Application Development and Automation 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: 
Read only

What is the basic Functionality for a print-program?

Former Member
0 Likes
625

Hi ABAP,

I´m doing SAP-Script for quie a time now, but now for the first time i got the task to build a Sap-Script Form and a corresponding print-programm.

I did the customizing part, created a message, and implemented that message in a bill in SAP-System.

What means if i save that offer, or want a print preview i SHOULD get a Spool or an output.

Actually i get nothing, so hence i forgot something like

Call function 'OPEN_FORM'.

any ideas? Any Hints how to build a Form from nothing?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
455

Hi

Write an executable program like any other report program

in that call the fun module

OPEN_FORM and in that give the form Name as parameter.

and fetch the related data for printing from all the databse tables into internal tables .

loop that internal table and in that loop call the fun modules WRITE_FORM

endloop. and finally call the fun module CLOSE_FORM.

Then go to SE71 and develop ascript with the name you have mentioned in OPEN_FORM.

Create Pgaes, Paragraph formats, charcter formats,

windows, Page windows, text elements etc and write the data in the text elements.

when you execute the program, it will call the script and print.

see

SAPScripts help

http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf

http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf

http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf

http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf

http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf

http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-sub...

Reward points if useful

Regards

Anji

2 REPLIES 2
Read only

Peter_Inotai
Active Contributor
0 Likes
455

>any ideas? Any Hints how to build a Form from nothing?

Copy the SAP standard program to a new z-one and start to modify it based on your requirements.

Peter

Read only

Former Member
0 Likes
456

Hi

Write an executable program like any other report program

in that call the fun module

OPEN_FORM and in that give the form Name as parameter.

and fetch the related data for printing from all the databse tables into internal tables .

loop that internal table and in that loop call the fun modules WRITE_FORM

endloop. and finally call the fun module CLOSE_FORM.

Then go to SE71 and develop ascript with the name you have mentioned in OPEN_FORM.

Create Pgaes, Paragraph formats, charcter formats,

windows, Page windows, text elements etc and write the data in the text elements.

when you execute the program, it will call the script and print.

see

SAPScripts help

http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf

http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf

http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf

http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf

http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf

http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-sub...

Reward points if useful

Regards

Anji