Application Development 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: 

Restrict user to select only F4 values in parameter

Former Member
0 Kudos

Hi All,

In report, I have created a search help using fm F4IF_INT_TABLE_VALUE_REQUEST on parameter. Is it possible to restrict user to select only F4 values. By disabling parameter although I can restrict users from not entering vague value but at the same time even F4 selection won't work. <removed by moderator>.

Thanks in advance.

Regards

Randhir Jha

Edited by: Thomas Zloch on Nov 23, 2011 1:50 PM

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

Check my response in

Note the parameter display = 'F' "F = Force. If its a module pool , then it screen attributes just mark the check box output field and follow the same approach

6 REPLIES 6

kesavadas_thekkillath
Active Contributor
0 Kudos

Please go through the documentation of F4IF_INT_TABLE_VALUE_REQUEST parameters. Its there.

Keshav

Former Member
0 Kudos

Hi,

Use the FM F4IF_SHLP_EXIT_EXAMPLE.

Please go through

http://wiki.sdn.sap.com/wiki/display/ABAP/SAPGUISearchHelps

Thanks,

Manish

former_member209703
Active Contributor
0 Kudos

There are several ways to implement it ones better than others.

This is one of them


REPORT ztest .

  TYPES: BEGIN OF type,
      bukrs TYPE p0001-bukrs.
  TYPES: END OF type.

  DATA: g_tabla TYPE TABLE OF type.
  DATA: l_prog TYPE syrepid.
  DATA: l_dynp TYPE sydynnr.

  SELECT * INTO CORRESPONDING FIELDS OF TABLE g_tabla FROM pa0001 UP TO 10 ROWS.

  l_prog = sy-repid.
  l_dynp = sy-dynnr.

PARAMETERS p_uno TYPE p0001-bukrs.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name EQ 'P_UNO'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_uno.

  LOOP AT SCREEN.
    IF screen-name EQ 'P_UNO'.
      screen-input = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'BUKRS'
*   PVALKEY                = ' '
     dynpprog               = l_prog
     dynpnr                 = l_dynp
     dynprofield            = 'P_UNO'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
     value_org              = 'S'
    TABLES
      value_tab              = g_tabla
            .
  LOOP AT SCREEN.
    IF screen-name EQ 'P_UNO'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

0 Kudos

Hi Jose,

Thanks Jose for your prompt reply.

I tried your code. Although F4 field gets disabled but no values are found. After commenting below code I do get F4 list but "Enter" button is disabled. i.e I can not select any thing from F4 list.

*AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_uno.

  • LOOP AT SCREEN.

  • IF screen-name EQ 'P_UNO'.

  • screen-input = 1.

  • MODIFY SCREEN.

  • ENDIF.

  • ENDLOOP.

Regards

Randhir Jha

former_member1245113
Active Contributor
0 Kudos

Hi

You can make the Input field only for display and also can provide F4 help or if it is editable then you can restrict

check the below threads

Cheerz

Ramchander Rao.K

kesavadas_thekkillath
Active Contributor
0 Kudos

Check my response in

Note the parameter display = 'F' "F = Force. If its a module pool , then it screen attributes just mark the check box output field and follow the same approach