Reading PDF attachment from sap inbox through ABAP
Function Modules used are as follows:
1.SO_USER_READ_API1
This fm will read the folder details in the sap inbox for the particular user id.
2.SO_FOLDER_READ_API1
This fm will read the folder content present in the sap inbox folder.
3. SO_DOCUMENT_READ_API1
This fm will read the attachment present in the mail.
4. SO_ATTACHMENT_READ_API1
This fm will read the attachment and will give in the binary format.
5. SCMS_BINARY_TO_XSTRING
This fm will convert the binary format to xstring format.
6.Xml parsing is done to get data from the xstring by passing to the ADS.
Hence we can get the read the pdf attachment from the sap inbox mail.
If you like this post, you may as well like these too:
- ABAP Programs: Reading single entries REPORT ZSOURCE1105.* Work area for a database tableTABLES CUSTOMERS.* Reading a single entrySELECT SINGLE * FROM CUSTOMERS WHERE ID = ’87654321′.IF SY-SUBRC = 0. WRITE CUSTOMERS-NAME.ELSE. WRITE ‘Customer not found.’.ENDIF.~~~...
- ABAP Program:Reading data from a file REPORT ZSOURCE2602. * Data declarations for later use TABLES CUSTOMERS. PARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat' LOWER CASE. DATA: MSG_TEXT(50), ALL_CUSTOMER_NAMES LIKE CUSTOMERS-NAME OCCURS 100 WITH HEADER LINE. * Opening the File...
- ABAP Programs:Reading data from a file (presentation server) REPORT ZSOURCE2604. * Data declarations for later use PARAMETERS FILENAME(128) DEFAULT 'c:usersdefaulttestfile.dat' LOWER CASE. TABLES CUSTOMERS. DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE. CALL FUNCTION 'WS_UPLOAD' EXPORTING FILENAME...
- ABAP Program to Send Mail with Attachment This ABAP program use the function module ‘SO_NEW_DOCUMENT_ATT_SEND_API1′ to send the email with attachment. There are five steps involved in sending the email with attachment. Add Recipients Put in the...
- Print to PDF SAP Script *----------------Database Declaration-----------------------------*TABLES: LFA1,ADR6.*-----------------Internal Table Declaration----------------------* *----------------Work VAriables ----------------------------------*DATA: S_DOC_CHNG LIKE SODOCCHGI1.DATA: L_TAB_LINES LIKE SY-TABIX.DATA: COUNT1 TYPE I.DATA: COUNT2(4) TYPE N.DATA: W_ITCPO LIKE ITCPO,W_DIALOG,W_ITCPP LIKE ITCPP.DATA: W_BIN_FILESIZE(10) TYPE C.DATA: L_FILENAME LIKE...
- How to download all the SAP Help files in PDF? Do you know that you can download all the SAP help files located at help.sap.com in PDF format. Just visit the SAP PDF Library....
- How do you add an attachment to a Purchase Order? One may attach any document to a PO manually without using the Document Management System in SAP, but no attachments can be added while you create a PO using ME21N....



















Leave a Reply