cancel
Showing results for 
Search instead for 
Did you mean: 

SRM 7.0 Approval note update

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

konstantin_anikeev
Active Contributor
0 Kudos

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

Former Member
0 Kudos


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

konstantin_anikeev
Active Contributor
0 Kudos

Hi, first update_longtext, then submit_update

regards

Former Member
0 Kudos

Hi Konstantin,

Thank you for the update. it works fine now.

Thank you

Magesh

Answers (0)