DBA Data[Home] [Help]

APPS.GMF_API_WRP SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 85

 |           line from file. because of this API inserting last record only |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
  FUNCTION Create_Item_Cost
  (
  p_dir                 IN              VARCHAR2,
  p_input_file          IN              VARCHAR2,
  p_output_file         IN              VARCHAR2,
  p_delimiter           IN              VARCHAR2
  )
  RETURN VARCHAR2
  IS

    /******************
    * Local variables *
    ******************/
    l_status              VARCHAR2(11);
Line: 190

          l_this_lvl_tbl.delete ;
Line: 191

          l_lower_lvl_tbl.delete ;
Line: 192

          l_costcmpnt_ids.delete;
Line: 230

          l_this_lvl_tbl(l_idx).delete_mark          := Get_Field(l_line,l_delimiter,11) ;
Line: 273

          UTL_FILE.PUT_LINE(l_log_handle,'tl delete_mark('||l_idx||') = '||l_this_lvl_tbl(l_idx).delete_mark) ;
Line: 285

          l_lower_lvl_tbl(l_idx1).delete_mark          := Get_Field(l_line,l_delimiter,7) ;
Line: 302

            l_this_lvl_tbl.delete(l_idx);
Line: 305

            l_lower_lvl_tbl.delete(l_idx1);
Line: 384

          * Update error status *
          **********************/
          IF (l_status = 'U') THEN
            l_return_status  :=l_status;
Line: 460

 |    Update_Item_Cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Update item Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper procedure to call the                        |
 |    Update_Item_Cost API wrapper function                             |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    None                                                                  |
 |                                                                          |
 | HISTORY                                                                  |
 |    07-Mar-2001  Uday Moogala    created                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
  PROCEDURE Update_Item_Cost
  (
  p_dir                 IN              VARCHAR2,
  p_input_file          IN              VARCHAR2,
  p_output_file         IN              VARCHAR2,
  p_delimiter           IN              VARCHAR2
  )
  IS

    /******************
    * Local Variables *
    ******************/
    l_return_status  VARCHAR2(1);
Line: 502

    l_return_status  := Update_Item_Cost  (p_dir, p_input_file, p_output_file, p_delimiter);
Line: 503

  END Update_Item_Cost;
Line: 507

 |    Update_Item_Cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Update item Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper function to call the                         |
 |    Update_Item_Cost API.                                             |
 |    It reads item data from a flat file and outputs any error             |
 |    messages to a second flat file. It also generates a Status            |
 |    called gmf_aloc_wrapper.log in the temp directory.        |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    VARCHAR2 - 'S' All records processed successfully                     |
 |               'E' 1 or more records errored                              |
 |               'U' 1 or more record unexpected error                      |
 |                                                                          |
 | HISTORY                                                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
  FUNCTION Update_Item_Cost
  (
  p_dir                 IN              VARCHAR2,
  p_input_file          IN              VARCHAR2,
  p_output_file         IN              VARCHAR2,
  p_delimiter           IN              VARCHAR2
  )
  RETURN VARCHAR2
  IS

    /******************
    * Local variables *
    ******************/
    l_status              VARCHAR2(100);
Line: 652

          l_this_lvl_tbl.delete ;
Line: 653

          l_lower_lvl_tbl.delete ;
Line: 654

          l_costcmpnt_ids.delete;
Line: 695

          l_this_lvl_tbl(l_idx).delete_mark          := Get_Field(l_line,l_delimiter,11) ;
Line: 737

          UTL_FILE.PUT_LINE(l_log_handle,'tl delete_mark('||l_idx||') = '||l_this_lvl_tbl(l_idx).delete_mark) ;
Line: 750

          l_lower_lvl_tbl(l_idx1).delete_mark          := Get_Field(l_line,l_delimiter,7) ;
Line: 767

            l_this_lvl_tbl.delete(l_idx);
Line: 770

            l_lower_lvl_tbl.delete(l_idx1);
Line: 786

            GMF_ItemCost_PUB.Update_Item_Cost
            (
            p_api_version         =>      3.0,
            p_init_msg_list       =>      FND_API.G_TRUE,
            p_commit              =>      FND_API.G_TRUE,
            x_return_status       =>      l_status,
            x_msg_count           =>      l_count,
            x_msg_data            =>      l_data,
            p_header_rec          =>      l_header_rec,
            p_this_level_dtl_tbl  =>      l_this_lvl_tbl,
            p_lower_level_dtl_Tbl =>      l_lower_lvl_tbl
            );
