Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

DYNP_VALUES_READ Limitations for multiple lines select options

Hi all !

First post here, but a tough one I think. Here is my inquiry :

I have worked on an specific abap function used in many long abap list reports. Theses reports are launched in background processing. The aim of this routine is to stop the report execution if a background job with the same selection parameters is already launched for the current user (to Prevent useless several launch of a time-expensive program).

Because this routine is dynamic, I read the selection screen of the current report with the function 'DYNP_VALUES_READ'. And I compare the result with the variant of the backgroung job (read with function 'RS_VARIANT_CONTENTS').

The real problem is that function "DYNP_VALUES_READ" only extract the first line of select-options. I found an alternative solution to extract the select options values (a dynamic assign with field symbols), but external conversions (for WBS elements for example ) are lost, so the comparison detects differences between the background job's variant values and the current selection screen values.

Does anybody know a way to get entire select options values from a selection screen just as they are displayed on screen ?

Thanks for reading my message

Message was edited by: Thomas BRICOUT

Former Member
Former Member replied


Perhaps the following code will help you. A function module in the code captures everything on the selection screen into an internal table. It doesn't actually capture the information the way you want it, but I believe you will be able to work with it to achieve your desired result. If it doesn't meet your needs, it is still useful for printing selection screen fields and their values.


report zybttes2.

tables: zf137, " 137 General Ledger Document Details Table

zf137a. " 137 General Ledger Document Details Table, Archive

selection-screen begin of block b1 with frame title text-004." BCT003

parameters: p_zf137 radiobutton group xxx, " BCT003

p_zf137a radiobutton group xxx. " BCT003

selection-screen end of block b1. " BCT003


selection-screen begin of block parameter with frame title text-001.

selection-screen skip 1.

select-options: s_date for zf137-zzpostdat.

selection-screen skip 1.

selection-screen begin of line.

selection-screen comment 3(6) text-002.

selection-screen end of line.

selection-screen skip 1.

select-options: s_loan for zf137-zzloan.

selection-screen skip 1.

selection-screen begin of line.

selection-screen comment 3(6) text-003.

selection-screen end of line.

selection-screen skip 1.

select-options: s_ccentr for zf137-zzcostctr.

selection-screen skip 1.

selection-screen end of block parameter.

data: ww(3) type n.

data: zz(3) type c.

data: c1(1) type c value '0'.

do 2 times.

ww = ww + 1.

zz = ww. shift zz left deleting leading c1.

write: / zz.



  • Capture and then print the selection screen fields and their values


data: begin of i_info occurs 20,


olength type x,

line like raldb-infoline,

end of i_info.

call function 'PRINT_SELECTIONS'


mode = 'TABLE'

rname = sy-cprog

rvariante = sy-slset


infotab = i_info.

loop at i_info.

write: / i_info-line.


write: / 'end'.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question