‎2010 Sep 13 7:35 PM
Hi Experts,
I have a requirement for data selections from 2 different Item table based on select option's value. Its based on the value of Select option LEDGER which may have multiple value. If it contains '0L' then data will be selected from BSEG table, else if it contains 'Z1' then from BSEG_ADD table and if contains both value then from both table. Please tell me how can I approach.
Edited by: Amit Biswas on Sep 14, 2010 12:06 AM
‎2010 Sep 13 7:39 PM
You can design radio-buttons instead of select-options....
when user selects 0L -> FETCH FROM BSEG.
when user selects Z1 -> FETH FROM BSEG_ADD.
when user select both -> FETCH FROM BSEG /BSEG_ADD..
‎2010 Sep 13 7:59 PM
But the requirement is fixed, cant use radio buttons. And 2 radio button cannot be selected at a time. Is there any solution about using the field of the select option's field (the low-high field) as it is a structure itself?
‎2010 Sep 13 8:03 PM
>
> But the requirement is fixed, cant use radio buttons. And 2 radio button cannot be selected at a time. Is there any solution about using the field of the select option's field (the low-high field) as it is a structure itself?
You' ll actually have 3 radio buttons, 0L, Z1 and Both....
‎2010 Sep 13 8:02 PM
Hi
Create 3 diff itab's; Read the select options table based on the entries execute that particular select statement
As stated above you might use the check box instead of radio buttons
Regards
Edited by: Anesht on Sep 13, 2010 9:02 PM
‎2010 Sep 13 8:16 PM
data: R_LEDGER type range of VBAK-LEDGER,
R_TYPE like line of R_LEDGER,
L_LINES type I.
selection-screen begin of block BLK1 with frame title TEXT-S01.
select-options S_LEDGER for TABLE-LEDGER no intervals.
selection-screen end of block BLK1.
start-of-selection.
describe table S_LEDGER lines L_LINES.
if L_LINES gt 1.
read table S_LEDGER into R_TYPE with key S_LEDGER-LOW = '0L'.
if SY-SUBRC eq 0.
read table S_LEDGER into R_TYPE with key S_LEDGER-LOW = 'Z1'.
if SY-SUBRC eq 0.
perform READ_BOTH.
else.
perform READ_BSEG.
endif.
else.
read table S_LEDGER into R_TYPE with key S_LEDGER-LOW = 'Z1'.
if SY-SUBRC eq 0.
perform READ_BSEG_ADD.
endif.
endif.
else.
read table S_LEDGER into R_TYPE with key S_LEDGER-LOW = '0L'.
if SY-SUBRC eq 0.
perform READ_BSEG.
else.
read table S_LEDGER into R_TYPE with key S_LEDGER-LOW = 'Z1'.
if SY-SUBRC eq 0.
perform READ_BSEG_ADD.
endif.
endif.
endif.