2009 Apr 07 8:43 AM
Can u please tell me How shall i put drop down list box in screen painter. in that list box i have to add some entries in it user has to select among them.
I ave already searched in net some FM to use and i tried but i not yet got the answer.
Please help me in this regard i need step by step.
Thanks in advance.
Can u please tell me How shall i put drop down list box in screen painter. in that list box i have to add some entries in it user has to select among them.
I ave already searched in net some FM to use and i tried but i not yet got the answer.
Please help me in this regard i need step by step.
Thanks in advance.
2009 Apr 07 9:31 AM
2009 Apr 07 11:34 AM
2009 Apr 08 11:56 AM
Hi,
for creating the list box:
-
in the screen painter you have the option for creating the drop down box.
for populating the values into list box:
-
populate the internal table with the required data.
Under process on value request module,you call the fm 'F4IF_INT_TABLE_VALUE_REQUEST'.
To this function module export the field name and internal table.
2009 Apr 07 11:35 AM
Hi,
In the screen painter you select a input/output field and drag it on the screen painter.
Now double click on the field, you will get screen painter attribute window.
There you select list box near drop down.
Thanks,
Sri.
2009 Apr 11 7:24 AM
Hi
In screen there is list box name
DEPARTMENT when i click it shows the drop down list box.
there it shows all the departments.
FINANCE
COSTING
HR
HR
HR
HR
MATERIALS
MATERIALS
If i select finance and click SAVE button. It inserted into my table corresponding department field.
dept is my field. The field entry i fetched from ZTABLE-DEPT.
After entering new entry it shows
FINANCE
FINANCE
COSTING
HR
HR
HR
HR
MATERIALS
MATERIALS
I want only the list of deparment not the repeated entry. How can i overcome this. May be it basic.
Thanks and regards
arvind
2009 Apr 13 9:56 AM
what you can do is create an internal table with only field as department.
Now for all entries in your previous internal table copy all corresponding department in this new table.
Now sort this department internal table and delete adjacent duplicates comparing the field.
This table now gives you unique department.
Now you can refer your drop down to this internal table field.
Regards,
Lalit Mohan Gupta.
2009 Apr 09 5:00 AM
Hi,
Refer the programs:-
DEMO_DYNPRO_DROPDOWN_LISTBOX
DEMO_DROPDOWN_LIST_BOX
Also you can refer:-
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/content.htm
Hope this helps you.
Regards,
Tarun
2009 Apr 11 7:55 AM
HI...
Goto to se51 in ur form painter..
select ur field and double click on it..
In the attributes window...select the listbox in dropdown field.
And Use the below shown FM as per ur requirement---
DATA : BEGIN OF VALUE ,
FRMNM TYPE PINPF-FRMNM,
END OF VALUE .
DATA : VTAB LIKE TABLE OF VALUE ,
VAL LIKE LINE OF VTAB .
CLEAR VTAB .
MOVE 'YES' TO VAL-FRMNM .
APPEND VAL TO VTAB .
CLEAR VAL .
MOVE 'NO' TO VAL-FRMNM .
APPEND VAL TO VTAB .
CLEAR VAL .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'FRMNM'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'ZSTORES-MODVATE'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = VTAB
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2009 Apr 15 5:48 AM
Hi,
In the layout select the listbox option for the field u want to apply the dropdown list box.
In Pbo use the function module VRM_SET_VALUES
for example:
DATA : lt_vrm_values TYPE TABLE OF vrm_value,
ls_vrm_values TYPE vrm_value.
CONSTANTS : lc_field TYPE vrm_id VALUE 'The name given to the dropdown on the layout'.
(select the fields that should be displayed in the dropdown)
select id
desc from table
into itab.
LOOP AT itab INTO wa.
ls_vrm_values-key = wa_id.
ls_vrm_values-text = wa_desc.
APPEND ls_vrm_values TO lt_vrm_values.
CLEAR ls_vrm_values.
AT LAST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = lc_field
values = lt_vrm_values
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks & Regards
2009 Apr 16 1:55 PM
Hi hema thaks for ur response i tried but still.
Kindly spare few minutes,
I have a table called zcrept there fields are SNO (is the unique), department etc, In department field is a drop down list box in screen painter, which i shown above question,
What i need is 1. when execution List box values must comes from master table zdept and after selecting the dept field under run time it has to save in my transaction table ie, zcrept.
I am working this call report for a long time still not yet arrived the solution.
thanks and regards
2009 Apr 15 10:15 AM
TYPES : BEGIN OF TY_ZCS_TAG_CAT,
CATG TYPE ZCS_TAG_CAT-Z_CODE,
Z_DESC TYPE ZCS_TAG_CAT-Z_DESC,
END OF TY_ZCS_TAG_CAT.
DATA : IT_ZCS_TAG_CAT TYPE STANDARD TABLE OF TY_ZCS_TAG_CAT.
in screen I used CATG with length 30 for displaying text.
&----
*& Module CATG_F4_HELP INPUT
&----
text
----
MODULE CATG_F4_HELP INPUT.
IF IT_ZCS_TAG_CAT[] IS INITIAL.
SELECT Z_CODE Z_DESC FROM ZCS_TAG_CAT INTO TABLE IT_ZCS_TAG_CAT.
SORT IT_ZCS_TAG_CAT. " BY Z_CODE.
delete adjacent duplicates from IT_ZCS_TAG_CAT comparing z_code.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'CATG'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'CATG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = IT_ZCS_TAG_CAT
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
2009 Apr 15 11:20 AM
TYPES : BEGIN OF TY_ZCS_TAG_CAT,
CATG TYPE ZCS_TAG_CAT-Z_CODE,
Z_DESC TYPE ZCS_TAG_CAT-Z_DESC,
END OF TY_ZCS_TAG_CAT.
DATA : IT_ZCS_TAG_CAT TYPE STANDARD TABLE OF TY_ZCS_TAG_CAT.
in screen I used CATG with length 30 for displaying text,
and my main aim is use the corresponding code of it for further process
then
&----
*& Module CATG_F4_HELP INPUT
&----
text
----
MODULE CATG_F4_HELP INPUT.
IF IT_ZCS_TAG_CAT[] IS INITIAL.
SELECT Z_CODE Z_DESC FROM ZCS_TAG_CAT INTO TABLE IT_ZCS_TAG_CAT.
SORT IT_ZCS_TAG_CAT. " BY Z_CODE.
delete adjacent duplicates from IT_ZCS_TAG_CAT comparing z_code.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'CATG'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'CATG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = IT_ZCS_TAG_CAT
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |