2006 Mar 13 2:52 PM
I know that this subject appears many times, but I can't find solution.
My problem is:
I try to create routing with component allocation to operations, but when I call function BAPI_ROUTING_CREATE I get following message: "CPCC_DT 206
The component to be assigned has not been completely specified".
my code:
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'
EXPORTING
bomusage = 'Z'
IMPORTING
group = group
groupcounter = group_counter
TABLES
task = task
materialtaskallocation = materialtaskallocation
operation = operation
componentallocation = componentallocation
return = return
.
Help me please, this is urgent.
Regards
PS. The routing without componentallocation posting correct.
2006 Mar 13 3:47 PM
Hello,
the field SEQUENCE_NO from COMPONENTALLOCATION is missing.
Try to add it.
Regards
2006 Mar 14 7:16 AM
2006 May 23 3:26 PM
Hi Friends,
I am facing same problem,
Please help me to solve the
puzzle by providing your
valuable suggestions.
with regards,
Pravin
2006 May 24 6:38 AM
In my case the problem was:
componentallocation-bom_type = 'Z'.
instead of
componentallocation-bom_type = 'M'.
regards
Bartek
2006 May 30 8:52 AM
Hi Bartosz,
Thanks for your valuable reply.
with regards,
Pravin
2006 May 24 6:42 AM
Hai
CALL FUNCTION 'BAPI_ROUTING_CREATE'
EXPORTING
TESTRUN = TESTRUN
PROFILE = PROFILE
BOMUSAGE = BOMUSAGE
APPLICATION = APPLICATION
IMPORTING
GROUP = GROUP
GROUPCOUNTER = GROUPCOUNTER
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
EXCEPTIONS
OTHERS = 1
.
Thanks & regards
Sreeni