‎2010 Jan 11 10:52 AM
Hi Experts ,
I want to create parameter which will only accept value from F4 help i.e drop down provided for that parameter.
Thanks & Regards,
Jigar.
‎2010 Jan 11 10:57 AM
‎2010 Jan 11 10:57 AM
‎2010 Jan 11 11:02 AM
Hi,
If it is a report parameter or is it a form , If you are creating through report the standard screen will be developed by System and you can validate the input value with the desired list of values,
If it is from form , you can use VRM_SET_VALUES as mention by Mr. Prashant,
Hope it will be helpful to you.
Rani
‎2010 Jan 11 11:02 AM
Hi Prashant ,
I have implemented F4 help. Now i want to stop user from entering free text in that parameter.
Thanks,
Jigar
‎2010 Jan 11 11:19 AM
jigar,
that is what every one is saying.. use a listbox in place of F4.
‎2010 Jan 11 11:20 AM
Hi,
You can do this way....
DATA: BEGIN OF it_help1 OCCURS 0,
matnr TYPE mara-matnr,
END OF it_help1.
PARAMETERS: para TYPE mara-matnr MODIF ID 1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN. "make the field disabled for input
IF screen-group1 = '1'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR para.
SELECT matnr FROM mara INTO TABLE it_help1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-cprog
dynpnr = '1000'
dynprofield = 'PARA1'
value_org = 'S'
DISPLAY = 'F'
TABLES
value_tab = it_help1[]
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
this is just a demo code...check this....
‎2010 Jan 11 11:23 AM
Hi Jigar,
Can you try as below
PARAMETERS: belnr TYPE bkpf-belnr AS LISTBOX VISIBLE LENGTH 12.
Thanks!!
‎2010 Jan 11 11:20 AM
hi
Please search Before you Post
[Check this Thread|http://forums.sdn.sap.com/thread.j[Other Thread for your reference|]
[Other Thread for your reference|]
Make your field Display only So that user can not enter or type any thing
in POV
Process on Value-Request. " Replace this with AT SELECTION-SCREEN ON VALUE-REQUEST Event
field carrid module F4_carrid.
in Program.
module F4_carrid.
DATA : begin of JTAB occurs 0,
carrid type spfli-carrid,
end of jtab.
SELECT * FROM SPFLI INTO TABLE JTAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'CARRID'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'CARRID'
VALUE_ORG = 'S'
DISPLAY = 'F' " This Forces F4 Help for Display Field
TABLES
VALUE_TAB = JTAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
endmoduleThis is Second Option but I recommend the above method only
Or Declare Variable in TOP Include
data : f4_taken.
in PAI.
field your_field_name module Check on Input.
in POV
process on Value-Request. " replace this with At selection-screen on value-request Event
field Your_field module F4_for_field
in program
module check input. " Replace this with AT SELECTION-SCREEN (Input) Event
if F4_taken is initial.
message 'You have to Take F4 help only to enter a Value here' type 'E'.
else.
clear F4_taken.
endif.
endmodule
module f4_for_field.
f4_taken = 'X'.
endmoduleCheerz
Ram
‎2010 Jan 11 11:31 AM
IF you are using FM 'F4IF_FIELD_VALUE_REQUEST' then there is a parameter DISPLAY = ' F ' in it. Just mark it with F.
Hope it is helpful for u.
‎2010 Jan 11 11:52 AM