Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_ROUTING_CREATE

Former Member
0 Likes
552

I'm using this BAPI to create a "route".

After the BAPI I'm using the function BAPI_TRANSACTION_COMMIT.

Everthing seems ok ... it says that the route has been created but when I enter trx CA02 the route wasn't create. Anybody knows what can I do ?

Thx any way !

1 REPLY 1
Read only

Former Member
0 Likes
461

Refer the following code...

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.

task-task_list_usage = '1'.

task-plant = 'Z4'.

task-task_list_status = '4'.

task-task_measure_unit = 'KG'.

APPEND task.

materialtaskallocation-group_counter = 'AC'.

materialtaskallocation-material = '3EP6001'.

materialtaskallocation-plant = 'Z4'.

APPEND materialtaskallocation.

operation-group_counter = 'AC'.

operation-activity = '0010'.

operation-operation_id = 'V10'.

operation-control_key = 'ZS11'.

operation-work_cntr = 'NAM'.

operation-plant = 'Z4'.

operation-standard_text_key = 'Z400001'.

operation-operation_measure_unit = 'KG'.

operation-denominator = 1.

operation-nominator = 1.

operation-base_quantity = 200.

operation-std_unit_02 = 'MIN'.

operation-std_value_02 = '3.5'.

operation-std_unit_03 = 'MIN'.

operation-std_value_03 = '3.5'.

operation-required_wait_time_unit = 'STD'.

operation-required_wait_time = 1.

APPEND operation.

operation-group_counter = 'AC'.

operation-activity = '0020'.

operation-operation_id = 'V20'.

operation-control_key = 'ZS05'.

operation-work_cntr = 'LP1K71'.

operation-plant = 'Z4'.

operation-standard_text_key = 'Z400002'.

operation-operation_measure_unit = 'KG'.

operation-denominator = 1.

operation-nominator = 1.

operation-base_quantity = 200.

operation-std_unit_02 = 'MIN'.

operation-std_value_02 = 4.

operation-std_unit_03 = 'MIN'.

operation-std_value_03 = 48.

operation-required_wait_time_unit = 'STD'.

operation-required_wait_time = 1.

APPEND operation.

componentallocation-group_counter = 'AC'.

componentallocation-activity = '0010'.

componentallocation-operation_id = 'V10'.

componentallocation-bom_type = 'Z'.

componentallocation-bom_no = '00080331'.

componentallocation-alternative_bom = '01'.

componentallocation-item_id = '00000001'.

componentallocation-item_no = '0010'.

componentallocation-comp_qty = 200.

componentallocation-comp_unit = 'KG'.

componentallocation-material = '0200200354011'.

componentallocation-plant = 'Z4'.

componentallocation-bom_type_root = 'Z'.

componentallocation-bom_no_root = '00080331'.

componentallocation-alternative_bom_root = '01'.

APPEND componentallocation.

componentallocation-group_counter = 'AC'.

componentallocation-activity = '0020'.

componentallocation-operation_id = 'V20'.

componentallocation-bom_type = 'Z'.

componentallocation-bom_no = '00080331'.

componentallocation-alternative_bom = '01'.

componentallocation-item_id = '00000002'.

componentallocation-item_no = '0020'.

componentallocation-comp_qty = 200.

componentallocation-comp_unit = 'KG'.

componentallocation-material = '0100400069051'.

componentallocation-plant = 'Z4'.

componentallocation-bom_type_root = 'Z'.

componentallocation-bom_no_root = '00080331'.

componentallocation-alternative_bom_root = '01'.

APPEND componentallocation.

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.