cancel
Showing results for 
Search instead for 
Did you mean: 

Custom partner function BOL entity

Former Member
0 Kudos

Hi all,

We have 3 custom partner functions defined for our opportunity transaction. These appear in the 'parties involved' AB and I have no issue updating them from here. But my client's requirement is to put these partners on the details view. I tried to identify the BOL entities with each of these in Genil_bol_browser, but found that they exist as a collection in the BTPartner BOL entity.(Navigation path in Genil_bol_browser: BTQuery1O->BTOrderHeader->BTHeaderpartnerset->BTPartnerOpportunity) and not as an independant entity that I can add a context node for.

But for another transaction type we use all standard partner functions and I am able to add them to details assignment block by adding BTpartner context node into details view(using relation for ex: BTPartner_PFT_005_MAIN). I'm not able to find a relation similar to BTPartner_PFT_005_MAIN for our custom partner function.

I tried to do search in this forum and found that we need to do something with the table CRMV_ORLALL_BTIL. Can someone please give me some details on how to acheive this ?

Thanks

Sree

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

Entry in that table is there when you define your own bol object. But again difficulty that you will face is how will that bol object get data and set data.

If nothing works for you, use rename standared partner function and use it in partner determination procedure. Same you can get easily in ui as well. This is not good practice, do only if nothing works for you.

Best regards

Pankaj Kumar

Former Member
0 Kudos

Hi,

I have not worked with custom BOL objects. Can someone please share experience who may have woked with similar requirement ?

Thanks

Sree

Former Member
0 Kudos

Hi Sreesanth,

Create the entries for partner functions in the table CRMV_ORLALL_BTIL. Go to the required view and create the new attribute using the BTpartnerset relationship, with this, code will be automatically generated for the Getter and Setter methods.

we had a similar requirement, we have added the Zvendor as attribute in the Items assignment block for sales orders and populated the value using the following code:

method GET_VENDORSHS.

DATA: current TYPE REF TO if_bol_bo_property_access.

DATA: dref TYPE REF TO data.

value = ' '. "#EC NOTEXT

IF iterator IS BOUND.

current = iterator->get_current( ).

ELSE.

current = collection_wrapper->get_current( ).

ENDIF.

TRY.

DATA: coll TYPE REF TO if_bol_bo_col.

DATA: entity TYPE REF TO cl_crm_bol_entity.

entity ?= current.

coll = entity->get_related_entities(

iv_relation_name = 'BTItemPartnerSet' ). "#EC NOTEXT

current = coll->get_current( ).

IF current IS NOT BOUND.

RETURN.

ENDIF.

entity ?= current.

coll = entity->get_related_entities(

iv_relation_name = 'BTPartner_ZSVEND_MAIN' ). "#EC NOTEXT

current = coll->get_current( ).

IF current IS NOT BOUND.

RETURN.

ENDIF.

value = cl_crm_uiu_bt_partner=>get_partner2( current ).

CATCH cx_sy_ref_is_initial cx_sy_move_cast_error

cx_crm_genil_model_error.

RETURN.

ENDTRY.

endmethod.

And for Changig the value of the ZVendor, we have created the F4 help.

Hope it helps!

Regards,

S Reddy

Former Member
0 Kudos

Hi,

Thanks for the help. I'm not sure if I understand it completely. Can you please help me understand how you link the custom partner function Z_Vendor to BOL relation 'BTPartner_ZSVEND_MAIN' ? I would think we need to do some coding to establish this link and then maintain the entry in table CRMV_ORLALL_BTIL.

Appreciate your help with this.

Thanks

Sree

Former Member
0 Kudos

Hi Sree,

if you maintain the entries in the table CRMV_ORLALL_BTIL, automatically BOL entites will created under the BTPartnerset, no need of additional coding.

Regards,

S Reddy

Former Member
0 Kudos

I understand the relation will appear from BTPARTNERSET to BTPARTNER BOL object. But, where do we say that this relation will derive the custom partner function. I have three custom partner functions (Z_Leader1, Z_Leader2 & Z_leader 3). If I create 3 entries in this table, how do I/the system knows which relation should be used to read each one of these three partner functions.

Thanks again,

Sree

Former Member
0 Kudos

Hi Sree,

Under BTpartnerset>relations>BTpartner_ZSVEND_MAIIN Bol entity will be created. it will contain the structure CRMST_PARTNER_BTIL, which contains the PARNER_NO field, from here you can read the value of the partner function.

Regards,

S Reddy