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

SUBMIT ZREPORT WITH INTERNAL TABLE

Former Member
0 Likes
619

Hello,

I have a problem because I would like to call zreport and I need to pass an internal table.

I need the internal table because in the zreport I work with it.

I tried to pass doing SUBMIT ZREPORT WITH IT_SFLIGHT. but it doesn't work.

<b>

MAIN_REPORT</b>

ZTOP.______________________________

TYPES:BEGIN OF S_SFLIGHT.

INCLUDE STRUCTURE SFLIGHT.

TYPES END OF S_SFLIGHT.

DATA: IT_SFLIGHT TYPE STANDARD TABLE OF S_SFLIGHT,

WA_SFLIGHT LIKE LINE OF IT_SFLIGHT.

ZCLASS._____________________________

CLASS LCL_HANDLER DEFINITION.

PUBLIC SECTION.

CLASS-METHODS:

ON_DOUBLE_CLICK

FOR EVENT DOUBLE_CLICK OF CL_SALV_EVENTS_TABLE

IMPORTING

ROW

COLUMN.

ENDCLASS.

CLASS LCL_HANDLER IMPLEMENTATION.

METHOD ON_DOUBLE_CLICK.

CASE COLUMN.

WHEN 'CONNID'.

AUX_ROW = ROW.

  • MESSAGE I000(0K) WITH 'You Double Clicked on Line'

  • ROW

  • 'Of Column'

  • COLUMN.

READ TABLE IT_SFLIGHT INTO WA_SFLIGHT INDEX ROW.

SUBMIT ZFUN2 with IT_SFLIGHT = IT_SFLIHT.

ENDCLASS.

ZREPORT___________________________________

WRITE: / IT_SFLIGHT-CARRID, IT_SFLIGHT-CONNID.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
587

Hi Ana,

perhaps you can export and import it to/from memory.

Here a short example:

REPORT ZGRO_EXPORT_MEM MESSAGE-ID ZZ LINE-SIZE 1000.

*

TABLES: EKKO.

*

DATA: I_EKKO TYPE TABLE OF EKKO WITH HEADER LINE.

*

START-OF-SELECTION.

*

SELECT * FROM EKKO INTO TABLE I_EKKO UP TO 100 ROWS.

*

EXPORT I_EKKO FROM I_EKKO TO MEMORY ID 'I_EKKO'.

*

SUBMIT ZGRO_IMPORT_MEM.

*

REPORT ZGRO_IMPORT_MEM MESSAGE-ID ZZ LINE-SIZE 1000.

*

DATA: I_EKKO TYPE TABLE OF EKKO WITH HEADER LINE.

*

START-OF-SELECTION.

*

IMPORT I_EKKO FROM MEMORY ID 'I_EKKO'.

*

LOOP AT I_EKKO.

WRITE: / SY-REPID, I_EKKO-EBELN.

ENDLOOP.

*

Regards, Dieter

Message was edited by:

Dieter Gröhn

Hello,

I have a problem because I would like to call zreport and I need to pass an internal table.

I need the internal table because in the zreport I work with it.

I tried to pass doing SUBMIT ZREPORT WITH IT_SFLIGHT. but it doesn't work.

<b>

MAIN_REPORT</b>

ZTOP.______________________________

TYPES:BEGIN OF S_SFLIGHT.

INCLUDE STRUCTURE SFLIGHT.

TYPES END OF S_SFLIGHT.

DATA: IT_SFLIGHT TYPE STANDARD TABLE OF S_SFLIGHT,

WA_SFLIGHT LIKE LINE OF IT_SFLIGHT.

ZCLASS._____________________________

CLASS LCL_HANDLER DEFINITION.

PUBLIC SECTION.

CLASS-METHODS:

ON_DOUBLE_CLICK

FOR EVENT DOUBLE_CLICK OF CL_SALV_EVENTS_TABLE

IMPORTING

ROW

COLUMN.

ENDCLASS.

CLASS LCL_HANDLER IMPLEMENTATION.

METHOD ON_DOUBLE_CLICK.

CASE COLUMN.

WHEN 'CONNID'.

AUX_ROW = ROW.

  • MESSAGE I000(0K) WITH 'You Double Clicked on Line'

  • ROW

  • 'Of Column'

  • COLUMN.

READ TABLE IT_SFLIGHT INTO WA_SFLIGHT INDEX ROW.

SUBMIT ZFUN2 with IT_SFLIGHT = IT_SFLIHT.

ENDCLASS.

ZREPORT___________________________________

WRITE: / IT_SFLIGHT-CARRID, IT_SFLIGHT-CONNID.

4 REPLIES 4
Read only

Former Member
0 Likes
587

Hi

There is no option to submit the Internal Table for the report in SUBMIT command

see the syntax and different parameters

SUBMIT yreport

WITH s_kunnr IN s_kunnr

WITH p_land1 EQ p_land1

AND RETURN

USER sy-uname

VIA JOB jobname

NUMBER jobcount

TO SAP-SPOOL

SPOOL PARAMETERS print_params

ARCHIVE PARAMETERS arc_params

WITHOUT SPOOL DYNPRO.

Regards

Anji

Read only

Former Member
0 Likes
587

Hallo Ana

Please explore using EXPORT / IMPORT .

For example

export itab to memory id 'ZMEM'.

In your second report do an

import itab from memory id 'ZMEM'.

Also try SUBMIT with option EXPORTING LIST TO MEMORY

Regards,

Arun

Regards,

Arun

Read only

Former Member
0 Likes
588

Hi Ana,

perhaps you can export and import it to/from memory.

Here a short example:

REPORT ZGRO_EXPORT_MEM MESSAGE-ID ZZ LINE-SIZE 1000.

*

TABLES: EKKO.

*

DATA: I_EKKO TYPE TABLE OF EKKO WITH HEADER LINE.

*

START-OF-SELECTION.

*

SELECT * FROM EKKO INTO TABLE I_EKKO UP TO 100 ROWS.

*

EXPORT I_EKKO FROM I_EKKO TO MEMORY ID 'I_EKKO'.

*

SUBMIT ZGRO_IMPORT_MEM.

*

REPORT ZGRO_IMPORT_MEM MESSAGE-ID ZZ LINE-SIZE 1000.

*

DATA: I_EKKO TYPE TABLE OF EKKO WITH HEADER LINE.

*

START-OF-SELECTION.

*

IMPORT I_EKKO FROM MEMORY ID 'I_EKKO'.

*

LOOP AT I_EKKO.

WRITE: / SY-REPID, I_EKKO-EBELN.

ENDLOOP.

*

Regards, Dieter

Message was edited by:

Dieter Gröhn

Read only

0 Likes
587

Your answer is correct . Thanks.

My problem was that when I do EXPORT I_EKKO FROM I_EKKO TO MEMORY ID 'I_EKKO'. I don't write 'FROM I_EKKO' so I have mistakes.

Thanks a lot