Friday, December 17, 2010
Function module F4IF_INT_TABLE_VALUE_REQUEST is used to get the functionality.

F4 help for field on the screen.

PROCESS ON VALUE-REQUEST.
  FIELD P0016-ZZ_CONTR_TYP module f4_for_contr_type.

F4 help for field on selection-screen.

 AT SELECTION-SCREEN ON VALUE-REQUEST FOR FIELD p_contr_type.


G_PROGNAME  = 'MP001600'.
  G_SCR_NUM   = '2000'.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD        = 'ZHRPAE_CONTRTYP'  "--> Field on F4 popup window
      DYNPPROG        = G_PROGNAME
      DYNPNR          = G_SCR_NUM
      DYNPROFIELD     = 'P0016-ZZ_CONTR_TYP' "--> Field on the screen
      VALUE_ORG       = 'S'
    TABLES
      VALUE_TAB       = I_ZHRPAT_CONTRTYP1 "-->Data that is displayed on F4 help
      RETURN_TAB      = I_RET_VALUES           "-->This contains selected record PROPERTIES
    EXCEPTIONS
      PARAMETER_ERROR = 1
      NO_VALUES_FOUND = 2
      OTHERS          = 3.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE .
    " Read table i_ret_values with index 1.
    READ TABLE I_RET_VALUES INTO  W_RET_VALUES INDEX 1.
    P0016-ZZ_CONTR_TYP = W_RET_VALUES-FIELDVAL.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.