Hello Experts,
I have created transaction launcher to launch VA01 from web ui and i am able to launch the VA01 transaction.
Here i need to pass the confirmed account number to VA01 transaction as a sold to party. Hence i have enhance the method IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW but i am not able to set the bp in sold to party field of VA01. I have used the BOR type as TSTC_UI.
Please see the code below and help me if i need to do any additional changes eaither in the configuration / code?
**********************
METHOD if_crm_ic_action_handler~prepare_data_flow.
DATA: __gdc TYPE REF TO if_crm_ui_data_context,
__source TYPE string,
__line TYPE string,
__path TYPE crmt_ic_ac_identify_path.
__gdc ?= cl_crm_ui_data_context_srv=>get_instance( gv_view_controller ).
*
*********** Begin of parameter declaration ***********
*
DATA icwcprocessedobject
TYPE ty_icwcprocessedobject .
DATA icwebclientborkeyparameter
TYPE ty_icwebclientborkeyparameter .
icwebclientborkeyparameter
=
'VA01'.
*
me->set_container_object(
iv_name = '<*MAINOBJ*>'
iv_object_key = icwebclientborkeyparameter
iv_object_type = gv_bortype ).
DATA lv_bpid TYPE bu_partner.
TYPES: BEGIN OF ty_param1,
pid(000020) TYPE c,
* value(10) type c ,
value(000250) TYPE c,
END OF ty_param1.
DATA lv_param1 TYPE ty_param1.
*
IF __gdc IS BOUND.
TRY.
CALL METHOD __gdc->get_entity_attribute_as_value
EXPORTING
path = '//currentCustomer/BP_NUMBER'
IMPORTING
value = lv_bpid.
CATCH cx_crm_bdc_no_data cx_crm_bdc_xpath_error cx_root.
ENDTRY.
*
lv_param1-pid = 'VAG'.
lv_param1-value = lv_bpid.
*
me->set_container_data( iv_name = 'PARAM1'
iv_value = lv_param1 ).
* iv_object_key = ICWEBCLIENTBORKEYPARAMETER
* iv_object_type = gv_bortype ).
CLEAR lv_bpid.
ENDIF.
*
* Data flow is complete - set to false if data is missing
gv_data_flow_complete = abap_true.
*
ENDMETHOD.
*********************************