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: 

Sending selection screen information to another program.

Former Member
0 Kudos

Hi Friends ,

we have a requirement here.

I have 2 reports , each having a selection screen , and finally after entry in selection screen, the result is generated as alv reports.

Current requirement is, in teh first report, i had to make the selection screen of the second report [ in blocl 2] along with the existing first report selection screen [block 1] . So, now there are two blocks in the first report.

Now the requirement is , whn i fill up the selection criteria of the second report in the screen, on execution of the report, the program should be able to collect the secelction screen information from the firts report, block 2 , and submit it in the second report, and execute the second report , and generate the output.

I am just uncomfortable / unaware of the syntax, or code to SUBMIT the selection screen information to the second report , from the first report.

Can any one help me with the necesary code in the firts report to submit the block 2 information, and the code in report 2 , to receive it.

Regards,

Arnab.

1 ACCEPTED SOLUTION

former_member536879
Active Contributor
0 Kudos

Hi,

Just check the syntax of the SUBMIT in the abapdocu or refer in google or in SCN .

Refer the SCN rules before posting.

With Regards,

Sumodh.P

6 REPLIES 6

Former Member
0 Kudos

Arnab,

check this thread

please search in sdn and google

Thanks

Bala Duvvuri

0 Kudos

Hi Bala / All ,

as per given code by you, I designed my sample code as follows. Let me tell you, I have 4 parameters in selection screen block, that I needed to send to the program zs2 from zs1.

REPORT ZS1.

.

*DATA text TYPE c LENGTH 10.

DATA: text TYPE c LENGTH 10,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

SELECTION-SCREEN BEGIN OF block b1.

SELECT-OPTIONS: selcrit1 FOR text,

selcrit2 FOR text,

selcrit3 FOR text,

selcrit4 FOR text,

SELECTION-SCREEN END OF block b1.

rspar_line-selname = SELCRIT1.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

rspar_line-selname = SELCRIT2.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

rspar_line-selname = SELCRIT3.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

rspar_line-selname = SELCRIT4.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

*SUBMIT report1 USING SELECTION-SCREEN '1100'

*WITH SELECTION-TABLE rspar_tab

*WITH selcrit2 BETWEEN 'H' AND 'K'

*WITH selcrit2 IN range_tab

*AND RETURN

SUBMIT RHALESMD

WITH SELECTION-TABLE rspar_tab

WITH selcrit1 IN range_tab

WITH selcrit2 IN range_tab

WITH selcrit3 IN range_tab

WITH selcrit4 IN range_tab

AND RETURN.

In the debugging mode I can see rspar_tab getting populated with data.I wish to know , if this process is OK, then I guess the activities in this program is done, but how do i receive this selection screen data at the zprogram 2. I mean this must have some receiving parameters / coding at the receiving program also!!

Please suggest !!

Regards,

Arnab.

0 Kudos

Hi ,

See this

Program accessed

REPORT report1.

DATA text TYPE c LENGTH 10.

SELECTION-SCREEN BEGIN OF SCREEN 1100.

SELECT-OPTIONS: selcrit1 FOR text,

selcrit2 FOR text.

SELECTION-SCREEN END OF SCREEN 1100.

Calling program

REPORT report2.

DATA: text TYPE c LENGTH 10,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

rspar_line-selname = 'SELCRIT1'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

You can refer the f1 help on selection screen for the same. It will give you the clear idea.

You need to keep the same names in Submit statement.

Hope this is helpful.

Regards,

Uma Dave

Former Member
0 Kudos

Hi,

The data of the Selection screen of block 2 of first report will have to be passed on to memory ID by IMPORT to memory and then in your report you can get back that data from memory.

Hope this works for you!

Regards,

Mansi

former_member536879
Active Contributor
0 Kudos

Hi,

Just check the syntax of the SUBMIT in the abapdocu or refer in google or in SCN .

Refer the SCN rules before posting.

With Regards,

Sumodh.P

ThomasZloch
Active Contributor
0 Kudos

Please press F1 on the SUBMIT statement, it is all very well explained.

Thread locked.

Thomas