Line: 806

        GMF_ItemCost_PUB.Update_Item_Cost
        (
        p_api_version         =>      3.0,
        p_init_msg_list       =>      FND_API.G_TRUE,
        p_commit              =>      FND_API.G_TRUE,
        x_return_status       =>      l_status,
        x_msg_count           =>      l_count,
        x_msg_data            =>      l_data,
        p_header_rec          =>      l_header_rec,
        p_this_level_dtl_tbl  =>      l_this_lvl_tbl,
        p_lower_level_dtl_Tbl =>      l_lower_lvl_tbl
        );
Line: 842

          * Update error status *
          **********************/
          IF (l_status = 'U') THEN
            l_return_status  :=l_status;
Line: 904

  END Update_Item_Cost;
Line: 909

 |    Delete_Item_Cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Delete item Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper procedure to call the                        |
 |    Delete_Item_Cost API wrapper function                             |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    None                                                                  |
 |                                                                          |
 | HISTORY                                                                  |
 |    07-Mar-2001  Uday Moogala    created                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
  PROCEDURE Delete_Item_Cost
  (
  p_dir                 IN              VARCHAR2,
  p_input_file          IN              VARCHAR2,
  p_output_file         IN              VARCHAR2,
  p_delimiter           IN              VARCHAR2
  )
  IS
    /******************
    * Local Variables *
    ******************/
    l_return_status  VARCHAR2(1);
Line: 950

    l_return_status  :=Delete_Item_Cost(p_dir, p_input_file, p_output_file, p_delimiter);
Line: 951

  End Delete_Item_Cost;
Line: 955

 |    Delete_Item_Cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Delete item Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper function to call the                         |
 |    Delete_Item_Cost API.                                             |
 |    It reads item data from a flat file and outputs any error             |
 |    messages to a second flat file. It also generates a Status            |
 |    called gmf_rsrc_wrapper.log in the temp directory.        |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    VARCHAR2 - 'S' All records processed successfully                     |
 |               'E' 1 or more records errored                              |
 |               'U' 1 or more record unexpected error                      |
 |                                                                          |
 | HISTORY                                                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
  FUNCTION Delete_Item_Cost
  (
  p_dir                 IN              VARCHAR2,
  p_input_file          IN              VARCHAR2,
  p_output_file         IN              VARCHAR2,
  p_delimiter           IN              VARCHAR2
  )
  RETURN VARCHAR2
  IS
    /******************
    * Local variables *
    ******************/
    l_status              VARCHAR2(100);
Line: 1092

          l_this_lvl_tbl.delete ;
Line: 1093

          l_lower_lvl_tbl.delete ;
Line: 1094

          l_costcmpnt_ids.delete;
Line: 1135

          l_this_lvl_tbl(l_idx).delete_mark          := Get_Field(l_line,l_delimiter,11) ;
Line: 1177

          UTL_FILE.PUT_LINE(l_log_handle,'tl delete_mark('||l_idx||') = '||l_this_lvl_tbl(l_idx).delete_mark) ;
Line: 1190

          l_lower_lvl_tbl(l_idx1).delete_mark          := Get_Field(l_line,l_delimiter,7) ;
Line: 1207

            l_this_lvl_tbl.delete(l_idx);
Line: 1210

            l_lower_lvl_tbl.delete(l_idx1);
Line: 1226

            GMF_ItemCost_PUB.Delete_Item_Cost
            (
            p_api_version         =>      3.0,
            p_init_msg_list       =>      FND_API.G_TRUE,
            p_commit              =>      FND_API.G_TRUE,
            x_return_status       =>      l_status,
            x_msg_count           =>      l_count,
            x_msg_data            =>      l_data,
            p_header_rec          =>      l_header_rec,
            p_this_level_dtl_tbl  =>      l_this_lvl_tbl,
            p_lower_level_dtl_Tbl =>      l_lower_lvl_tbl
            );
Line: 1246

        GMF_ItemCost_PUB.Delete_Item_Cost
        (
        p_api_version         =>      3.0,
        p_init_msg_list       =>      FND_API.G_TRUE,
        p_commit              =>      FND_API.G_TRUE,
        x_return_status       =>      l_status,
        x_msg_count           =>      l_count,
        x_msg_data            =>      l_data,
        p_header_rec          =>      l_header_rec,
        p_this_level_dtl_tbl  =>      l_this_lvl_tbl,
        p_lower_level_dtl_Tbl =>      l_lower_lvl_tbl
        );
Line: 1283

          * Update error status *
          **********************/
          IF (l_status = 'U') THEN
            l_return_status  :=l_status;
Line: 1345

  END Delete_Item_Cost;
Line: 1575

            * Update error status *
            **********************/
            IF (l_status = 'U') THEN
              l_return_status  :=l_status;
Line: 1715

 |    Create/Insert, Update or Delete Actual Cost Adjustment                  |
 |                                                                            |
 | DESCRIPTION                                                                |
 |    This is a PL/SQL wrapper function to call the                           |
 |    Call_ActualCost_API.							                                      |
 |    It reads item data from a flat file and outputs any error               |
 |    messages to a second flat file. It also generates a Status              |
 |    called gmf_api__wrapper.log in the /tmp directory|
 |                                                                            |
 | PARAMETERS                                                                 |
 |    p_dir              IN VARCHAR2         - Working directory for input    |
 |                                             and output files.              |
 |    p_input_file       IN VARCHAR2         - Name of input file             |
 |    p_output_file      IN VARCHAR2         - Name of output file            |
 |    p_delimiter        IN VARCHAR2         - Delimiter character            |
 |    p_operation	  IN VARCHAR2	     - Operation to be performed              |
 |									                                                          |
 | RETURNS                                                                    |
 |    VARCHAR2 - 'S' All records processed successfully                       |
 |               'E' 1 or more records errored                                |
 |               'U' 1 or more record unexpected error                        |
 |                                                                            |
 | HISTORY                                                                    |
 |    30-Oct-2005     Anand Thiyagarajan      Created                         |
 |                                                                            |
 +============================================================================+
  Api end of comments
*/
  FUNCTION Process_ActualCost_Adjustment
  (
  p_dir                   IN            VARCHAR2,
  p_input_file            IN            VARCHAR2,
  p_output_file           IN            VARCHAR2,
  p_delimiter             IN            VARCHAR2,
  p_operation             IN            VARCHAR2
  )
  RETURN VARCHAR2
  IS

    /******************
    * Local variables *
    ******************/
    l_status              VARCHAR2(11);
Line: 1792

    IF p_operation = 'INSERT' THEN
      l_log_name := 'gmf_api_crtacadj_wrapper' ;
Line: 1794

    ELSIF p_operation = 'UPDATE' THEN
      l_log_name := 'gmf_api_updacadj_wrapper' ;
Line: 1796

    ELSIF p_operation = 'DELETE' THEN
      l_log_name := 'gmf_api_delacadj_wrapper' ;
Line: 1856

          l_adjustment_rec.delete_mark          :=	 Get_Field(l_line,l_delimiter,19);
Line: 1929

          * Update error status *
          **********************/
          IF (l_status = 'U') THEN
            l_return_status  :=l_status;
Line: 2008

 |    p_operation	    IN VARCHAR2         - Insert/Update/Delete		            |
 |    x_status              OUT VARCHAR2        - Return Status			            |
 |    x_count               OUT VARCHAR2        - # of msgs on message stack	  |
 |    x_data                OUT VARCHAR2        - Actual Message from msg stack	|
 |										                                                          |
 |										                                                          |
 | HISTORY									                                                    |
 |     30-Oct-2005 Anand Thiyagarajan Created                                   |
 +==============================================================================+
*/

  PROCEDURE Call_ActualCost_API
  (
  p_adjustment_rec		      IN  OUT   NOCOPY    GMF_ACTUAL_COST_ADJUSTMENT_PUB.ADJUSTMENT_REC_TYPE,
  p_operation               IN			            VARCHAR2,
  x_status                      OUT		NOCOPY	  VARCHAR2,
  x_count                       OUT		NOCOPY	  NUMBER,
  x_data                        OUT		NOCOPY	  VARCHAR2
  )
  IS
  BEGIN
    IF p_operation = 'INSERT' THEN
      GMF_ACTUAL_COST_ADJUSTMENT_PUB.CREATE_ACTUAL_COST_ADJUSTMENT
      (
      p_api_version			        =>              1.0,
      p_init_msg_list		        =>              FND_API.G_TRUE,
      p_commit		              =>              FND_API.G_TRUE,
      x_return_status		        =>              x_status,
      x_msg_count			          =>              x_count,
      x_msg_data			          =>              x_data,
      p_adjustment_rec			    =>              p_adjustment_rec
      );
Line: 2040

    ELSIF p_operation = 'UPDATE' THEN
      GMF_ACTUAL_COST_ADJUSTMENT_PUB.UPDATE_ACTUAL_COST_ADJUSTMENT
      (
      p_api_version			        =>              1.0,
      p_init_msg_list		        =>              FND_API.G_TRUE,
      p_commit		              =>              FND_API.G_TRUE,
      x_return_status		        =>              x_status,
      x_msg_count			          =>              x_count,
      x_msg_data			          =>              x_data,
      p_adjustment_rec			    =>              p_adjustment_rec
      );
Line: 2051

    ELSIF p_operation = 'DELETE' THEN
      GMF_ACTUAL_COST_ADJUSTMENT_PUB.DELETE_ACTUAL_COST_ADJUSTMENT
      (
      p_api_version			        =>              1.0,
      p_init_msg_list		        =>              FND_API.G_TRUE,
      p_commit		              =>              FND_API.G_TRUE,
      x_return_status		        =>              x_status,
      x_msg_count			          =>              x_count,
      x_msg_data			          =>              x_data,
      p_adjustment_rec			    =>              p_adjustment_rec
      );
Line: 2201

        l_adjustment_rec.delete_mark          :=	 Get_Field(l_line,l_delimiter,19);
Line: 2273

          * Update error status *
          **********************/
          IF (l_status = 'U') THEN
            l_return_status  :=l_status;
Line: 2541

  alloc_rec.delete_mark         := Get_Field(l_line,l_delimiter,19) ;
Line: 2559

  UTL_FILE.PUT_LINE(l_log_handle, 'delete_mark  	= ' || alloc_rec.delete_mark) ;
Line: 2603

   /*  Update error status */
    IF (l_status = 'U')
    THEN
      l_return_status  :=l_status;
Line: 2694

 |    Update_Alloc_Def                                                      |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Update Allocation Definition                                          |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper procedure to call the                        |
 |    Update_Alloc_Def API wrapper function                                 |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    None                                                                  |
 |                                                                          |
 | HISTORY                                                                  |
 |    07-Mar-2001  Uday Moogala    created                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
PROCEDURE Update_Alloc_Def
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
IS

l_return_status  VARCHAR2(1);
Line: 2735

l_return_status  :=Update_Alloc_Def( p_dir
                                     , p_input_file
                                     , p_output_file
                                     , p_delimiter
                                   );
Line: 2742

End Update_Alloc_Def;
Line: 2746

 |    Update_Alloc_Def                                                      |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Update Allocation Definition                                          |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper function to call the                         |
 |    Update_Allocation_definition API.                                     |
 |    It reads item data from a flat file and outputs any error             |
 |    messages to a second flat file. It also generates a Status            |
 |    called gmf_aloc_wrapper.log in the temp directory.        |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    VARCHAR2 - 'S' All records processed successfully                     |
 |               'E' 1 or more records errored                              |
 |               'U' 1 or more record unexpected error                      |
 |                                                                          |
 | HISTORY                                                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
FUNCTION Update_Alloc_Def
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
RETURN VARCHAR2
IS

/* Local variables */

l_status             VARCHAR2(100);
Line: 2891

  alloc_rec.delete_mark         := Get_Field(l_line,l_delimiter,19) ;
Line: 2911

  UTL_FILE.PUT_LINE(l_log_handle, 'delete_mark          = ' || alloc_rec.delete_mark) ;
Line: 2915

  GMF_ALLOCATIONDEFINITION_PUB.Update_Allocation_Definition
  ( p_api_version    => 3.0
  , p_init_msg_list  => FND_API.G_TRUE
  , p_commit         => FND_API.G_TRUE

  , x_return_status  =>l_status
  , x_msg_count      =>l_count
  , x_msg_data       =>l_data

  , p_allocation_definition_rec => alloc_rec
  );
Line: 2957

  /*  Update error status */
    IF (l_status = 'U')
    THEN
      l_return_status  :=l_status;
Line: 3042

END Update_Alloc_Def;
Line: 3047

 |    Delete_Alloc_def                                                      |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Delete Allocation Definition                                          |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper procedure to call the                        |
 |    Delete_Alloc_def API wrapper function                                 |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    None                                                                  |
 |                                                                          |
 | HISTORY                                                                  |
 |    07-Mar-2001  Uday Moogala    created                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
PROCEDURE Delete_Alloc_def
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
IS

l_return_status  VARCHAR2(1);
Line: 3088

l_return_status  :=Delete_Alloc_def( p_dir
                                     , p_input_file
                                     , p_output_file
                                     , p_delimiter
                                   );
