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

Problems using WITH SELECTION-TABLE

mike_reader3
Active Participant
0 Likes
783

I am trying to call rfrecpsfa140 using:

SUBMIT rfrecpsfa140

"VIA SELECTION-SCREEN

WITH SELECTION-TABLE gt_rsparams. "parameter table

I am setting up the table gt_rsparams like this

"Company Code

wa_rsparams-selname = 'S_BUKRS'.

wa_rsparams-kind = 'S'.

wa_rsparams-low = '1000'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'EQ'.

APPEND wa_rsparams TO gt_rsparams.

"Land Record

wa_rsparams-selname = 'S_SGRNR'.

wa_rsparams-kind = 'S'.

wa_rsparams-low = '287'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'EQ'.

APPEND wa_rsparams TO gt_rsparams.

"Land Record

wa_rsparams-selname = 'S_SGRNR'.

wa_rsparams-kind = 'S'.

wa_rsparams-low = '392'.

wa_rsparams-sign = 'I'.

wa_rsparams-option = 'EQ'.

APPEND wa_rsparams TO gt_rsparams.

Table is defined like this

gt_rsparams TYPE STANDARD TABLE OF rsparams, "parameter table

wa_rsparams like line of gt_rsparams. "Work area for gt_rsparams

The problem I am having is that I am only seeing the results for the first land record, if I uncomment the VIA SELECTION SCREEN and run it, the Multiple Selections is Active, when I go into the multiple selections I can see both land records, however, if I close out of that window I get a message "The entered selections were not copied". If I select Copy from that screen, then run it I get info for both land records.

Seems like I am setting up the gt_rsparams table wrong, or maybe calling the program incorrectly.

Any ideas??

7 REPLIES 7
Read only

Former Member
0 Likes
742

try this way..

data: r_bukrs type range of bukrs,
        wa_bukrs like line of r_bukrs,
        r_sgrnr type range of sgrnr,
        w_sgrnr like line of r_sgrnr.

*wa_bukrs-selname = 'S_BUKRS'.
wa_bukrs-low = '1000'.
wa_bukrs-sign = 'I'.
wa_bukrs-option = 'EQ'.
APPEND wa_bukrs TO r_bukrs.

*w_sgrnr-selname = 'S_SGRNR'.
w_sgrnr-low = '287'.
w_sgrnr-sign = 'I'.
w_sgrnr-option = 'EQ'.
APPEND w_sgrnr TO r_sgrnr.

*w_sgrnr-selname = 'S_SGRNR'.
w_sgrnr-low = '392'.
w_sgrnr-sign = 'I'.
w_sgrnr-option = 'EQ'.
APPEND w_sgrnr TO r_sgrnr.

SUBMIT rfrecpsfa140
  with s_bukrs in r_bukrs
  with s_rgrnr in r_sgrnr
  and return.

Read only

0 Likes
742

A little clarification, I only want records 392 and 287, not a range of those numbers - which I think is what you were going for.

Read only

0 Likes
742

even the above code in my post will give only 392 and 287

Read only

0 Likes
742

Tried it out, still only getting record 287

Read only

0 Likes
742

check it once again, you have any entry in the database table with other value.

Read only

0 Likes
742

I checked, I do.

Read only

0 Likes
742

I figured it out, using my original code I added a call to RS_REFRESH_FROM_SELECTOPTIONS and found that for some reason the first entry in S_SGRNRS is getting padded with 0's but the 2nd one is not. I manually padded the numbers with 0's and now it works.

Here is the results of the call to RS_REFRESH_FROM_SELECTOPTIONS before I padded the numbers

1 S_BUKRS S

2 S_FUNLOC S

3 S_MUNKEY S

4 S_ORDER S

5 S_REGKEY S

6 S_SGRNR S I EQ 00000273

7 S_SGRNR S I EQ 275

8 S_SURF S