09-22-2008 12:05 PM
Hi Friends
Here is my requirement:
I need to create an input field, say, "Mode". This field should contain 'D' (Display) 'U' (Update) 'A' (All).
These 3 values should be displayed in a popup window when the user presses the F4 on the MODE input field.
Please let me know how to do this.
Thank you
Senthil
09-22-2008 12:19 PM
09-22-2008 12:21 PM
hi,
See the standard program DEMO_DYNPRO_F4_HELP_MODULE in SE38.
Regards,
Vikram.S
09-22-2008 12:23 PM
Hi Senthil,
Just go to se11.
Create a Data Element for your input field having those 3 values in its value range. Activate it.
Now Choose Search help radio button and Press Create
Choose Elementry search Help.
Assign that data element in that search help.
Now use that Search help in you program.
Hope this will help.
Regards,
Nitin.
09-22-2008 12:32 PM
Hi
Please see this is my code:
DATA : BEGIN OF it_mode OCCURS 0,
p_mode type c,
END OF it_mode.
PARAMETERS : p_mode TYPE c DEFAULT 'D'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_mode.
it_mode-p_mode = 'D'.
Append it_mode.
it_mode-p_mode = 'U'.
Append it_mode.
it_mode-p_mode = 'A'.
Append it_mode.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'P_MODE'
dynpprog = 'SY-REPID'
value_org = 'S'
TABLES
value_tab = it_mode
return_tab = it_return_tab.
IF sy-subrc = 0.
READ TABLE it_return_tab INDEX 1.
p_mode = it_return_tab-fieldval.
ENDIF.
This gives popup window only.... not showing the values(i.e. D U). Please help...
Thanks
Senthil
09-22-2008 1:17 PM
Hi Senthil,
Please remove quotes of SY-REPID in function call.
DYNPPROG = SY-REPID
Regards,
Aparna Gaikwad
09-22-2008 1:08 PM
Hi,
plz check below code :
tables kna1.
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
select-options s_begru for kna1-begru.
at selection-screen on value-request for s_begru-low.
refresh t_values.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
s_begru-low = t_return-fieldval.
endif.
thanx.
09-22-2008 1:46 PM
Hi,
Use:
TYPE: BEGIN of ty_it,
chr type c,
desc type char15,
END OF ty_it.
DATA: it type table of ty_it,
wa type ty_it.
PARAMETERS : MODE Type c.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MODE.
perform f4_values.
Form f4_values.
wa-chr = 'A'. wa-desc = 'ALL'. append wa to it.
wa-chr = 'D'. wa-desc = 'DISPLAY'. append wa to it.
wa-chr = 'U'. wa-desc = 'UPDATE'. append wa to it.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CHR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'MODE'
value_org = 'S'
TABLES
value_tab = it
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
endform.
03-03-2009 11:11 AM