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 change attributes

Former Member
0 Likes
1,299

Hi All

I really need your suggestion, I have got stuck into the following scenario. I want to change the attribute/property of push button at the time of PAI means when user pressed u201CCreate Push Buttonu201D then others push button attributes change from input to display, I write the following code to achieve my goal but itu2019s not working. My screen group name is u2018Cu2019.

when 'CREATE'.

LOOP AT SCREEN.

IF screen-group1 = 'C'.

screen-input = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Thanks

Thanks

Muzokh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,259

Hi,

Try this logic in PBO...

LOOP AT SCREEN.

if ok_code = 'CREATE'.

IF screen-name = 'EDIT' or screen-name = 'DISPLAY' .

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

elseif ok_code = 'EDIT'.

IF screen-name = 'CREATE'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

endif.

ENDLOOP.

Thanks,

Vijay

10 REPLIES 10
Read only

former_member209703
Active Contributor
0 Likes
1,259

Hi

Those changes should be made in the PBO (meaning AT SELECTION-SCREEN OUTPUT event in case you're talking about a report)

So, i recommend you to store the OK-CODE (CREATE) in a global variable and place your code in the AT SELECTION-SCREEN OUTPUT event or in your PBO Module checking its value there.

Regards

Edited by: Jose Maria Otero on Nov 5, 2011 7:24 PM

Read only

0 Likes
1,259

Thanks for the reply, but i want to change my screen elements dynamic at PAI event, for example

if user press "Create" Push Button" then Display and Edit button cannot accept input and if user press Display push button then Edit and Create push button become unavailable for input. Thanks

Read only

0 Likes
1,259

Screen element changes can only be done in PBO, keep in mind that when you press 'Create' button, after the PAI logic is executed it comes back again to PBO and it is rigth there where you have to modify those attributes.

Regards

Read only

Former Member
0 Likes
1,260

Hi,

Try this logic in PBO...

LOOP AT SCREEN.

if ok_code = 'CREATE'.

IF screen-name = 'EDIT' or screen-name = 'DISPLAY' .

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

elseif ok_code = 'EDIT'.

IF screen-name = 'CREATE'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

endif.

ENDLOOP.

Thanks,

Vijay

Read only

0 Likes
1,259

Thanks for the reply, but the mentioned codes are not working, really need some other options to achieve my goal.

Read only

0 Likes
1,259

Hi Muzokh,

Are you sure that you are putting logic at correct place.

Have you see this in debugging mode that how program reacting for above mentioned logic .

Thanks

Read only

0 Likes
1,259

Thanks for the reply, I checked the values through debugger and ok_code unable to get value of Create in PBO module but when I checked the value in PAI then ok_code can get the value of in PAI.

Read only

0 Likes
1,259

Hi Muzokh,

Then definitely from PAI program is passing the value OK_CODE to some other variable which is available in PBO.

Just you need to check in debugging in PAI that is program passing the value of ok_code to some other variable and use that variable in PBO for your purpose.

Thanks,

Read only

0 Likes
1,259

Oooh yes, you are right, I just find that save_ok receive the value of ok_code. Thanks. Will let you the exact situation.

Read only

0 Likes
1,259

Thanks, its working pretty fine, thank you once again