Skip to Content
0
Jun 30, 2020 at 03:13 PM

Unable to create PO with multiple line items

50 Views

Hi Experts,

I am using BAPI_PO_CREATE1 to create purchase order but i am unable to create Line items.

I am able to create only one line item that is 10.

Requirement:

If the vendor number (AUFNR-LIFNR) is same we have to create only one purchase order with line items.

if the vendor is same :

if lc_previous = aufr-lifnr.

LC_ITEM = LC_ITEM+10.

ITEMS-PO_ITEM = LC_ITEM.

ITEMSX-PO_ITEM = LC_ITEM.

ITEMSX-PO_ITEMX = 'X'

ENDIF.

APPEND items.
APPEND itemsx.

SCHED-PO_ITEM = LC_ITEM.

SCHED-SCHED_LINE = 1C_ITEM.

SCHEDX-PO_ITEM = LC_ITEM.

SCHEDX-SCHED_LINE = LC_ITEM.

SCHEDX-PO_ITEMX = 'X'.

SCHEDX-SCHED_LINEX = 'X'.

APPEND sched.
APPEND schedx.

Please suggest me how to solve this.