06-05-2008 12:32 PM
Hi,
In DEV in debugging mode, S_VENDO is showing three entries but
in PRD in debugging mode it shows one table entry.
and thats why looping in not happening in PRD properly.
I am inserting three entries.
So how to loop in select option field.
Edited by: Anurodh Jindal on Jun 5, 2008 1:32 PM
06-05-2008 12:35 PM
HI
data: s_sel like line of <select-option name>.
loop at <select-option name> into s_sel.
*write your code
endloop.
select option is an internal table without header line.
Aditya
06-05-2008 12:36 PM
Hi Buddy,
Pls elaborate on your query...what is s_vendno etc etc..
Thanks
Nayan.
06-05-2008 12:40 PM
Better if U have all the entries in S_VENDO-low ..
loop at S_VENDO.
use ... S_VENDO-low to pass
endloop.
06-05-2008 12:44 PM
in debugging it shows like this...
SIGN OPTION LOW HIGH
I BT 600 603
and thats why loop read 1 st entry i.e 600 only and after that it terminate.
I have to make them read all entries
06-05-2008 12:51 PM
Anurodh,
You really need to post the code you are trying to debug. What you are stating doesn't make a lot of sense.
The select-option field is generally used as a RANGE in IF, CHECK, SELECT and others.
Why would you want to loop thru this?
If you are building this range in the INITIALIZATION section, or AT SELECT-SCREEN OUTPUT, Might be better to write each line to the RANGE it self.
You also may want to check and see if the the records actually exist in your PRD system.
04-27-2014 8:54 AM
Hi Anurodh,
I have a similar problem in my program.
// in debugging it shows like this...
SIGN OPTION LOW HIGH
I BT 600 603
and thats why loop read 1 st entry i.e 600 only and after that it terminate.
I have to make them read all entries //
What was the solution you used to solve this issue. Kindly reply. Thanks.
04-28-2014 10:03 AM
Hi Bala,
Please let us know why you need to loop in the range table as you can directly use it in your query or condition. Still if you want to loop, you will have to check the low as well as high values, and then adjust the loop accordingly. For ex.
LOOP AT s-vendo INTO ls_vendo.
lv_vendo = s_vendo-low.
IF s_vendo-high IS NOT INITIAL.
WHILE lv_vendo <= s-vendo-high.
"write your code here using lv_vendo
lv_vendo = lv_vendo + 1.
ENDWHILE.
ELSE.
"write your code here using lv_vendo
ENDIF.
ENDLOOP.
Let me know if you have any further doubts.
Regards,
Rachna
04-29-2014 9:04 PM
Hi Rachna,
Thanks a lot for your reply.
Yes, in the current requirement, I cannot use the Select Value in where condition and so, I will have to loop it.
I solved the issue in an other way.
Collected all the user values in a Select-option which has restrictions placed on it, allowing only multiple low values. (I used an FM Select_options_restrict). I then looped the Select table and processed the further code. There by, arrived at the right output.
Thanks again, Cheers
06-05-2008 12:43 PM
Hello,
Are you looking in the new debugger? Try entering the table S_VENDO[] in the debugger.
Regards.
06-06-2008 1:17 AM
Hi,
Try this
loop at S_VENDO.
use S_VENDO-low
endloop.
let me know if u have any question.
Regards,
Kinjal