09-19-2008 1:14 PM
Hello experts,
Please tell me how does the print program link with the script?
How does the print program pass values to the variables in script?
Thanks!
09-19-2008 1:18 PM
09-19-2008 1:31 PM
Hi,
You can call your form as given below in your print program.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZSCRIPTFORM' "(SAP SCRIPT form name)
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
The above is one of the possible method or you can configure your Script form name thro' NACE transaction.
Hope this will surely help you to resolve the issue.
Regards,
P.S.Chitra
09-20-2008 11:57 AM
hi friend
check NACE transaction
and click on the output type and if you go in there you can find the link between
and more over as said by chitra
in driver program you will be calling
and you can see output type,print program, form for standard SAP in db table TNAPR
with regards
s.janagar
09-20-2008 12:08 PM
By using below function module we can communicate form and script.
NACE is nothing but used to confugure FORMS to transaction not used for communication between form and program.
for more help you may read all these FM's documentation in SE37
Open_form
write_form
start_form
end_form
close_form
09-20-2008 12:41 PM
And basically, every variable you declared in your program can be used in your sapscript just using &variablename& , although sometimes you need some sapscript modifiers to show or use that variables and sometimes you are better off preformating them in the calling program.