2012 May 23 7:22 PM
Hi all,
I have an internal table with the below fields:
Name
number
City
I did a select statement from the database table and filled my table with the data for the above fields. Now the user can also enter all the above fields using a selection screen and based on the user input I need to fetch the data and for this I have written the below code:
Loop at it_table into wa_table.
if wa_table-number = v_number and wa_table-name = v_name and wa_data-city = v_city.
write: v_number, v_name, v_city
endif.
endloop.
Now if user enters all these fields on the selection my logic works fine and it shows the correct data but let's say if user enters only name and no number and city then my logic is not working fine, ideally it should look into the internal table for all the entries with the name user entered, instead it doesn't find anything.
Can you please let me know what I am doing wrong here?
2012 May 23 7:26 PM
Rahul Goel wrote:
Can you please let me know what I am doing wrong here?
You really didn't look at your logic closely enough.
Basic question locked.
Rob