‎2005 Mar 07 6:22 AM
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.
‎2005 Mar 09 11:31 AM
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