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: 

Help needed with F4 input selection

Former Member
0 Kudos


Hi

I am working on a dynpro in which there is an input field and the F4 selection dialog displays all entries including delimited entries from a Z table. There is no search help object specified in the screen painter layout for the field. I have no idea how the list is populated and where to find the code. I need to stop delimited value being primed for input selection. How should I go about troubleshooting this? Thanks in anticipation.

8 REPLIES 8

karun_prabhu
Active Contributor
0 Kudos

Hello Ramprasad.

     Simple. Just debug and see the flow.

     If no search help is in screen painter, then a module would have been written under PROCESS ON VALUE-REQUEST.

Regards.

0 Kudos

Hi Arun

I tried that. The code just passes through FM 'DD_SHLP_CALL_FROM_DYNP' and exits, displaying the selection window.

0 Kudos

Check the values passed on to structure help_infos.

0 Kudos

They look OK to me. Moreover there are no date fields in the structure for me to try and pass on so that delimited entries could be filtered out.

0 Kudos

I am not sure about this FM's full functionality.

But using FM F4IF_INT_TABLE_VALUE_REQUEST, we can prepare an internal table filtered based on our requirements and then displayed.

former_member192842
Participant
0 Kudos

Hi,

Please check on whether a search help is attached to the data element of the input field.

Regards

Anand

raymond_giuseppi
Active Contributor
0 Kudos

The system use a simple hierarchy to attach search-help to a dynpro field, look at this picture

(Source Hierarchy of Search Help Calls at help.sap.com)

This graphic is explained in the accompanying text

So there may be no code to find, and the PROCESS ON VALUE-REQUEST (or POV) allows you to change the standard behavior.

Regards,

Raymond

former_member228804
Participant
0 Kudos

Hello Ram,

     Please find the below excerpt.

******POV event

PROCESS ON VALUE-REQUEST.

FIELD w_header-matnr

MODULE matnr_help.

******POV ends.

DATAw_dynfields TYPE dynpread,

            lr_matnr    TYPE RANGE OF matnr.

FIELD-SYMBOLS: <lx_makt> TYPE t_maktx.

SELECT matnr maktx

       FROM makt

       INTO TABLE i_makt

       WHERE matnr IN lr_matnr.

w_mapp-fldname = w_header-matnr.

w_mapp-fldinh = w_header-matnr.

APPEND w_mapp TO i_mapp.

CLEAR w_mapp.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

   EXPORTING

    retfield               = MATNR

    dynpprog           = sy-repid

    dynpnr              = sy-dynnr

    dynprofield         = W_HEADER-MATNR

    value_org              = S

   TABLES

    value_tab              = i_makt

    return_tab             = i_return_tab

  EXCEPTIONS

    parameter_error        = 1

    no_values_found        = 2

    OTHERS                 = 3 ##FM_SUBRC_OK..

IF  i_return_tab  IS NOT INITIAL.

READ TABLE i_return_tab INTO w_return_tab

                       WITH KEY retfield = W_HEADER-MATNR

   IF sy-subrc 0.

         w_header-matnr   = w_return_tab-fieldval.

   CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

             EXPORTING

               input    = w_header-matnr

            IMPORTING

              output    = w_header-matnr.

   CLEAR: i_marc.

     SELECT matnr sernp

       FROM marc

       INTO TABLE i_marc

       WHERE matnr = w_header-matnr.

   READ TABLE i_makt ASSIGNING <lx_makt>

                   WITH KEY matnr = w_header-matnr.

IF <lx_makt> IS ASSIGNED.

   w_dynfields-fieldname  W_HEADER-MAKTX.

   w_dynfields-fieldvalue = <lx_makt>-maktx.

   APPEND w_dynfields TO i_dynfields.

   CLEAR: w_dynfields, w_marc.

   READ TABLE i_marc INTO w_marc

                     WITH KEY matnr = W_HEADER-MATNR.

   IF sy-subrc = 0.

     CLEAR w_dynfields.

     w_dynfields-fieldname      W_HEADER-SERNR.

     IF w_marc-sernp IS NOT INITIAL.

         w_dynfields-fieldvalue = 'Y'.

         v_group = abap_true.

         APPEND w_dynfields TO i_dynfields.

         CLEAR w_dynfields.

     ELSE.

       CLEAR: w_header-sernr, w_dynfields-fieldvalue.

       APPEND w_dynfields TO i_dynfields.

     ENDIF.

   ENDIF.

   CALL FUNCTION 'DYNP_VALUES_UPDATE'

   EXPORTING

       dyname                     = sy-repid

       dynumb                     = sy-dynnr

     TABLES

       dynpfields                 = i_dynfields.

  ENDIF.

ENDIF.

ENDIF.

CLEAR i_dynfields.