dynamic report headers(something challenging)

Question:
hi my organization mostly uses standerd reports supplied by SAP and then they could not have their company name as the report headers now they feel that should have company name as a report header and they don't want to edit the standerd reports either, now they are looking for some parameter or some dynamic process so that when ever a report is executed they want that to pick up the this parameter or whatever to print it as header
does any body have any brilliant idea
thanks
Answer:
If you are printing, the solution is simple. Use pre printed headed stationery.
It's a curious one though, quite why would anyone want to do this ? It's an attempt to chuck in a load of extra complexity for purely cosmetic reasons, and to spend some money at the same time. I wouldn't want to be around when doing Hotpacks, upgrades etc.
Still, on a technical level I'd be interested to see if anyone knows a way to do it as a dynamic process.
_________________
"You start coding. I'll go find out what they want"
Answer:
All I would suggest is to make a copy of the standard report, and in TOP-OF-SELECTION, add an include containing the information they need which could appear above the dynamic headers.
Answer:
There are tonnes of SAP reports which populate structure BHDGD(Common data area batch heading routine) inside standard SAP program and do external perform of BATCH-HEADING(RSBTCHH0). If you modify program RSBTCHH0, you will be able to modify the header of all those SAP lists which call it.
Answer:
If the operating system is Unix, you can (and I have have done this...) intercept the output and then massage the output using awk.
Although not quite the same, we had to examine the name at the bottom of a letter, insert a tif file and route the output to a printer dependant on the name at the bottom of the letter.
R
Answer:
hey sharad u thought looks great can u make it more explanatory, if possible a small example like which SAP standerd report uses this RSBTCHH0 routine and the structure BHDG
Answer:
Here's a reply to a mail I received on this:
Hi Mohammed,
This was some years ago now, but basically you change the printer output from for example /dev/lpt1 to |awk {file name}>/dev/lpt1. In other words you are piping the output through awk running the program {file name} against it and then sending the output to lpt1.
It's easy to append a few lines to the output in awk. I can't remember the syntax (seriously it's about 20 years ago!!) but the psuedo code is simple:
Carrying on from the theme that R mentioned. I guess it would be possible to create an ABAP to submit a report (as a parameter) and collect the list output from memory on return. Then just make the required mods and print it.
It should work with most reports...
Dr Sidewalk
The problem with that approach is that you have to turn the report into Ascii using function list_to_asci and then add your head which would then lose any formating in the report.
The other thing about doing it at the o/s level is that it only has to be done once and that affects all reports in one go.
R

More Articles:

Question: Floating point field to Decimal field problems?
?
Upload tab delimited file in background?
'parameters ' ABAP instruction?
Company Code?
Mass delete of File?