Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP VA02 / VA12 - Mass update partner sales employee - Partner Function Update

jhon_jhon
Explorer
0 Kudos

Hi Experts ,

We have a requirement to update bulk data of sales employee of Partner Function 'ZM' on Sales Order , But the issue is we do not have API/BAPI/FM to handle multiple sales order in one go , We are using FM 'BAPI_SALESORDER_CHANGE' to update partner number , This FM is consuming more time to update records and leading to performance issues due to the FM is being called inside LOOP.

please let me know if there's any other BAPI or function module or Any Class to achieve this by giving multiple sales order numbers to avoid loop.

8 REPLIES 8

juan_suros
Contributor

I do not think you will find any library code to make mass updates because there are so many possible change scenarios:

  • Add new ZM partner to document
  • Assign different vendor number to existing ZM partner
  • Change any random field of ZM partner address, using current address
  • Change any random field of ZM partner address, creating new address for this document

The BADI can handle all scenarios, using extensive check logic.

If performance is very important, you could try bypassing library logic and updating data tables directly: VBPA, CDHDR, CDPOS.

If your update scenarios involve tables KNA1 or LFA1, you should probably consider breaking the updates into multiple parrallel processes to get around the single thread resource limit.

Jelena
Active Contributor

"We don't do that here". Please NEVER recommend updating standard SAP tables directly to anyone.

0 Kudos

Jelena,

Never is a very strong word. SAP customers must manage risk.

Jelena said "never RECOMMEND", not "never DO IT". I wouldn't have recommended it without knowing the exact context, I would have proposed parallel processing instead.

jhon_jhon
Explorer
0 Kudos

Hi Juan ,

Thanks for your response.

My requirement is to update Partner function which of field 'VBPA-PERNR' , At present we are handling this tthru FM 'BAPI_SALESORDER_CHANGE' , Considering the volume of data and limitations on FM , we are unable to mass multiple sales document to this FM.

Yes , Its performance issue only and the Program is taking longer time to process multiple sales order , Please let us know in case of any other way to handle this scenario , Like any FM which can handle multiple orders in one go.

0 Kudos

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

juan_suros
Contributor
0 Kudos

Jhon Jhon,

Your scenario has an abap program submitting many documents for change using BADI_SALESORDER_CHANGE. Each change is submitted to system in series. Each change is simple but the libraries are complex.

You could try to run this abap program in background many times with different selections. Each run of program would process a small part of the total list.

The theory is that this would avoid system throttling of resources applied to each single process. Multiple processes would each be allocated the same amount of resources. Total resources available to solve problem would be multiplied.

0 Kudos

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.