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: 

search help to filter values

Former Member
0 Kudos

hi friends,

appreciate your help on this search help issue

TYPE ACTCODE

DUN A01

DUN A02

DUN A03

COL A06

COL A07

i need to have a search help on selection screen when it loads, search help should have only values TYPE = DUN

please tell me how to

thnaks

iver

4 REPLIES 4

Former Member
0 Kudos

u can use this 'F4IF_INT_TABLE_VALUE_REQUEST' function module at selection-screen on value request for that particular field..........

Former Member
0 Kudos

Hi ,

Here is the Example Report Program with Selction-screen F4 help .

REPORT DEMO_DYNPRO_F4_HELP_MODULE.

TYPES: BEGIN OF VALUES,
         CARRID TYPE SPFLI-CARRID,
         CONNID TYPE SPFLI-CONNID,
       END OF VALUES.

DATA: CARRIER(3) TYPE C,
      CONNECTION(4) TYPE C.

DATA: PROGNAME LIKE SY-REPID,
      DYNNUM   LIKE SY-DYNNR,
      DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
      FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
      VALUES_TAB TYPE TABLE OF VALUES.

CALL SCREEN 100.

MODULE INIT OUTPUT.
  PROGNAME = SY-REPID.
  DYNNUM   = SY-DYNNR.
  CLEAR: FIELD_VALUE, DYNPRO_VALUES.
  FIELD_VALUE-FIELDNAME = 'CARRIER'.
  APPEND FIELD_VALUE TO DYNPRO_VALUES.
ENDMODULE.

MODULE CANCEL INPUT.
  LEAVE PROGRAM.
ENDMODULE.

MODULE VALUE_CARRIER INPUT.

  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
       EXPORTING
            TABNAME           = 'DEMOF4HELP'
            FIELDNAME         = 'CARRIER1'
            DYNPPROG          =  PROGNAME
            DYNPNR            =  DYNNUM
            DYNPROFIELD       = 'CARRIER'.

ENDMODULE.

MODULE VALUE_CONNECTION INPUT.

  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            DYNAME                   = PROGNAME
            DYNUMB                   = DYNNUM
            TRANSLATE_TO_UPPER       = 'X'
       TABLES
            DYNPFIELDS               = DYNPRO_VALUES.

  READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.

  SELECT  CARRID CONNID
    FROM  SPFLI
    INTO  CORRESPONDING FIELDS OF TABLE VALUES_TAB
    WHERE CARRID = FIELD_VALUE-FIELDVALUE.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            RETFIELD         = 'CONNID'
            DYNPPROG         = PROGNAME
            DYNPNR           = DYNNUM
            DYNPROFIELD      = 'CONNECTION'
            VALUE_ORG        = 'S'
       TABLES
            VALUE_TAB        = VALUES_TAB.

ENDMODULE.

Reward points if it is usefull .....

Girish

Former Member
0 Kudos

Hi

the same req

see this code

aapply for ur logic

by putting condition in where condition

reward if usefull

it is a code for search help which will give u the based on ur condition

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.

  • IF S_OBJID IS NOT INITIAL.

SELECT OTYPE OBJID FROM HRP1000

INTO TABLE IT_OBJID_SH

WHERE OTYPE = 'D'.

IF SY-SUBRC EQ 0.

  • SEARCH HELP FOR QUALIFICATION.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'OBJID'

  • PVALKEY = ' '

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'S_OBJID'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_OBJID_SH

  • FIELD_TAB =

  • RETURN_TAB = RETURN_TAB

  • DYNPFLD_MAPPING =

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

ENDIF.

ENDIF.

.

Former Member
0 Kudos

hi,

if these both feilds are from DDIC table?

Than u can create search help and take default value of type 'DUN' and use that search help in selection screen as match code.

Hope it will b helpful.