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

ALV To Sapscript

Former Member
0 Likes
388

Hi all,

1. While showing alv reports, the column

numbers can vary. When we take the print

of this report, the hardcopy output

is not so good looking.

ie. the font gets smaller, the left & top

margins are not so descent.

Is there any way in which this alv output

can be printed in SAPScript format?

(which also takes care of groupings,

page breaks and subtotals )

2. In Sapscript, is there any way

we can set the TABS of a paragraph

dynamically from the program.

ie. we can modify the tab length, alignment

or add a new tab to that paragraph ?

Reg

Amit Mittal.

1 REPLY 1
Read only

Former Member
0 Likes
314

Amit,

Re1. Is this your custom report or standard SAP report?

a) If this is your custom report then you can set your own print option on the application toolbar (within Status). Set the function code to, lets say, &PRN and give it a nice print icon. You will need to process it manually when you click on this new option. In you 'user command' FORM you need to fetch it through you ok_code. When you are happy that you can fetch your own print option you can start the second phase of your task, which is your print program and a sapscript. Once you have done it you can pull strings together and put:

SUBMIT ZMYPRINTPROGRAM AND RETURN.

in your 'user command' FORM for the alv report.

You will probably need to pass some parameters like your internal table (do it via the reference rather than the value).

Now, when you click on the new print icon on the alv toolbar the system will jump to 'user command' FORM and will execute your print program, which should handle the sapscript processing (like OPEN_FORM FM and others).

b) If this is an SAP report then I wouldn't recommend modifying it. I'd rather copy it into your customer name space and then modify that copy as I described in point 1a).

Re2. You can't have dynamic tabs. That would be useful, I know...

Hope this helps,

Wojtek