Question:
Hi
I need to retrieve the sales organisation information from a call list id.
I can not retrieve it from the Business partner number, because some of our BPs' are set up in more than one sales organisation.
Each item on a call list has a particular call id.
Does anyone know how this can be achieved..
Thank you
Darren
Answer:
Hi everyone
I found out how to do this. The key is to link the call id back to the underlying business transaction. Once you have the business transaction guid you can use the function module crm_order_read to retrieve the sales organisation information...
data:
lr_Call TYPE REF TO CL_TM_CLM_INTERACTION,
ir_bus_trans type ref to CL_TM_PXY_ACTIVITY,
lr_Business_Context TYPE REF TO CL_TM_BUSINESS_CONTEXT.
lr_Business_Context = lr_Call->get_Business_Context( ).
CHECK lr_Business_Context IS BOUND.
ir_bus_trans = lr_Business_Context->GET_BUSINESS_TRANSACTION( ).
ir_bus_trans->id "this is the bt guid.