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

call transaction

Former Member
0 Likes
1,033

Hello sapgurus

I want to know how to send range of values to the selection screen using call transaction.

Will definitely reward.

Thanks,

Reeta.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,009

Hello,

Try using SUBMIT


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. 

Regards,

9 REPLIES 9
Read only

amit_khare
Active Contributor
0 Likes
1,009

Don't use Call Transaction, use SUBMIT report instead.

Read only

0 Likes
1,009

Thanks for your response Amit.

Will submit run in the foreground. I want the list to be displayed to the user.

Read only

Former Member
0 Likes
1,010

Hello,

Try using SUBMIT


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. 

Regards,

Read only

Former Member
0 Likes
1,009

hi,

First of all record that range field in recording time, then in the program we can easily pass the value to that range field using screen number.

Read only

Former Member
0 Likes
1,009

Hi Reeta

SUBMIT ztest
             WITH p_matnr = p_matnr
             WITH v_mtart = g_mat_typ
             WITH SELECTION-TABLE rspar_tab.

Read only

Former Member
0 Likes
1,009

Thank you all for your help.

I am using submit command now.

When I use the following code:

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.

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 selcrit2 IN range_tab

AND RETURN.

I get the result only for value 'H' and not for 'K'.

My requirement is to display data for something like...A, B, H,K ..etc.

Can somebody tell me what I am doing wrong in the above code.

Thanks,

Reeta

Read only

0 Likes
1,009

IF you want to select by those criterias use


range_line-sign = 'I'. 

Read only

0 Likes
1,009

Actually, I had tried that too...but didn't help.

Any other thoughts?

Reeta.

Read only

0 Likes
1,009

Thank you again to all the gurus.

The program is working now. I had the leading zeros missing for the the document numbers, which is why only the first one was picked for display. David your sample code was helpful...matched my requirement.

I have awarded points to all accordingly.

Thanks again.

Reeta.