Line: 3095

End Delete_Alloc_def;
Line: 3099

 |    Delete_Alloc_def                                                      |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Delete Allocation Definition                                          |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper function to call the                         |
 |    Delete_Allocation_definition API.                                     |
 |    It reads item data from a flat file and outputs any error             |
 |    messages to a second flat file. It also generates a Status            |
 |    called gmf_aloc_wrapper.log in the temp directory.        |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    VARCHAR2 - 'S' All records processed successfully                     |
 |               'E' 1 or more records errored                              |
 |               'U' 1 or more record unexpected error                      |
 |                                                                          |
 | HISTORY                                                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
FUNCTION Delete_Alloc_def
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
RETURN VARCHAR2
IS

/* Local variables */

l_status             VARCHAR2(100);
Line: 3244

  alloc_rec.delete_mark         := Get_Field(l_line,l_delimiter,19) ;
Line: 3264

  UTL_FILE.PUT_LINE(l_log_handle, 'delete_mark          = ' || alloc_rec.delete_mark) ;
Line: 3268

  GMF_ALLOCATIONDEFINITION_PUB.Delete_Allocation_Definition
  ( p_api_version    => 3.0
  , p_init_msg_list  => FND_API.G_TRUE
  , p_commit         => FND_API.G_TRUE

  , x_return_status  =>l_status
  , x_msg_count      =>l_count
  , x_msg_data       =>l_data

  , p_allocation_definition_rec => alloc_rec
  );
Line: 3301

  /*  Update error status */
    IF (l_status = 'U')
    THEN
      l_return_status  :=l_status;
Line: 3388

END Delete_Alloc_def;
Line: 3453

 |    Create/Insert, Update or Delete Lot Cost Adjustment                     |
 |                                                                            |
 | DESCRIPTION                                                                |
 |    This is a PL/SQL wrapper function to call the                           |
 |    Call_LotCost_API.							      |
 |    It reads item data from a flat file and outputs any error               |
 |    messages to a second flat file. It also generates a Status              |
 |    called gmf_api__wrapper.log in the /tmp directory|
 |                                                                            |
 | PARAMETERS                                                                 |
 |    p_dir              IN VARCHAR2         - Working directory for input    |
 |                                             and output files.              |
 |    p_input_file       IN VARCHAR2         - Name of input file             |
 |    p_output_file      IN VARCHAR2         - Name of output file            |
 |    p_delimiter        IN VARCHAR2         - Delimiter character            |
 |    p_operation	  IN VARCHAR2	     - Operation to be performed      |
 |									      |
 | RETURNS                                                                    |
 |    VARCHAR2 - 'S' All records processed successfully                       |
 |               'E' 1 or more records errored                                |
 |               'U' 1 or more record unexpected error                        |
 |                                                                            |
 | HISTORY                                                                    |
 |                                                                            |
 +============================================================================+
  Api end of comments
*/
FUNCTION Process_LotCost_Adjustment
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
, p_operation    IN VARCHAR2
)
RETURN VARCHAR2
IS

/* Local variables */


l_status             VARCHAR2(11);
Line: 3537

  IF p_operation = 'INSERT' THEN
    l_log_name := 'gmf_api_crtlcadj_wrapper' ;
Line: 3539

  ELSIF p_operation = 'UPDATE' THEN
    l_log_name := 'gmf_api_updlcadj_wrapper' ;
Line: 3541

  ELSIF p_operation = 'DELETE' THEN
    l_log_name := 'gmf_api_dellcadj_wrapper' ;
Line: 3623

              l_header_rec.delete_mark			:=	 Get_Field(l_line,l_delimiter,13);
Line: 3656

      	l_dtl_tbl.DELETE ;
Line: 3698

          l_dtl_tbl.DELETE(l_idx);
Line: 3771

          /*  Update error status */
          IF (l_status = 'U') THEN
            l_return_status  :=l_status;
Line: 3867

 |    p_operation	    IN VARCHAR2         - Insert/Update/Delete		|
 |    x_status              OUT VARCHAR2        - Return Status			|
 |    x_count               OUT VARCHAR2        - # of msgs on message stack	|
 |    x_data                OUT VARCHAR2        - Actual Message from msg stack	|
 |										|
 |										|
 | HISTORY									|
 |     Created by dvadivel on 5-Apr-2004                                        |
 +==============================================================================+
*/

