cancel
Showing results for 
Search instead for 
Did you mean: 

BADI CRM_CLEANSING - merge functionality

Former Member
0 Kudos

Hello SAP CRM gurus,

basically we have implemented BADI CRM_CLEANSING in order to filter the target partners object of merge.

This BADI is called :

- 1 once the sellection of accounts is done via button 'MERGE ACCOUNTS'

- 2 in the following pop-up where you can decide the source account and the master account

- 3 inside the case which is the last stage, and after double-clicking on the button START.

I would like to code in the point 3. But my actual problem is that I cannot distinguish the stage in which the BADI is called.

We have tried with the sentence IMPORT MEMORY and EXPORT MEMORY.

But unfortunately that seems not working.

Any idea is welcome.

Thanks in advance,

AndreA

Accepted Solutions (1)

Accepted Solutions (1)

jordi_escodaruiz
Active Participant
0 Kudos

Hi AndreA!

Small world, isn't it?

¿Do you know something about shared objects?

Please, read this links.

http://help.sap.com/saphelp_nw70/helpdata/en/14/dafc3e9d3b6927e10000000a114084/frameset.htm

http://help.sap.com/saphelp_nw70/helpdata/en/c5/85634e53d422409f0975aa9a551297/content.htm

http://help.sap.com/saphelp_nw70/helpdata/en/5d/f4fc3f37c2e569e10000000a155106/content.htm

This technique is very powerful, and will give you a solution for your need.

I used it to integrate Webdynpro with WebClient UI.

Best regards

Jordi

Former Member
0 Kudos

Hi Jordi,

many thanks for your precious hint. Eventually I solved the problem by implementing an 'EXPORT MEMORY' abap CODE in the DO_PREPARE_OUTPUT of component CLEAR_HEAD as shown below.

lv_cle = '01'.

EXPORT para = lv_cle TO MEMORY ID 'CLE'.

Then I recover the value of variable lv_cle in the Badi implementation ZBADI_CRM_CLEANSING with the following code:

IMPORT para = lv_cle FROM MEMORY ID 'CLE'.

Eventually within the BADI, depending from the value of variable lv_cle, I implement my code:

IMPORT para = lv_cle FROM MEMORY ID 'CLE'.

IF lv_cle IS NOT INITIAL.

........

Many thanks for the documentation,

Best Regards,

AndreA

Answers (2)

Answers (2)

former_member191572
Contributor
0 Kudos

HI Andrea,

Try with the global variable. Create an static attribute in the respective class as check that in the required place.

Gv_flag Static Attribute Public Type boolean

Former Member
0 Kudos

Hi Gobi,

I have tried what you said. But unfortunately and again the BADI come three times until reaching the point 3 or the button inside the case.

Your suggestion is better but not enough for me.

I miss something like the logic to catch the first time with the variable and the second time inside the case.

In any case many thanks,

AndreA

former_member191572
Contributor
0 Kudos

Hi Andrea,

ok fine now i understand ur scenario. u just change the attribute property into string r integer. There u write the logic as below.

if gv_value = 3.

< > write ur logic.

clear gv_value.

else.

gv_value = gv_value+1.

endif.

former_member191572
Contributor
0 Kudos

Hi Andrea,

Please try with some other option becoz the import memory and export memory this will not work in CRM system like ECC. Already my self tried the same and failed.

Former Member
0 Kudos

Hi Gobi,

can you just be more explicit.

What do you mean for other options?

I am loosing my head in finding a way to distinguish the different moment when this BADI comes.

In any way many thanks for your suggestion,

Regards,

AndreA