Skip to Content
avatar image
Former Member

Internal table to Remove duplicates from f4

Hi All,

I created a customised F4 & duplicate values are being passed.I wrote a search help exit & created a function module

Please let me know how do i declare an Internal table in it so that i can pass the record_tab body into that internal table.

What shoul be the internal table structure be like.

Appreciate Your Quick Help.

Regards,

Ravi S.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 14, 2009 at 10:48 AM

    Hi

    Refer this sample code.

    • Prepare F4 help.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'WA_LFA1_S-LIFNR' (refernace field)

    value_org = 'S'

    dynpnr = '1000'

    dynprofield = 'P_LIFNR' (Parameter on the screen)

    TABLES

    value_tab = t_lfa1_s ( this is th internal table with values)

    return_tab = t_ret

    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.

    READ TABLE t_ret INTO wa_ret INDEX 1.

    IF sy-subrc IS INITIAL.

    MOVE wa_ret-fieldval TO p_lifnr.

    ENDIF.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Thanks for the Quick reply.That's not what i'm looking for.

      I'm Using the example F4IF_SHLP_EXIT_EXAMPLE & writing the code in 'DISP'.

      I want to declare an Internal table in it & pass the record_tab values into that .

      Then Sort it & Remove Duplicates from it.

      What i need is,how should the internal structure be like.

      Regards,

      Ravi S.

  • avatar image
    Former Member
    Jul 14, 2009 at 11:23 AM

    Sice ur are using the FOM F4IF_SHLP_EXIT_EXAMPLE so ur internal table structure should be SHLP_TAB for the search help.

    if you want to sort the internal table and remmove duplicate then use the below syntax.

    Sort Itab.

    delete adjacent duplicated from iatb.if u want mre information then use F1 help.

    Add comment
    10|10000 characters needed characters exceeded