PROCEDURE Call_LotCost_API
(
  p_header_rec		  IN OUT	NOCOPY GMF_LOTCOSTADJUSTMENT_PUB.Lc_Adjustment_Header_Rec_Type
, p_dtl_tbl		  IN OUT	NOCOPY GMF_LOTCOSTADJUSTMENT_PUB.Lc_Adjustment_Dtls_Tbl_Type
, p_operation             IN			VARCHAR2
, x_status                OUT		NOCOPY	VARCHAR2
, x_count                 OUT		NOCOPY	NUMBER
, x_data                  OUT		NOCOPY	VARCHAR2
)
IS

BEGIN

 IF p_operation = 'INSERT' THEN
   GMF_LotCostAdjustment_PUB.Create_LotCost_Adjustment
	( p_api_version		=>	2.0
	, p_init_msg_list	=>	FND_API.G_TRUE
	, p_commit		=>	FND_API.G_TRUE
	, x_return_status	=>	x_status
	, x_msg_count		=>	x_count
	, x_msg_data		=>	x_data
	, p_header_rec		=>	p_header_rec
	, p_dtl_Tbl		=>	p_dtl_tbl
	);
Line: 3902

 ELSIF p_operation = 'UPDATE' THEN
   GMF_LotCostAdjustment_PUB.Update_LotCost_Adjustment
	( p_api_version		=>	2.0
	, p_init_msg_list	=>	FND_API.G_TRUE
	, p_commit		=>	FND_API.G_TRUE
	, x_return_status	=>	x_status
	, x_msg_count		=>	x_count
	, x_msg_data		=>	x_data
	, p_header_rec		=>	p_header_rec
	, p_dtl_Tbl		=>	p_dtl_tbl
	);
Line: 3913

 ELSIF p_operation = 'DELETE' THEN
   GMF_LotCostAdjustment_PUB.Delete_LotCost_Adjustment
	( p_api_version		=>	2.0
	, p_init_msg_list	=>	FND_API.G_TRUE
	, p_commit		=>	FND_API.G_TRUE
	, x_return_status	=>	x_status
	, x_msg_count		=>	x_count
	, x_msg_data		=>	x_data
	, p_header_rec		=>	p_header_rec
	, p_dtl_Tbl		=>	p_dtl_tbl
	);
Line: 4070

      l_dtl_tbl.delete ;
Line: 4094

        l_header_rec.delete_mark			:=	 Get_Field(l_line,l_delimiter,13);
Line: 4165

        /*  Update error status */
        IF (l_status = 'U') THEN
          l_return_status  :=l_status;
Line: 4197

    l_dtl_tbl.delete ;
Line: 4375

  IF p_operation = 'INSERT' THEN
    l_log_name := 'gmf_api_crbrdn_wrapper' ;
Line: 4377

  ELSIF p_operation = 'UPDATE' THEN
    l_log_name := 'gmf_api_updbrdn_wrapper' ;
Line: 4379

  ELSIF p_operation = 'DELETE' THEN
    l_log_name := 'gmf_api_delbrdn_wrapper' ;
Line: 4435

      l_dtl_tbl.delete ;
Line: 4473

      l_dtl_tbl(l_idx).delete_mark          := Get_Field(l_line,l_delimiter,12) ;
Line: 4488

      UTL_FILE.PUT_LINE(l_log_handle,'DtlRec: delete_mark('||l_idx||') = '||l_dtl_tbl(l_idx).delete_mark) ;
Line: 4500

      l_dtl_tbl.delete(l_idx);
Line: 4573

        /*  Update error status */
        IF (l_status = 'U') THEN
          l_return_status  :=l_status;
Line: 4602

      l_burdenline_ids.delete ;
Line: 4851

      l_dtl_tbl.delete ;
Line: 4908

        /*  Update error status */
        IF (l_status = 'U') THEN
          l_return_status  :=l_status;
Line: 4944

			' Delete Mark : ' || l_dtl_tbl(i).Delete_Mark
                       );
Line: 4947

    l_dtl_tbl.delete ;
Line: 5030

 |    p_operation        IN VARCHAR2         - Insert/Update/Delete         |
 |    x_burdenline_ids   OUT VARCHAR2        - Inserted burdenline_ids      |
 |    x_status           OUT VARCHAR2        - Return Status                |
 |    x_count            OUT VARCHAR2        - # of msgs on message stack   |
 |    x_data             OUT VARCHAR2        - Actual Message from msg stack|
 |                                                                          |
 | RETURNS                                                                  |
 |    VARCHAR2 - 'S' All records processed successfully                     |
 |               'E' 1 or more records errored                              |
 |               'U' 1 or more record unexpected error                      |
 |                                                                          |
 | HISTORY                                                                  |
 |                                                                          |
 +==========================================================================+
