cancel
Showing results for 
Search instead for 
Did you mean: 

Send a billing document to spool

Former Member
0 Kudos

Hi all,

We have created a form (sapcript) for printing biling documents. We need to send this form to spool for a bililng document in order to retrieve from the spool the pdf file generated and send it via mail.

We know how to retrieve the pdf from the spool. Does anybody know how to send the bililng document to the spool? Is there any standard function module for that?

Thanks and regards.

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Jul 14, 2009 12:32 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

alex_m
Active Contributor
0 Kudos

The spool would be created automatically when you print the document.

In Write_form the parameter ITCPO-TDNEWID should be as 'X'.

Former Member
0 Kudos

Hi,

Create a custom z prog, from that z prog u call the FORM..... now run the z prog in background....the o/p generated will automatically transferred to spool.

Amitava

Former Member
0 Kudos

Hello Amitava,

How can I call the form from my z program with the number of billing document that I want to send to the spool?

Thanks and regards.

Former Member
0 Kudos

Hi,

Are you printing the documents immediately now ?

Just try this

Use TCODE VV32

Select the Billing document output type say ZRD0. Note that this is based on billing type as well

Click on one of the Billing type and click on "Communication (F2)"

Here there is a check box "Print Immediately". Remove the check (see the documentation)

This should generate a spool (if you have configured the output type for print)

Regards

Former Member
0 Kudos

First of all assign a file name as

DATA: S_FILE LIKE RLGRAP-FILENAME.

After That in Script Calling Program do the changes in Close Form as follows:

FORM FORM_CLOSE.

DATA: I_ITCPP LIKE ITCPP.

CALL FUNCTION 'CLOSE_FORM'

IMPORTING

RESULT = I_ITCPP

EXCEPTIONS

OTHERS = 1.

IF SY-SUBRC NE 0.

RETCODE = SY-SUBRC.

PERFORM PROTOCOL_UPDATE.

ENDIF.

IF I_ITCPP-TDSPOOLID NE SPACE.

PERFORM PROTOCOL_UPDATE_SPOOL USING '342' I_ITCPP-TDSPOOLID

SPACE SPACE SPACE.

CONCATENATE 'C:\EX_' VBDKR-VBELN '.pdf' INTO S_FILE.

SUBMIT RSTXPDFT4 WITH SPOOLNO EQ I_ITCPP-TDSPOOLID

WITH P_FILE EQ S_FILE AND RETURN.

***To delete Spool Request from Database:

DELETE FROM TSP01 WHERE RQIDENT = I_ITCPP-TDSPOOLID.

***To delete Spool Request from Database: ENDIF.

ENDIF.

Hope this is enough for you.

Regds,

Anil