cancel
Showing results for 
Search instead for 
Did you mean: 

BADI to modify a BP AFTER save

Former Member
0 Kudos

Hello Expert,

i have a scenario in which i have to add information about territory on the BPs after their creation on CRM.

Simplifying:

  • BPs are created / modified on CRM from R/3 through BUPA_MAIN or BUPA_REL
  • for each BP in BUPA_MAIN / REL, if the BP has Role "ZROLE" and a relation with the BP "BP_X"
    • add the new BP on the territory "terr_A"

Now I must find a BAdi that is triggered after the commit of creation / update, because i need all the information on DB to use the BOL in order to assign a territory.

All the BAdi I've tried (PARTNER_UPDATE, BUPA_ROLE_CHECK, BUPA_FURTHER_CHECKS, BUPA_GENERAL_UPDATE and so on...) are triggered before the commit so, for example, i can't find the information on the BUT000 as well as I can't use BOL programming to do analisys.

Can you help me?

Thank you a lot...

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Alberto,

With the BAdis you will have to use FM that can read memory data while getting created for example BUP_MEMORY_BUT000_GET, but you run a risk that this data may get changed in some other BAdi after you have read it.

If you must be sure that data is saved in DB table before you start adding territory information, then you can trigger a job from one of these BAdi. Starting time of the job can be system time + 30 seconds so that you have enough time for data to get saved in tables. In the job program you can check again that data has been saved in table before starting your core logic.

If you have this logic for initial load, then you will have lot of jobs created. Probably best will be to have a separate program for initial load. But if this is for delta, then this solution will not have any problem.

Cheers,

Niraj

Former Member
0 Kudos

Hi,

Goto transaction code –SWETYPV

Create an event to trigger when partner is created.

Regards,

Padma.

0 Kudos

Hi,

I have checked your query. I believe PARTNER_UPDATE Badi is called for exchange scenarios after the COMMIT WORK AND WAIT is issued. By this time already the data will be in the DB buffer memory. If you need to change or add any information, in my opinion you can use this BADI. But this is generally used for collecting data for the outbound scenario.

I hope this helps.

Regards,

Venkat