‎2007 Apr 16 12:13 PM
Hi,
Ther is a field on screen which whenever is lesser than 0 , i need to clear the field on the screen and throw the error message , that the quantity field is lesser than 0.
but it works fine in debugging mode but in real time it throw the message but clearing of field is not happening....
Regards
Gunjan
‎2007 Apr 16 12:30 PM
hi,
u are clearing the screen field in the PAI module of the program, but this cleared field value is passed to the screen only after the PBO. As error message is executed immediately after the CLEAR statement program execution stops there itself without executing the PBO module. So old value is displayed on the screen.
‎2007 Apr 16 12:15 PM
‎2007 Apr 16 12:18 PM
hi
u might have used
if sy-subrc ne 0
error message
before giving error message write <b>clear <field name>.</b>
and to make that field editable incase it gets disabled, in the PAI of that screen
write
<b>field <field name > module <module name > on request</b>
inside this module write ur validation code
regards
ravish
<b>
plz reward points if helpful</b>
‎2007 Apr 16 12:18 PM
Hi,
Before thorowing the error, just clear the field.
before the MESSAGE statement write the CLEAR stament
Regards
Sudheer
‎2007 Apr 16 12:19 PM
Are you moving the 0 value to the screen field before issuing the error message?
‎2007 Apr 16 12:21 PM
You can put the field & the module in which ur checking the field
in chain endchain in PAI module
Sandeep
Reward if helpful
‎2007 Apr 16 12:31 PM
CHAIN.
FIELD v_new_qty.
MODULE f_message.
ENDCHAIN.
CLEAR : v_syucomm.
v_syucomm = sy-ucomm.
v_qty = v_new_qty.
IF v_syucomm EQ 'ENTER'.
IF v_qty < 0.
PERFORM f_clear.
MESSAGE e001(z2c_gdmvt).
ELSEIF v_qty > v_vmng.
PERFORM f_clear.
MESSAGE e002(z2c_gdmvt).
ENDIF.
ENDIF.
pls check the code for ur reference..
Regards
Gunjan
‎2007 Apr 16 12:32 PM
Hi Sankar
I guess u hav got the problem...
what shall i do to overcome this situation?
Regards
Gunjan
‎2007 Apr 16 12:35 PM
or set one global flag
<b>in PAI</b>
If screen-field LT 0.
clear screen-field.
v_flag = 'X'.
message ..............
endif.
<b>in PBO</b>
if v_flag eq 'X'.
clear screen-field.
clear flag.
endif.
Message was edited by:
Chandrasekhar Jagarlamudi
‎2007 Apr 16 12:44 PM
hi chandrasekar,
it works fine in debugging mode but doesn't work in normal transaction ....
Regards
Gunjan
‎2007 Apr 16 12:30 PM
hi,
u are clearing the screen field in the PAI module of the program, but this cleared field value is passed to the screen only after the PBO. As error message is executed immediately after the CLEAR statement program execution stops there itself without executing the PBO module. So old value is displayed on the screen.
‎2007 Apr 16 12:32 PM
try this..
If screen-field LT 0.
clear screen-field.
message ..............
endif.