BADI COM_PARTNER_BADI
Hello experts
I am trying to implement the BADI COM_PARTNER_BADI for determining Sold-to Parties from different Partner functions in a preceding document. But I notice that if I implement this, it only works when the Contact Person, Employee Responsible or Person Responsible is determined. Why is this so? Do I miss a setting?
Regards,
Sowmiya
I hope the following pointer code in DETERMINATION_ADD_IN_2 method helps you
*1. Partner comes from SC header (sales rep at the item level is assumed in BADI BILL_ACC_IF)
call function 'CRM_PARTNER_READ_OW'
exporting
iv_ref_guid = lv_sc_guid
iv_ref_kind = 'A'
iv_partner_fct = is_determination_step-partner_fct
iv_mainpartner_only = 'X'
importing
es_partner_wrk = ls_partner_external_wrk
exceptions
error_occurred = 1
parameter_error = 2
entry_does_not_exist = 3
others = 4.
if sy-subrc eq 0.
ls_found_partners-partner_number = ls_partner_external_wrk-partner_no.
ls_found_partners-display_type = 'BP'.
ls_found_partners-no_type = 'BP'.
ls_found_partners-default_partner = 'X'.
insert ls_found_partners into table et_found_partners.
endif.
else.
* 2. The other partners come from the schedule items
* first find out if this is a new item or comes from a change process.
call function 'CRM_PARTNER_GET_DECOUPL_VALUES'
importing
ev_ref_object = lv_ref_object
ev_ref_kind = lv_ref_kind.
if lv_ref_kind eq 'B'.
lv_pred = 1.
call function 'CRM_CAI_PREDECESSOR'
exporting
iv_guid = lv_ref_object
iv_pred = lv_pred
importing
ev_guid = lv_pred_guid
et_return = et_return
exceptions
failed = 1
others = 2.
* if there is no predecessor then it's the current item
if sy-subrc ne 0 or lv_pred_guid is initial.
lv_pred_guid = lv_ref_object.
lv_chng_process = 'NEWL'.
endif.
*read predecessor item details
call function 'CRM_ORDERADM_I_READ_OW'
exporting
iv_guid = lv_pred_guid
* IV_INCLUDE_DELETED_ITEM = ' '
importing
es_orderadm_i_wrk = ls_orderadm_i
exceptions
item_not_found = 1
others = 2
if sy-subrc <> 0.
Similar Messages
-
Badi in standard tranction BP in CRM module
Hi,
i have to impliment badi in tranction BP, for field postal code and city i have to valdidate this 2 fields can u help me to know which badi i have to use and in which
interface i have to use this,
thanks,
Tanveerhi sonali
this is the normal problem faced with the BADI which u r using,yeah it will definitelty give u solution but some ifs and buts are there
just refer the note 663905
also try using BAdi COM_PARTNER_BADI
but i should tell you that
COM_PARTNER_BADI is for business transactions, not for BP creates/changes. BUPA_FURTHER_CHECKS is usable for customer checks and it provides all of the customer information in the BADI interface, but it's only called by the BP BAPIs, not by the BP transaction.
For BP updates at create/change save time, the BUPA_UPDATE BADIs need to be used. The interface only provides the GUID of the not yet created BP or the GUID of the changed BP, not a bunch of parameters that you can change before save. However, you can call the BUPA_CALLBACK series of function modules to get the info you need about the BP, and use a field symbol to directly access the data in the memory stack i.e., (SAPLBUD0)MEM_BUT000[] and change the values. I am using this technique to add an authorization group to certain BP type at create save time.
best regards
ashish -
Hi All,
I need to check for certain data changes before saving a business partner using transaction BP in CRM. If there are any unwanted changes I need to throw an error and should not allow to change the business partner using transaction BP.
For this purpose I found BADI BUPA_FURTHER_CHECKS and implemented the BADI method CHECK_CENTRAL. I have put a break-point in the method but it doesn't stop.
I have activated the implementation of the method and BADI but still doesn't work.
Has anyone successfully implemented this BADI? or is there is any other BADI to solve my problem?
Please let me know if anyone has answers.
Points will be rewarded.
Thanks in advance.
Sonali.hi sonali
this is the normal problem faced with the BADI which u r using,yeah it will definitelty give u solution but some ifs and buts are there
just refer the note 663905
also try using BAdi COM_PARTNER_BADI
but i should tell you that
COM_PARTNER_BADI is for business transactions, not for BP creates/changes. BUPA_FURTHER_CHECKS is usable for customer checks and it provides all of the customer information in the BADI interface, but it's only called by the BP BAPIs, not by the BP transaction.
For BP updates at create/change save time, the BUPA_UPDATE BADIs need to be used. The interface only provides the GUID of the not yet created BP or the GUID of the changed BP, not a bunch of parameters that you can change before save. However, you can call the BUPA_CALLBACK series of function modules to get the info you need about the BP, and use a field symbol to directly access the data in the memory stack i.e., (SAPLBUD0)MEM_BUT000[] and change the values. I am using this technique to add an authorization group to certain BP type at create save time.
best regards
ashish -
COM_PARTNER_BADI is not trigger during CHANGE
I can determine the Manager partner function by using BADI COM_PARTNER_BADI method DETERMINATION_ADD_IN_1. However, if the user changes the partner function, Manager need to be redetermined. The problem is, This BADI is not getting triggered during Change. Please let me know if i am missing something...Thanks.
Please check the below documentation:
Partner Redetermination Using this function, you can manually trigger the partner determination procedure from within a business transaction, such as lead or opportunity, and redetermine all parties, such as contacts, employees, and other partners, involved in the transaction. This enables you to ensure that the correct parties are identified and associated with a transaction This might be necessary because partners determined originally, based on a partner determination procedure, are no longer up-to-date. You might have switched to new partners, for example, which in turn might require changes to all dependent partner functions. Prerequisites u2022 You have set up the partner determination procedure appropriately. You do this in Customizing for Customer Relationship Management, by choosing Basic Functions Partner Processing Define Partner Determination Procedure . u2022
You have activated the enhancement implementation ES_CRM_SET_ACTIVE of the enhancement spot ES_CRM_PARTNER_REDETERMIN.
You have to set the parameter value X for the user parameter CRM_REDETERMINATION
Note Partner redetermination is only possible for those business objects listed in the table COMS_PARTNER_DET. Features You can start partner redetermination manually from the overview page of a lead or opportunity.
Depending on your Customizing settings, partners are redetermined as follows:
No Redetermination The partner functions in the partner determination procedure that have this value are not changed. All existing partners remain, with no new partners of the given partner function being determined or added to the partner set. Similarly, any existing partners are not replaced.
Add New Partners The partner functions in the partner determination procedure that have this value are redetermined. All existing partners remain and any new partners determined based on the partner function are added to the partner set. Before a new partner is added to the set, the system checks whether the same partner with the same partner function already exists. If this is the case, the newly determined partner is not added to prevent a duplicate entry. The system indicates when the maximum number of partners has been reached.
Replace Existing Partners The partner functions in the partner determination procedure that have this value are redetermined. All existing partners of the given partner function, irrespective of whether they were entered manually or determined automatically, are discarded and the newly determined partners with the given partner function are added to the partner set. The system indicates when the maximum number of partners has been reached.
Note A partner might be replaced by the same partner. However, if the partner previously had any notes, these will be lost. u2022 Buying Center All partners in the buying center are partner functions of the partner function category Contact Person. If redetermination is allowed for partner functions of this category, this affects the buying center as follows: o Where new partners are added, newly determined partners are shown but without any characteristics, relationships to other partners, or relationship characteristics. o Where existing partners are replaced, the buying center partners of a given partner function are replaced completely, resulting in not only the partner being deleted, but also the associated characteristics, relationships to other partners, and relationship characteristics. Note
If partner determination has been blocked in Customizing for the partner determination procedure, redetermination does not take place for this partner function, irrespective of the settings made for partner redetermination. u2022 Partner functions that are not part of the partner determination procedure are unaffected by redetermination. u2022 If redetermination is performed, territory determination also takes place. However, there is no organizational data determination, or price and free goods determination. -
Determine where badi is called from : webshop, GUI or webUI
Hi Experts,
I am working on BADI com_partner_badi.
I want to determine where this badi is being called from, ie, either from webshop, GUI or webUI in the ABAP debugger.
Which parameter of the badi should i check , which will provide me with the calling application ?
Thanks,
Shantanu.
Edited by: shantanu sardal on Mar 18, 2009 10:15 AMHi Shantanu,
Here is the explanation: The purpose of BADI is to enhance the functionality as per the customer needs. SAP has given the envelope in which you can write your own logic to change the SAP's standard behavior. Now the question that from where it gets triggered ?? It is not dependent on the GUI or Web UI etc , It can be triggered from any where as long as the component's code is getting triggered.
For example You create a BP from GUI or from WebUI does not matters as underneath API's remains the same and if you have a BADI implementation for the BP it will get triggered irrespective of the GUI or UI.
Hope this will clear your doubt.
Thanks,
Vikash. -
Need help on my requirement...
Hello Experts,
I am experimenting with BADI 'COM_PARTNER_BADI' and 'CRM_PRICING_BADI' for transaction CRMD_ORDER. My requirement is this,
I need to check the customer classification of the given customer and if it falls as '09', then I
need to bypass all the condition exclusion for its pricing procedure.Hope you can help me guys.
Thank you and take care!No answer...
-
Employee determination on the basis of Org.Unit
Hi expert,
I'd like to retrieve the employee responsible for a task from the organizational unit:
In the business scenario i've a person that, for each org unit, is in charge to fulfill this task; the expected behaviour would be that while creating a task, the employee responsible is automatically filled with the person, that for the identified org unit, is responsible.
I've set the access sequence "0009: organizational data employee for an organizational unit." in correspondence of the partner function Employee responsible; Now i don't know how to link that person to the org unit. Do i have to use position before?
Regards
CCarmine,
You would need to create a new access sequences based on organizational data. Then you would also need to use a organizational data determination rule to determine which org unit/position should be used in the sequence.
If this can't work, then you need to implement the partner determination BADI (COM_PARTNER_BADI) to build your source determination logic so that it meets your needs.
Good luck,
Stephen -
ZCL_IM_COM_PARTNER_BADI - not breaking on break point.
I have implementated a BADI but the methods
IF_EX_COM_PARTNER_BADI~DETERMINATION_ADD_IN_1,
and
IF_EX_COM_PARTNER_BADI~DETERMINATION_ADD_IN_2,
and
IF_EX_COM_PARTNER_BADI~DETERMINATION_ADD_IN_3
are not been called and when I but a break point inside IF_EX_COM_PARTNER_BADI~DETERMINATION_ADD_IN_3 it doesnt break during the creation of service oder.
Kindly assist.fill in your batch sequence=10, dialog seq.=10 if it's the first access.
If your source is COM_PARTNER_X, then go to se18, enter badi=COM_PARTNER_BADI.
If you already created implementation, should find it under implementation menu -> overview and select your implementation. Otherwise, create a new one.
Then go to interface tab and click on DETERMINATION_ADD_IN_1 method. Implement your source codes here. Put an external breakpoint for testing.
Dont forget to assign your access sequence in the 'Partner function in proceudure' in partner determination procedure.
Lastly, assign the partner determnation procedure to your service order trx. -
Parties involved work center and partner functions in SAP WEBUI
Dear Experts,
Here is the situation
I have sales rep, quote admin1, quote admin2 and quote admin3 positions in my org model. Each level has approval process. All of these three types of users will create quotes directly without a previous document/follow-up document.
When a sales rep or anybody other than quote admin logon to create quote, parties involved <> quote admin should be admin1. When admin 1 logon, it should default to admin1. Admin 2 logs in only after admin1 so, it should display admin1 and admin2. When admin 3 logson, it should show admin1, 2 and three. They need to be able to see howmany quote admins already there in the quote. How can I get this?? Please help me..Hi Sri,
You can use Partner Determination Procedure for the first time to create a Quotation automatically which will be triggered by the system. For the next time, based on your requirement you can probably need to use something else which will trigger the partner determination and will select the partner function and the business partner. You can check the badi - COM_PARTNER_BADI which is used for the Partner Procedure Determination.
Hope this helps.
Thanks,
Samantak. -
Administration header could not be found error in Mobile Apps
Hi All,
Our company is using Sybase as the mobile application. Now we have a requirement to stop an opportunity from being saved upon certain condition.
What I did:
~ I implemented ORDER_SAVE, method CHECK_BEFORE_SAVE
~ Inside the method, for some condition i do RAISE DO_NOT_SAVE
Result:
~ The web UI is behaving properly, the defined message appeared, and the document is not saved
~ However, if the transaction is created from Sybase Side, it prompts error "Administration header could not be found for XXXXXXXXXXXXXXXX" <--GUID
Any idea why the error message in the Sybase side is prompting some kind of system error instead of my defined error message? in addition to that, the process also jammed in the MI System.
Best Regards
Andre JuliusI have the same problem when I'm doing the partner determination with the badi COM_PARTNER_BADI.
But I don't known what's happened
Luiz Schumann -
Copy users in Parties Involved on Opportunity to Email Activity
Hello Gurus,
In CRM WEB UI when i am creating a Email Activity as a follow up of an existing Opportunity (with Parties Involved having email Id's) , is it possible to copy the email id of the users in Parties involved of the Opportunity to the email Activity in the To : field
Currently it only gets the email ids of contact persons on opportunities to the email activity when its create as a follow up.
Will i be able to achieve this using config without doing any development?
Thanks a lot in advance.
Thanks
Edited by: Chetan Tangadpelli on Jul 20, 2011 8:49 PM
Edited by: Chetan Tangadpelli on Jul 21, 2011 3:21 AMHi Chetan,
Functionally Iam not aware how you can achieve it, but you can try implementing the COM_PARTNER_BADI to achieve this.
Get the access sequence created so that, the method DETERMINATION_ADD_IN_1 of the BAdI COM_PARTNER_BADI is called.
Now inside this method you can try to read the partner values of the oppurtunity and assign them to the follow up Email activity.
Hope this helps you out!
Regards
Veena. -
Update Sold to party address to Ship to party in parties involved
Dear Experts,
I have problem in Development, actually my requirement is while creating the service order user will give the Sold to party number. I want to update the ship to party address as per the given sold to party in the Parties involved.
Please guide.
Regards
AnandhanHi Anandhan,
Have you worked on call back event function modules earlier. Using a call back function module would be required more of coding and in your case its not necessary to use FM.
There is another simple way to achieve this requirement. You can create a custom implementation for the badi COM_PARTNER_BADI and use the method COM_PARTNER_MERGE.
This badi will trigger for all the partners maintained in service order, so we have pick only ship to party partner function.
1. Check the partner function field(partner_fct) value in changing parameters CS_PARTNER_BADI, if it is your ship to party partner function then continue with below steps
2. Get the REF_GUID field from CS_PARTNER_BADI and
read the document process type and partner details. Observe below sample code
lv_guid = is_partner_control-document_id. "is_partner_wrk-guid.
APPEND lv_guid TO li_guid.
lw_object_name = 'ORDERADM_H'.
APPEND lw_object_name TO li_object_name.
lw_object_name = 'PARTNER'.
APPEND lw_object_name TO li_object_name.
CALL FUNCTION 'CRM_ORDER_READ_OW'
EXPORTING
it_header_guid = li_guid
it_requested_objects = li_object_name
IMPORTING
et_orderadm_h = li_orderadm_h
et_partner = li_partner
CHANGING
cv_log_handle = lv_log_handle
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
IF sy-subrc <> 0.
RETURN.
ENDIF.
3. Check the process type using li_orderadm_h table.
4. Read sold to party partner details from li_partner and pick the address fields and assign them to CS_PARTNER_BADI structure.
Best Regards,
Dharmakasi. -
Change Employee Responsible based on user who last changed.
CRM 5.0
Partner procedure has IC Agent & Employee Responsible. Both use partner access sequence 0008 which brings in the person that created the document.
We would like to automatically change the Employee Responsible based on the last employee BP that changed the document. This would be useful in warm transfers via CTI instead of the user manually changing the record. The IC Agent can always be the person that created the record.
I don't see any actions that can set this, is there any standard functionality to do what I want? or is this an enhancement.Try this BadI, COM_PARTNER_BADI.
Cheers,
cady. -
Hi we ware using SAP CRM 2005.
we have assigned the responsible employee to every customer. We now want to exchange the business partner for the relationship employee responsible.
Is there a chance to delete or restrict the validity for all existing relationships to the former employee responsible and to create a new relationship of the type employee responsible for all relevant customers? (Mass-change)
Oliver
Message was edited by:
Oliver BitterwolfTry this BadI, COM_PARTNER_BADI.
Cheers,
cady. -
"Administration header could not be found" Error POP
hi
i m getting the pop up "Administration header could not be found" when i m using the FM CRM_ORDER_MAINTAIN to fill a BP(prospect) in Lead transaction which i have created through a BAPII have the same problem when I'm doing the partner determination with the badi COM_PARTNER_BADI.
But I don't known what's happened
Luiz Schumann
Maybe you are looking for
-
When opening Iphoto (Iphoto 9 version 8.1.2) I went from hundreds of photos to 0. I looked in my harddrive and could not locate the pictures under library or photos. I tried rebuilding the system (ctl. alt. and opeing the program). I would assume
-
I am trying to create a "text slideshow" that will have 4 different quotes appear on top of 4 different images (using it's own slideshow). When I use the blank composition widget, I can't get rid of the thumbnails (even when the fill and stroke are s
-
Everything on my scanner worked perfectly up until two days ago. I am on a Mac and upgraded my system software to 10.10.3 and now the scanner doesn't work. I am still able to print, but not scan. Nothing else was changed anywhere on the printer or sy
-
Changing the PXI-6624 Counter Output rate on the fly
I'm programming an application in VB.net 2005 to set several counter output channels (each with its own task) on the PXI-6624 card. I'd like to know if there is a way to change the frequency of the output without stopping the task, changing the frequ
-
TS5376 download file will not save for installation
As above I have been through the whole process as detailed. I did have issues uninstalling the mobile portion but got there in the end. I wnt into files and deleted anything left. Now when I ask to download file it ask to save and even though I hit s