Application Development and Automation 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: 
Read only

On Value Request Problem

Former Member
0 Likes
602

When I use On Value request for sel_op_fielda, I need to validate another field in my selection screen.... ( Sel_op_fieldb-low in case of this example)

It's... not working. When debbuging the Sel_opfieldb keeps comming initial.

Am I forgotting something?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
578

Header line and itab.... both Initial.

I debbuged a standard program and saw it using de Function Indicated by our friend here.

Function: DYNP_VALUES_READ

But still my CN_'s comming Initial.

Code Below:

Data: ti_campos like table of DYNPREAD WITH HEADER LINE,

l_repid like sy-repid.

l_repid = sy-repid.

ti_campos-FIELDNAME = 'CN_PROJN-LOW'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_PROJN-HIGH'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_NETNR-LOW'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_NETNR-HIGH'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_PSPNR-LOW'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_PSPNR-HIGH'.

append ti_campos.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = l_repid

dynumb = sy-dynnr

  • TRANSLATE_TO_UPPER = ' '

  • REQUEST = ' '

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

tables

dynpfields = ti_campos

EXCEPTIONS

INVALID_ABAPWORKAREA = 1

INVALID_DYNPROFIELD = 2

INVALID_DYNPRONAME = 3

INVALID_DYNPRONUMMER = 4

INVALID_REQUEST = 5

NO_FIELDDESCRIPTION = 6

INVALID_PARAMETER = 7

UNDEFIND_ERROR = 8

DOUBLE_CONVERSION = 9

STEPL_NOT_FOUND = 10

OTHERS = 11.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Message was edited by:

Jose Oliveira

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
578

Remember that select options are like internal tables, are you seeing the header line as initial, or is the table itself initial as well?

Regards,

RIch Heilman

Read only

Former Member
0 Likes
578

Use function module DYNP_VALUES_READ:

Parameters:

DYNAME = <program name>

DYNUMB = '1000'

Read only

Former Member
0 Likes
579

Header line and itab.... both Initial.

I debbuged a standard program and saw it using de Function Indicated by our friend here.

Function: DYNP_VALUES_READ

But still my CN_'s comming Initial.

Code Below:

Data: ti_campos like table of DYNPREAD WITH HEADER LINE,

l_repid like sy-repid.

l_repid = sy-repid.

ti_campos-FIELDNAME = 'CN_PROJN-LOW'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_PROJN-HIGH'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_NETNR-LOW'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_NETNR-HIGH'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_PSPNR-LOW'.

append ti_campos.

ti_campos-FIELDNAME = 'CN_PSPNR-HIGH'.

append ti_campos.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = l_repid

dynumb = sy-dynnr

  • TRANSLATE_TO_UPPER = ' '

  • REQUEST = ' '

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

tables

dynpfields = ti_campos

EXCEPTIONS

INVALID_ABAPWORKAREA = 1

INVALID_DYNPROFIELD = 2

INVALID_DYNPRONAME = 3

INVALID_DYNPRONUMMER = 4

INVALID_REQUEST = 5

NO_FIELDDESCRIPTION = 6

INVALID_PARAMETER = 7

UNDEFIND_ERROR = 8

DOUBLE_CONVERSION = 9

STEPL_NOT_FOUND = 10

OTHERS = 11.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Message was edited by:

Jose Oliveira

Read only

0 Likes
578

I tried the same thing and it is working perfectly alright.

What dump are you getting?

Did you try testing it after getting specifying all the values on selection screen? because i made the same mistake while testing..

See my code:

REPORT YTEST_DRSH .

TABLES : MARA, KNA1.

select-options : s_matnr for mara-matnr,

s_kunnr for kna1-kunnr.

Data: ti_campos like table of DYNPREAD WITH HEADER LINE,

l_repid like sy-repid.

DATA TEMP_POV LIKE SY-STEPL.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_KUNNR-LOW.

l_repid = sy-repid.

ti_campos-FIELDNAME = 'S_MATNR-LOW'.

append ti_campos.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = l_repid

dynumb = sy-dynnr

tables

dynpfields = ti_campos

EXCEPTIONS

INVALID_ABAPWORKAREA = 1

INVALID_DYNPROFIELD = 2

INVALID_DYNPRONAME = 3

INVALID_DYNPRONUMMER = 4

INVALID_REQUEST = 5

NO_FIELDDESCRIPTION = 6

INVALID_PARAMETER = 7

UNDEFIND_ERROR = 8

DOUBLE_CONVERSION = 9

STEPL_NOT_FOUND = 10

OTHERS = 11.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

START-OF-SELECTION.

WRITE 'HI'.

Read only

0 Likes
578

Thx, Darshil Shah.

At first I imagined that that function returns the proper values in my own select options.

But it fills de field "fieldvalue" in its own table. In this case, Ti_campos.

Problem solved.