on 01-30-2014 2:36 AM
Hello SRM experts,
I have an requirement to update SC approval note from any function module/Class.
I was trying to use below method to update. unfortunately it is not working. I may missing something i guess. Can you please someone help us to resolve the issue to update SC Approval note
Is there any other was to update the approval text?
lo_sc1 = /sapsrm/cl_pdo_factory_sc_adv=>get_instance(
iv_header_guid = iv_document_guid
iv_mode = /sapsrm/if_pdo_constants_gen_c=>GC_MODE_EDIT
IV_WIID = iv_workflow_id
IV_USER_ID = 'xxxx' "'<<approver>>'
IV_USER_LANGUAGE = 'E'
).
lo_sc1 ->/sapsrm/if_pdo_do_longtext~update_longtext(
EXPORTING
iv_p_guid = iv_document_guid
iv_tdid = 'NOTM'"iv_tdid'
iv_tdspras = 'E'"iv_tdspras
iv_tdformat = 'X'""
iv_text_preview = 'iv_text_preview') .
Thank you
Magesh
Hi Magesh,
in common, you doing wright...
don't forgen
lo_sc1->/sapsrm/if_pdo_base~submit_update( CHANGING co_message_handler = lo_message_handler ).
lo_sc1->/SAPSRM/IF_PDO_BASE~SAVE()
after that.
Regards
Konstantin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Konstantin,
Thank you for the update again.
I was trying to use below logic. but still i am not getting and it is not updating. I am doing any wrong?
data
lo_message_handler type REF TO /SAPSRM/IF_PDO_MSG_CONSUMER.
data lo_sc1 type REF TO /SAPSRM/IF_PDO_BO_SC_ADV.
lo_sc1 = /sapsrm/cl_pdo_factory_sc_adv=>get_instance(
iv_header_guid = iv_document_guid
iv_mode = /sapsrm/if_pdo_constants_gen_c=>GC_MODE_APPROVE_AND_EDIT
IV_WIID = iv_workflow_id
IV_USER_ID = 'USMANAGER12' "'<<approver>>'
IV_USER_LANGUAGE = 'E'
).
lo_sc1->/sapsrm/if_pdo_base~submit_update( CHANGING co_message_handler =
lo_message_handler ).
lo_sc1->/sapsrm/if_pdo_do_longtext~update_longtext(
EXPORTING
iv_p_guid = iv_document_guid
iv_tdid = 'NOTM'"iv_tdid'
iv_tdspras = 'E'"iv_tdspras
iv_tdformat = 'X'""
iv_text_preview = 'iv_text_preview') .
lo_sc1->/SAPSRM/IF_PDO_BASE~SAVE
( ).
since i am new to these kind of development kindly help me on this...
Thank you
Magesh
User | Count |
---|---|
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.