‎2010 Mar 31 1:51 PM
Hi Guru's,
I am more or less novice in abap and I have an issue with one of my selections.
In fact
I select a value from my select-option and I execute my report, the report execute well the isntructions and the good value are displayed. After that I remove the value from the select-option and I re-run the report. All values are displayed now. Untill here, everything wokrs fine but what is strange is when I want to put again a value in this selection-option, the report takes all value and also my value that I have inserted.
Anybody has an idea from where is my problem?
FORM at_selection_screen.
TYPES: BEGIN OF ty_kstar,
kstar TYPE cskb-kstar,
END OF ty_kstar.
DATA: li_kstar2 TYPE STANDARD TABLE OF ty_kstar
WITH HEADER LINE.
REFRESH: li_kstar2.
SELECT kstar
FROM cskb
INTO TABLE li_kstar2
WHERE kstar in s_kstar
and katyp IN ('21','31','41','42','43','50','51','52','61').
IF sy-subrc IS INITIAL.
LOOP AT li_kstar2.
CLEAR r_kstar.
r_kstar-sign = 'I'.
r_kstar-option = 'EQ'.
r_kstar-low = li_kstar2-kstar.
APPEND r_kstar.
ENDLOOP.
REFRESH s_kstar.
CLEAR s_kstar.
s_kstar[] = r_kstar[].
ELSE.
"message no data found
ENDIF.
ENDFORM. "at_selection_ScreenThank you in advance for your help.
MohameD.
‎2010 Mar 31 2:04 PM
s_kstar[] = r_kstar[].
why you are doing this step.
please remove this
i don't know why you are populating the value in to select-option table.
cheers
S.Janagar
‎2010 Mar 31 2:25 PM