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

Former Member
0 Kudos

Hi,

I have created a search help and assigned it to a selection screen field.

But it is displaying the null values also which are in that field(it is a z..field).

Can anyone help me how to suppress those null values in the f4..list

regards

sree

5 REPLIES 5

Former Member
0 Kudos

Hi,

If you want to do at the DDIC level..Then you can use search help exit to delete the null values..

OR

in AT SELECTION-SCREEN ON VALUE-REQUEST.

Get the values from the z table and delete the null values...

Then use the function module F4IF_INT_TABLE_VALUE_REQUEST to display the F4.


TABLES: T005T.

DATA: BEGIN OF t_t005 OCCURS 0,
        land1 TYPE t005-land1,
      END OF t_t005.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
PARAMETERS: p_land1  TYPE t005-land1.

SELECTION-SCREEN COMMENT 13(35) v_text1.
SELECTION-SCREEN END OF LINE.

INITIALIZATION.
  v_text = 'Country'.
  v_text1 = ' '.

AT SELECTION-SCREEN OUTPUT.
  IF NOT p_land1 IS INITIAL.

    SELECT SINGLE * FROM t005t
           WHERE spras = sy-langu
           AND   land1 = p_land1.

    IF sy-subrc = 0.
      v_text1 = t005t-landx.
    ENDIF.

  ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.

  REFRESH: t_t005.

  SELECT land1
         INTO TABLE t_t005
         FROM t005.


  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
*            DDIC_STRUCTURE   = 'T005'
            PVALKEY          = ' '
            retfield         = 'LAND1'
            dynpprog         = sy-repid
            DYNPNR           = sy-dynnr
            dynprofield      = 'P_LAND1'
            callback_program = sy-repid
            value_org        = 'S'
       TABLES
            value_tab        = t_t005
       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.

Thanks

Naren

Former Member
0 Kudos

hi

good

in f4 help basically you fetch the data from the database table field,if the field contain the null value than i will display in your f4 help.

go through these link,hope these would help you to solve your problem

http://help.sap.com/saphelp_nw2004s/helpdata/en/79/34a246d9b511d1950e0000e8353423/content.htm

reward point if helpful.

thanks

mrutyun^

Former Member
0 Kudos

Hi,

While fetching the data using the select query to show in search help, avoid records which are having space in where clause.

Reward if it helps,

Satish

Former Member
0 Kudos

Hi,

Hi,

call this FM under....

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_orderno-low.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'ORDERNO'

dynpprog = 'ZTEST'

dynpnr = '1010'

dynprofield = 'S_ord-LOW'

TABLES

value_tab = orders

EXCEPTIONS

parameter_error = 1

NO_VALUES_FOUND = 2

others = 3.

Please call this function module in Process On Value Request.

please see below steps.

1) get the data of order number into internal table or into variable.

2) call the function module

3) pass this value to value_tab = <int table name> or <variable name>.

then ur code should work.

thanks,

Paras

Former Member
0 Kudos

Hi

'F4IF_INT_TABLE_VALUE_REQUEST' this FM exists in that vertion

u can use like this

TYPES : BEGIN OF ST_OBJID_SH,

OTYPE TYPE HRP1000-OTYPE,

OBJID TYPE HRP1000-OBJID,

END OF ST_OBJID_SH.

DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.

DATA : WA_OBJID_SH TYPE ST_OBJID_SH.

***********SELECTION SCREEN DESIGN***********************

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

*SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .

SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .

SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B1.

**********END OF SELECTION SCREEN DESIGN*****************

*********VALIDATION FOR SCREEN FIELDS********************

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.

Reward if usefull .