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

Former Member
0 Likes
647

i want to make dynamic s.screen with hthe result i get from i_chars how i can do it???

CALL FUNCTION 'BAPI_CLASS_GET_CHARACTERISTICS'

EXPORTING

classnum = wa_alloc_list-classnum

classtype = 'Z01'

TABLES

characteristics = i_chars

char_values = i_char_values.

LOOP AT i_char_values INTO wa_char_values.

parameters : <u>wa_char_values-name</u> <b>dynamic how</b>???

ENDLOOP.

5 REPLIES 5
Read only

anversha_s
Active Contributor
0 Likes
619

Hi Yifat,

I think it is not possible.

beacuse how will we give the type or like dynamically.

1. ... TYPE type [DECIMALS dec]

2. ... LIKE dobj

3. ... LIKE (name)

<i>If none of the additions is specified, the parameter has the type c.</i>

<i>if this is ok, then u can try in

AT SELECTION-SCREEN OUTPUT.

this is only a sugestion, i never faced this situation</i>

rgds,

anver

Message was edited by: Anversha s

Read only

Former Member
0 Likes
619

Hello Yifat,

I dont think that it is possible. You can create different screens selection but statically, you arent able to create dynamamic fields.

An idea is to create an screen with a editable table control, and make those the selection screen.

Hope this helps

Gabriel.

Read only

0 Likes
619

do ytou have an examp for this

Read only

Former Member
0 Likes
619

Hello,

Just try the following.

1) Create an Internal Table for i_char_values (already have it) add a new field for the input data.

2) create a new screen. ( call screen 100 ).

3) Create the table control with the wizard, remeber to point it to the internal table i_Char_values. And dont forget to make it editable.

on the PBO into the module should call:

CALL FUNCTION 'BAPI_CLASS_GET_CHARACTERISTICS'

EXPORTING

classnum = wa_alloc_list-classnum

classtype = 'Z01'

TABLES

characteristics = i_chars

char_values = i_char_values.

On the PAI you can process the table control doing a loop on the internal table i_char_values.

Thats all!!!

Gabriel P.

Read only

Clemenss
Active Contributor
0 Likes
619

Hi Yifat,

I don't know if I got your requirement.

First you extract possible values for characteristics for class type 'Z01'.

This is clear and should be done at event INITIAIZATION.

Then, what yhould your selection-screen look like?

If you just want a parameter for the charactesristics name, it will be

P_name like i_char_values-name.

If you want a help on possible values, create event

at value-request for p_name.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

...

look at documentation of this FM

Check input values for P_name against the table using event

at selection-screen on p_name.

read table i_char_values with key name = p_name.

if sy-subrc <> 0.

  • error message

endif.

You could do the same replacing parameters with select-options. But this depends on what you want.

Regards,

Clemens