2010 Jan 28 11:00 AM
Hi all, I'm just looking for a little help.
I have a table with PO number & item number (it_po_numbers) and a work area that contains a new delivery date (wa_eindt)
I want to use BAPI_PO_CHANGE to update these PO's with this new date. Could anyone suggest how the FM should look. It currently looks like
loop at it_po_numbers into wa_po_numbers.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = wa_po_numbers-ebeln
* POHEADER =
* POHEADERX =
* POADDRVENDOR =
* TESTRUN =
* MEMORY_UNCOMPLETE =
* MEMORY_COMPLETE =
* POEXPIMPHEADER =
* POEXPIMPHEADERX =
* VERSIONS =
* NO_MESSAGING =
* NO_MESSAGE_REQ =
* NO_AUTHORITY =
* NO_PRICE_FROM_PO =
* IMPORTING
* EXPHEADER =
* EXPPOEXPIMPHEADER =
* TABLES
* RETURN =
POITEM = wa_po_numbers-ebelp
* POITEMX =
* POADDRDELIVERY =
* POSCHEDULE =
* POSCHEDULEX =
* POACCOUNT =
* POACCOUNTPROFITSEGMENT =
* POACCOUNTX =
* POCONDHEADER =
* POCONDHEADERX =
* POCOND =
* POCONDX =
* POLIMITS =
* POCONTRACTLIMITS =
* POSERVICES =
* POSRVACCESSVALUES =
* POSERVICESTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* POEXPIMPITEM =
* POEXPIMPITEMX =
* POTEXTHEADER =
* POTEXTITEM =
* ALLVERSIONS =
* POPARTNER =
* POCOMPONENTS =
* POCOMPONENTSX =
* POSHIPPING =
* POSHIPPINGX =
* POSHIPPINGEXP =
* POHISTORY =
* POHISTORY_TOTALS =
* POCONFIRMATION =
Thanks
2010 Jan 28 11:09 AM
Hi ,
you need to Pass the data to the table POSCHEDULE with the line item number and the new delivery date
and also pass the data in POSCHEDULEX with delivery date update flag to 'X'.
Pass the table to return paramter it will provide the log details the PO.
Use the BAPI 'BAPI_TRANSACTION_COMMIT' after the 'BAPI_PO_CHANGE'.
Hi ,
you need to Pass the data to the table POSCHEDULE with the line item number and the new delivery date
and also pass the data in POSCHEDULEX with delivery date update flag to 'X'.
Pass the table to return paramter it will provide the log details the PO.
Use the BAPI 'BAPI_TRANSACTION_COMMIT' after the 'BAPI_PO_CHANGE'.
2010 Jan 28 11:09 AM
Hi ,
you need to Pass the data to the table POSCHEDULE with the line item number and the new delivery date
and also pass the data in POSCHEDULEX with delivery date update flag to 'X'.
Pass the table to return paramter it will provide the log details the PO.
Use the BAPI 'BAPI_TRANSACTION_COMMIT' after the 'BAPI_PO_CHANGE'.
2010 Jan 28 11:29 AM
Hi,
Call to bapi for basic data changes should look as below -
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = l_salesdocument "Sales order number
order_header_in = l_w_order_header_in "Header Data
order_header_inx = l_w_order_header_inx "Indicators for fields that we want to change in header
TABLES
return = g_t_return "This will have return messages
order_item_in = l_t_order_item_in "Each line item data that we want to change
order_item_inx = l_t_order_item_inx 'Indicators for feilds which we want to change
schedule_lines = l_t_schedule_lines "Additional data for line items
schedule_linesx = l_t_schedule_linesx "Indicators for additional fields
extensionin = l_t_extensionin. " this table should be filled for custom fields
If you want to change delivery date, then it is at header level. You need to fill ORDER_HEADER_IN-REQ_DATE_H with the new date. and ORDER_HEADER_INX-REQ_DATE_H = 'X' and ORDER_HEADER_INX-UPDATEFLAG = 'U'.
With this data you should be able to update sales order delivery date. Then you have to call BAPI_TRANSACTION_COMMIT to reflect these changes to database.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |