cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,I have a requirement to call transaction VA02 from an ABAP program, which will run as a background task. The user will provide input via a selection screen. This input should be populated in VA02, and the sales order should be saved automatically. I'm considering two options for achieving this: BDC (Batch Data Communication) or BAPI_SALESORDER_CHANGE. Which option would be the most suitable for this scenario? Additionally, my VA02 screen has a custom tab with fields populated from a Z table. Is it possible to update this Z table using either BDC or BAPI_SALESORDER_CHANGE? Are there any other alternatives besides BDC or BAPI that I should consider? Your insights and suggestions would be greatly appreciated. Regards,

0 Likes
View Entire Topic
SantoshB
Explorer
0 Likes

@Ryan-Crosby 

Hi Ryan-Crosby,

In my current process, I manually update sales orders through the on-screen transaction code VA02. The steps involved include:

  1. Updating the Order Reason field.
  2. Navigating to the Conditions tab and clicking the Update button.

To automate this process, I am considering two options:

  1. BDC recording: My initial plan was to record a BDC session to replicate the steps performed manually.
  2. BAPI_SALESORDER_CHANGE: However, considering the preference for BAPIs over BDC for standard transactions, I am exploring the possibility of achieving the same outcome using the BAPI_SALESORDER_CHANGE function module.

Before proceeding further, I would appreciate your guidance on whether BAPI_SALESORDER_CHANGE can effectively handle the required updates. Additionally, if you have any insights or recommendations on the most efficient approach for this task, please feel free to share them.

SantoshB_0-1709914127802.png]

SantoshB_1-1709914134315.png

 

Ryan-Crosby
Active Contributor
0 Likes
@SantoshB yes, you can most certainly update the order reason code and conditions in the BAPI (assuming it's permitted in the pricing procedure configuration).