Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

Former Member
Former Member replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question