2008 Apr 14 2:46 PM
Hello everybody,
how can I fill a select-options field with more than one value.
Here is the code example:
CLEAR: GT_BDCDATA, GS_BDCDATA.
GS_BDCDATA-program = 'RHALEINI'.
GS_BDCDATA-DYNPRO = '1000'.
GS_BDCDATA-DYNBEGIN = 'X'.
APPEND GS_BDCDATA TO GT_BDCDATA.
CLEAR: GS_BDCDATA.
GS_BDCDATA-FNAM = 'PCHOTYPE'.
GS_BDCDATA-FVAL = 'P'.
APPEND GS_BDCDATA TO GT_BDCDATA.
CLEAR: GS_BDCDATA.
LOOP AT gt_hrobjinfty INTO gs_hrobjinfty.
GS_BDCDATA-FNAM = 'PCHOBJID-LOW'.
GS_BDCDATA-FVAL = gs_hrobjinfty-objid.
APPEND GS_BDCDATA TO GT_BDCDATA.
CLEAR: GS_BDCDATA.
ENDLOOP.
CALL TRANSACTION 'PFAL' USING GT_BDCDATA MODE 'A'
MESSAGES INTO GT_MESSAGES.
THX.
2008 Apr 14 3:03 PM
Instead of calling transaction PFAL, use statement SUBMIT for program RHALEINI. Then you can fill all select-options as you wish.
Cheers
Thomas
2008 Apr 14 3:11 PM
Hi, thanks for the answer.
I know that I can use submit.
But is it also possible to use the call transaction with more than one value for the select-options field.
thx.
2008 Apr 14 3:14 PM
not sure, never done it, because I am using SUBMIT in this case.
Maybe it is possible to record the entire "multiple selections" dialog, but that must be a pain in the a...
good luck
2008 Apr 14 3:21 PM
Hi,
Please refer the code below:
*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.
Thanks,
Sriram Ponna.
2008 Apr 14 3:11 PM
2008 Apr 14 3:15 PM
You canuse more tahn one value.
LOOP AT s_selectoption.
PERFORM bdc_data USING 's_field-low' 's_selectoption-low'.
PERFORM bdc_data USING 's_field-high' 's_selectoption-high'.
ENDLOOP.