on 06-17-2009 3:51 PM
Hello Experts,
We are on CRM 2007.
Our requirement is to add a dummy payment card to a Business Patner during/before/after SAVE.
It should work if we create a Business Partner from either BP transaction or CRM IC Web UI.
Which BAdI can I use to write the code ?
Also, sample code if you have any please
Regards,
Sree
Hi Sree,
Since you want to trigger this operation on the save of a business partner, you need to look for a Business Partner BADI, not a payment card BADI.
The best BADI here is PARTNER_UPDATE. This will be called when a BP is saved - from transaction BP or Web UI, or even other applications - any way.
In general, PARTNER_UPDATE is used to trigger any operation after the save of a BP.e.g : data exchange, synchronization, updates meant to be sent to other applications, etc.
In this case, you can create the payment card within the implementation of PARTNER_UPDATE. Possibly you can use the payment card BAPIs for this, namely BUPA_PCARD_ADD, etc.
Hope this helps you.
Cheers,
Rishu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sree,
How did you get the BP number to which you are trying to add the card ? In change mode, you might know the BP number from before, but in create mode, it will be different..
If you are trying to create the PCARD during CREATION of the BP, you would need to first call the FM BUPA_GENERAL_CALLBACK to get the BUT000 details, which will give you the partner number which exists in memory, but is not yet created on the database.
Using the BP number obtained from the mentioned FM, you can call BUPA_PCARD_ADD.
Another solution :
You can implement the EVENT CREATED of Business Partner object. To have a look at this, look at transaction swo1 (oh - not zero). Give object = BUS1006. Look under 'Events'. These are some events triggered during various points in BP creation / change, etc. - this is also solve the problem.
Cheers,
Rishu.
Hi Rishu,
I have already tried exactly what you said.
In PATNER_UPDATE BAdI, I used BUPA_GENERAL_CALLBACK to get the partner number and tried calling BUPA_PCARD_ADD.
As I said before, I'm getting Business Partner doesn't exists error in FM BUPA_PCARD_ADD call.
If possible can you try from your end too ?
We are trying not to go for EVENTS.
Thanks and Best Regards,
Sree
Hi Sree,
Please try to implement the BADI BUPA_CCARD_IMPORT, using transaction SE19.
Unfortunately I do not have code examples for you, however it seems to be a quite simple code: all you have to do is fill the exporting parameter "ET_BUT0CC".
I hope it helps.
Best Regards,
Gabriel Santana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.