cancel
Showing results for 
Search instead for 
Did you mean: 

Create Routing Groups using BAPI_ROUTING_CREATE Limitation?

Former Member
0 Kudos

Hi all,

I am doing a conversion for the routing groups for PP. The routing groups include sequence, operation number, material assigned and component allocation.

In this project, the BOM size of the material is super huge, thus to ease the conversion. I have used Function module to download the BOM structure and then allow user to maintain manually the operation and sequence. After that I will use BAPI BAPI_ROUTING_CREATE to do the conversion.

And I manage to get all operation, sequences, material assigned and component allocated. However, I face a problem as the BOM size keep increasing and same material BOM might be assigned to different header BOM at the same time. Thus, key field such as level and path is important for the input.

Note: Please check the order path in CA03, the technical name is STPOB-WEGXX1 with attribute type DEC length 4.

In my case, the Order Path is more than 99... around few hundreds.... But the issue is the order path field used in the BAPI_ROUTING_CREATE: BAPI1012_COM_C-ORDER_PATH is only has attribute type NUMC length 2.

Either I get a short dump by passing in the order path, or I might miss out the some component allocation using the BAPI. Anyone faces this before? Please advise.

Thanks.

Best regards,

Vin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi all,

although this post is almost 6 years old, I try to add my own experience to it - including new questions:

1. Vin's requirement seems only to be solvable by SAP. They have to expand the field length of the ORDER_PATH. I see, they didn't it, even with EHP7.

2. I really miss a competent documentation of how to use BAPI_ROUTING_CREATE, considering multi-level BOMs, in particular if you want to do COMPONENTALLOCATION.

3. As far as I tested that, you are able to assign phantom BOM components, but not to assign components of those phantoms.

4. I don't know whether subsequent components (not phantoms) are assignable to operations.

Does anyone have more information on that? I appreciate any help.

Kind Regards

Werner

Former Member
0 Kudos

Hi,

Populate the below fields & you should be able to link the items.

BOM_TYPE - Bom usage (STLAN)

BOM_NO - Bom number (STLNR)

ALTERNATIVE_BOM - Bom alternative (STLAL)

ITEM_ID - Not sure on this one but just check if its STLKN or another field

ITEM_NO - Item (POSNR)

Check & revert.

Regards,

Vivek

Former Member
0 Kudos

Hi Vivek,

Thanks for the reply, but apparently all the fields that you mention already populated in the BAPI. And the some of the component allocation still missing in the routing groups.

Actually the reason in my case to have detail on the order level and order path is the same BOM (called this Child) appear twice under one header BOM (Parent). Note: this is the required design over here for variant configuration.

Example: Parent BOM has two same Child BOM A. Then the non-BOM items appear in the child BOM A can only be differenciate through the order path and order level.

Hope for any new idea. Really appreaciated.

Best regards,

Vin

Former Member
0 Kudos

Hi,

Can you please upload some screenshots (picasaweb or some portal). Its very hard to understand what is happening.

Regards,

Vivek

Former Member
0 Kudos

Hi Vivek,

Thanks for your fast response. Can I have your email? I already do a print screen and some explanation in the document, maybe it will be faster if i can send to ur email to have a look on it.

Cheers,

Vin

Former Member
0 Kudos

Hi,

I believe it would be better to upload on a portal, simply because you will ensure that other forum members will have a look as well & provide you with inputs & you would not have to solely depend on me.

It would help for a better learning for all of us. Hope you understand.

Also the forum rules state no sending mails to personal id's, so if the forum moderators agree, i have no issue in providing in my e mail id here.

Regards,

Vivek

Former Member
0 Kudos

Hi,

No problem.

Please refer to the link below.

http://docs.google.com/Doc?docid=0AfgjkxudoDlhZGZmemQ1dGtfMGNmZnc4Zjhi&hl=en

Thanks for your response.

Cheers.

Former Member
0 Kudos

Hi,

For download of data

Table - PLMZ:

PLNNR = Routing nos

PLNAL = Group counter

PLNKN = node

STLTY = M

STLNR = bom nos

STLAL = Alt.

STLKN = node

Pass the details from PLMZ to get VORNR

Table - PLPO:

PLNTY = N (default for routing)

PLNNR = Routing nos from PLMZ

PLNKN = node (from PLMZ)

VORNR = read value

Now once you get VORNR from PLPO from your download data, in your upload pass this value to ACTIVITY in the strucutre, you can link back the components based to the order other fields as required.

Check if it resolves the issue.

Regards,

Vivek

Former Member
0 Kudos

