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

Retrieving Selection-Screen Button Variables

Former Member
0 Likes
718

Hello,

Im currently doing a modification to a custom HR/Payroll report. I changed the report type to 1_MHR001 because I wanted the selections screen to include the 'Org. Structure' button, in order to allow easier hierarchical selection. The problem is that I need to make a comparison between the selected Organizational Units and a custom field, but I am not able to retrieve the values entered by the user. If you take a look at the image bellow, you'll see a blue square (covering the Organizational Unit field in the 'get PERNR' selection fields) and a red square (covering the top 'Org. Structure' button).

<a href="http://img442.imageshack.us/my.php?image=selscreenil8.png">Image of the selection screen...</a>

I can get the Organizational Unit values (pnporgeh) but I can't get to the values that are input by the user after pressing the 'Org. Structure' button. I thought they'd be placed in the same variable, but they are not.

How do I access those values? In what variable are they stored? How can I get that information (for future reference) ?

Thanks in advance,

Robert

5 REPLIES 5
Read only

Former Member
0 Likes
655

Try using the FM DYNP_VALUES READ.

Read only

Former Member
0 Likes
655

Try the function module RS_SELECTIONSCREEN_READ

Read only

0 Likes
655

I just tried both.

The first one returns an exception (invalid dynpro name). The second one returns nothing.

Thanks for trying..

Read only

0 Likes
655

Did you try something like below

data: l_selvalues type table of rsselread with header line,

l_program type sy-repid,

l_workspace type wsid.

l_selvalues-name = 'P_WSID'.

l_selvalues-kind = 'P'.

append l_selvalues.

l_program = sy-repid.

call function 'RS_SELECTIONSCREEN_READ'

exporting program = l_program

tables fieldvalues = l_selvalues.

Read only

0 Likes
655

Yeah,

I replaced my code with yours.. just to check if I did anything wrong. The only record in the table is:

'P_WSID' | 'P'