Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Firoz_Ashraf
Contributor

When DMS was activated and a new category (Say, ZISPCOFFIC) was used instead of SOFFDB for class SOFFPHIO

(Using Transaction Code SKPR08)

Function Modules SO_DOCUMENT_SEND_API1 and SO_NEW_DOCUMENT_ATT_SEND_API1 was not sending emails with attachments. Exception X_ERROR was being generated.

Solution Implemented:

We enhanced subroutine phio_get_storage (in include LSDCLF05) used in FM SDOK_PHIO_STORE_CONTENT which is used internally by the above FMs. (ENHANCEMENT Z_DMS_EMAIL_ATTACHMENT)

Idea is to force these FMs  to use the storage category SOFFDB instead of new storage category.

Since there are many ABAP programs where we use these FMs to send the email attachments hence, we will maintain the program names in a custom table ZDML.

Since these ABAP programs do not store the attachments permanently. Rather, the attachments are generated at run-time and stored temporarily until emails are sent from SOST (The log, with attachment in SOST can be deleted by BASIS anytime, or standard jobs can be scheduled to delete once the emails are sent). Hence, forcing to use standard storage category SOFFDB will presumably not have any issue.

FORM phio_get_storage USING    p_stor_cat LIKE sdokphio-stor_cat

                      CHANGING p_stor_rep LIKE sdokstre

                               p_subrc    LIKE sy-subrc.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form PHIO_GET_STORAGE, Start                                                                                                                      A

*$*$-Start: (1)---------------------------------------------------------------------------------$*$*

ENHANCEMENT Z_DMS_EMAIL_ATTACHMENT.    "active version

**********************************ATG**********************************

  TABLES: ZDML.

  SELECT single * from ZDML where REPNM = sy-cprog.

  IF sy-subrc = 0.

    p_stor_cat = 'SOFFDB'.

  ENDIF.



ENDENHANCEMENT.

*$*$-End:   (1)---------------------------------------------------------------------------------$*$*



  STATICS: isdokstca        LIKE sdokstca OCCURS 0 WITH HEADER LINE,

If any one comes up with a better solution then please let me know.

Regards,

Firoz Ashraf.