2007 Sep 08 5:26 PM
Hi,
I have one requirement with select options.
I am trying to read the select option values in one Subroutine, but it is giving error
" No structure found with S_KUNNR and no value LOW'.
code is like this.
*********************************
selection-screen S_KUNNR FOR VBPA-KUNNR.
INCLUDE FORM.
PERFORM SUB_DISPLAY.
"
"
"
FORM SUB_DISPLAY.
KUNNRLOW = S_KUNNR-LOW.
KUNNRHIGH = S_KUNNR-HIGH.
ENDFORM.
i am not getting data from S_KUNNR-LOW TO KUNNRLOW.
Please answer asap..
Thanks in Advance.
Kumar A.
Hi anil,
I'm convinced you already found the solution. Everybody will be delighted if you mark this question as solved and let people know the solution.
Regards,
Clemens
2007 Sep 08 6:54 PM
Hi anil,
if you have a requirement with select-options then you should use select-options.
selection-screen S_KUNNR FOR VBPA-KUNNR
does not look like syntactically correct.
select-options S_KUNNR FOR VBPA-KUNNR.
is better.
And you must make sure that somethng has been entered.
FORM SUB_DISPLAY.
read table S_KUNNR[] index 1.
check sy-subrc = 0-
KUNNRLOW = S_KUNNR-LOW.
KUNNRHIGH = S_KUNNR-HIGH.
Regards,
Clemens
2007 Sep 08 7:41 PM
2007 Sep 09 4:45 PM
Hi,
First of all as mentioned in the earlier replies, it should select-options, not selection-screen.
As far as reading data is concerned, the event where you are trying to read data is important.
If you are trying to retrieve value in the event "AT SELECTION-SCREEN", definitely you will get the value.
If you are trying in the events such as "ON VALUE-REQUEST", you have to use DYNPREAD to retrieve data from the selection screen fields, otherwise the values will be initial.
Regards,
Hema
2007 Sep 10 10:32 AM
Hi Anil,
Check the below code.
data v_num(3) type n.
select-options: s_num for v_num.
if s_num-low is initial and
s_num-high is initial.
s_num-low = 1.
s_num-high = 5.
elseif s_num-high is initial.
s_num-high = s_num-low.
elseif s_num-low is initial.
s_num-low = s_num-high.
endif.
while s_num-low le s_num-high.
perform my_num using s_num-low.
s_num-low = s_num-low + 1.
endwhile.
form my_num using p_num.
write:/ p_num.
endform.
Message was edited by:
Velangini Showry Maria Kumar Bandanadham
2007 Sep 10 10:37 AM
It should be,
data : v_kunnr type VBPA-KUNNR.
select-options S_KUNNR FOR v_kunnr .
2007 Sep 10 10:41 AM
Hi anil,
I'm convinced you already found the solution. Everybody will be delighted if you mark this question as solved and let people know the solution.
Regards,
Clemens
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |