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: 

EMail + spool printing

himayan_das2
Explorer
0 Kudos

Hi Experts..

I have a requirement where i am using exit & BTE for mail sending thru Dunning, f.27 & APP..

Though the mail is goin perfectly but I need to generate spools alongside mail generation too..

But prob is tht at a time C_FINAA-NACHA can have value I or 1 or 2.

'I' is for mailing & '1' is for printing.

BTE r 2040 & 1040.

Need to hv both the value for both mail n spool printing.

Kindly guide me pls..thanks in advance..

1 ACCEPTED SOLUTION

venkat_o
Active Contributor
0 Kudos

Hi,

If you want to mail the output, once you give the print, It is possible.

What u have to do is that get the Spool number from driver program using the function module OPEN_FORM & CLOSE_FORM.

Once you get the spool number, you can convert spool job to PDF and send that to exact address.

Check this procedure.

DATA :g_spool LIKE  itcpp.

CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT = g_spool
    EXCEPTIONS
      OTHERS = 1.

g_spool-tdspoolid "spool request number

Call this function module to convert spool to Pdf

CONVERT_OTFSPOOLJOB_2_PDF

Sendind mail using the following function module.

SO_NEW_DOCUMENT_ATT_SEND_API1

I hope that it helps you.

Regards,

Venkat.O

2 REPLIES 2

venkat_o
Active Contributor
0 Kudos

Hi,

If you want to mail the output, once you give the print, It is possible.

What u have to do is that get the Spool number from driver program using the function module OPEN_FORM & CLOSE_FORM.

Once you get the spool number, you can convert spool job to PDF and send that to exact address.

Check this procedure.

DATA :g_spool LIKE  itcpp.

CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT = g_spool
    EXCEPTIONS
      OTHERS = 1.

g_spool-tdspoolid "spool request number

Call this function module to convert spool to Pdf

CONVERT_OTFSPOOLJOB_2_PDF

Sendind mail using the following function module.

SO_NEW_DOCUMENT_ATT_SEND_API1

I hope that it helps you.

Regards,

Venkat.O

Former Member
0 Kudos

Hello Das,

May be this like solve your problem....

https://forums.sdn.sap.com/click.jspa?searchID=10270569&messageID=2820212

****Reward points ,if found useful