Application Development 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: 

Custom dynamic selection variable for standard SAP reports

Former Member
0 Kudos
482

Hi. Is it possible to add a dynamic selection variable that can then be used by standard SAP reports?

For example I made an entry in TVARVC with "SY-UNAME" as the value, and that can be selected in ME2N, but it comes through as a literal, it does not read the system user name.

Is there some way of either getting system fields or perhaps specifying a function module to read a custom table for the values?

We want to use it on standard SAP reports so changing the declaration of the select options is not an option. We could create a Z report as a copy, but we would prefer not to.

Thanks a lot for your help,

Dave.

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos
119

Dynamic Selections are possible for date and time fields. Maintaining entry in the table TVARVC will be treated as the literal, not the variable.

Check this thread:

As some workaround you can try to use the parameter id, if it is attached to that field.

Regards,

Naimesh Patel

Sandra_Rossi
Active Contributor
0 Kudos
119

I never saw that it was possible to set a variable content other than date or time (neither GUIXT, nor screen variants, nor extension, etc.)

I would advise you not to do anything, as there is not a big gain for the effort and the maintenance!

The only acceptable solution I can see immediately is to use "call transaction" by setting values and stop without doing anything else (leave on the first screen).

Another possibility is to use enhancement framework. Recently, I had to use it in vendor creation transaction (should be a big gain), to fill automatically default data from web service.

0 Kudos
119

Thank you both, I think that confirms it.