List box in screen painter
Hi
I have created a screen in menu painter in which there are 3 drop down listbox .
Each list box field has a domain created for it and the domain is assigned a value table.
the value table contains data that data should be populated to list box.
Now when i excecute the screen i am not able to select any data.
any idea how can i achieve this
Hi,
I believe you have to manually fill up the list box using the function module VRM_SET_VALUES..
Check this example...
TYPE-POOLS: vrm.
PARAMETERS: p_test TYPE char4 AS LISTBOX VISIBLE LENGTH 10.
DATA: t_data TYPE vrm_values.
INITIALIZATION.
DATA: s_data TYPE vrm_value.
s_data-key = 'ABCD'.
s_data-text = 'First four'.
APPEND s_data TO t_data.
s_data-key = 'EFGHI'.
s_data-text = 'Second four'.
APPEND s_data TO t_data.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_TEST'
values = t_data
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.
START-OF-SELECTION.
WRITE: / p_test.
Thanks,
Naren
Similar Messages
-
How to add record in List Box in Screen Painter(SE51) ?
I am not able to add record in List box in Screen Painter using se51 Transaction code.
Regards,
Nirav DesaiDear All,
I found the solution.
If you are facing same problem , follow the bellow steps.
1. Declare in report.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
2. IN PBO Event.
clear: list.
NAME = 'TXT_PERIOD'. " your screen field name
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
VALUE-KEY = '3'.
VALUE-TEXT = 'LINE 3'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING ID = NAME VALUES = LIST.
Regards,
Nirav Desai -
How to create a drop down box and text box in screen painter?
Hi i am totally new to this concept of screen painter..please can any tell me
how to create drop down box in screen painter?
How to create or display default date and time values?
How to create text box for giving comments?
How to store the records that we are entering in a table?
Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.Hi,
Check all these.
1.how to create drop down box in screen painter?
To get Drop Drown Box on screen .
Follow these steps.
1.
Go to T.Code SE51 and Select Laypout for the Screen.
2.
Double click on the field for which u want Dropdown box.
3.
Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
4.
Save and Activate ur screen .
5.
Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
6.
The following code should be written under PROCESS BEFORE EVENT in the MODULE.
TYPE-POOLS :vrm.
DATA:
i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
w_natio LIKE LINE OF i_natio.
DATA:
BEGIN OF i_t005t OCCURS 0,
land1 TYPE t005t-land1,
natio TYPE t005t-natio,
END OF i_t005t.
IF i_t005t[] IS INITIAL.
SELECT land1 natio
FROM t005t
INTO TABLE i_t005t
WHERE spras = sy-langu.
IF sy-subrc = 0.
LOOP AT i_t005t .
w_natio-key = i_t005t-land1.
w_natio-text = i_t005t-natio.
APPEND w_natio TO i_natio.
CLEAR w_natio.
ENDLOOP.
ENDIF.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
values = i_natio
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.
2.1.How to create or display default date and time values?
1.
create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
2.
Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
3.How to create text box for giving comments?
1.
Define one variable in the TOP include with type STRING means Global variable.
2.
Create one input field by giving screen field name which u have defined in the above step.
4.How to store the records that we are entering in a table?
For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
Check the following steps to handle Table control.
1).
U should take one variable in your internal table or in structure which
is used for table control fields
ex :
data :
begin of itab occurs 0 ,
mark type c , "This is to select the record.
matnr like mara-matnr ,
matkl like mara-matkl,
maktx like makt-maktx,
end of itab .
Controls: TABC types TABLEVIEW using screen 100.
2).
This mark variable should be given in Table control properties.
follow the path
double click on the table control-->attributes .->select
w/SelColumn and in that itab-mark. Check in the figure.
[Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
3).
After that. Take this example.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT ITAB WITH CONTROL tabc
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP AT ITAB.
Module read_table_control.
ENDLOOP.
module user_command_0100.
In this Module read_table_control, You should write the following code
MODULE read_table_control INPUT.
MODIFY itab INDEX tabc-current_line."( This will update the
"ITAB table MARK field with 'X ' whatever we have selected
"on table control.)
ENDMODULE.
4)
If you want to Delete some of the records from Table control
follow this code Create one pushbutton and give Fucnction code to that
and write below code
CASE OKCODE.
WHEN 'CREATE'.
LOOP AT itab WHERE mark = 'X'.
"Use UPDATE statement to create new record.
ENDLOOP.
ENDCASE.
I hope that you will get something.
Regards,
Venkat.O -
Background color change option for box in screen painter
have created a box in screen painter . is there any option to change the back ground color of this box.
please helpNo, you can not change the background color of your screen painter box.
-
Can any share me the procedure to create a text box in screen painter?
Hi Friends,
Can anyone share me the procedure to create a text box in screen painter and browser for attaching files ....please its urgent....
Points will be definetly rewarded.
ThanksRefer to
How to create a text box in ascreen painter?
where another user (venkateshwar reddy) has asked a very similar question... is this an exam question?
Jonathan -
Adding input box to screen painter
Hi abapers,
my question is...... is it possible to add input box to screen painter though code,
NOT by drag and drop?Well it would probably be technically possible to create a complete dynpro "on the fly" in memory and then save and generate it (i.e. replicate everything SAP does in SE80) and then display it to the user... however the risks are high, and the user might not like the delay while your program does this. The usual practice is to define the field on the screen, and then hide it if it is not required under some circumstances, using the usual "loop at screen. screen-active = '0'. endloop." technique.
-
How to show value in list box on screen.
Hey,
I'm trying to write a little program to select a value from a listbox on a screen...
Filling the listbox, no problem. But showing the value on screen, and using the selected value isn't working...
So when i select a value, directly after the listbox 'closes', the selected value disappears...
I read already different threads regarding this topic, but i don't see a solution :(.
Below you find the code. Anyone sees where the problem is?
Screen number = 300.
PROCESS BEFORE OUTPUT.
MODULE status_0300.
Module init_dropdown_box.
PROCESS AFTER INPUT.
MODULE user_command_0300.
REPORT ztesttom2 .
TABLES: zbadgelinks.
TYPE-POOLS vrm.
DATA values TYPE vrm_values WITH HEADER LINE.
data: name type vrm_id.
DATA ok_code LIKE sy-ucomm.
DATA save_ok LIKE sy-ucomm.
DATA init.
DATA it_badgelinks LIKE zbadgelinks OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM zbadgelinks INTO TABLE it_badgelinks.
CALL SCREEN 300.
*& Module status_0300 OUTPUT
* text
module status_0300 output.
SET PF-STATUS 'ST_0300'.
SET TITLEBAR 'TB_0300'.
endmodule. " status_0300 OUTPUT
MODULE init_dropdown_box output.
IF init is initial.
name = 'LB_SEL_PC'.
loop at it_badgelinks.
values-text = it_badgelinks-description.
values-key = it_badgelinks-id.
append values.
endloop.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
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.
init = 'X'.
ENDMODULE.
*& Module user_command_0300 INPUT
* text
module user_command_0300 input.
CASE OK_CODE.
WHEN 'BACK'. LEAVE TO SCREEN 0.
WHEN 'EXIT'. LEAVE TO SCREEN 0.
WHEN 'CANC'. LEAVE TO SCREEN 0.
WHEN 'CB_CANCEL'. leave to screen 0.
WHEN 'CB_OK'.
READ TABLE it_badgelinks WITh KEY ID = it_badgelinks-id.
IF SY-SUBRC = 0.
MESSAGE I398(00) WITH 'ID: ' it_badgelinks-id
'Description: ' it_badgelinks-description.
ENDIF.
WHEN 'SEL_PC'.
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = name
IMPORTING
VALUES = values[]
EXCEPTIONS
ID_NOT_FOUND = 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.
ENDCASE.
endmodule. " user_command_0300 INPUT
Thanks in advance,
Kind Regards,
TomHi,
Please check the below modified code of yours.
Now the value is retained in the list box.
REPORT ztest_cert.
TABLES: t511t.
TYPE-POOLS vrm.
DATA: lb_sel_pc(80).
DATA values TYPE vrm_values WITH HEADER LINE.
DATA: name TYPE vrm_id.
DATA ok_code LIKE sy-ucomm.
DATA save_ok LIKE sy-ucomm.
DATA init.
DATA it_t511t LIKE t511t OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM t511t INTO TABLE it_t511t WHERE sprsl = 'EN'.
CALL SCREEN 300.
*& Module status_0300 OUTPUT
text
MODULE status_0300 OUTPUT.
SET PF-STATUS 'ST_0300'.
SET TITLEBAR 'TB_0300'.
ENDMODULE. " status_0300 OUTPUT
MODULE init_dropdown_box OUTPUT
MODULE init_dropdown_box OUTPUT.
IF init IS INITIAL.
name = 'LB_SEL_PC'.
LOOP AT it_t511t.
values-text = it_t511t-kotxt.
values-key = it_t511t-konst.
APPEND values.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
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.
ELSEIF init = 'X'.
<b> lb_sel_pc = values-text.</b>
ENDIF.
init = 'X'.
ENDMODULE. "init_dropdown_box OUTPUT
*& Module user_command_0300 INPUT
text
MODULE user_command_0300 INPUT.
data: l_code like values-key.
CASE ok_code.
WHEN 'BACK'. LEAVE TO SCREEN 0.
WHEN 'EXIT'. LEAVE TO SCREEN 0.
WHEN 'CANC'. LEAVE TO SCREEN 0.
WHEN 'CB_CANCEL'. LEAVE TO SCREEN 0.
WHEN 'CB_OK'.
clear: it_t511t.
lb_sel_pc = l_code.
READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
IF sy-subrc = 0.
CLEAR values.
values-key = it_t511t-konst.
values-text = it_t511t-kotxt.
MESSAGE i398(00) WITH 'ID: ' it_t511t-konst
'Description: ' it_t511t-kotxt.
ENDIF.
WHEN 'SEL_PC'.
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = name
IMPORTING
VALUES = values[]
EXCEPTIONS
id_not_found = 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.
ELSE.
<b> l_code = lb_sel_pc.
READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
CLEAR values.
values-key = it_t511t-konst.
values-text = it_t511t-kotxt</b>.
ENDIF.
ENDCASE.
ENDMODULE. " user_command_0300 INPUT
Thanks & Regards
Praba -
How to create Drop Down box in screen painter..??
Can anybody give me sample code or detailed description about creating Drop-Down Box in a screen...??
I have created the drop down box in screen..
But how to make data to be visible in Dropdown box, when i click the drop icon in that box...???
Regards
Pavan SanganalHere are couple of DEMO programs for the same functionality
DEMO_DROPDOWN_LIST_BOX
DEMO_DYNPRO_DROPDOWN_LISTBOX
You execution sequence will be PBO - Process before output, then the screen is displayed and the PAI Process after input.
Regards,
Ravi
Note : Please mark all the helpful answers -
Regarding F4 help for text box in screen painter
i am passing 4 valus in data element values tab, it is passing correctly to the text box, if i am making the text box to ouput only then the values and button for pop up is not comming, what do i need to do if i need values for output only.
Hi Rocky,
I think u can try out this.
make ur textbox both input and output field and in PBO write
loop at screen.
if screen-fieldname = 'TEXTBOX'.
screen-input = 0.
endif.
endloop.
Regards. -
How to create function code for field in GRID like list box in screen
Hi all,
I have requirement like drop down is created for field1 in GRID,
and have given f4 help for it, as soon as i change the data in the field
event has to trigger to update thevalues in other field.
This scenario i worked on screens where field is created with listbox and assign function code to it
when the field value changes the event triggers .
Is there is anything like that which will fire the event for field value changes.
can i update anything through the fieldcatalogue.
anybody help me on this
Regards,
MadhaviHi Madhavi,
yes we can do that by registering edit events..
check the below example.. has both the variants dropdown/f4 hlp...
screen flow logic
PROCESS BEFORE OUTPUT.
MODULE pbo.
PROCESS AFTER INPUT.
MODULE pai AT EXIT-COMMAND.
program
* CLASS lcl_event_responder DEFINITION *
CLASS lcl_event_responder DEFINITION.
PUBLIC SECTION.
DATA : ls_changed_cell TYPE lvc_s_modi,
lv_language TYPE spras..
METHODS refresh_changed_data FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed
e_ucomm.
ENDCLASS. "event_responder DEFINITION
DATA: go_handler TYPE REF TO lcl_event_responder,
go_container TYPE REF TO cl_gui_custom_container,
go_grid TYPE REF TO cl_gui_alv_grid,
gt_fieldcat TYPE lvc_t_fcat,
gv_language TYPE spras VALUE 'E',
gt_outtab TYPE TABLE OF makt WITH HEADER LINE.
PARAMETERS : dropdown TYPE char01 RADIOBUTTON GROUP grp,
f4help TYPE char01 RADIOBUTTON GROUP grp.
START-OF-SELECTION.
CALL SCREEN 100.
END-OF-SELECTION.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'BASIC'.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
SET SCREEN 0. LEAVE SCREEN.
ENDMODULE. "pai INPUT
FORM create_and_init_alv CHANGING pt_outtab LIKE gt_outtab[]
pt_fieldcat TYPE lvc_t_fcat.
CHECK go_container IS NOT BOUND.
CREATE OBJECT go_container
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container.
PERFORM build_display_table.
PERFORM build_fieldcat CHANGING pt_fieldcat.
IF dropdown EQ abap_true.
PERFORM set_drdn_table.
ENDIF.
go_grid->set_table_for_first_display( CHANGING it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab ).
go_grid->set_ready_for_input( 1 ).
" raises the 'data_changed' event when we select another cell/any action after changing the data
go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ).
CREATE OBJECT go_handler.
SET HANDLER go_handler->refresh_changed_data FOR go_grid.
ENDFORM. "CREATE_AND_INIT_ALV
FORM build_display_table.
FREE gt_outtab.
SELECT * FROM makt UP TO 20 ROWS INTO TABLE gt_outtab WHERE spras EQ gv_language.
ENDFORM. "build_display_table
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'MAKT'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
IF ls_fcat-fieldname EQ 'SPRAS'.
ls_fcat-edit = abap_true..
ls_fcat-outputlen = 8.
IF dropdown EQ abap_true.
ls_fcat-drdn_hndl = '1'.
ls_fcat-checktable = '!'. "do not check foreign keys
ENDIF.
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
FORM set_drdn_table.
CHECK go_grid->offline( ) IS INITIAL.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'EN'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'DE'.
APPEND ls_dropdown TO lt_dropdown.
CALL METHOD go_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
ENDFORM. " set_drdn_table
FORM change_display_table USING pv_language pv_rowno TYPE i.
READ TABLE gt_outtab INDEX pv_rowno.
SELECT SINGLE * FROM makt INTO gt_outtab WHERE matnr = gt_outtab-matnr AND spras = pv_language.
IF sy-subrc EQ 0.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ELSE.
CLEAR : gt_outtab-maktx,
gt_outtab-maktg.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ENDIF.
ENDFORM. "change_display_table
* CLASS event_responder IMPLEMENTATION *
CLASS lcl_event_responder IMPLEMENTATION.
METHOD refresh_changed_data.
READ TABLE er_data_changed->mt_mod_cells INTO ls_changed_cell INDEX 1.
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
EXPORTING
input = ls_changed_cell-value
IMPORTING
output = lv_language.
PERFORM change_display_table USING lv_language ls_changed_cell-row_id.
go_grid->refresh_table_display( ).
ENDMETHOD. "click
ENDCLASS. "event_responder IMPLEMENTATION
Cheers,
Jose. -
How to create dropwdown list box values and checkbox in screen painter.
Hi Experts,
I need to know the creation of dropdown list box values and the checkbox to use in screen painter.
I have 3 values to insert as:-
INR,USD,EUR
if user selects INR/USD/EUR, then it will store into the table field.
And also want to know the checkbox functioning in screen painter, i.e. what should we write in PBO/PAI.
I have found some sites to get knowledge, but didnot found anything that relates to my questions.
So please help me!
Thanks,
DeepanshuHi,
For dropdown list box in Screen create a input field and choose Drop down by index.
To populate the values write the logic in PBO as follows
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. -
Is it possible to enter our own value in dropdown list box in Module Pool. How?
Dear Experts,
Being new to ABAP, I am trying my hands on Dropdownlist box on Module Pool.
I want to pull data from Ztable(Custom Table) into Dropdown list box on Screen in Module pool and be able to edit it, delete it and enter new data through it, thus thereby able to manage the Ztable. Is it possible in dropdown.
Looking forward for experts advice.
Regards
DeepikaDear Kannan,
Thanks. But why sud I write an event in Table maintenance generator. My code is in Module Pool and it has no connection with Table Msintenance.
The I/O field Drop down list box is on the Screen in my Module Pool. I am able to pull data in it from Ztable but now I want to edit this pulled data and also want to enter new data in this dropdown list box.
Regards
Deepika -
Hello all,,
am using the following code.
How i need to work this listbox with user-command.
TYPE-POOLS : VRM.
DATA : VALUES TYPE vrm_values.
DATA : VW LIKE LINE OF VALUES.
PARAMETERS : LIST(10) TYPE c AS LISTBOX VISIBLE LENGTH 10." user-command
INITIALIZATION.
vw-key = '1'.
vw-text = 'SUN'.
APPEND vw TO VALUES.
vw-key = '2'.
vw-text = 'MON'.
APPEND vw TO VALUES.
vw-key = '3'.
vw-text = 'TUE'.
APPEND vw TO VALUES.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LIST'
values = VALUES
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.hi,
if this is the scenario than i have one example.
I have one list box on screen and one table control.
when i select some value in list box and press enter, table control fill with the values accor. to list box.
for this i have done like,
<b>MODULE user_command_1000 INPUT.</b>
CASE ok_code.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
WHEN ''.
<b> IF itab-matnr IS NOT INITIAL.
PERFORM get_val.
ENDIF.</b> ENDCASE.
<b>ENDMODULE. " USER_COMMAND_1000 INPUT</b>
itab-matnr is my field which is list box.....
<b>FORM get_val .</b>
SELECT mblnr INTO CORRESPONDING FIELDS OF TABLE itab1 FROM mseg
WHERE matnr = itab-matnr.
<b>ENDFORM. " get_val</b>
try this
reward if useful -
Index of Values in the List Boxes on a Selection Screen
Hi,
I have a list box on the selection screen for Month field. It has the values Jan, Feb, Mar....etc in it.
These entries, I added thru the VRM_SET_VALUES.
Now, I want to default the month to current month SY-DATUM+4(2).
Is there any FM to which I can send this SY-DATUM+4(2) as an Index and the corresponding value gets set for the Month field.
As an alternatvie, I could use<b> Case Sy-DATUM+4(2). when '01'. p_month = 'Jan'. etc etc..</b> But I want to avoid this big case statement.
Please suggest.
Thanks,
Suryakiran D.Hi Suryakiran,
Try to use the func <b>MONTH_NAMES_GET</b>.It will
return the month name along with the number.
And also you can directly select from table <b>T247</b>
Thanks&Regards,
Siri.
Message was edited by: Srilatha T -
Changing the selection screen based on the option in list box option
Hi Experts,
I have a list box parameter in my selection screen,
i have four options and i am changing my selection screen based the option selected.
see my code below,
at selection-screen output.
GS_VRM_VALUES-KEY = '1'.
GS_VRM_VALUES-TEXT = TEXT-S02.
APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
GS_VRM_VALUES-KEY = '2'.
GS_VRM_VALUES-TEXT = TEXT-S03.
APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
GS_VRM_VALUES-KEY = '3'.
GS_VRM_VALUES-TEXT = TEXT-S04.
APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
GS_VRM_VALUES-KEY = '4'.
GS_VRM_VALUES-TEXT = TEXT-S05.
APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
CLEAR: GS_VRM_VALUES.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'P_DROP'
VALUES = GT_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.
LOOP AT SCREEN .
CASE P_DROP .
WHEN '1'.
IF SCREEN-GROUP1 = 'M2' OR
SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
WHEN '2'.
IF SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
WHEN '3'.
IF SCREEN-GROUP1 = 'M2' OR
SCREEN-GROUP1 = 'M4' .
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
WHEN '4'.
IF SCREEN-GROUP1 = 'M2' OR
SCREEN-GROUP1 = 'M3'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
WHEN OTHERS.
IF SCREEN-GROUP1 = 'M2' OR
SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
SCREEN-INPUT = 0.
SCREEN-ACTIVE = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDCASE.
ENDLOOP.
my problem is when i change the option in the list box, the particular modify group ie, the screen is getting changed only after i press enter, So please suggest me how i can change the screen without pressing enter.Hi,
without using VRM_SET_VALUES...you just create one data element by going se11....create one domain for it...now give the values in the "value range" tab....and at the time of declaration just write ..
PARAMETERS var1 TYPE <your created data element>
AS LISTBOX VISIBLE LENGTH 20
USER-COMMAND onli
DEFAULT <one value>.
You will get the same effect as list box....and make it mandatory..
Arunima
Maybe you are looking for
-
I had been on facebook in the morning of this date. I went back to my page and things began loading slowly. I logged out and tried to reload my account and from that moment on I keep getting the "Unable to connect Firefox can't establish a connection
-
what is the best way to handle errors in BizTalk ? We are using web services, databases. Is ESB Exception handling preferred to others ? any better suggestions please ? MBH
-
Hi, I have trying to apply 10.2.0.4 patch on oracle home i.e. i am trying to upgrade my oracle software from 10.2.0.3 to 10.2.0.4 But whil applying patch i am getting following message: cannot overwrite or remove $ORACLE_HOME/rdbms/admin/externaljob.
-
How i can import MS access Data base in Oracle 9i
Dear ALL, i am feacing problem in import data base from MS ACCESS to Oracle 9i the procedure was very simple in oracle 8.0.5 but dont know what is in Oracle 9i pls i am in big tribble just boz of this problem pls tell me the solution of this prob wit
-
Install Portal and Database with modem turned off?
I am about to install Oracle Portal 9iAS with Oracle 8i database in a Win2000 PC. I have a cable internet connection that uses DHCP to dynamically assign IP and DNS addresses. Would DHCP be a problem? Should I make the installation with the modem tur