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_SALESORDER_CREATEFROMDAT2 with BOM Explosion

0 Likes
1,279

Hi gurus,

I'm using standard BAPI BAPI_SALESORDER_CREATEFROMDAT2 to enter a sales order. I need to enter item lines with a specific order. I've fill all the BAPI required parameters in order_items_in (material for matnr) and quantity in order_schedules_in. If i'm not wrong, fields itm_number in both structures are mandatory and I fill it respecting original order.

My problem comes when I find a material list. I explain, if material B is a material list composed for B2, B3 i entered the following to the bapi:

itm_number material

000010 A

000020 B

000030 C

My requirement is to generate a sales order like that:

000010 A

000020 B

000030 B2

000040 B3

000050 C

but the order I create is like:

000010 A

000020 B

000030 C

000040 B2

000050 B3

I think that a solution is to check material list before itm_number assignment assigning like

000010 A

000020 B

000050 C

but I don't like this solution at all.

Does anyone face similiar problem?

Is there some parameter at the BAPI to achieve this.

Thanks in advance.

David Gimeno

2 REPLIES 2
Read only

Former Member
0 Likes
581

Hi David,

i was also facing the same requirment and the solution was possible as you mentioned by increasing the item number of the consecutive materials.

Regards,

Ankur Parab

Read only

581

Hi Ankur,

thanks for you reply. After watching several notes from OSS I've finally found the solution.

Just take a look at OSS note 522356. You can achieve your requirement by setting the IntNumberAssignment flag of the bapi to 'X'.

Best regards,

David.