‎2011 Mar 16 10:14 AM
Hi Experts,
i have a stucking problem. Here's the scenario.
I add a validation in OB28 in Doc Header like this.
Prerequisite :
SYST-TCODE = 'FBV0' OR BKPF-TCODE = 'FBV0' OR
SYST-TCODE = 'FB08' OR BKPF-TCODE = 'FB08'
Check :
U944
Then in ZGGBR000, i add this code for checking before delete :
FORM u944 CHANGING b_result.
IF lt_data[] IS NOT INITIAL OR
MESSAGE e000(zz) WITH ld_msg1 ld_msg2.
ENDIF.
ENDFORM.
So when i process t-code FBV0,
input the Comp,code, Doc Num, and Fiscal Year, press Enter.
CASE 1 :
I clicked DOCUMENT > DELETE. and then the ERROR message COME OUT (from U944). (SUCCESS)
but when,
CASE 2 :
I clicked SAVE. then DOCUMENT > DELETE. its successfully DELETED without checking to the U944 first. (FAIL)
i'm wandering where else i should put this validation? because it didnt pass this U944 when i do case number two.
Can anybody help me with this one? plis.
Regards,
Yusyonin
Edited by: ai03yudyon05 on Mar 16, 2011 11:15 AM
‎2011 Mar 16 10:55 AM
TCODE might be different in your second case. To find out, enter OB28 in display mode, select the step and set a breakpoint via "extras - expert trace - set breakpoint", then run your case again.
Thomas
‎2011 Mar 17 2:53 AM
dear Thomas,
thanks for your response. your answer quite a little bit help by adding break points in OB28 in one of the step that i added.
so just when i click menu DOCUMENT > DELETE., it does stop at break point, press F8, and then error message appears.
But when you click SAVE > Document > DELETE. it appears a YES NO message button like this :
Data will be lost.
Delete parked document?
Yes No
if i click yes, then the break point didnt stop, and the document deleted straight away.
I think there must be an exit to add a validation in this fbv0 so i could check before this message appears.