Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

To disable parameter input

Former Member
0 Likes
2,132

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,728

Hi jigar,

For getting the drop down for the Parameter, you have to use the FM 'VRM_SET_VALUES'.

For more info :

Thanks!!

9 REPLIES 9
Read only

Former Member
0 Likes
1,729

Hi jigar,

For getting the drop down for the Parameter, you have to use the FM 'VRM_SET_VALUES'.

For more info :

Thanks!!

Read only

0 Likes
1,728

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

Read only

0 Likes
1,728

Hi Prashant ,

I have implemented F4 help. Now i want to stop user from entering free text in that parameter.

Thanks,

Jigar

Read only

0 Likes
1,728

jigar,

that is what every one is saying.. use a listbox in place of F4.

Read only

0 Likes
1,728

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....

Read only

0 Likes
1,728

Hi Jigar,

Can you try as below

PARAMETERS: belnr TYPE bkpf-belnr AS LISTBOX VISIBLE LENGTH 12.

Thanks!!

Read only

Former Member
0 Likes
1,728

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.
endmodule

This 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'.
endmodule

Cheerz

Ram

Read only

Former Member
0 Likes
1,728

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.

Read only

Former Member
0 Likes
1,728

hi frnd...

For getting the drop down for the Parameter, you have to use the FM 'VRM_SET_VALUES'.

For more info :