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: 

Dynamic selection

Former Member
0 Kudos

Hi All,

I have a dynamic selection on a selection screen..in which i have some fields. Is it possible to get the dynamic selection field onto the selection screen without editing the porgram( i mean any settings available to proceed).

Thanks & Regards,

Padmasri.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Check whether these links help you-

Former Member
0 Kudos

This message was moderated.

0 Kudos

>

> Hi,

> Find the sample code below which serves a similar requirement.

>

>

DATA: BEGIN OF fs_vbeln,
>       vbeln TYPE vbeln_va,
>       posnr TYPE posnr_va,
>       END OF fs_vbeln,
>       t_vbeln LIKE STANDARD TABLE OF fs_vbeln.
> 
> DATA: lt_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
> 
> PARAMETERS: p1(10).
> 
> SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
> 
> PARAMETERS: p3 RADIOBUTTON GROUP rad2 MODIF ID sc1,
>             p4 RADIOBUTTON GROUP rad2 MODIF ID sc1.
> 
> PARAMETERS: p5 RADIOBUTTON GROUP rad2 MODIF ID sc2,
>             p6 RADIOBUTTON GROUP rad2 MODIF ID sc2.
> 
> SELECTION-SCREEN END OF BLOCK b2.
> 
> AT SELECTION-SCREEN OUTPUT.
> 
>   LOOP AT SCREEN.
>     IF screen-group1 = 'SC1'.
>       IF p1 EQ '123456'.
>         screen-active = 1.
>       ELSE.
>         screen-active = 0.
>       ENDIF.
>       MODIFY SCREEN.
>     ENDIF.
> 
>     IF screen-group1 = 'SC2'.
>       IF p1 EQ '456789'.
>         screen-active = 1.
>       ELSE.
>         screen-active = 0.
>       ENDIF.
>       MODIFY SCREEN.
>     ENDIF.
> 
>   ENDLOOP.
> 
> 
> AT SELECTION-SCREEN ON VALUE-REQUEST FOR p1.
>   SELECT vbeln posnr
>     INTO TABLE t_vbeln
>     UP TO 20 ROWS
>     FROM vbap.
>   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
>     EXPORTING
>       retfield         = 'VBELN'
>       dynpprog         = sy-cprog
>       dynpnr           = sy-dynnr
>       value_org        = 'S'
>       callback_program = sy-cprog
>     TABLES
>       value_tab        = t_vbeln
>       return_tab       = lt_tab
>     EXCEPTIONS
>       parameter_error  = 1
>       no_values_found  = 2.
> 
>   IF sy-subrc EQ 0.
>     LOOP AT lt_tab.
>       CLEAR p1.
>       p1 = lt_tab-fieldval.
>     ENDLOOP.
> 
>     CALL SCREEN 1000.  " Mandatory command for reflecting the changes made on screen attributes
>   ENDIF.

>

> Cheers,

> Murthy.

>

> Edited by: pr murthy on Oct 21, 2008 6:57 AM

Nice Copy-paste answer from Kothand's reply here: .

Reported

pk

PS: I see that you have managed to change the Comment text in red..just in time.

Edited by: prashanth kishan on Oct 21, 2008 10:32 AM