cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DYNP_GET_STEPL not work into User Exit for F4 Search Help

UlisesCasal
Explorer
0 Kudos
606

Hello everyone!! I have the following problem. I created a user exit for a custom search help, where I filter the data to be displayed by certain fields. The problem occurs when trying to use DYNP_GET_STEPL, I can’t get the STEPL, it always returns 0. I checked the dynpro number and program name and it is correct as it brings and displays the data as I want if I hardcode stepl = 1. Any help, suggestion or another FM that serves me? PS: I tried with get cursor line but it also returns 0. This is my code:

 

 

DATA: gs_dynpread     TYPE dynpread,
      gt_dynpread     TYPE TABLE OF dynpread. "tabla con los campos de la vista
  CALL FUNCTION 'DYNP_GET_STEPL'
    IMPORTING
      povstepl        = gs_dynpread-stepl
    EXCEPTIONS
      stepl_not_found = 1
      OTHERS          = 2.
  IF sy-subrc <> 0.
** Implement suitable error handling here
  ENDIF.

************REEMPLAZAR***********************
*  gs_dynpread-stepl = 1. Hardcode does work
  APPEND gs_dynpread TO gt_dynpread.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor

For getting the information about F4 on a field in a Table Control, it depends whether you handle F4 via POV  (MODULE ON VALUE-REQUEST or AT SELECTION-SCREEN ON field) or via Search Help (in the Search Help Exit).

For POV, DYNP_GET_STEPL is to be used.

For Search Help Exit, as answered by @rgore at Re: How To transfer values from search help to tab... - SAP Community:

  • Please use the function module F4UT_GET_ENVIRONMENT (It will provide the steploop, where F4 help was triggered)
  • Then use the DYNP_UPDATE_FIELDS function module to update the dynpro field values. Make sure that you have populated the steploop value received from above FM.

Answers (0)