2008 Feb 07 3:45 PM
Hi,
I have to create a selection screen list box with with values at run time.
This is actually for a maintanence view.
Please help.
Thanks
Vimalraj
2008 Feb 07 4:08 PM
Hi,
If it is for maintenance view , try to edit the PBO module of the generated screen and write a new module to fill the listbox values using FM : VRM_SET_VALUES.
Regards
L Appana
Hi,
I have to create a selection screen list box with with values at run time.
This is actually for a maintanence view.
Please help.
Thanks
Vimalraj
2008 Feb 07 3:49 PM
Hi,
YOu can have a look at the demo programs:
DEMO_DROPDOWN_LIST_BOX
DEMO_DYNPRO_DROPDOWN_LISTBOX
Regards,
Ravi Kanth talagana
2008 Feb 07 4:08 PM
Hi,
If it is for maintenance view , try to edit the PBO module of the generated screen and write a new module to fill the listbox values using FM : VRM_SET_VALUES.
Regards
L Appana
2008 Feb 07 4:53 PM
Hi Appana,
Can you please help with some small examples done with VRM_SET_VALUES.
That can be used for maintanence view.
Thanks
Vimalraj
2008 Feb 07 5:22 PM
Hi,
Chk this program
report zcha .
data init.
tables scarr.
tables spfli.
tables sflight.
tables sbook.
data save_ok like sy-ucomm.
data ok_code like sy-ucomm.
call screen 100.
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
module status_0100 output.
if init is initial.
set pf-status 'GRUND'.
set titlebar '100'.
preset of listboxes
spfli-carrid = 'LH'.
sflight-carrid = 'LH'.
sbook-carrid = 'LH'.
endif.
endmodule. " STATUS_0100 OUTPUT
&----
*& Module SET_DATA_CARRID INPUT
&----
text
----
module set_data_carrid input.
types: begin of type_carrid,
carrid like spfli-carrid,
carrname like scarr-carrname,
end of type_carrid.
data itab_carrid type standard table of type_carrid with header line.
select carrid carrname
from scarr
into corresponding fields of table itab_carrid.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'CARRID'
value_org = 'S'
tables
value_tab = itab_carrid
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.
endmodule. " SET_DATA_CARRID INPUT
&----
*& Module FILL_CARRID OUTPUT
&----
text
----
module fill_carrid output.
Do not use this process (but it works)
type-pools vrm.
data values type vrm_values with header line.
if init is initial.
select * from scarr.
values-text = scarr-carrname.
values-key = scarr-carrid.
append values.
endselect.
call function 'VRM_SET_VALUES'
exporting
id = 'SBOOK-CARRID'
values = 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.
endif.
scarr-carrid = 'LH'.
init = 'X'.
endmodule. " FILL_CARRID OUTPUT
&----
*& Module EVENT_FROM_LISTBOX INPUT
&----
text
----
module event_from_listbox input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'LISTBOX_2'.
message i300(eu) with save_ok.
when 'LISTBOX_3'.
message i300(eu) with save_ok.
endcase.
endmodule. " EVENT_FROM_LISTBOX INPUT
&----
*& Module EXIT INPUT
&----
text
----
module exit input.
leave program.
endmodule. " EXIT INPUT
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |