Application Development 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: 

BAPI_ROUTING_CREATE and components allocation.

Former Member
0 Kudos
1,775

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.

6 REPLIES 6

Former Member
0 Kudos
302

Hello,

the field SEQUENCE_NO from COMPONENTALLOCATION is missing.

Try to add it.

Regards

0 Kudos
302

I don't want to add sequence - only operations.

Regards.

0 Kudos
302

Hi Friends,

I am facing same problem,

Please help me to solve the

puzzle by providing your

valuable suggestions.

with regards,

Pravin

0 Kudos
302

In my case the problem was:

componentallocation-bom_type = 'Z'.

instead of

componentallocation-bom_type = 'M'.

regards

Bartek

0 Kudos
302

Hi Bartosz,

Thanks for your valuable reply.

with regards,

Pravin

Former Member
0 Kudos
302

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