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

Change Sales Order

This document summarizes a process that loops through sales order data, updates status flags, calls a BAPI function to change sales orders, and collects any error or status messages returned. Key steps include: - Looping through sales order data and updating status flags for items and headers - Calling a BAPI function to change the sales orders - Collecting any error or status messages returned and adding them to a message table

Uploaded by

nirav487
Copyright
© © All Rights Reserved
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)
177 views2 pages

Change Sales Order

This document summarizes a process that loops through sales order data, updates status flags, calls a BAPI function to change sales orders, and collects any error or status messages returned. Key steps include: - Looping through sales order data and updating status flags for items and headers - Calling a BAPI function to change the sales orders - Collecting any error or status messages returned and adding them to a message table

Uploaded by

nirav487
Copyright
© © All Rights Reserved
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
You are on page 1/ 2

LOOP AT it_chkd INTO wa_chkd. AT NEW vbeln. sdoc = wa_chkd-vbeln. wa_headerx-updateflag = 'U'. ENDAT. wa_item-itm_number = wa_chkd-posnr. wa_item-reason_rej = 'Z1'.

APPEND wa_item TO it_item. wa_itemx-itm_number = wa_chkd-posnr. wa_itemx-updateflag = 'U'. wa_itemx-reason_rej = 'X'. APPEND wa_itemx TO it_itemx. AT END OF vbeln. CALL FUNCTION 'BAPI_SALESORDER_CHANGE' EXPORTING salesdocument = sdoc ORDER_HEADER_IN = order_header_inx = wa_headerx SIMULATION = BEHAVE_WHEN_ERROR = ' ' INT_NUMBER_ASSIGNMENT = ' ' LOGIC_SWITCH = NO_STATUS_BUF_INIT = ' ' TABLES return = it_return order_item_in = it_item order_item_inx = it_itemx PARTNERS = PARTNERCHANGES = PARTNERADDRESSES = ORDER_CFGS_REF = ORDER_CFGS_INST = ORDER_CFGS_PART_OF = ORDER_CFGS_VALUE = ORDER_CFGS_BLOB = ORDER_CFGS_VK = ORDER_CFGS_REFINST = SCHEDULE_LINES = SCHEDULE_LINESX = ORDER_TEXT = ORDER_KEYS = CONDITIONS_IN = CONDITIONS_INX = EXTENSIONIN = . CLEAR: it_item[], it_itemx[].

* * * * * *

* * * * * * * * * * * * * * * * *

* *

ENDAT. READ TABLE it_return INTO wa_return WITH KEY type = 'E'. IF sy-subrc = 0. LOOP AT it_return INTO wa_return WHERE type = 'E'. APPEND wa_return TO it_msg. CLEAR wa_return. ENDLOOP. ELSE. LOOP AT it_return INTO wa_return WHERE type = 'S'. APPEND wa_return TO it_msg. CLEAR wa_return. ENDLOOP. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X' IMPORTING RETURN = . ENDIF. ENDLOOP.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy