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

Regarding BAPI_PO_CHANGE

Former Member
0 Likes
409

Hi all,

BAPI_PO_CHANGE can be used for changing quantity of more than one line items at a time or should it be called for each line item?

Regards,

Shanthini

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
360

Hi shanthini,

1. This bapi will change the whole purchase order.

2. Hence, we can give all items, in one shot.

regards,

amit m.

Hi all,

BAPI_PO_CHANGE can be used for changing quantity of more than one line items at a time or should it be called for each line item?

Regards,

Shanthini

2 REPLIES 2
Read only

Former Member
0 Likes
361

Hi shanthini,

1. This bapi will change the whole purchase order.

2. Hence, we can give all items, in one shot.

regards,

amit m.

Read only

0 Likes
360

Hi Amit,

Thanks for responding immediately.In that case, could you please tell me what are the tables to be populated.

Have i missed something in the following code?

LOOP AT sel_tab WHERE sel = 'X'

AND NOT ebelp IS INITIAL.

t_head-po_number = po_number.

t_head-item_intvl = sel_tab-ebelp.

APPEND t_head.

CLEAR t_head.

t_headx-po_number = 'X'.

t_headx-item_intvl = 'X'.

APPEND t_headx.

CLEAR t_headx.

t_itemx-po_item = sel_tab-ebelp.

t_itemx-po_itemX = 'X'.

APPEND t_itemx.

CLEAR t_itemx.

t_sche-po_item = sel_tab-ebelp.

t_sche-quantity = sel_tab-labst.

APPEND t_sche.

CLEAR t_sche.

t_schex-po_item = sel_tab-ebelp.

t_schex-quantity = 'X'.

APPEND t_schex.

CLEAR t_schex.

ENDLOOP.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

purchaseorder = po_number

poheader = t_head

poheaderx = t_headx

TABLES

return = h_retur

poitem = t_item

poitemx = t_itemx

poschedule = t_sche

poschedulex = t_schex.