|
SAP Community Network Forums
»
SAP Solutions
»
Customer Relationship Management (CRM) - General & Framework
Thread: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
 |
This question is answered.
|
|
Replies:
14
-
Pages:
1
-
Last Post:
Nov 9, 2009 6:05 AM
Last Post By: Sanila John
|
|
|
|
|
|
|
BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 4, 2009 7:51 AM
|
|
|
|
Hi experts,
I have used this BADI BADI_CRM_BP_UIU_DEFAULTS for defaulting the number range while creating a BP. This works perfect.
Now I have one more requirement. Default the number range for BP which gets created in MSA (CRM offline)
Can I implement the BADI BUPA_INBOUND for this ?
I am looking for the right code to put in this BADI.
My requirement is when a BP is gets created in MSA and send to CRM ,based on the BP Type say if Organization then I want to default the number range (BU_GROUP ='0060')
Please reply the code for this requirement.
Thanks
Sanila
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 4, 2009 9:00 AM
in response to: Sanila John
|
|
|
|
I have used the CHECK_BEFORE_INBOUND method of this BADI to change the group as you required.
the field to set is c_bp_central_data-common-data-bp_control-grouping based on your criteria for changing.
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 4, 2009 9:46 AM
in response to: Sanila John
|
|
|
|
Hi Paul,
Thanks a lot for this.
This is excatly what I am looking for .Could you please paste the code here
Thanks
Sanila
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 4, 2009 10:12 AM
in response to: Sanila John
|
|
|
|
I does not feel appropriate for me to write the code for you, not knowing you environment and specific criteria.
Have a go yourself, and I will happily advise if you have problems.
Edited by: Paul Thompson on Nov 4, 2009 10:12 AM
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 5, 2009 9:12 AM
in response to: Sanila John
|
|
|
Hi Paul,
My code is as below but when I create a BP in MSA , the grouping id not getting changed to 0060. This is still having the internal grouping configured.
METHOD if_ex_bupa_inbound~check_before_inbound.
IF c_bp_central_data-common-data-bp_control-category ='2'.
c_bp_central_data-common-data-bp_control-grouping = '0060'.
ENDIF.
ENDMETHOD.
Thanks ,
Sanila
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 5, 2009 9:18 AM
in response to: Sanila John
|
|
|
|
hi
Not quite sure what you mean when you say entry via MSA, but
I think it is probably worth trying to debug now, to ensure entry via MSA is invoking this BADI, and checking the values of the data.
Are you okay to debug the middleware ?
It requires putting the breakpoint into the BADI, deregistering the queue, changing the RFC user associated with middleware to a dialogue user, and then going into debug from the queue in SMQ2.
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 5, 2009 12:24 PM
in response to: Sanila John
|
|
|
|
Hi Paul,
MSA is nothing but SAP CRM's Mobile sales application .
I am okay with debugging middleware but can you tell me how to
change the RFC user associated with middleware to a dialogue user.
Thanks,
Sanila
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 5, 2009 12:28 PM
in response to: Sanila John
|
|
|
|
Hi Sanilla
transactio SU01, put in the user name of the middleware RFC user, usually RFCUSER (but may be different on your system), and press change icon.
On the 'logon data' tab, the field user type should be changed from 'B System' to 'A Dialogue'.
It may be that you do not have authorisation in which case you will need to ask the help of your Basis team.
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 5, 2009 12:58 PM
in response to: Sanila John
|
|
|
Hi Paul,
I changed the RFC user to Dialog user
Deregistered the Q
and from SMQ2 I debugged but my code of the BADI_INBOUND was not getting hit.
But I assumed that any new BP created from outside CRM will go through this BADI before save in CRM.
Is there an alternate place where I can acheive this functionality.
hanks& Regards,
Sanila
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 5, 2009 1:02 PM
in response to: Sanila John
|
|
|
|
I do a similar thing with BP coming from an ECC5 system, and this does go through this BADI. If the entry is appearing in the queue, I would expect it to go through the same process.
have you checked the badi is active ?
and have you tried a hard 'breakpoint' command in the badi rather than trying a session breakpoint ?
This badi should be being invoked by a bupa bdoc.
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 6, 2009 12:28 PM
in response to: Sanila John
|
|
|
|
Hi Paul,
I debugged the middleware part and I could see that in the below code the BADI is not getting called because
he value for gv_class_bupa_inbound is INITIAL.
*BAdI for Inbound
DATA: gv_class_bupa_inbound type ref to BUPA_INBOUND.
GET BADI gv_class_bupa_inbound.
CATCH CX_BADI_NOT_IMPLEMENTED into lc_ref.
ENDTRY.
IF gv_class_bupa_inbound IS NOT INITIAL.
CALL BADI gv_class_bupa_inbound->check_before_inbound
EXPORTING
iv_partner = lv_partner
iv_partnerguid = lv_partnerguid
IV_OBJECTTASK = ls_header-object_task
CHANGING
c_bp_central_data = ls_central_data.
ENDIF.
The BADI is active. When I go to se18 and open the BADI ,it displays as Enhancement spot. Is that the issue.
Or am I missing something else.
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 6, 2009 12:39 PM
in response to: Sanila John
|
|
|
|
if gv_class_bupa_inbound is INITIAL then the badi is not being seen as active.
Can you check in SE19 for the implementation, on tab 'Enh.Implementation Elements', under the section 'Runtime Behavior', is the 'implementation active' checkbox checked ?
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 6, 2009 2:24 PM
in response to: Sanila John
|
|
|
|
Hi,
The checkbox under Runtime behaviour Implementation is Active is checked.
Should I cross check some other settings.
Sanila
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 6, 2009 2:36 PM
in response to: Sanila John
|
|
|
|
If the badi is active and the implementation has been generated and activated, the get badi command should be returning a non null value to the gv_class_bupa_inbound.
I am sorry there is not much more I can suggest if all looks like it is active.
It should be invoking the badi.
|
|
|
|
|
|
Re: BADI BUPA_INBOUND How to change BU_GROUP for the incoming BP
Posted:
Nov 9, 2009 6:05 AM
in response to: Sanila John
|
|
|
|
Hi Paul,
I found the issue.
The issue was For the BADI in the tab Enh spot element Definitions under the header 'Instance creation Mode'
I selected Reusing Instantiation and now the BADI is getting called.
Thanks for your support.
|
|
|
|
|