Hi Vivek,

Actually i do not face any problem downloading the data from SAP database. And this is a conversion work.

After I download the Material BOM, I will do manual allocate the component to which operation and sequence. Then after that, when i try to upload the routing groups conversion data using BAPI_ROUTING_CREATE. I face the problem.

Note: All the fields that you mentioned already extracted from database and provided into the BAPI as the pervious document shown.

Thanks.

Vin

Former Member
0 Kudos

Hi,

I guess i missed out one part from my prev input.

From your downlod file: for PLMZ table read the below

STLST - Order level

STLWG - Order Path

(below fields to identify the component)

STLTY_W - BOM category

STLNR_W - Bill of material

STLAL_W - Alt. BOM

KANTE - Path in exploded BOM tree

For upload pass this value to BAPI

ORDER_LVL - Order level (PLMZ-STLST )

ORDER_PATH - Order path (PLMZ-STLWG )

I guess the above should fix the issue, check & revert.

Regards,

Vivek

Former Member
0 Kudos

Really appreciate the input.

But I am able to get the order path and order level from one function module as well. And the provided information of order path and level match exactly with my routing group. But it is because my BOM size is very huge. The order path is up to few hundreds number, means minimum 3 char length. Then, BAPI only provide the order path with length 2 char. So I cannot provide a correct order path into the BAPI with structure BAPI1012_COM_C and field ORDER_PATH.

However, if we look at the technical name from CA02/CA03... the order path is STPOB-WEGXX1 which has 4 DEC length. Thus, either my program always hit short dump or i have to remove the order path assignment into the BAPI.

As a result, some of the component allocation are missing.

Thanks.

Former Member
0 Kudos

Hi,

Can you check in PLMZ table as to how these values are stored at the moment ?

I mean the level & path fields.

Regards,

Vivek

Former Member
0 Kudos

Hi Vivek,

I have checked the order level and order path in PLMZ currently for those only with 2 char (< 100) will display as per correct value, but for those order path with value more than 100, it shows 00 in the table PLMZ.

Example,

if the component with order level 3, order path 20. In PLMZ will show 3 and 20.

if the component with order level 3, order path 200. In PLMZ will show 00 and 00.

But it does still show the 204 (example) path in the CA02.

Thanks for any advice.

Vin

Former Member
0 Kudos

Hi,

In this case only SAP can be of help, as they would need to enhance the structure in the BAPI.

Meanwhile just do a check in LSMW, if i remember there is one object for routing in direct input, check if that meets your need.

I guess i can't be of much help further, sorry wasn't able to help resolve the issue.

Regards,

Vivek

Former Member
0 Kudos

Hi Vivek,

I have check the batch input / direct input in LSMW and find that the field on order path provided in both batch/direct input also only 2 char length.

Really thanks for your support for this.

This issue really cost the conversion a big problem... and I also have log a OSS note. Hopefully they also can come out with some alternative solution for this. If any solution provided, I will keep this posted.

Cheers,

Vin

Former Member
0 Kudos

Hi Vivek,

I got this reply from SAP.

-


ORDER_LVL and ORDER_PATH need not be filled, but PATH has to be

filled with the KANTE values.

The logic to calculate path value is the same as the kante value.

(PATH)

A (N) 0

-> B (P) 1

-> B1(N) 1

-> B2(P) 2

-> C (P) 3

-> C1 (N) 3

-> C2 (P) 4

N- normal item P- phantom

Note 305919 details this.

-


However, it quite confuses me as I read through sapnote 305919 : It seems like what is been replied from SAP does not really correct.

Symptom

You want to create component allocations to phantom assemblies using batch or direct input. In order to uniquely identify the phantom assembly, you must enter the level and the path. This note describes how the SAP System assigns the level and the path.

Thus, I will continue to check with SAP. I think this is the inconsistency of the database and the BAPI, correct me if I am wrong.

Thanks a lot.

Regards,

Vin

Former Member
0 Kudos

Hi,

I guess in this case, as input in one of my previous postings in this thread, pass the value KANTE from the legacy system to PATH with other BOM details & you should be able to get the result.

As f/b from SAP dont pass values to ORDER_LVL and ORDER_PATH .

Do a check with the above & revert.

Regards,

Vivek

Former Member
0 Kudos

Hi Vivek,

Actually KANTE is already one of the input for my current BAPI upload, you can refer to the document in the link provided earlier in this thread.

But some of the component allocation is still missing. I guess what is mentioned in the SAPnote is we still need to key in the LEVEL and PATH.

Thanks.

Best regards,

Vin