*/
PROCEDURE Call_Burden_API
(
  p_burden_header    IN  GMF_BurdenDetails_PUB.Burden_Header_Rec_Type
, p_burden_detail    IN  GMF_BurdenDetails_PUB.Burden_Dtl_Tbl_Type
, p_operation        IN  VARCHAR2
, x_burdenline_ids   OUT NOCOPY GMF_BurdenDetails_PUB.Burdenline_Ids_Tbl_Type
, x_status           OUT NOCOPY VARCHAR2
, x_count            OUT NOCOPY NUMBER
, x_data             OUT NOCOPY VARCHAR2
)
IS

BEGIN

 IF p_operation = 'INSERT' THEN
   GMF_BurdenDetails_PUB.Create_Burden_Details
   (
     p_api_version        =>  2.0
   , p_init_msg_list      =>  FND_API.G_TRUE
   , p_commit             =>  FND_API.G_TRUE

   , x_return_status      =>  x_status
   , x_msg_count          =>  x_count
   , x_msg_data           =>  x_data

   , p_header_rec         =>  p_burden_header
   , p_dtl_tbl            =>  p_burden_detail

   , x_burdenline_ids     =>  x_burdenline_ids
   );
Line: 5075

 ELSIF p_operation = 'UPDATE' THEN
   GMF_BurdenDetails_PUB.Update_Burden_Details
   (
     p_api_version        =>  2.0
   , p_init_msg_list      =>  FND_API.G_TRUE
   , p_commit             =>  FND_API.G_TRUE

   , x_return_status      =>  x_status
   , x_msg_count          =>  x_count
   , x_msg_data           =>  x_data

   , p_header_rec         =>  p_burden_header
   , p_dtl_tbl            =>  p_burden_detail
   );
Line: 5089

 ELSIF p_operation = 'DELETE' THEN
   GMF_BurdenDetails_PUB.Delete_Burden_Details
   (
     p_api_version        =>  2.0
   , p_init_msg_list      =>  FND_API.G_TRUE
   , p_commit             =>  FND_API.G_TRUE

   , x_return_status      =>  x_status
   , x_msg_count          =>  x_count
   , x_msg_data           =>  x_data

   , p_header_rec         =>  p_burden_header
   , p_dtl_tbl            =>  p_burden_detail
   );
Line: 5301

  rsrc_rec.delete_mark         := Get_Field(l_line,l_delimiter,12) ;
Line: 5315

  UTL_FILE.PUT_LINE(l_log_handle, 'delete_mark   = ' || rsrc_rec.delete_mark);
Line: 5359

    /*  Update error status */
      IF (l_status = 'U')
      THEN
        l_return_status  :=l_status;
Line: 5450

 |    Update_resource_cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Update Resource Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper procedure to call the                        |
 |    Update_resource_cost API wrapper function                             |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    None                                                                  |
 |                                                                          |
 | HISTORY                                                                  |
 |    07-Mar-2001  Uday Moogala    created                                  |

 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
PROCEDURE Update_resource_cost
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
IS

l_return_status  VARCHAR2(1);
Line: 5492

l_return_status  :=Update_resource_cost( p_dir
                                     , p_input_file
                                     , p_output_file
                                     , p_delimiter
                                   );
Line: 5499

END Update_resource_cost;
Line: 5503

 |    Update_resource_cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Update Resource Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper function to call the                         |
 |    Update_Resource_Cost API.                                             |
 |    It reads item data from a flat file and outputs any error             |
 |    messages to a second flat file. It also generates a Status            |
 |    called gmf_aloc_wrapper.log in the temp directory.        |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    VARCHAR2 - 'S' All records processed successfully                     |
 |               'E' 1 or more records errored                              |
 |               'U' 1 or more record unexpected error                      |
 |                                                                          |
 | HISTORY                                                                  |
 | 21-Oct-2005 Prasad marada Modified the procedure as per the record type  |
 |                           changes in resource cost public packages       |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
FUNCTION Update_resource_cost
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
RETURN VARCHAR2
IS

/* Local variables */

l_status             VARCHAR2(100);
Line: 5642

      rsrc_rec.delete_mark         := Get_Field(l_line,l_delimiter,12) ;
