Skip to Content
0
Former Member
Aug 04, 2008 at 08:17 AM

get entity BTPartner

22 Views

Hi,

I am trying to get the GUID for my contact in context node BTPARTNERCONTACT in the lead component.

I am writing the following code in the get_partnerno:

method GET_PARTNERNO.

DATA: current TYPE REF TO if_bol_bo_property_access.

  • value = 'BTPartner not bound'. "#EC NOTEXT

IF iterator IS BOUND.

current = iterator->get_current( ).

ELSE.

current = collection_wrapper->get_current( ).

ENDIF.

value = cl_crm_uiu_bt_partner=>get_partner2( current ).

DATA : lr_part TYPE REF TO cl_crm_bol_entity,

lv_mode_en TYPE string,

ET_ADSMTP TYPE bapiadsmtp,

iv_partner type BU_PARTNER.

lr_part ?= typed_context->partner->collection_wrapper->get_current( ).

*THIS LINE IS GIVING AN EXCEPTION ANY IDEA????

lv_mode_en = lr_part->get_property_as_string( iv_attr_name = 'PARTNER_GUID' ).

CALL FUNCTION 'BUPA_ADDRESS_GET_DETAIL'

EXPORTING

  • IV_PARTNER =

IV_PARTNER_GUID = lv_mode_en

  • IV_ADDRNUMBER =

  • IV_ADDRGUID =

  • IV_VALDT = SY-DATLO

  • IMPORTING

  • ES_ADDRESS = ADDRESS.

TABLES

ET_ADSMTP = ET_ADSMTP.

lr_part->set_property( iv_attr_name = 'e_mailsmt' iv_value = ET_ADSMTP-E_MAIL ).

.

endmethod.

I am getting an exception here

lr_part ?= typed_context->partner->collection_wrapper->get_current( ).

is this the correct way 2 get an entity?

Please help!!!

Regards

Shilpi