<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: USE BAPI  BAPI_ROUTING_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248237#M144227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method serves to create routings with all their subordinated objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, you can generate a key date view as well as the complete history of a routing. The latter is particularly useful for data transfers from non-SAP systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;You want to create a routing with its sequences, operations and inspection characteristics on the key date 01.01.2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You generate an entry for each object in the following table by always entering the date 01.01.2000 in the attribute VALID_FROM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TASK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter the relevant task list header data here. The attributes TASK_LIST_GROUP and GROUP_COUNTER only have to be supplied if you work with external number assignment. For internal number assignment the task list group and the group counter are determined automatically.&lt;/P&gt;&lt;P&gt;SEQUENCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, only entries for alternative or parallel sequences are allowed. The standard sequence of a routing is always generated automatically and therefore does not have to be entered. Here also, the attributes TASK_LIST_GROUP and GROUP_COUNTER need only be supplied in the case of external number assignment.&lt;/P&gt;&lt;P&gt;OPERATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You generate an entry for each operation in this table. To identify the operations, you have to enter an external operation identifier in the field OPERATION_ID. This identifier has to contain at least one character that is not a number (such as VORG0010). This external identifier is used by the definition of the alternative or parallel sequences to identify the corresponding branch or return operation. You only have to supply the TASK_LIST_GROUP and GROUP_COUNTER in the case of external number assignment.&lt;/P&gt;&lt;P&gt;INSPCHARACTERISTIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You generate an entry for each inspection characteristic in this table. To identify the inspection characteristics you have to enter an inspection characteristic number in the field INSPCHAR. You can create inspection characteristics with or without reference to a master inspection characteristic. In the field CHA_MASTER_IMPORT_MODUS (Modus for the reference to the master inspection characteristic) enter the reference to the master inspection characteristic: 'L' for reference. In this case, the master inspection characteristic has to be completely maintained. In the parameter INSPCHARACTERISTIC you only have to supply those fields that could not be copied from the master inspection characteristic; 'C' for copy the data from the master inspection characteristic into the inspection characteristic, 'N' for create a lockable and unlockable reference to the master inspection characteristic without a data transfer from the master inspection characteristic. In this case manually fill out all fields in the parameter INSPCHARACTERISTIC.&lt;/P&gt;&lt;P&gt;You can either transfer the inspection characteristic control indicator directly from the master inspection characteristic, enter it individually or in the field PRESET_CTRL_INDS_KEY you enter a key for the control indicator if you have stored this key in Customizing.&lt;/P&gt;&lt;P&gt;If you have individually entered a control indicator, note the following special features:&lt;/P&gt;&lt;P&gt;SCOPE_IND: Inspection scope. This indicator can have different&lt;/P&gt;&lt;P&gt;characteristics:&lt;/P&gt;&lt;P&gt;You set " " for: Free inspection scope&lt;/P&gt;&lt;P&gt;You set "&amp;lt;" for: Smaller inspection scope permitted&lt;/P&gt;&lt;P&gt;You set "&amp;gt;" for: Larger inspection scope permitted&lt;/P&gt;&lt;P&gt;You set "=" for: Defined inspection scope&lt;/P&gt;&lt;P&gt;RESULT_RECORDING_TYPE: Record entry type. This indicator can have different characteristics:&lt;/P&gt;&lt;P&gt;You set "-" for: No record entry&lt;/P&gt;&lt;P&gt;You set "*" for: Classified record entry&lt;/P&gt;&lt;P&gt;You set "+" for: Single record entry&lt;/P&gt;&lt;P&gt;You set " " for: Summarized record entry&lt;/P&gt;&lt;P&gt;DOCU_REQU: Documentation required for check results. This indicator can&lt;/P&gt;&lt;P&gt;have different characteristics:&lt;/P&gt;&lt;P&gt;You set " " for: No documention required&lt;/P&gt;&lt;P&gt;You set "." for: Documentation for rejection&lt;/P&gt;&lt;P&gt;You set "+" for: Document all check results&lt;/P&gt;&lt;P&gt;You set "+" for: Document all check results.&lt;/P&gt;&lt;P&gt;CONFIRMATION_CATEGORY Characteristic category&lt;/P&gt;&lt;P&gt;You set " " for: Optional characteristic&lt;/P&gt;&lt;P&gt;You set "+" for: Limited to the acceptance of the previous mandatory characteristic&lt;/P&gt;&lt;P&gt;You set "-" for: Limited to the rejection of the previous mandatory characteristic&lt;/P&gt;&lt;P&gt;You set "X" for: Mandatory characteristic&lt;/P&gt;&lt;P&gt;PRINT_IND: Print control&lt;/P&gt;&lt;P&gt;This indicator can have different characteristics:&lt;/P&gt;&lt;P&gt;You set " " for: Print&lt;/P&gt;&lt;P&gt;You set "x" for: Do not print&lt;/P&gt;&lt;P&gt;You set "*" for: Do not print at skip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to assign an inspection equipment to the inspection characteristic in the field ITEM_NO_OF_PRODUCTION_RESOURCE, note that this has to be assigned to the operation in the PARAMETER PRODUCTIONRESOURCE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;Provided that during the data transfer no errors can be found, the export parameters GROUP and GROUPCOUNTER contain the key for the generated task list. To secure the data in the database, you now have to carry out a COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All error that occur are logged in the external parameter RETURN. In the case of inconsistencies, the entire routing to be generated is rejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;P&gt;pls. reward appropriate points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Mar 2006 11:51:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-03T11:51:27Z</dc:date>
    <item>
      <title>USE BAPI  BAPI_ROUTING_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248236#M144226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;THIS IS FIRST TIME I AM USING BAPI FOR CREATING ROUTING .&lt;/P&gt;&lt;P&gt;I NEED HELP REGARDING DATA DECLERATION THAT I NEED TO TRANSFER TO THE FUNCTION MODULE,&lt;/P&gt;&lt;P&gt;A HELP IS NEEDED SO THAT I CAN START.PLEASE TELL ME HOW TO PROCEDE TO UPLOAD DATA USING BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLEASE HELP ME.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2006 11:25:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248236#M144226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-03T11:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: USE BAPI  BAPI_ROUTING_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248237#M144227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method serves to create routings with all their subordinated objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, you can generate a key date view as well as the complete history of a routing. The latter is particularly useful for data transfers from non-SAP systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;You want to create a routing with its sequences, operations and inspection characteristics on the key date 01.01.2000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You generate an entry for each object in the following table by always entering the date 01.01.2000 in the attribute VALID_FROM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TASK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter the relevant task list header data here. The attributes TASK_LIST_GROUP and GROUP_COUNTER only have to be supplied if you work with external number assignment. For internal number assignment the task list group and the group counter are determined automatically.&lt;/P&gt;&lt;P&gt;SEQUENCE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, only entries for alternative or parallel sequences are allowed. The standard sequence of a routing is always generated automatically and therefore does not have to be entered. Here also, the attributes TASK_LIST_GROUP and GROUP_COUNTER need only be supplied in the case of external number assignment.&lt;/P&gt;&lt;P&gt;OPERATION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You generate an entry for each operation in this table. To identify the operations, you have to enter an external operation identifier in the field OPERATION_ID. This identifier has to contain at least one character that is not a number (such as VORG0010). This external identifier is used by the definition of the alternative or parallel sequences to identify the corresponding branch or return operation. You only have to supply the TASK_LIST_GROUP and GROUP_COUNTER in the case of external number assignment.&lt;/P&gt;&lt;P&gt;INSPCHARACTERISTIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You generate an entry for each inspection characteristic in this table. To identify the inspection characteristics you have to enter an inspection characteristic number in the field INSPCHAR. You can create inspection characteristics with or without reference to a master inspection characteristic. In the field CHA_MASTER_IMPORT_MODUS (Modus for the reference to the master inspection characteristic) enter the reference to the master inspection characteristic: 'L' for reference. In this case, the master inspection characteristic has to be completely maintained. In the parameter INSPCHARACTERISTIC you only have to supply those fields that could not be copied from the master inspection characteristic; 'C' for copy the data from the master inspection characteristic into the inspection characteristic, 'N' for create a lockable and unlockable reference to the master inspection characteristic without a data transfer from the master inspection characteristic. In this case manually fill out all fields in the parameter INSPCHARACTERISTIC.&lt;/P&gt;&lt;P&gt;You can either transfer the inspection characteristic control indicator directly from the master inspection characteristic, enter it individually or in the field PRESET_CTRL_INDS_KEY you enter a key for the control indicator if you have stored this key in Customizing.&lt;/P&gt;&lt;P&gt;If you have individually entered a control indicator, note the following special features:&lt;/P&gt;&lt;P&gt;SCOPE_IND: Inspection scope. This indicator can have different&lt;/P&gt;&lt;P&gt;characteristics:&lt;/P&gt;&lt;P&gt;You set " " for: Free inspection scope&lt;/P&gt;&lt;P&gt;You set "&amp;lt;" for: Smaller inspection scope permitted&lt;/P&gt;&lt;P&gt;You set "&amp;gt;" for: Larger inspection scope permitted&lt;/P&gt;&lt;P&gt;You set "=" for: Defined inspection scope&lt;/P&gt;&lt;P&gt;RESULT_RECORDING_TYPE: Record entry type. This indicator can have different characteristics:&lt;/P&gt;&lt;P&gt;You set "-" for: No record entry&lt;/P&gt;&lt;P&gt;You set "*" for: Classified record entry&lt;/P&gt;&lt;P&gt;You set "+" for: Single record entry&lt;/P&gt;&lt;P&gt;You set " " for: Summarized record entry&lt;/P&gt;&lt;P&gt;DOCU_REQU: Documentation required for check results. This indicator can&lt;/P&gt;&lt;P&gt;have different characteristics:&lt;/P&gt;&lt;P&gt;You set " " for: No documention required&lt;/P&gt;&lt;P&gt;You set "." for: Documentation for rejection&lt;/P&gt;&lt;P&gt;You set "+" for: Document all check results&lt;/P&gt;&lt;P&gt;You set "+" for: Document all check results.&lt;/P&gt;&lt;P&gt;CONFIRMATION_CATEGORY Characteristic category&lt;/P&gt;&lt;P&gt;You set " " for: Optional characteristic&lt;/P&gt;&lt;P&gt;You set "+" for: Limited to the acceptance of the previous mandatory characteristic&lt;/P&gt;&lt;P&gt;You set "-" for: Limited to the rejection of the previous mandatory characteristic&lt;/P&gt;&lt;P&gt;You set "X" for: Mandatory characteristic&lt;/P&gt;&lt;P&gt;PRINT_IND: Print control&lt;/P&gt;&lt;P&gt;This indicator can have different characteristics:&lt;/P&gt;&lt;P&gt;You set " " for: Print&lt;/P&gt;&lt;P&gt;You set "x" for: Do not print&lt;/P&gt;&lt;P&gt;You set "*" for: Do not print at skip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to assign an inspection equipment to the inspection characteristic in the field ITEM_NO_OF_PRODUCTION_RESOURCE, note that this has to be assigned to the operation in the PARAMETER PRODUCTIONRESOURCE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;Provided that during the data transfer no errors can be found, the export parameters GROUP and GROUPCOUNTER contain the key for the generated task list. To secure the data in the database, you now have to carry out a COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All error that occur are logged in the external parameter RETURN. In the case of inconsistencies, the entire routing to be generated is rejected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;P&gt;pls. reward appropriate points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2006 11:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248237#M144227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-03T11:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: USE BAPI  BAPI_ROUTING_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248238#M144228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: GROUP               TYPE BAPI1012_TSK_C-TASK_LIST_GROUP,
        GROUP_COUNTER       TYPE BAPI1012_TSK_C-GROUP_COUNTER,
        SEQUENCE_NO         TYPE BAPI1012_OPR_C-SEQUENCE_NO,
        TASK_LIST_USAGE     TYPE BAPI1012_TSK_C-TASK_LIST_USAGE,
        TASK_LIST_STATUS    TYPE BAPI1012_TSK_C-TASK_LIST_STATUS,
        LOT_SIZE_FROM       TYPE BAPI1012_TSK_C-LOT_SIZE_FROM,
        LOT_SIZE_TO         TYPE BAPI1012_TSK_C-LOT_SIZE_TO,
        TASK_MEASURE_UNIT   TYPE BAPI1012_TSK_C-TASK_MEASURE_UNIT,

        TESTRUN             TYPE BAPIFLAG,
        PROFILE             TYPE BAPI1012_CONTROL_DATA-PROFILE,

        TASK                TYPE BAPI1012_TSK_C
                              OCCURS 0 WITH HEADER LINE,
        MATERIALTASKALLOCATION TYPE BAPI1012_MTK_C
                              OCCURS 0 WITH HEADER LINE,
        SEQUENCE            TYPE BAPI1012_SEQ_C
                              OCCURS 0 WITH HEADER LINE,
        OPERATION           TYPE BAPI1012_OPR_C
                              OCCURS 0 WITH HEADER LINE,
        SUBOPERATION        TYPE BAPI1012_SUB_OPR_C
                              OCCURS 0 WITH HEADER LINE,
        REFERENCEOPERATION  TYPE BAPI1012_REF_OPR_C
                              OCCURS 0 WITH HEADER LINE,
        WORKCENTERREFERENCE TYPE BAPI1012_WC_REF_OPR_C
                              OCCURS 0 WITH HEADER LINE,
        COMPONENTALLOCATION TYPE BAPI1012_COM_C
                              OCCURS 0 WITH HEADER LINE,
        PRODUCTIONRESOURCE  TYPE BAPI1012_PRT_C
                              OCCURS 0 WITH HEADER LINE,
        INSPCHARACTERISTIC  TYPE BAPI1012_CHA_C
                              OCCURS 0 WITH HEADER LINE,
        TEXTALLOCATION      TYPE BAPI1012_TXT_HDR_C
                              OCCURS 0 WITH HEADER LINE,
        TEXT                TYPE BAPI1012_TXT_C
                              OCCURS 0 WITH HEADER LINE,
        RETURN              TYPE BAPIRET2
                              OCCURS 0 WITH HEADER LINE,
        BAPI_RETN_INFO      LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;* Initialization
  GROUP_COUNTER     = '01'.
  TASK_LIST_USAGE   = '1'.
  TASK_LIST_STATUS  = '4'.
  LOT_SIZE_FROM     = '0'.
  LOT_SIZE_TO       = '999999999'.
  TASK_MEASURE_UNIT = 'ST'.


  TASK-GROUP_COUNTER       =  GROUP_COUNTER.
  TASK-VALID_FROM          =  VALID_FROM.
  TASK-TASK_LIST_USAGE     =  BOMUSAGE.
  TASK-PLANT               =  PLANT.
  TASK-TASK_LIST_STATUS    =  TASK_LIST_STATUS.
  TASK-DESCRIPTION         =  MATERIAL.
  TASK-LOT_SIZE_FROM       =  LOT_SIZE_FROM.
  TASK-LOT_SIZE_TO         =  LOT_SIZE_TO.
  TASK-TASK_MEASURE_UNIT   =  TASK_MEASURE_UNIT.
  APPEND TASK.

  MATERIALTASKALLOCATION-MATERIAL      = MATERIAL.
  MATERIALTASKALLOCATION-PLANT         = PLANT.
  MATERIALTASKALLOCATION-GROUP_COUNTER = GROUP_COUNTER.
  MATERIALTASKALLOCATION-VALID_FROM    = VALID_FROM.
  APPEND MATERIALTASKALLOCATION.

