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: 

Script and its print program.

Former Member
0 Kudos

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!

5 REPLIES 5

GauthamV
Active Contributor
0 Kudos

hi,

u can link them from NACE transaction.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

former_member181995
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.