cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Attachment in Change Request in SAP MDG through code

naseemallika14
Participant
0 Kudos
287

Hello Experts,

I have a requirement, to fetch the files from ai11 and update the attachments in Change request section.

Could you please let me know if you have any sample code for that.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

studencp
Participant

cl_usmd_model=>get_instance( EXPORTING i_usmd_model = 'xx' " your model here

IMPORTING eo_instance = lo_model

et_message = lt_message ).

lo_model->write_char_value( EXPORTING i_fieldname = usmd0_cs_fld-crequest

it_data = lt_crequest_attachment

IMPORTING et_message = lt_message ).

where:
lt_message TYPE usmd_t_message

lt_crequest_attachment TYPE TABLE OF usmd_s_crequest_attachment

lo_model TYPE REF TO if_usmd_model