08-26-2010 3:01 PM
Hi,
i have created a validation in ob28 for f-47. first i have created a form in zggbr000 and write code in it. after that i create a validation in ob28 and use this exit which i have created in zggbr000 in the check and prerequisite is sy-tcode = f-47.But when i give a break pont on that code and use t-code f-47 the debugger doesn't go to that code. plz any one help.
1. define form
exits-name = 'U403'.
exits-param = c_exit_param_none.
exits-title = 'AMOUNT VALIDATION'. " check order value
APPEND exits
2.FORM U403 USING b_result
end form.
3.use ob28 and create validation
prerequsite = (sy-tcode = f-47)
check = u403
message
08-26-2010 3:53 PM
Check the transaction code value. F-47 is just a variant of FB01. You need to use document level values in your check.
08-27-2010 5:43 AM
Thanks for the reply, but how i use document level value in my check.plz suggest.
08-27-2010 6:08 AM
Hi,
Try to use the condition SY-TCODE = 'FBA6' . or BKPF-TODE = 'FBA6'.
08-27-2010 7:04 AM
- Use sy-tcode = 'FBA6' (as SAP do in [Note 792736 - Extension to Note# 763934 to cater FBA7.|https://service.sap.com/sap/support/notes/792736])
- F-47 is only a variant of FBA6 with BKPF-BLART = ''KA', so you can also check this second condition.
Proposal:
- Prerequisite = (sy-tcode = 'FBA6' AND bkpf-blart = 'KA')
Regards,
Raymond
08-27-2010 2:50 PM
Sorry, Raymond is correct about the FBA6 value; I misread the trans code you specified - just keep in mind that many FI tcodes are variants of other 'base' transactions and that's why your pre-requisite didn't work. However, I don't think you should use ANY checks on SY-TCODE (and certainly not BKPF-TCODE) in your validation, so that the validation is not transaction code dependent (and it fires in a BAPI call as well). A header validation should generally be document specific and not dependent on how/where the document was entered. So, for an FI validation, you would use fields from BKPF for your pre-requisitie logic such as document type (BLART).
08-29-2010 9:46 AM
08-26-2010 4:09 PM
Read OSS [Note 842318 - Frequently asked questions about validations + substitutions|https://service.sap.com/sap/support/notes/842318] look for "debug" to find the actual include to use foir debug.
Regards,
Raymond
08-27-2010 6:46 AM
Hello ,
you need to create these steps in GGB0(tcode) then on u need to do it in tcode OB28.
let me know if you need any more info on it.
regards
Prabhu
08-27-2010 3:24 PM
@prbhat..
Please check if you hav maintained the correct validation against the company code u are checking.
08-27-2010 3:24 PM
@prbhat..
Please check if you hav maintained the correct validation against the company code u are checking in ob28 transaction.
08-27-2010 8:12 PM
Hi Prabhat,
Make sure you have run the regeneration part of code, if not then obviously the control will not go to your part of the code because whenever we add any step through GGB0, We have to run the regeneration program RGUGBR00. As soon as you run this program your changes will take effect.
Caution wile running the program. On Selection screen, you need to check all checkbox except Generate sets, Gen. substn routns in all clnts & Trace Prog. generate calls
I am sure control will go to your part of the code in Debug mode.
Regards
Abhinandan
08-27-2010 9:43 PM
No, I don't think you last two gentlemen understand - his breakpoint is in the validation exit code. It will NEVER hit because the pre-requisite fails for the simple fact that the SY-TCODE value in the check is wrong. Though good suggestions, the issue has nothing to do with assignments in GGB4 or boolean code re-generation. Transaction code checks are not a good idea in validations...