cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for Baseline Date

Former Member
0 Kudos

Hi Experts,

I want to create a validation in FI for baseline date. The validation is something like this,

During Invoice posting through MIRO and FB60 and also during invoice parking through MIR7 and FV60, the baseline date entered should not be smaller than the posting date. It should be either same as the posting date or should be greater than the posting date. For e.g. if posting date in the invoice is 02.01.2016, then the baseline date should be either 02.01.2016 or anything greater than 02.01.2016 like 03.01.2016 but it should not be 01.01.2016.

I have already written a validation for the above, but it is not working properly. It is throwing a error message even if the above check is met i.e. if baseline date is same or greater than the posting date it should not throw error, but it is giving the error.

PFA screenshot of my validation for reference. So, I would like to know whether if, I am going wrong somewhere?

Regards,

Akshay Zirmirkar

Accepted Solutions (1)

Accepted Solutions (1)

former_member198650
Active Contributor
0 Kudos

Hi Akshay,

Change the message as error in OBA5 for the message F5-149.

Regards,

Mukthar

Former Member
0 Kudos

Hi Mukhtar,

The message F5-149 is related to Net due date. I want a solution for validating baseline date.

Regards,

Akshay Zirmirkar

former_member198650
Active Contributor
0 Kudos

Hi Akshay,

Remove co.code from prerequisite and define check as  BSEG-ZFBDT >= BKPF-BUDAT. Then definitely it will work. I have tested just now. After create the validation, assign it to the co.code OB28.

Regards,

Mukthar 

Former Member
0 Kudos

Hi Mukhtar,

I tried removing company code and defining the validation as you said, but still, it is not working properly.

Please find below image for your reference,

Regards,

Akshay Zirmirkar

former_member198650
Active Contributor
0 Kudos

Hi Akshay,

Have you assigned validation to co.code in OB28?

Regards,

Mukthar

Former Member
0 Kudos

Hi Mukhtar,

Yes, I have assigned the validation to co.code in OB28.

Regards,

Akshay Zirmirkar

ajaycwa1981
Active Contributor
0 Kudos

Hi Akshay Bhau

I wrote this Validation in my system and its a success

May be you should regenerate using Program RGUGBR00

Ajay M

former_member198650
Active Contributor
0 Kudos

Hi,

I have defined the same in my system, but it is working.

Regards,

Mukthar

Former Member
0 Kudos

Hi Ajay,

Done!..but partly. If, I put the prerequisites as you said above, it is working properly. But if, I am entering more than one transaction code in the prerequisite then it is not working. It is working fine only if there is one tcode in the prerequisite. So, I guess there is a bit issue in arranging the data in prerequisite.

So, can you suggest how should be the prerequisite for multiple tcodes?

Regards,

Akshay Zirmirkar

sanilbhandari
Product and Topic Expert
Product and Topic Expert
0 Kudos

Inclue multiple tcodes in a set through T code GS01 and add that set in your prerequisite

Regards

Sanil Bhandari

ajaycwa1981
Active Contributor
0 Kudos

Hi Akshay

Create a SET from GS01 - ZFITCODE

     Table BKPF - Field TCODE

     Enter T Codes in it

Now write your validation like this

     BKPF-TCODE IN ZFITCODE AND BKPF-BUKRS=XXXX AND BSEG-KOART=K

Br,

Ajay  M

Former Member
0 Kudos

Hi Ajay,

Finally, the thread has been resolved with your above solution!!

Thank you very much for your assistance.

Regards,

Akshay Zirmirkar

Answers (5)

Answers (5)

Former Member
0 Kudos

I would like to thank everyone for there quick responses!!

Thread closed.

Regards,

Akshay Zirmirkar

anss_shahid
Participant
0 Kudos

Hi Akshay,

First create a set in GS01 for e.g. ZPC_IO_VAL_TCODES_1 (You can have your own name).

In GS01 use table: SYST and Field Name: TCODE and add the list of T-Codes on which the validation should be executed.

Once the set is made, create a validation step in Financial Accounting - Line Item as per the screen shot below.

In the message part, you can have your own error message.

Then go to OB28, add your company code, call point as "2", the validation name and the activation status as "1".

Hopefully the validation will 100% work.

Thanks,

Anss

Former Member
0 Kudos

Hi

Wont it be easier to handle this via configuration of the payment terms ?

By defaulting the baseline date from the payment term, e.g default posting date or entry date.

Former Member
0 Kudos

Hi Zamuxolo,

The client wants to enter the baseline date manually, so it should not be defaulted from posting date or entry date. I just need to put a check that whenever the user enters the baseline date, it should not smaller that the posting date. The system should throw a error if its smaller than the posting date.

Regards,

Akshay Zirmirkar

former_member183294
Active Participant
0 Kudos

Hi,

In check - (BSEG-ZFBDT<>BKPF-BUDAT) OR (BSEG-ZFBDT< BKPF-BUDAT)

Activate trace , test validation , it will show validation status

With Regards,

Ganesh

Former Member
0 Kudos

Hi Ganesh.

I tried your above solution. But, it is working exact opposite i.e. if my baseline date and posting date is same then it is throwing an error and if my baseline date is smaller or greater than posting date it is not giving an error.

Regards,

Akshay Zirmirkar

ajaycwa1981
Active Contributor
0 Kudos

Hi Akshay

Try Check as Zfbdt >= Budat

Ajay M

Former Member
0 Kudos

Hi Ajay,

I also tried that one. But, still it is not working.

Regards,

Akshay Zirmirkar

ajaycwa1981
Active Contributor
0 Kudos

Can you try with < symbol please

Ajay M

sanilbhandari
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Akshay

Please write the validation as below:

Prerquisite

BKPF-BUKRS=XXXX AND SYST_TCODE IN ZFI_TCODE AND BSEG-KOART=K

Check

(BSEG-ZFBT=BSEG-H_BUDAT) OR (BSEG-ZFBT>BSEG-H_BUDAT)

Put all the T Codes in the set ZFI_TCODE, which you can create in GS01. The t codes to be used should be:

FB60

FBVB

MIR7

MIRO

Regards

Sanil Bhandari

Former Member
0 Kudos

Hi Sanil Sir,

Can you help me with the sets. I am not able to prepare a set using the tcodes. Also, I am not able to find posting date field in table BSEG i.e. BSEG-H_BUDAT. It is in BKPF.

Regards,

Akshay Zirmirkar

former_member198650
Active Contributor
0 Kudos

Hi Akshay,

Remove co.code from prerequisite and define check as  BSEG-ZFBDT >= BKPF-BUDAT. Then definitely it will work. I have tested just now. After create the validation, assign it to the co.code OB28.

Regards,

Mukthar 

sanilbhandari
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi

You can use T Code GS01 to create a set. Specify the base table as SYST and than it will ask you for the field. There specify TCODE and once you press enter you should be able to specify the values as well

regards


Sanil