on 03-05-2009 10:32 PM
Hi,
I was following the blog /people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application
It works find when the values are entered in the fields of select options. But when these fields are empty
I get dump in the select statement as "Field Symbols has not yet been assigned".
select * into corresponding fields of table isflight from sflight
where carrid in <fs_carrid>
and connid in <fs_connid>.
Is there any procedure to use the select statement other than passing it to field symbols.?
Thanks in advance,
Hi,
I was going through the this article [select options and alv|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60811d03-b69e-2b10-cd86-ad2790e44ecc] and I noticed that if we don't give any value in the select options, still we are getting the output. Infact all the data is being fetched. I think you should go through this article and look for the method named GET_DATA.
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Resolved on my own
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
This occurs because in the blog the field-symbols retrieves the related range tables. If these tables are empty (the user don't enter any value in the field) these tables doesn't can be referenced.
As this blog is a tutorial I suggest you to try to "optimize" it doing some verifications as the following:
if <fs_carrid> is assigned and <fs_connid> is assigned.
select * into corresponding fields of table isflight from sflight
where carrid in <fs_carrid>
and connid in <fs_connid>.
else.
* JUST FOR TEST PURPOSES!
select * into corresponding fields of table isflight from sflight.
endif.
The best approach is that when nothing is entered in the select-options, the user should be alerted with a message and have choice to select all records or none (a simple pop up with an yes/no option), for example.
You can get help on how to show a pop up in the following article [Quick tips and tricks on Web Dynpro for ABAP u2013 How to use ALV and Pop ups|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4].
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks David.
In my case I have 8 fields for the selection criteria. all of them are optional. As per your suggestion i need to check field symbol is assigned or not. Yes i did it. But my question is that does not solve my issue because user can fill any of the 8 fields. So my select statement should change based on the field he has entered?
Do i need to create dynamic where clause??
Thanks in advance
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.