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

Dynamic selection screen parameter

Former Member
0 Likes
893

Hello All,

I am facing problem in dynamic parameter declaration in selection screen. My requirement is as below,

Want to have 2 parameters in selection screen and based on first parameter (table fields) selected value, the second parameter (display the value of the selected table field) should display value of the selected field.

The problem is the second paramter type should be of first parameter selected field.

How to declare parameter dynamically after getting the first parameter selected field.

Thanks in Advance.

Regards,

Suganya.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
347

hi

You may use the Runtime Type Information(RTTI)/ RTTS to get the parameter type at runtime

Process would be :

> create a variable: l_var type ref to CL_ABAP_ELEMDESCR.

> l_var ?= cl_abap_typedescr=>describe_by_data(parameter).

> loop at l_var->components into wa

> process.

> endloop

shiva

2 REPLIES 2
Read only

Former Member
0 Likes
348

hi

You may use the Runtime Type Information(RTTI)/ RTTS to get the parameter type at runtime

Process would be :

> create a variable: l_var type ref to CL_ABAP_ELEMDESCR.

> l_var ?= cl_abap_typedescr=>describe_by_data(parameter).

> loop at l_var->components into wa

> process.

> endloop

shiva

Read only

Former Member
0 Likes
347

Hi,

As per my understanding you should try search helps.

Create elemantery search help if the fields are from single table else create collective search help.

Vikas.