*  SEQUENCE-GROUP_COUNTER       = '01'.
*  SEQUENCE-SEQUENCE_NO         = '000000'.
*  SEQUENCE-VALID_FROM          = '20040816'.
*  SEQUENCE-SEQUENCE_CATEGORY   = '0'.
*  SEQUENCE-REFERENCE_SEQUENCE  = ''.
*  SEQUENCE-DESCRIPTION         = '4587201_JK'.
*  SEQUENCE-TASK_MEASURE_UNIT   = 'PC'.
*  APPEND SEQUENCE.
  REFRESH : IT_REF.
*  LOOP AT rout_list WHERE component = material. 
  LOOP AT ROUT_LIST.

    IF ROUT_LIST-REFSET = 'X' AND
       NOT ROUT_LIST-VPLNR IS INITIAL.
      REFERENCEOPERATION-GROUP_COUNTER              = GROUP_COUNTER.
      REFERENCEOPERATION-SEQUENCE_NO                = SEQUENCE_NO.
      REFERENCEOPERATION-VALID_FROM                 = VALID_FROM.
      REFERENCEOPERATION-ACTIVITY                   = ROUT_LIST-VORNR.
      REFERENCEOPERATION-REFERENCED_TASK_LIST_GROUP = ROUT_LIST-VPLNR.
      REFERENCEOPERATION-REFERENCED_GROUP_COUNTER   = GROUP_COUNTER.
      APPEND REFERENCEOPERATION.

      IT_REF-VPLNR = ROUT_LIST-VPLNR.
      IT_REF-VORNR = ROUT_LIST-VORNR.
      APPEND IT_REF.
      CLEAR IT_REF.

    ELSE.
      OPERATION-GROUP_COUNTER      = GROUP_COUNTER.
      OPERATION-SEQUENCE_NO        = SEQUENCE_NO.
      OPERATION-VALID_FROM         = VALID_FROM.
      OPERATION-ACTIVITY           = ROUT_LIST-VORNR.
      OPERATION-CONTROL_KEY        = ROUT_LIST-STEUS.
      OPERATION-WORK_CNTR          = ROUT_LIST-ARBPL.
      OPERATION-PLANT              = PLANT.
      OPERATION-DESCRIPTION        = ROUT_LIST-LTXA1.
      OPERATION-DENOMINATOR        = ROUT_LIST-UMREN.
