cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for ABAON

Former Member
0 Kudos

Hi Gurus,

We have a requirement for while run the transaction code ABAON put a validation for

1. Transaction type 206 = If Posting Year(ABAON screen field) Less than or equal to Capitalized Year(ANLA-AKTIV from the Asset entered); transaction will raise error message - "Asset Capitalized Year should be prior to posting year"

2. Transaction type 256 = If Posting Year(ABAON screen field) and Capitalized Year(ANLA-AKTIV from the Asset entered) is not equal to current date year; transaction will raise error message "Capitalized date and Posting date year should be in current year only".

I have added two validations through transaction OAZ1 and these working for one company code and not working for other.

Please help me out,

Thanks in advance...

Tirumula Rao Chinni

Accepted Solutions (1)

Accepted Solutions (1)

ajaycwa1981
Active Contributor
0 Kudos

Hi Tirumala rao gaaru

Did you specify BUKRS (Company code) in your validation rule? See if you have specified only Both the BUKRS in your validation rule using OR i.e. if BUKRS = 'XXXX' OR BUKRS = 'YYYY'

Regards

Ajay M

Former Member
0 Kudos

Hi Ajay,

I have mentioned in validation

Prerequisite

SYST-TCODE = 'ABAON' AND ANEP-BWASL = '206'

Check

U906

Message

Capitalized year should be less than Posting year for TType 206

Message number YA 006

And written in code

FORM U906 USING B_RESULT.

  • Check if capitalization year is prior of Posting year,

  • If not thow error message.

IF ANEK-BUDAT(4) LE ANTS-AKTIV(4).

B_RESULT = B_FALSE.

ELSE.

B_RESULT = B_TRUE.

ENDIF.

ENDFORM.

Please let me know, any solution.... My problem not yet solved

Regards

Tiru

ajaycwa1981
Active Contributor
0 Kudos

Hi Tiru

Your code looks fine to me....

You will debug the issue.. Put a break point in the code and debug it.. May be, take the help of an ABAP consultant, if you cant debug... Only that will help you to understand why the code is not working for One Comp Code..

Regards

Ajay M

Former Member
0 Kudos

I Kept the break point and checked, if the company code is changed it is not reaching code at all...

ajaycwa1981
Active Contributor
0 Kudos

Hi

thats what I am saying.. you will have to find out which condition or line in your ABAP code is not working....

Proper de-bug should tell you where is the problem

Regards

Ajay M

Answers (0)