‎2008 Oct 23 10:58 PM
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??
‎2008 Oct 24 5:20 AM
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.
‎2008 Oct 24 2:43 PM
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.
‎2008 Oct 24 2:49 PM
‎2008 Oct 24 3:23 PM
‎2008 Oct 24 4:20 PM
check it once again, you have any entry in the database table with other value.
‎2008 Oct 24 4:54 PM
‎2008 Oct 24 9:05 PM
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