2007 Aug 27 1:44 PM
Hi,
i'm new to exits. i want warning msgs to be popped up for a field- asset value date if it does not satisfy a certain criteria.the field name and data element is BZDAT used in transaction ABAON. how should i proceed?what r the steps?
regards
Juhi Kulshreshtha
2007 Aug 27 2:54 PM
Field exits are obsolete from version 46C - even though they still exist and are used.
For new exits or validations you should look for a Customer Exit or BADI to implement the checks - do not use Field Exits on the domain.
Asset accounting transactions can often have fields validated in FI Validation exits. Talk to your FI consultant to see if the BZDAT field is available for checking in validations. If so, they may be able to set the check up entirely in customising. If they cannot, then you will need to build a validation exit.
Andrew
2007 Aug 31 7:10 AM
Hi Andrew,
I want warning msgs to be popped up for a field- asset value date if it is greater than the current date(SY-DATUM). The field name and data element is BZDAT used in transaction ABAON.
So what I did was
Created an include ZXINTU06 in function group XINT. Entered the code there
that determines the asset value date when a transaction is assigned
to the new rules.
Created a customer enhancement project that is related to the SAP
enhancement AMAV0001, and activated it (transaction CMOD).
Still when I give an asset value date greater than the current date in transaction ABAON and try to save it, nothing happens. Please suggest.
Regards
Juhi Kulshreshtha
2007 Aug 28 11:45 AM
Hello Juhi,
Please try field Exit as solution since you need only a mandatory field check or a fixed quantity based check.....Please keep in mind that field exits have just one export and one parameter and that is the value in the field itself...you cannot do any checks with an external data
To create a field Exit
1)For field exits in R/3 4.6C, execute transaction CMOD. Then type PRFB in the command field.
2)on the top menu...click on Field exit-> create ->enter the name of data element
3)enter the data element required for screen field to be mandatory and Execute
4)another screen comes with a function module name FIELD_EXIT_name of data element
5)Click create and save it to corresponding function group
6)you will get a function module with
import parameter as : INPUT
export parameter as : OUTPUT
7) in the source code write the code :
if input is initial.
message 'SALES FIELD MADATORY' type 'E'.
endif.
or
if input > 10.
message 'Value cannot Exceed 100 units' type 'E'.
endif.
8)again to activate execute transaction CMOD. Then type PRFB in the command field. on the top menu...click on Field exit->Activate
now wherever data element is used the mandatory check will come but you need it only for your program ,so in the same screen click on Assign prog./screen tab and write the name of the program and screen number where you want the particular check
I believe field exit are not possible if structure field is on the screen...please do the above and check..you can also run the report RSMODPRF to create a field exit
Hope the suggestions proved useful.
Reward points if it was of any help
Regards
Byju
2007 Aug 31 7:43 AM
Take a look at transaction code OAZ1. This allows validations to be defined for asset postings.
1. click on "Validation" button to drill down to validation editor. Use Create validation button to create a validation (give it Z.. name) and then Create step button to create step in the validation. Fill in required check in the "Check" part of the step (ANEK-BZDAT >= SYST-DATUM), and error message number / fields in the "Message" part. Can also add pre-requisite checks if needed such as SY-TCODE = 'ABAON" etc. Check and Save validation. To Add validation to tranport request - need to use menu option Validation-->Transport. It is not automatically put in a transport.
2. return to original OAZ1 screen and add new validation (Z.. name) to relevent transaction groups for ABAON, set active flag and save.
No coding needed.
The problem with the user exit is that warning messages cannot be issued in an exit - only errors, and this tends to lock the screen fields leaving user only option being to cancel from transaction.
Andrew
2007 Sep 03 1:54 PM
Hi Andrew,
How can i find the transaction group for ABAON?
Juhi Kulshreshtha
2007 Sep 03 2:26 PM
Hi,
Each asset transaction code like ABAON includes one or more possible 3 character or 3 digit asset transaction identifiers, and one of these is selected and used when it posts documents. These are grouped into transaction groups - eg the 100, 110, etc asset transactions are all to do with acquisition and are in transaction group 10 I think. You need to look in SPRO under Asset Management in Financials - there is a branch or two there dealing with asset postings which have options for setting up and changing the asset transaction identifiers. You need to drill into one of these options for one or more of the codes associated with your TCode - one of the screens there includes the detail of whch group the transaction belongs to.
Sometimes it is easy to guess - the groups like acquisition, disposal, and some others are pretty obvious - others less so.
Sorry I cant give more details - I do not have access to a system at the moment to check the path - suggest you look for it in SPRO or perhaps someone else can post the exact details.
Andrew
2007 Sep 05 10:05 AM
Hi Andrew ,
Your suggestions were very useful...and i was able to successfuly generate warning message as per the requirement. But the input fields were not open for input ....warning message worked just like an error message....
2007 Sep 05 3:59 PM
I was not aware of this behaviour - I have generally used validations to issue error messages - I think pressing enter for the message re-displays the unlocked version of the screen to allow correction of the error.
You could perhaps try issuing message as I or even S type - but I am not sure if this is possible in validation directly, or if it would give the result you desire.
Andrew
2007 Sep 10 11:24 AM
Hi Andrew,
The warning message for asset value date doesn't work for all the trnscns but it does for few trnscns which are as follows-
transactions successful-
These trnsctns create new assets and post asset values.
Trnscn code- Trnsctn type- Trnscn type group
ABZON - 100/110 - 10
ABAON - 210 - 20
ABAVN - 200 - 20
ABUMN - 300 - 30
trnsctns unsuccessful-
These trnsns post values for existing assets ( does not create new asset).
Trnscn code - Trnsctn type- Trnscn type group
ABZE - Z10(Tax only assets)- 10
ABZU - 700-742 - 70-73
ABZP - 153 - 19
I want warning messages for trnscns which are unsuccessful.
Do these validations work for standard as well as custom programs?
regards
Juhi
2007 Sep 10 2:36 PM
The transactions which dont work all appear to be older SAP transactions without the N in the fifth position. Are there equivalent new transactions?
I wonder if SAP has changed how validations work when they introduced the newer transactions to Assets? I think this was with version 4.6? Perhaps there is an OSS note?
Validations should work for SAP supplied transactions - not sure about customer added ones.
You could try posting this question in the FI forum - The setting up of validations is often done by functional consultants and not ABAP programmers. I have done a bit with them, but dont consider myself an expert.
Andrew