2011 Dec 13 9:18 AM
Hellow Experts,
I am new To ABAP , my requirment is to fill the defualt value in dropdownlistbox like follow,
MATH
CHEMESTRY
GEOGRAPHY
ALJABRA
HISTORY
i need when user click the dropdownlist these values will be come in dropdownlist box .
Its really appercite if sample code is provided using the above list item.
2011 Dec 13 9:25 AM
Hi ,
Maintain those values at domain level in your table.
1. Double click on data element-> domain->value range maintain values.
Now in screen place the dropdown for that field . At the runtime by pressing the drop down the values which you have maintained in domain->value range will be displayed.
Regards,
G.Aditya
Hellow Experts,
I am new To ABAP , my requirment is to fill the defualt value in dropdownlistbox like follow,
MATH
CHEMESTRY
GEOGRAPHY
ALJABRA
HISTORY
i need when user click the dropdownlist these values will be come in dropdownlist box .
Its really appercite if sample code is provided using the above list item.
2011 Dec 13 9:25 AM
Hi ,
Maintain those values at domain level in your table.
1. Double click on data element-> domain->value range maintain values.
Now in screen place the dropdown for that field . At the runtime by pressing the drop down the values which you have maintained in domain->value range will be displayed.
Regards,
G.Aditya
2011 Dec 13 9:47 AM
2011 Dec 13 10:24 AM
Hi ,
now i m getting list but i cant get value in my Programme,in screen painter i declare the name : ZSUB-ZSUBNAME
so i got the list but user click and choose one subject how can i get that value in my programe.
select * from zstudentmaser where SubjidID = (Here i need the dropdownlist selected value).
thanks
Edited by: Neha.Servade on Dec 13, 2011 11:24 AM
2011 Dec 13 10:26 AM
Hai,
Goto layout, double click on inputfield and set dropdown property to lsitbox and use this code and place it in PAI
select * from zstudentmaser where SubjidID = zsub-zsubname.
Edited by: Ravi.Seela on Dec 13, 2011 11:41 AM
2011 Dec 13 11:18 AM
Hi Neha,
Frst check whether you maintained value range for that field .
If you want to check click on table settings and you find search for the field you set the value range if it shows values them valu range properly set for that field .
After placing the input field in the screen painter double click on input field and set dropdown field as 'Listbox'.
Place your select query in PAI module.
In PAI Module.
if zdept1-dname is not INITIAL.
select * from zdept1 into CORRESPONDING FIELDS OF table itab where dname = zdept1-dname.
endif.
In above code am checking the condition if the zdept1-dname is intial or not initial .
If it is not initial the slect query process and zdept1-dname hold the current value you have selected from dropdown list.
Hope this is helpful for you.
Regards,
G.Aditya
2011 Dec 13 9:29 AM
Hi,
Create a custom Dala emement in SE11. While creating custom data element, createa custom domain with value range(fixed value and description) as MATH
CHEMESTRY
GEOGRAPHY
ALJABRA
HISTORY
Selection screen Declaration:
PARAMETERS : p_subject TYPE zdomain AS LISTBOX VISIBLE LENGTH 15 obligatory.
where p_subject : parameter
zdomain : Data element ( create data element with domain as elementary Type and give domainas "Z" name and doble click , u will get value range as fixed)
2011 Dec 13 9:29 AM
Hi
<< Moderator message - Cut and paste response from removed. Plagiarism is not allowed in SCN >>* *Points unassigned
regards
Deepak.
Edited by: Rob Burbank on Dec 16, 2011 5:15 PM
2011 Dec 13 9:30 AM
Hi,
Go to domain of that perticular field , and add value range i.e. what ever you want in drop down list.
Regards -
Makarand Tale
2011 Dec 13 9:52 AM
Hi,
1.Goto se11 and enter your table name click on change
2.Double click on the Data Element of the field.
3.Double click on the Domain of the field. It opens a screen then select the value range tab . There give your values like male, female.
2011 Dec 19 4:12 AM
2015 Sep 29 6:10 AM
i have one query on this... for displaying the values in dropdown if i donot give fixed values in the domain but use a value table in value range will it work?
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |