cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancement of webdynpro component /SAPSRM/WDC_DODC_NA.

Former Member
0 Kudos

Thanking you advance.

please help.

View  : V_DODC_ADDATTACHMENT

Method: ONACTIONON_SAVE ( pre or overwrite exit )

                 Context Node ATTACHMENT contains all existing attachment(file) details.

                Context Node FILE contains new attachment(file) details.

                Loop through all the attachments in node ATTACHMENT collecting value in attribute PHIO_FSIZE(bytes).

                Get file size for new attachment from node FILE ,

                  lon_file->get_attribute(

      EXPORTING

      name =  lc_fcontent

      IMPORTING

      value = lv_item_file_content ).

  lv_content = lv_item_file_content.

  lv_fsize = XSTRLEN( lv_content ).

               

                Add new file size to existing file size and compare with threshold limit ( e.g. lv_tot_size > 60mb).

                Throw error and return.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Unfortunately, I don't have access to SRM system. Is the node ATTACHMENT already being read in the ONACTIONON_SAVE method? If so, to avoid redundancy you can go for overwrite/ post exit.

If you have to read the ATTACHMENT node and calculate, go for Pre-Exit and display exception if total size exceeds threshold.

Hope this helps u.,

Regards,

Kiran