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

Reports Select Option

Former Member
0 Likes
824

Hi all,

I have a task - i have to use "SELECT-OPTIONS of one program into select statements of another program, Please solve my problem.

Thanks in advance

Ranjith

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
786

Hi Ranjith,

here an example with two little Reports:

REPORT ZGRO_TEST.

*

TABLES: MARA.

*

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.

*

START-OF-SELECTION.

*

SUBMIT ZGRO_TESTT

WITH S_MATNR IN S_MATNR

AND RETURN.

*

END-OF-SELECTION.

REPORT ZGRO_TESTT.

*

TABLES: MARA.

*

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR NO-DISPLAY.

*

START-OF-SELECTION.

*

BREAK-POINT.

*

SELECT * FROM MARA WHERE MATNR IN S_MATNR.

*

WRITE: / MARA-MATNR.

*

ENDSELECT.

*

END-OF-SELECTION.

zgro_test calls zgro_testt with the select-options.

Regards, Dieter

Hi all,

I have a task - i have to use "SELECT-OPTIONS of one program into select statements of another program, Please solve my problem.

Thanks in advance

Ranjith

7 REPLIES 7
Read only

Former Member
0 Likes
786

Hi Ranjit,

Try using SUBMIT option with the addition SELTAB.

You can also pass the select options along with the SUBMIT statement. Take a look at the help.

Code used to populate 'select-options' & execute report  
DATA: seltab type table of rsparams,
      seltab_wa like line of seltab.

  seltab_wa-selname = 'PNPPERNR'.
  seltab_wa-sign    = 'I'.
  seltab_wa-option  = 'EQ'.

* load each personnel number accessed from the structure into
* parameters to be used in the report
  loop at pnppernr.
    seltab_wa-low = pnppernr-low.
    append seltab_wa to seltab.
  endloop.
  SUBMIT zreport with selection-table seltab
                                via selection-screen.

Cheers

VJ

Message was edited by: Vijayendra Rao

Read only

Former Member
0 Likes
786

Hello Ranjith,

Use <b>SUBMIT</b> statement

If useful reward.

Vasanth

Read only

0 Likes
786

refer..

Read only

Former Member
0 Likes
786

Hi Ranjit,

Use SUBMIT statement in this way ..

SUBMIT ztab with selection-table selecttab
         via selection-screen.

Regards,

Santosh

Read only

Former Member
0 Likes
787

Hi Ranjith,

here an example with two little Reports:

REPORT ZGRO_TEST.

*

TABLES: MARA.

*

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.

*

START-OF-SELECTION.

*

SUBMIT ZGRO_TESTT

WITH S_MATNR IN S_MATNR

AND RETURN.

*

END-OF-SELECTION.

REPORT ZGRO_TESTT.

*

TABLES: MARA.

*

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR NO-DISPLAY.

*

START-OF-SELECTION.

*

BREAK-POINT.

*

SELECT * FROM MARA WHERE MATNR IN S_MATNR.

*

WRITE: / MARA-MATNR.

*

ENDSELECT.

*

END-OF-SELECTION.

zgro_test calls zgro_testt with the select-options.

Regards, Dieter

Read only

0 Likes
786

Hi Ranjith,

is your Problem still open?

Regards, Dieter

Read only

0 Likes
786

Hi Dieter

Thanks for good example.

Bye

Ragards

Ranjith