‎2011 Nov 05 6:15 PM
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
‎2011 Nov 05 7:10 PM
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
‎2011 Nov 05 6:23 PM
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
‎2011 Nov 05 6:50 PM
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
‎2011 Nov 05 7:10 PM
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
‎2011 Nov 05 7:10 PM
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
‎2011 Nov 05 7:43 PM
Thanks for the reply, but the mentioned codes are not working, really need some other options to achieve my goal.
‎2011 Nov 05 7:56 PM
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
‎2011 Nov 05 8:06 PM
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.
‎2011 Nov 05 8:16 PM
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,
‎2011 Nov 05 8:24 PM
Oooh yes, you are right, I just find that save_ok receive the value of ok_code. Thanks. Will let you the exact situation.
‎2011 Nov 08 9:06 PM