cancel
Showing results for 
Search instead for 
Did you mean: 

Adding additional attributes related to transaction in mail forms

faisal_pc
Active Contributor
0 Kudos

Hi All,

I am trying to add additional attributes in a mail form. I have created the attribute context and the assignment of the structure to the same is already done. Now I need to populate the values for that custom attributes. For this I have implemented the BADI CRM_IM_ADD_DATA_BADI. Here, I could see only BP GUID I can get. But my case is, I am creating an email as a follow up of a complaint. And in the email I want the Complaint ID and some related data. So could anybody please let me know on how can I get the transaction related data in this BADI. Or can I achieve this using any other ways. This transaction number is already available in 'Reference' field in email page.

Thanks,

Faisal

Accepted Solutions (0)

Answers (1)

Answers (1)

sumeet_gehlot
Contributor
0 Kudos

Hi Faisal,

I am not sure but you can try with Global data context or Global custom contoller.

TRY.

* Create an instance of the data context.

       lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( ).

       IF lr_gdc IS BOUND.

* Get the Business Transaction entity

         lr_current_bt = lr_gdc->get_entity( if_iccmp_global_data_cont_con=>gdc_currentservicerequest ).

* Get the Business Transaction GUID

         ls_guid = lr_current_bt->get_property_as_string( 'CRM_GUID' ).

         l_obj_guid = ls_guid.

       ENDIF.

     CATCH cx_root.

   ENDTRY.


Regards,

Sumeet

faisal_pc
Active Contributor
0 Kudos

Hi Sumeet,

With GDC we have already tried. But no luck as the entity is not available in GDC.

Thanks,

Faisal

Saurabh_Kabra
Participant
0 Kudos

Hi faisal,

Did you try to set the entity using lr_gdc->Set_entity method? And then you can probably get the entity details using lr_gdc->get_entity at the desired place.

Currently entity is not available because it might not have been set by standard. but anyways you can set it using SET_ENTITY method of GDC.

Thanks

Saurabh kabra