Skip to Content

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

(Using Transaction Code SKPR08) SKPR08.jpg

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)---------------------------------------------------------------------------------$*$*




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

  IF sy-subrc = 0.

    p_stor_cat = 'SOFFDB'.



*$*$-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.


Firoz Ashraf.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply