cancel
Showing results for 
Search instead for 
Did you mean: 

Business partner Archive Issue in Web UI

Former Member
0 Kudos

Hi All,

I have a requirement to set the archive flag in BP while edit it in Web UI . Once user select status as close in EDIT mode of BP and press SAVE button then it should set the archive flag in backend.

could you please let us know where can I write the code so that after pressing save button after editing the data BP can be archived.

I tried writing code in PARTNER_UPDATE badi using FM - BAPI_BUPA_CENTRAL_CHANGE but it is raising Abort message and not working.

Please advise.

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

dharmakasi
Active Contributor
0 Kudos

Hi Saurabh,

What code you have written in PARTNER_UPDATE badi? can you share the code with us?

You can achieve this using bsp components itself, add code in set method of the status attribute. Check the new status is Closed then set the Archieve flag value using the entity itself.

Best Regards,
Dharmakasi.

Former Member
0 Kudos

Have a look at badi BUPA_GENERAL_UPDATE standard implementation CMS_CM_BUPA_GENERAL. It was created for central blocking, so it may be similar for archiving as well.

Hope, it will help.

Former Member
0 Kudos

Hi Dmytro,

I have copied same code in my Z-implementation but it is not working.

does this BADI trigger before saving the data?  how it function?

Please advise.

Former Member
0 Kudos

You can check what badis are triggered in class cl_exithandler. Set the breakpoint in method GET_INSTANCE and keep an eye on exit_name (names of calling badis).

Badi BUPA_GENERAL_UPDATE triggers during save process, the general purpose of it is to change BP data. You should not copy the same code of CMS_CM_BUPA_GENERAL (it sets BP central block), I have just given you a point how to do it in similar way.

Maybe it would be helpful (some hints for your code):

1. Read status value (BUPA_STATUS_CALLBACK or find another one FM)

2. Use FM BAPI_BUPA_CENTRAL_CHANGE ()

Maybe there are another options, but you  can try this.

Use debug it always helpful.