0% found this document useful (0 votes)
6 views2 pages

Data Processing and Analysis Techniques

The document describes transferring purchase order item quantities from a table into BAPI structures to call the BAPI_PO_CHANGE function to update purchase order quantities. It loops through a table of order data, extracts the item and quantity, appends it to BAPI item structures, calls the function, then commits the transaction if no errors occurred.

Uploaded by

meenugoel12
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Data Processing and Analysis Techniques

The document describes transferring purchase order item quantities from a table into BAPI structures to call the BAPI_PO_CHANGE function to update purchase order quantities. It loops through a table of order data, extracts the item and quantity, appends it to BAPI item structures, calls the function, then commits the transaction if no errors occurred.

Uploaded by

meenugoel12
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

data: it_ekpo_bdc type table of ztest_po, wa_ekpo_bdc like line of it_ekpo_main. it_ekpo_bdc[] = it_ekpo_main[] .

delete it_ekpo_bdc where newmenge is initial . loop at it_ekpo_bdc into wa_ekpo_bdc . if wa_ekpo_bdc-newmenge is initial. wa_data-menge = wa_ekpo_bdc-menge. elseif wa_ekpo_bdc-newmenge is not initial. wa_data-menge = wa_ekpo_bdc-newmenge. endif.

wa_data-bstnr = wa_ekpo_bdc-ebeln. wa_data-ebelp = wa_ekpo_bdc-ebelp. condense wa_data-menge. condense wa_data-kbetr. append wa_data to it_data. * * CLEAR: MENGE_CURSOR, VAR_SELECTION_FLAG . clear: wa_ekpo_bdc,wa_data. REFRESH: IT_DATA.

endloop. loop at it_data into wa_data. data :return type bapiret2 occurs 0 with header line, item type bapimepoitem occurs 0 with header line, itemx type bapimepoitemx occurs 0 with header line, poschedule type bapimeposchedule occurs 0 with header line, poschedulex type bapimeposchedulx occurs 0 with header line, wa_return like line of return....

item-po_item = wa_data-ebelp. item-quantity = wa_data-menge. append item to item. itemx-po_item = wa_data-ebelp. itemx-po_itemx = 'X'. itemx-quantity = 'X'. append itemx to itemx.

endloop.

call function 'BAPI_PO_CHANGE' exporting purchaseorder tables return poitem poitemx *BREAK-POINT. clear: wa_return. loop at return into wa_return. if wa_return-type eq 'E'. rtcode = 1. endif.

= wa_data-bstnr

= return[] = item[] = itemx[].

endloop. if rtcode ne 1. call function 'BAPI_TRANSACTION_COMMIT' exporting wait = 'X'. endif.

You might also like