cancel
Showing results for 
Search instead for 
Did you mean: 

Get dynpro field value in PROCESS ON VALUE-REQUEST.

phoenixming0912
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I have a field that requires search help, the search help import parameter value is from another input field.

I want to use the input field value before PAI and in 'PROCESS ON VALUE-REQUEST'.

I tried to use DYNP_VALUES_READ but it's not working, below is my code. Please correct me if I was wrong.

  DATA lt_dynp_values TYPE TABLE OF dynpread.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname     = XXX
      dynumb     = YYY
    TABLES
      dynpfields lt_dynp_values.

The dynpfields returned nothing, could anyone help me out?

Regards,
Ming

 

View Entire Topic
Sandra_Rossi
Active Contributor
0 Kudos

First of all, by design, search helps allow zero code and are able to source from multiple input fields at a time, provided that these screen fields are named according to DDIC structure/table and the search help is defined.

If you don't want zero code, DYNP_VALUES_READ "is working well", provided that you indicate which fields to query or parameter QUERY = 'A' to query all.

CALL FUNCTION 'DYNP_VALUES_READ'
      EXPORTING
        dyname     = dyname
        dynumb     = dynumb
        request    = 'A'       " A = read all screen fields
      TABLES
        dynpfields = dynpfields
      EXCEPTIONS
        ...

 

phoenixming0912
Product and Topic Expert
Product and Topic Expert

Yes, the key point is to set "request = A", otherwise it will not work.

Thanks a lot for the help.

Sandra_Rossi
Active Contributor
0 Kudos
Not 100% correct, you have 2 solutions as I said: EITHER "you indicate which fields to query OR parameter QUERY = 'A' to query all."
phoenixming0912
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Rossi, what do you mean by "you indicate which fields to query"? I checked the import parameter and I didn't find a likely one, do you mean the specify the field in table parameter "dynpfields"?
Sandra_Rossi
Active Contributor
0 Kudos
That's correct, dynpfields in an input/output parameter. Refer to the inline documentation of DYNP_VALUES_READ for more information.