Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10473

Re: Attachment in Travel Request

$
0
0

Hi,


callmethod lo_document->add_attachment is used for a ADOBE form PDFattachment which is coming to with the mail. I used CALLFUNCTION'SAP_WAPI_GET_ATTACHMENTS' and got the WF attachments in t_attachment (See the valule in attached image). Now problem is this how can I append my t_attachment(attachments) into allmethod lo_document->add_attachment. Pl suggest.


Try.

**-- Add Attachment to the Document

 

 

 

   CALLFUNCTION'SAP_WAPI_GET_ATTACHMENTS'

     EXPORTING

       workitem_id          = wi_id "'1620233'

*     USER                 = SY-UNAME

*     LANGUAGE             = SY-LANGU

*   IMPORTING

*     RETURN_CODE          =

    TABLES

      ATTACHMENTS          =  t_attachment

*     MESSAGE_LINES        =

*     MESSAGE_STRUCT       =

             .

 

 

                callmethod lo_document->add_attachment

                     exporting

                  i_attachment_type    = i_att_type

                  i_attachment_subject = 'Travel Request form.pdf'

                  i_att_content_hex    = gv_pdf_content.

 

                   catch cx_document_bcs.

   endtry.


Viewing all articles
Browse latest Browse all 10473

Trending Articles