on 12-07-2012 5:43 AM
Hi All,
My codings below.....
data: op_option type SSFCTRLOP,
job_output type SSFCRESCL.
op_option-getotf = 'X'.
DATA: w_form_name type tdsfname, "Smartform name
r_options type ssfcompop, "Print option
r_control type ssfctrlop, "Print control
w_function type rs38l_fnam.
r_options-tddest = 'LOCL'. "Spool: Output device
r_options-tdimmed = 'X'. "Print Immediately
r_options-tddelete = space. "Delete After Printing
r_options-tdnewid = 'Xxxx'. "New Spool Request
r_control-device = 'PRINTER'.
r_control-no_dialog = 'X'.
r_control-langu = sy-langu.
SELECT * FROM ZPAGE2 INTO TABLE LIT_ZPAGE2.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSF05_EX4'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = L_FORMNAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
CALL FUNCTION L_FORMNAME
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = R_options
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
LIT_PAGE2 = LIT_ZPAGE2
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
SUBMIT RSTXPDFT4
with SPOOLNO = r_options-tdnewid
AND RETURN
While execute this, I got error like below....
What should i do to get spool id dynamically and save the form ..
Thanks in advance..
Hi,
I hope this will help for dynamic pdf creation. Use TSP01 table.
It will contain all spool request number which created in SAP.
DATA : LT_INT TYPE TABLE OF TSP01,
WA_INT TYPE TSP01.
SELECT RQIDENT FROM TSP01 INTO CORRESPONDING FIELDS OF TABLE LT_INT.
SORT LT_INT BY RQIDENT DESCENDING.
READ TABLE LT_INT INTO WA_INT INDEX 1.
SUBMIT RSTXPDFT4 WITH SPOOLNO = WA_INT-RQIDENT AND RETURN.
Thanks,
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
TDNEWID is of length 1 char.So I think that does not give the spool request number.
Please check.
Better try this.....
To convert smartform output to pdf , after printpreview just type PDF! in the command bar gives u an option to save form as pdf.
Regards
Vamshi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If the data type is character then X will be support that,otherwise for numeric it will give u ERROR.
Gourav.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.