How To Call A SAP Search Help Manually

  DATA: lf_shlp TYPE shlp_descr,

        lf_if TYPE ddshiface,

        lt_ret TYPE STANDARD TABLE OF ddshretval WITH HEADER LINE.

 
 

      CLEAR: lf_shlp, lf_if.

 
 

      CALL FUNCTION ‘F4IF_GET_SHLP_DESCR’

        EXPORTING

          shlpname = ‘MAT1’

          shlptype = ‘SH’

        IMPORTING

          shlp     = lf_shlp.

 
 

      READ TABLE lf_shlp-interface INTO lf_if

        WITH KEY shlpfield = ‘MATNR’.

 
 

      IF sy-subrc EQ 0.

        lf_if-valfield = ‘X’.

        MODIFY lf_shlp-interface FROM lf_if INDEX sy-tabix.

      ENDIF.

 
 

      REFRESH lt_ret.

 
 

      CALL FUNCTION ‘F4IF_START_VALUE_REQUEST’

        EXPORTING

          shlp          = lf_shlp

          maxrecords    = 500

        TABLES

          return_values = lt_ret.

 
 

      READ TABLE lt_ret INDEX 1.

      CHECK sy-subrc EQ 0.

      e_matnr = lt_ret-fieldval.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s