Line: 5656

      UTL_FILE.PUT_LINE(l_log_handle, 'delete_mark   = ' || rsrc_rec.delete_mark);
Line: 5660

  GMF_ResourceCost_PUB.Update_Resource_Cost
  ( p_api_version    => 2.0
  , p_init_msg_list  => FND_API.G_TRUE
  , p_commit         => FND_API.G_TRUE

  , x_return_status  =>l_status
  , x_msg_count      =>l_count
  , x_msg_data       =>l_data

  , p_Resource_Cost_rec => rsrc_rec
  );
Line: 5702

    /*  Update error status */
      IF (l_status = 'U')
      THEN
        l_return_status  :=l_status;
Line: 5789

END Update_resource_cost;
Line: 5794

 |    Delete_resource_cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Delete Resource Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper procedure to call the                        |
 |    Delete_resource_cost API wrapper function                             |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    None                                                                  |
 |                                                                          |
 | HISTORY                                                                  |
 |    07-Mar-2001  Uday Moogala    created                                  |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
PROCEDURE Delete_resource_cost
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
IS

l_return_status  VARCHAR2(1);
Line: 5835

l_return_status  :=Delete_resource_cost( p_dir
                                     , p_input_file
                                     , p_output_file
                                     , p_delimiter
                                   );
Line: 5842

END Delete_resource_cost;
Line: 5846

 |    Delete_resource_cost                                                  |
 |                                                                          |
 | TYPE                                                                     |
 |    Public                                                                |
 |                                                                          |
 | USAGE                                                                    |
 |    Delete Resource Cost                                                  |
 |                                                                          |
 | DESCRIPTION                                                              |
 |    This is a PL/SQL wrapper function to call the                         |
 |    Delete_Resource_Cost API.                                             |
 |    It reads item data from a flat file and outputs any error             |
 |    messages to a second flat file. It also generates a Status            |
 |    called gmf_rsrc_wrapper.log in the temp directory.        |
 |                                                                          |
 | PARAMETERS                                                               |
 |    p_dir              IN VARCHAR2         - Working directory for input  |
 |                                             and output files.            |
 |    p_input_file       IN VARCHAR2         - Name of input file           |
 |    p_output_file      IN VARCHAR2         - Name of output file          |
 |    p_delimiter        IN VARCHAR2         - Delimiter character          |
 |                                                                          |
 | RETURNS                                                                  |
 |    VARCHAR2 - 'S' All records processed successfully                     |
 |               'E' 1 or more records errored                              |
 |               'U' 1 or more record unexpected error                      |
 |                                                                          |
 | HISTORY                                                                  |
 | 21-Oct-2005 Prasad marada Modified the procedure as per the record type  |
 |                           changes in resource cost public packages       |
 |                                                                          |
 +==========================================================================+
  Api end of comments
*/
FUNCTION Delete_resource_cost
( p_dir          IN VARCHAR2
, p_input_file   IN VARCHAR2
, p_output_file  IN VARCHAR2
, p_delimiter    IN VARCHAR2
)
RETURN VARCHAR2
IS

/* Local variables */

l_status             VARCHAR2(100);
Line: 5986

  rsrc_rec.delete_mark         := Get_Field(l_line,l_delimiter,12) ;
Line: 6000

  UTL_FILE.PUT_LINE(l_log_handle, 'delete_mark   = ' || rsrc_rec.delete_mark);
Line: 6004

  GMF_ResourceCost_PUB.Delete_Resource_Cost
  ( p_api_version    => 2.0
  , p_init_msg_list  => FND_API.G_TRUE
  , p_commit         => FND_API.G_TRUE

  , x_return_status  =>l_status
  , x_msg_count      =>l_count
  , x_msg_data       =>l_data

  , p_Resource_Cost_rec => rsrc_rec
  );
Line: 6037

    /*  Update error status */
      IF (l_status = 'U')
      THEN
        l_return_status  :=l_status;
Line: 6123

END Delete_resource_cost;
Line: 6320

    rsrc_rec.delete_mark         := Get_Field(l_line,l_delimiter,12) ;
Line: 6334

    UTL_FILE.PUT_LINE(l_log_handle, 'delete_mark   = ' || rsrc_rec.delete_mark);
Line: 6370

        /*  Update error status */
          IF (l_status = 'U')
          THEN
            l_return_status  :=l_status;
Line: 6396

                       ' Delete Mark : '     || x_rsrc_rec.delete_mark ||
                       ' User Name : '       || x_rsrc_rec.user_name
                       ) ;