09-23-2005 5:08 PM
Hi,
I've developed a report, named Z99BC044, that allow to publish the output of any report in our intranet and in HTML format. The idea is simple: I call the target report with a SUBMIT command like this one:
SUBMIT ( pprog )
USING SELECTION-SET pvari
EXPORTING LIST TO MEMORY
AND RETURN.
After this call I process the output of the target report and finally I call the function module WWW_HTML_FROM_LISTOBJECT to create the HTML version of the report.
This method works fine for batch jobs: I create a variant in Z99BC044 for every job that I schedule.
But if I want to use Z99BC044 to create a batch job from a dialog transaction, I need to call Z99BC044 using a SUBMIT command, and it does not allow to pass any table, with the target report selection screen, for example. As a dirt workaround I can create a variant dynamycally before to submit Z99BC044, but this means that I need to do cleaning tasks in programs because there will be a lot of variants only used once.
Is there any other way ?? Clever, if possible...
Regards,
Joan B. Altadill
CELSA SAP Admin
09-23-2005 5:37 PM
Hi
I can think only one solution to pass the data for selection-screen by IMPORT/EXPORT TO MEMORY. If you use that, you can pass a table, something like this:
DATA: T_SEL_SCREEN LIKE STANDARD TABLE OF TVARV
WITH HEADER LINE.
a) in dialog transaction:
- Build Variant and fill T_SEL_SCREEN
- EXPORT T_SEL_SCREEN TO MEMORY ID 'MY_ID'.
b) in Z99BC044
- IMPORT T_SEL_SCREEN TO MEMORY ID 'MY_ID'.
- build variant (get data from T_SEL_SCREEN)
- SUBMIT
Max
09-23-2005 5:30 PM
Use
In Dialog Program use .
EXPORT PAVRI TO MEMORY ID 'XXXX'.
SUBMIT Z99BC044 .....
In Z99BC044
IMPORT ITAB FROM MEMORY ID 'XXXX'.
SUBMIT ( pprog )
USING SELECTION-SET pvari
EXPORTING LIST TO MEMORY
AND RETURN.
FREE MEMORY ID 'XXXX' .
09-23-2005 5:37 PM
Hi
I can think only one solution to pass the data for selection-screen by IMPORT/EXPORT TO MEMORY. If you use that, you can pass a table, something like this:
DATA: T_SEL_SCREEN LIKE STANDARD TABLE OF TVARV
WITH HEADER LINE.
a) in dialog transaction:
- Build Variant and fill T_SEL_SCREEN
- EXPORT T_SEL_SCREEN TO MEMORY ID 'MY_ID'.
b) in Z99BC044
- IMPORT T_SEL_SCREEN TO MEMORY ID 'MY_ID'.
- build variant (get data from T_SEL_SCREEN)
- SUBMIT
Max