Skip to Content
author's profile photo Former Member
Former Member

Need to upload PDF files

Hi All,

I have a requirement

There are some PDF files which are to be send along with the goods sent to the customer, As these PDF documents are on Non sap system .

Requirment :

SAP need to trigger an interface toan external system and pull this pdf files into SAP and send a mail from SAP attaching these documents

How do i store these PDF files in SAP

How do i attach these files as attachement in the workflow. ( pdf format).

Can any one help me to resolve this issue,

thanks

Reddy

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 09, 2011 at 09:52 AM

    Hi,

    what about uploading it binary (ftp connection or from application server) and then sending it using class cl_bcs?

    Best regards,

    Oliver

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi ,

      Thanks for the input,

      But the issues it a PDF file which are impported from another system may have upto 24 pages and has a details instruction about the safety measures to be taken with material .

      Thanks

      Reddy

  • author's profile photo Former Member
    Former Member
    Posted on Nov 09, 2011 at 01:29 PM

    Hi Reddy,

    Step1. Import Other System PDF files to SAP server Files using FTP. ( Ref Program RSFTP002)

    * Connect to FTP (xxx) using CALL FUNCTION 'HTTP_SCRAMBLE' then CALL FUNCTION 'FTP_CONNECT'

    PERFORM FTP_CONNECT USING P_FTPUSR P_FTPPWD P_FTPHST P_RDEST.

    * Establish local directory(SAP) using CALL FUNCTION 'FTP_COMMAND'.

    CONCATENATE 'lcd' P_LCLDIR INTO LF_COMMAND SEPARATED BY SPACE.

    * Establish remote directory(DHL) using CALL FUNCTION 'FTP_COMMAND'.

    CONCATENATE 'cd' P_RMTDIR  INTO LF_COMMAND SEPARATED BY SPACE.

    * Get file from remote system(xxx) to local system (SAP) using CALL FUNCTION 'FTP_COMMAND'.

    CONCATENATE 'get' WF_UXFILE  INTO LF_COMMAND SEPARATED BY SPACE.

    * DisConnect FTP using CALL FUNCTION 'FTP_DISCONNECT'.

    PERFORM FTP_DISCONNECT.

    Step2. Then Attach the file to workflow.

    Please let me if need any.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 09, 2011 at 05:46 PM

    Hi,

    use GUI_UPLOAD Function module to pickup the PDF file by giving the file path in "filename" field of the GUI_UPLOAD and file type as 'BIN'. and store all the data coming in "data_tab" that data_tab should be of type standard table of solix.

    Then use function module 'CONVERT_OTF' here give format as 'PDF' and capture the bin_filesize, bin_file from importing and also

    otf and lines from tables of the function module.

    Then you can send the email to the user either using SO_NEW_DOCUMENT_ATT_SEND_API1 Function module

    or using cl_document_bcs.

    The way to do it using cl_document_bcs is well explained in the standard program BCS_EXAMPLE_6.

    Use this!

    << Moderator message - Point begging removed >>

    Regards,

    -Sandeep

    Edited by: Rob Burbank on Nov 9, 2011 1:29 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.