Search tool ABAP

For the convenience of adding records to the ALV table, you can use the forced call method search tools using the F4IF_FIELD_VALUE_REQUEST Functional Method. Passing the following parameters to the input:

  • tabname - table name or help view, as in our case. Available values for selection will be extracted from this view or table.

  • fieldname - name of the field in the tabname table in which this field is stored.

  • searchhelp - search tool for forced call.

  • multiple_choice - this field is responsible for the possibility of multiple choice of values.

You can also look at other parameters affecting the call of a given search tool by looking at its parameters.

As a result, we get a table of user selection results, in which the fieldval column stores user selected values. Now, if we use this function when adding fields to ALV table, then we can go through this table, move the necessary records, for example, checking on their presence in the target table. Then replenish, if necessary, additional fields. Then update ALV.
The final code of the ABAP program is as follows:

††††††ls_kunnr†    TYPE†ts_kunnr,
††††† lr_kunnr†    TYPE†REF†TO†ddshretval.