on 07-14-2009 12:11 PM
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
The spool would be created automatically when you print the document.
In Write_form the parameter ITCPO-TDNEWID should be as 'X'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.