* Start of changes STC001
      IF ROUT_LIST-UMREZ IS INITIAL.
        OPERATION-NOMINATOR          = '1'.
      ELSE.
        OPERATION-NOMINATOR          = ROUT_LIST-UMREZ.
      ENDIF.
* End of changes STC001
      OPERATION-BASE_QUANTITY      = ROUT_LIST-BMSCH.

      OPERATION-STD_VALUE_01       = ROUT_LIST-VGW01.
      OPERATION-STD_VALUE_02       = ROUT_LIST-VGW02.
      OPERATION-STD_VALUE_03       = ROUT_LIST-VGW03.
      OPERATION-STD_VALUE_04       = ROUT_LIST-VGW04.
      OPERATION-STD_VALUE_05       = ROUT_LIST-VGW05.
      OPERATION-STD_VALUE_06       = ROUT_LIST-VGW06.
      APPEND OPERATION.
    ENDIF.
  ENDLOOP.

  SORT IT_REF BY VPLNR VORNR.
  DELETE ADJACENT DUPLICATES FROM IT_REF COMPARING VPLNR.

  LOOP AT REFERENCEOPERATION.
    L_TABIX  = SY-TABIX.
    READ TABLE IT_REF
    WITH KEY VPLNR = REFERENCEOPERATION-REFERENCED_TASK_LIST_GROUP
             VORNR = REFERENCEOPERATION-ACTIVITY.

    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      DELETE REFERENCEOPERATION INDEX L_TABIX.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'BAPI_ROUTING_CREATE'
