Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Arch of correspondence and sending PDF via mail

Talke13
Discoverer
0 Kudos

Hello Gurus,

I need help regarding the topics of archiving of correspondences and sending the archived PDF to a specific mail. 
Is here someone that could or would help me with that problem. I need a step by step explanation for both topics. I tried many solutions from the internet but with no success.  Also am still new in SAP world, so an explanation for dummies would be great. 

For context, I'm writing my code in the Code Initialization part of the Adobe forms interface. I'm generating the form using the FBL1N T-code. I'm doing it by entering the vendor and company code, then execute it. After I requestion my correspondence and then display it to generate the PDF. All of this works perfectly, only those 2 functions have to be implemented. 

 

I would be grateful for some help,
Tarik T

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos

You could wrap the call of FBL1N / RFITEMAP to generate a spool in a SUBMIT with list options:

 

SUBMIT RFITEMAP 
  WITH <parameters here>
  TO SAP-SPOOL
    SPOOL PARAMETERS PARAMS <prevent immediate printing and deletion here>
    ARCHIVE PARAMETERS ARPARAMS
    WITHOUT SPOOL DYNPRO
  AND RETURN.
 GET PARAMETER ID 'SPI' FIELD lv_spoolid.

 

Then convert the spool to PDF which a FM such as CONVERT_ABAPSPOOLJOB_2_PDF and attach this PDF to a mail during creation with CL_BCS. (There are many samples in the forum, follow the search links)

0 Kudos

Hi Raymond,

thanks for the answer.

I will try it and provide feedback