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 or Function maodule for Variant configuration

Former Member
0 Kudos

Hi,

Is there any BAPI or Function module which can give Variant configuration for a sales order?

Thanks,

Madhu

7 REPLIES 7

Former Member
0 Kudos

Also if there is any IDoc that will also help me.

Thanks,

Madhu

Former Member
0 Kudos

BAPI_SALESORDER_CREATEFROMDAT2 is to be used with the structures populated:

1. ORDER_CFGS_REF STRUCTURE

2. ORDER_CFGS_INST STRUCTURE

3. ORDER_CFGS_PART_OF STRUCTURE

4. ORDER_CFGS_VALUE STRUCTURE

0 Kudos

Thanks.

Will BAPI_SALESORDER_CREATEFROMDAT2 not create sales order?

I need to fetch Variant config data.

My actutal requirement is-

For a delivery document-> I need to look for sales document->fetch the Var conf.

Is there any way in which I give delivery doc no and get var conf?

Thanks,

Madhu

Former Member
0 Kudos

hi,

there is a BAPI for Variant configuration for a sales order

<b>BAPI_SALESORDER_CREATEFROMDAT2</b>

hope it helps.

regards

gaurav

<b>Reward points if useful.</b>

Former Member
0 Kudos

hi

plz refer to the following code

Check the following Code & also Check the following Standard Programs

L2032U12

LCRMAU01

LCRMAU11

LZOC1U01

MWWMJF32

RBUS2032

  • Structures for order header

DATA: l_order_header_in LIKE bapisdhd1,

l_order_header_inx LIKE bapisdhd1x,

  • Tables for order items

li_order_items_in TYPE STANDARD TABLE OF bapisditm,

li_order_items_inx TYPE STANDARD TABLE OF bapisditmx,

  • Order partners

li_order_partners TYPE STANDARD TABLE OF bapiparnr,

*Schedule lines

li_ORDER_SCHEDULES_IN TYPE STANDARD TABLE OF BAPISCHDL,

li_ORDER_SCHEDULES_INX TYPE STANDARD TABLE OF BAPISCHDLX,

*-condition type

li_ORDER_CONDITIONS_IN TYPE STANDARD TABLE OF BAPICOND,

li_ORDER_CONDITIONS_INX TYPE STANDARD TABLE OF BAPICONDX,

  • Return table from bapi call

li_return TYPE STANDARD TABLE OF bapiret2,

  • Sales document number

l_vbeln LIKE bapivbeln-vbeln,

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'

EXPORTING

order_header_in = l_order_header_in

order_header_inx = l_order_header_inx

  • testrun = 'X'

IMPORTING

salesdocument = l_vbeln

TABLES

return = li_return

order_items_in = li_order_items_in

order_items_inx = li_order_items_inx

order_partners = li_order_partners

ORDER_SCHEDULES_IN = li_ORDER_SCHEDULES_IN

ORDER_SCHEDULES_INX = li_ORDER_SCHEDULES_INX

ORDER_CONDITIONS_IN = li_ORDER_CONDITIONS_IN

ORDER_CONDITIONS_INX = li_ORDER_CONDITIONS_INX.

Thanks & Regards

ravish

<b>* plz rewrd points if helpful</b>

raymond_giuseppi
Active Contributor
0 Kudos

Look at BAPI_SALESORDER_CHANGE

But check if OSS <a href="https://service.sap.com/sap/support/notes/852942">Note 852942 - BAPI Change: Item configuration can't be changed</a> is applicable.

Regards

0 Kudos

Thanks.

But it will change the sales order right?

I need to get so details...

Regards,

Madhu