on 03-29-2017 10:57 AM
Dear all,
I am trying to create followup activity on certain statuses of service request using BOL programming in action profile BADI.
If I am triggering this BADI on status which is not initial where service request is already created the code is working correctly and followup document getting created successfully.
However if I am triggering this BADI on initial status where service request is not saved yet my followup activity is getting created in buffer ( I am able to see activity no. on WebUI and when I open that activity it is giving information box as "The predecessor does not exist on the database" ) but not getting saved in database table.
Please help what could be the issue.
I have written following code to create followup document:
CALL METHOD lc_action_execute->get_ref_object
EXPORTING
io_appl_object = io_appl_object
ip_action = ip_action
ip_preview = ip_preview
ii_container = ii_container
IMPORTING
ev_guid_ref = lv_guid_ref
ev_actionname = lv_actionname
ev_actiontext = lv_actiontext.
DATA(lr_core) = cl_crm_bol_core=>get_instance( ).
lr_core->load_component_set( 'BTBP' ).
CHECK lr_core IS BOUND.
DATA(lr_order) = lr_core->get_root_entity( iv_object_name = 'BTOrder' iv_object_guid = lv_guid_ref ).
IF lr_factory IS BOUND.
CLEAR it_params.
CLEAR wa_params.
wa_params-name = 'PROCESS_TYPE'.
wa_params-value = 'Y001'.
APPEND wa_params TO it_params.
DATA(lr_order_sms) = lr_factory->create( it_params ).
IF lr_order_sms IS BOUND.
ENDIF.
ENDIF.
lr_adminh_sms->lock( ).
DATA(lr_tran) = lr_core->begin_transaction( iv_entity = lr_adminh_sms ).
lr_core->modify( ).
IF lr_tran IS BOUND.
lr_tran->save( iv_force_save = abap_true ).
ENDIF.
Thanks & Regards,
Rohan
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.