‎2007 May 23 7:24 AM
Hi all,
i have a requirement in which i need to pass the values from one selection screen to another. I have done the same using
SUBMIT <PROGRAMNAME> WITH P_Accnt = P_Accnt
WITH P_MON = P_MON
WITH P_YR = P_YR AND RETURN.
I am able to run the same.
Now the requirement has changed and i need to pass multiple accounts(ie my account field have got to be select-options).
If i pass the select options directly to the called program i am able to get only one value(first one ) to the called program.
Can anyone help me on how to pass the select option values to the called program.
Thanks.
Gowri Shankar.
‎2007 May 23 7:30 AM
Hi
Just use IN for select-options
SUBMIT <PROGRAMNAME> WITH <b>S_Accnt IN P_Accnt</b>
WITH P_MON = P_MON
WITH P_YR = P_YR AND RETURN.
Reward points if useful
Regards
Anji
‎2007 May 23 7:30 AM
Hi
Just use IN for select-options
SUBMIT <PROGRAMNAME> WITH <b>S_Accnt IN P_Accnt</b>
WITH P_MON = P_MON
WITH P_YR = P_YR AND RETURN.
Reward points if useful
Regards
Anji
‎2007 May 23 7:32 AM
... WITH SELECTION-TABLE rspar
Effect
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 8),
KIND (length 1),
SIGN (length 1),
OPTION (length 2),
LOW (length 45),
HIGH (length 45).
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
Note
In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
REPORT report2.
DATA: text(10) TYPE c,
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.
‎2007 May 23 7:38 AM
hi,
look this.
*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.Rgds
Anversha
‎2007 May 23 7:39 AM
Hi anji,
I was sinple solution man.
Thanks i tried it is working.
@rajesh,
I havent tried ur reply.
Tried the first one as it was very simple.
Thanks
Gowri