*    DESTINATION 'NONE'
    EXPORTING
      TESTRUN                = TESTRUN
      PROFILE                = PROFILE
      BOMUSAGE               = BOMUSAGE
      APPLICATION            = APPLICATION
    IMPORTING
      GROUP                  = GROUP
      GROUPCOUNTER           = GROUP_COUNTER
    TABLES
      TASK                   = TASK
      MATERIALTASKALLOCATION = MATERIALTASKALLOCATION
      SEQUENCE               = SEQUENCE
      OPERATION              = OPERATION
      SUBOPERATION           = SUBOPERATION
      REFERENCEOPERATION     = REFERENCEOPERATION
      WORKCENTERREFERENCE    = WORKCENTERREFERENCE
      COMPONENTALLOCATION    = COMPONENTALLOCATION
      PRODUCTIONRESOURCE     = PRODUCTIONRESOURCE
      INSPCHARACTERISTIC     = INSPCHARACTERISTIC
      TEXTALLOCATION         = TEXTALLOCATION
      TEXT                   = TEXT
      RETURN                 = RETURN.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2006 11:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248238#M144228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-03T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: USE BAPI  BAPI_ROUTING_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248239#M144229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI &lt;/P&gt;&lt;P&gt;vijay here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******&lt;STRONG&gt;DECLARATION&lt;/STRONG&gt;*******&lt;/P&gt;&lt;P&gt;DATA : path TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : flag type c.&lt;/P&gt;&lt;P&gt;data: count(2) TYPE n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : intern TYPE TABLE OF alsmex_tabline,&lt;/P&gt;&lt;P&gt;       wa_intern TYPE alsmex_tabline.&lt;/P&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;testrun      TYPE    bapiflag,&lt;/P&gt;&lt;P&gt;profile      TYPE    PROFID_STD,  "bapi1012_control_data-profile,&lt;/P&gt;&lt;P&gt;bomusage     TYPE    STLAN ,      "bapi1012_control_data-bom_usage,&lt;/P&gt;&lt;P&gt;application  TYPE    CAPID.      " bapi1012_control_data-application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;internal tables declaration.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;        it_task                    TYPE TABLE OF    bapi1012_tsk_c,&lt;/P&gt;&lt;P&gt;        it_materialtaskallocation  TYPE TABLE OF    bapi1012_mtk_c,&lt;/P&gt;&lt;P&gt;        it_operation               TYPE TABLE OF    bapi1012_opr_c,&lt;/P&gt;&lt;P&gt;        it_COMPONENTALLOCATION     TYPE TABLE OF    BAPI1012_COM_C,&lt;/P&gt;&lt;P&gt;*text                    TYPE TABLE OF    bapi1012_txt_c,&lt;/P&gt;&lt;P&gt;        return                     TYPE TABLE OF    bapiret2,&lt;/P&gt;&lt;P&gt;        it_return                  TYPE TABLE OF    bapiret2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work area declaration.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;        wa_items_task           TYPE bapi1012_tsk_c ,&lt;/P&gt;&lt;P&gt;        wa_item_materailtask    TYPE bapi1012_mtk_c,&lt;/P&gt;&lt;P&gt;        wa_item_operation       TYPE bapi1012_opr_c,&lt;/P&gt;&lt;P&gt;        wa_item_componentallocation  TYPE BAPI1012_COM_C,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       wa_item_text            TYPE bapi1012_txt_c,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        wa_return               TYPE return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : v_group          TYPE bapi1012_tsk_c-task_list_group,&lt;/P&gt;&lt;P&gt;       v_groupcounter   TYPE bapi1012_tsk_c-group_counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : filename TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************&lt;STRONG&gt;INTERNAL TABLE DECLARATION&lt;/STRONG&gt;***************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF routing,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         valid_from1             TYPE datuv,              "TASK(HEADER)&lt;/P&gt;&lt;P&gt;         valid_todate1           TYPE datub,&lt;/P&gt;&lt;P&gt;         usage                   TYPE pln_verwe ,&lt;/P&gt;&lt;P&gt;         werkstask(6),&lt;/P&gt;&lt;P&gt;         status                  TYPE plnst,&lt;/P&gt;&lt;P&gt;         task_measure_unit(3)    TYPE c,&lt;/P&gt;&lt;P&gt;         lot_size_from(010),&lt;/P&gt;&lt;P&gt;         lot_size_to(020),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         matnr(010),                                      " MATERIAL ALLOCATION(INITIAL SCREEN)&lt;/P&gt;&lt;P&gt;         werks2(006),&lt;/P&gt;&lt;P&gt;         valid_from2             TYPE datuv,&lt;/P&gt;&lt;P&gt;         valid_todate2           TYPE datub,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         valid_from3             TYPE datuv,&lt;/P&gt;&lt;P&gt;         valid_todate3           TYPE datub,&lt;/P&gt;&lt;P&gt;         optno                   TYPE VORNR,&lt;/P&gt;&lt;P&gt;         controlkey(004),&lt;/P&gt;&lt;P&gt;         work_cntr(006),&lt;/P&gt;&lt;P&gt;         werks3(006),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        description(20),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         denominator,&lt;/P&gt;&lt;P&gt;         quant(20),&lt;/P&gt;&lt;P&gt;         setup           TYPE      vgwrt,&lt;/P&gt;&lt;P&gt;         machine         TYPE      vgwrt,&lt;/P&gt;&lt;P&gt;         labor           TYPE      vgwrt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          reqsplit        TYPE      splittung,&lt;/P&gt;&lt;P&gt;          noofsplits      TYPE      dec03,&lt;/P&gt;&lt;P&gt;          unitmax         TYPE      vgwrteh,&lt;/P&gt;&lt;P&gt;          maxwaittime     TYPE      dzlmax,&lt;/P&gt;&lt;P&gt;          unitstd         TYPE      vgwrteh,&lt;/P&gt;&lt;P&gt;          stdqtime        TYPE      dzwnor,&lt;/P&gt;&lt;P&gt;          unitmin         TYPE      vgwrteh,&lt;/P&gt;&lt;P&gt;          minqtime        TYPE      dzwmin,&lt;/P&gt;&lt;P&gt;          unitstdmove     TYPE      vgwrteh,&lt;/P&gt;&lt;P&gt;          stdmovetime     TYPE      dztnor,&lt;/P&gt;&lt;P&gt;          unitminmove     TYPE      vgwrteh,&lt;/P&gt;&lt;P&gt;          minmovetime     TYPE      dztmin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          palnnedel           TYPE dec03,                   " IF CONTROL KEY PP02&lt;/P&gt;&lt;P&gt;          netprice(20)        TYPE c,&lt;/P&gt;&lt;P&gt;          priceunit           TYPE pack3,&lt;/P&gt;&lt;P&gt;          COSTELEMENT        TYPE KSTAR,&lt;/P&gt;&lt;P&gt;          currency            TYPE waers,&lt;/P&gt;&lt;P&gt;          purchorg(4)         TYPE c,&lt;/P&gt;&lt;P&gt;          purchgrp(3)         TYPE c,&lt;/P&gt;&lt;P&gt;          matgrp(9)           TYPE c ,&lt;/P&gt;&lt;P&gt;          subcontracting(1)   TYPE c,&lt;/P&gt;&lt;P&gt;          valid_from4         TYPE datuv,                   " COMPONENT ALLOCATION&lt;/P&gt;&lt;P&gt;          valid_todate4       TYPE datub,&lt;/P&gt;&lt;P&gt;          optno1(5),&lt;/P&gt;&lt;P&gt;          itemno(5),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          TEXT                TYPE TDLINE,&lt;/P&gt;&lt;P&gt;END OF routing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_record TYPE STANDARD TABLE OF record1.&lt;/P&gt;&lt;P&gt;DATA: record TYPE record1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS : fname TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR fname .&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program_name  = syst-repid&lt;/P&gt;&lt;P&gt;      dynpro_number = syst-dynnr&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      file_name     = fname&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      mask_too_long = 1&lt;/P&gt;&lt;P&gt;      OTHERS        = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="11" type="ul"&gt;&lt;P&gt;START OF SLECTION*************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  filename = fname.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="12" type="ul"&gt;&lt;P&gt;UPLOADING DATA***************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = filename&lt;/P&gt;&lt;P&gt;      filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator     = 'X'&lt;/P&gt;&lt;P&gt;      read_by_line            = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                = it_record&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_error         = 1&lt;/P&gt;&lt;P&gt;      file_read_error         = 2&lt;/P&gt;&lt;P&gt;      no_batch                = 3&lt;/P&gt;&lt;P&gt;      gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;      invalid_type            = 5&lt;/P&gt;&lt;P&gt;      no_authority            = 6&lt;/P&gt;&lt;P&gt;      unknown_error           = 7&lt;/P&gt;&lt;P&gt;      bad_data_format         = 8&lt;/P&gt;&lt;P&gt;      header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;      separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;      header_too_long         = 11&lt;/P&gt;&lt;P&gt;      unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;      access_denied           = 13&lt;/P&gt;&lt;P&gt;      dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;      disk_full               = 15&lt;/P&gt;&lt;P&gt;      dp_timeout              = 16&lt;/P&gt;&lt;P&gt;      OTHERS                  = 17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_record BY  matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_record INTO record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  at new matnr.&lt;/P&gt;&lt;P&gt;        flag = 'X'.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if flag = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  count = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    bomusage           = '1'.&lt;/P&gt;&lt;P&gt;    application        = 'PP01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH: task , materialtaskallocation , operation   ,   COMPONENTALLOCATION .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********&lt;STRONG&gt;HEADER DATA&lt;/STRONG&gt;**********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_items_task-valid_from               = record-valid_from1.&lt;/P&gt;&lt;P&gt;      wa_items_task-valid_to_date            = record-valid_todate1.&lt;/P&gt;&lt;P&gt;      wa_items_task-task_list_usage          = record-usage.&lt;/P&gt;&lt;P&gt;      wa_items_task-plant                    = record-werkstask.&lt;/P&gt;&lt;P&gt;      wa_items_task-task_list_status         = record-status.&lt;/P&gt;&lt;P&gt;      wa_items_task-task_measure_unit        = record-task_measure_unit.&lt;/P&gt;&lt;P&gt;      wa_items_task-lot_size_from            = record-lot_size_from.&lt;/P&gt;&lt;P&gt;      wa_items_task-lot_size_to              = record-lot_size_to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND wa_items_task TO task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************&lt;STRONG&gt;INITIAL SCREEN DATA&lt;/STRONG&gt;*************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_item_materailtask-material      = record-matnr.&lt;/P&gt;&lt;P&gt;      wa_item_materailtask-plant         = record-werks2.&lt;/P&gt;&lt;P&gt;      wa_item_materailtask-valid_from               = record-valid_from2.&lt;/P&gt;&lt;P&gt;      wa_item_materailtask-valid_to_date           = record-valid_todate2.&lt;/P&gt;&lt;P&gt;      APPEND wa_item_materailtask TO materialtaskallocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  flag = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF count = 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   count = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************&lt;STRONG&gt;OPERATION DATA&lt;/STRONG&gt;*******************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_item_operation-valid_from               = record-valid_from3.&lt;/P&gt;&lt;P&gt;      wa_item_operation-valid_to_date            = record-valid_todate3.&lt;/P&gt;&lt;P&gt;      wa_item_operation-activity               = record-optno.&lt;/P&gt;&lt;P&gt;      wa_item_operation-control_key            = record-controlkey.&lt;/P&gt;&lt;P&gt;      wa_item_operation-work_cntr              = record-work_cntr.&lt;/P&gt;&lt;P&gt;      wa_item_operation-plant                  = record-werks3.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     wa_item_operation-description            = record-description.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      wa_item_operation-denominator            = record-denominator.&lt;/P&gt;&lt;P&gt;      wa_item_operation-base_quantity          = record-quant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_item_operation-std_value_01           = record-setup.&lt;/P&gt;&lt;P&gt;      wa_item_operation-std_value_02            = record-machine.&lt;/P&gt;&lt;P&gt;      wa_item_operation-std_value_03            = record-labor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_item_operation-ind_splitting_reqrd       = record-reqsplit .&lt;/P&gt;&lt;P&gt;      wa_item_operation-max_no_of_splits          = record-noofsplits.&lt;/P&gt;&lt;P&gt;      wa_item_operation-max_wait_time_unit        = record-unitmax.&lt;/P&gt;&lt;P&gt;      wa_item_operation-max_wait_time             = record-maxwaittime.&lt;/P&gt;&lt;P&gt;      wa_item_operation-standard_queue_time_unit  = record-unitstd.&lt;/P&gt;&lt;P&gt;      wa_item_operation-standard_queue_time       = record-stdqtime.&lt;/P&gt;&lt;P&gt;      wa_item_operation-min_queue_time_unit       = record-unitmin.&lt;/P&gt;&lt;P&gt;      wa_item_operation-min_queue_time            = record-minqtime.&lt;/P&gt;&lt;P&gt;      wa_item_operation-standard_move_time_unit   = record-unitstdmove.&lt;/P&gt;&lt;P&gt;      wa_item_operation-standard_move_time        = record-stdmovetime.&lt;/P&gt;&lt;P&gt;      wa_item_operation-min_move_time_unit        = record-unitminmove.&lt;/P&gt;&lt;P&gt;      wa_item_operation-min_move_time             = record-minmovetime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************&lt;STRONG&gt;SUBCONTRACTING DATA&lt;/STRONG&gt;********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_item_operation-plnd_delry                      = record-palnnedel.&lt;/P&gt;&lt;P&gt;      wa_item_operation-info_rec_net_price             = record-netprice.&lt;/P&gt;&lt;P&gt;      wa_item_operation-price_unit                      = record-priceunit.&lt;/P&gt;&lt;P&gt;      wa_item_operation-COST_ELEM                       = RECORD-COSTELEMENT.&lt;/P&gt;&lt;P&gt;      wa_item_operation-currency                        = record-currency.&lt;/P&gt;&lt;P&gt;      wa_item_operation-purch_org                       = record-purchorg.&lt;/P&gt;&lt;P&gt;      wa_item_operation-purch_group                     = record-purchgrp.&lt;/P&gt;&lt;P&gt;      wa_item_operation-matl_group                      = record-matgrp.&lt;/P&gt;&lt;P&gt;      wa_item_operation-ext_proc_with_subcontract_ind   = record-subcontracting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     APPEND wa_item_operation TO operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************&lt;STRONG&gt;COMPONENT ALLOCATION&lt;/STRONG&gt;****************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_item_componentallocation-valid_from      = record-valid_from4.&lt;/P&gt;&lt;P&gt;      wa_item_componentallocation-valid_to_date   = record-valid_todate4.&lt;/P&gt;&lt;P&gt;      wa_item_componentallocation-activity        = record-optno1.&lt;/P&gt;&lt;P&gt;      wa_item_componentallocation-item_no         = record-itemno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND wa_item_componentallocation TO componentallocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="15" type="ul"&gt;&lt;P&gt;TEXT************************************&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   wa_item_text-TEXT_LINE = RECORD-TEXT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   APPEND wa_item_text TO TEXT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      count = count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; AT END OF MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************&lt;STRONG&gt;CALLING FUNCTION MODULE&lt;/STRONG&gt;**************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_ROUTING_CREATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    bomusage                     = bomusage&lt;/P&gt;&lt;P&gt;    application                  = application&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    group                        = group&lt;/P&gt;&lt;P&gt;    groupcounter                 = groupcounter&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;     task                        = task&lt;/P&gt;&lt;P&gt;     materialtaskallocation      = materialtaskallocation&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    SEQUENCE                   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     operation                   = operation&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SUBOPERATION                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   REFERENCEOPERATION          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WORKCENTERREFERENCE         =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    componentallocation          =  componentallocation&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PRODUCTIONRESOURCE          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   INSPCHARACTERISTIC          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   TEXTALLOCATION              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    text                        = text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     return                      = return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at return into wa_return.&lt;/P&gt;&lt;P&gt;write: / 'message type:' ,wa_return.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; COMMIT WORK.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE:/ 'GROUP:', group.&lt;/P&gt;&lt;P&gt;  WRITE:/ 'GROUPCOUNTER:', groupcounter.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will help u &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@vijji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 14:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/use-bapi-bapi-routing-create/m-p/1248239#M144229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T14:03:02Z</dc:date>
    </item>
  </channel>
</rss>

