2008 Feb 08 8:47 AM
Hi All,
I am using drop down list box in table control on screen painter, how to do this. I also need the value/index returned in the internal table of the selected row in the drop down list box. Its urgent.
Regards
Gajendra
Hi All,
I am using drop down list box in table control on screen painter, how to do this. I also need the value/index returned in the internal table of the selected row in the drop down list box. Its urgent.
Regards
Gajendra
2008 Feb 08 9:34 AM
2008 Feb 08 9:58 AM
hi,
first u need to take that field as listbox in attribute....
then write this into flow logic of screen after PAI...
PROCESS ON VALUE-REQUEST.
FIELD ifmtp-form_type MODULE fm_drop.
MODULE fm_drop INPUT.
CLEAR ifmtp.
REFRESH ifmtp.
ifmtp-form_type = 'C'.
APPEND ifmtp.
ifmtp-form_type = 'F'.
APPEND ifmtp.
ifmtp-form_type = 'H'.
APPEND ifmtp.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FORM_TYPE'
value_org = 'S'
TABLES
value_tab = ifmtp.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " fm_drop INPUT
ifmtp-form_type is my field which i take as listbox......
this is my internal table declaration in top module...
DATA : BEGIN OF ifmtp OCCURS 0,
form_type LIKE zform_track_mast-form_type,
END OF ifmtp.
reward if usefull.....
2008 Feb 08 10:26 AM
You can use the function VRM_SET_VALUES for the same.
Pass Id as the fieldname & values as the field values.
Regards,
Abhijeet
2008 Feb 08 10:28 AM
hi
good
check this code and use it in your code
VALUE LIST CREATED IN PBO
In this method we set the value list attribute to 'A'.The value list will be filled in the PBO by using FM VRM_SET_VALUES .
TYPE-POOLS : VRM
DATA : field_id TYPE VRM_ID ,
values TYPE VRM_VALUES,
value LIKE LINE OF values.
PROCESS BEFORE OUTPUT
MODULE list_fill_100
MODULE list_fill_100 OUTPUT
SELECT f1 f2 f3 FROM tab WHERE condition.
value-KEY = f1.
value-TEXT = f2
APPEND value TO VALUES
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'i/o screen field'
values = values.
ENDMODULE.
thanks
mrutyun^
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |