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
1,081

Hi All,

I am trying to use the above BAPI to create a new routing, but it keeps on giving me different errors. Does anyone have a reference program which I could use.

Regards,

K

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
875

You can see how the BAPI is used by looking at the function module IDOC_INPUT_ROUTING_CREATE. I can't seem to find other examples. Maybe you can show what you have so far and what error you are getting.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
875

Hi,

check out this:

https://www.sdn.sap.com/irj/sdn/profile?userid=2754143

reward if helpful.

regards,

keerthi.

Read only

0 Likes
875

Yikes.... can you format that?

Regards,

Rich Heilman

Read only

0 Likes
875

Hi,

My code is as follows:

task-VALID_FROM = sy-datum.

task-VALID_TO_DATE = '99991231'.

task-task_list_usage = '1'.

task-plant = '1000'.

task-task_list_status = '4'.

task-TASK_MEASURE_UNIT = 'PC '.

task-DESCRIPTION = 'TEST1'.

APPEND task.

*materialtaskallocation-group_counter = '1'.

materialtaskallocation-material = '958'.

materialtaskallocation-plant = '1000'.

APPEND materialtaskallocation.

And then I call the BAPI...

It gives the following Error:

E |BAPI |001

W |CPCC_DT |009 |The valid-from data has been set from today

A |M3|351 |Material 958 not maintained in plant 1000<

I also checked in the MAST table and there is an entry for the combination..

Regards,

K

Read only

0 Likes
875

I guess he is trying to point to this thread.

Regards,

Rich Heilman

Read only

0 Likes
875

yes I tried that, but I get the above mentioned error.

Read only

0 Likes
875

You must be passing the material in the internal format, which means leading zeros!!!.

materialtaskallocation-material = '000000000000000958'.

Regards.

Rich Heilman

Read only

0 Likes
875

I had tried that as well, it then gives an error:

E |CP |284 | Unit ****** cannot be converted to unit PC from material master 958

I am not sure which unit it is checking against. On Debug found that it checks against : meins = ST.

Not sure from where this is coming..