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: 

how to use Okcode in subscreens

Former Member
0 Kudos

Hi All,

In a dialog programm, I have one main screen and 2 subscreens.

One of the subscreens has 2 radiobuttons and a inputfield.

My requirement is:

When the user selects the first radio button, the input field must be made inactive. And on clicking the second radio button it must be made active.

This can be done using CASE .... ENDCASE for okcode, and LOOP AT SCREEN within one of the case.

The problem is : we can't create a okcode element within a subscreen.

Please give me a idea , how to go abt this.

Regards,

Vijay

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI

You would have to use the ok code assigned to the main screen. You can code for your requirement using the same. For ex, as per your requirement::

if ok_code = <field name>

<code>

endif.

Hope this helps...

Dinesh

2 REPLIES 2

Former Member
0 Kudos

Hello,

In the screen painter you define a group and assign the two radio buttons to it. path: edit->grouping->radio button group->define. assign a function code to this radio button group.

Now you can check for this sy-ucomm = <function code radio button>

if r1 is triggered you use the" loop at screen" to deactivate the input field.

Rgds,

JP

Former Member
0 Kudos

HI

You would have to use the ok code assigned to the main screen. You can code for your requirement using the same. For ex, as per your requirement::

if ok_code = <field name>

<code>

endif.

Hope this helps...

Dinesh