Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from mic-bv on Feb 10 at 7:29 AM Koushik , I'm wondering about the "WHERE record = '1'" - sure, that record is "1" not only in one line, and it's really "1" and not "0001" etc.? Sometimes it's a good idea to go through with debugger and possible take out some of the where-clauses.... Horacio, requesting the sy-SubRC after the loop makes sence: * to find out, if there were records matching the where conditions * to avoid calculating the amount of lines in the looped table. I guess in most cases a loop...endloop. if sy-SubRC should be slightly more performant (but only, if the loop should be processed anyway, not depending on the amount of records). However, at least it's a bit less to write and one conditional layer less compared to if...loop...endloop...endif. (as far as I know, the subrc after the endloop is set depending on the loop - no matter how the subrc within the loop was before leaving the loop). Regards, Stefan
| | | ---------------Original Message--------------- From: Rajavel Sent: Monday, February 10, 2014 6:15 AM Subject: Loop With Where Condition As Select Option Hi all, This is my code where i passed the select options as where condition. LOOP AT it_input INTO wa_input WHERE record = '1'. AND sold_party IN s_sold AND material IN s_matl. wa_input1-record = wa_input-record. wa_input1-sold_party = wa_input-sold_party. wa_input1-material = wa_input-material. wa_input1-quantity = wa_input-quantity. wa_input1-unit = wa_input-unit. APPEND wa_input1 TO it_input1. ENDLOOP. It_input has records and there is no syntax error. but sy-subrc is failing. Can anyone tell me what is the possible error? | | Reply to this email to post your response. __.____._ | _.____.__ |