Application Development 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: 

SUBMIT report and dynamic data...

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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' .

Former Member
0 Kudos

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