2009 Jan 21 5:36 AM
I cant write the event in PBO .
I have writeen in the PAI but the thing is after modification of the screen in one of my module .
its again get re-intialised to its initail value .
how to solve this problem ?
loop at SCREEN .
if screen-name eq 'CMD_OK' .
screen-invisible = '1' .
modify SCREEN .
endif .
ENDLOOP .
2009 Jan 21 5:43 AM
Hi,
Try like this,
in PAI,
loop at SCREEN .
if screen-name eq 'CMD_OK' .
flag = 'X'.
screen-invisible = '1' .
modify SCREEN .
endif .
ENDLOOP .
In PBO,
check the flag condition where it is again resetting.
Thanks,
Srilakshmi.
2009 Jan 21 5:42 AM
Hi Ankit,
Declare this variable on your top include.
DATA: ok_press TYPE c.
=== in PBO Module ===
IF ok_press EQ 'X'.
LOOP AT screen.
IF screen-name EQ 'CMD_OK'.
screen-invisible = 1.
MODIFY screen.
ENDIF.
ENDLOOP.
CLEAR ok_press.
ENDIF.
=== in PAI Module ===
LOOP AT screen.
MOVE 'X' to ok_press.
ENDLOOP .
regards,
Peter
2009 Jan 21 5:43 AM
Hi,
Try like this,
in PAI,
loop at SCREEN .
if screen-name eq 'CMD_OK' .
flag = 'X'.
screen-invisible = '1' .
modify SCREEN .
endif .
ENDLOOP .
In PBO,
check the flag condition where it is again resetting.
Thanks,
Srilakshmi.
2009 Jan 21 5:48 AM
hi
in PAI
module user_command
case sy- ucomm.
when ' enter ' " field which triggers the action .
f = 1. " declare the flag f as i in prog.
endcase
endmodule
In PBO
in any module for ex : module Initializa.
Module Initialize
If f = 1.
loop at screen
if screen-name eq 'CMD_OK' .
screen-invisible = '1' .
modify screen.
endif
endif
endloop
endmodule
regards
rajye
hope the content is usefull
pls close the thread if its resolved .Thank you .
2009 Jan 21 5:51 AM
Hi,
When u press 'ENTER' or any button , PAI is triggered and PBO after that.
Assign ur button (to be disabled) a group (say G1 to group1) in the screen itself.
Don't write Screen modification code in PAI. Write it in PBO.
Loop at screen.
if screen-group1 = 'G1'.
screen-active = 0.
modify screen.
endif.
Endloop.
Hope this helps.
Regards,
Nibha
2009 Jan 21 6:14 AM
Hi Ankit,
Check the value of sy-ucomm for enter.
I guess its space (' ').
Take the screen-group1 for the button as 'BTN1'.
So use code:-
At screen logic:-
PROCESS AFTER INPUT.
MODULE modify_screen.
In PAI,
MODULE modify_screen.
case sy-ucomm.
when space.
if ( screen-group1 = 'BTN1' ).
loop at screen.
screen-active = 0.
screen-invisible = 1. "to hide button from screen
endloop.
modify screen.
endif.
endcase.
ENDMODULE.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
2009 Jan 21 6:48 AM