Skip to Content
0

Validation rule for transaction code

Apr 20, 2017 at 07:04 AM

145

avatar image

Dear Experts,

I would like to set validation for for transaction code F-21 as like below

Perquisite

Company code - xxxx

T-code - F-21

Posting key = 40 or 50

GL = xxxxxx

Check

Cost center = Mandatory

Message

Cost center is mandatory.

So please tell me how can I set the validation on above case.

Your prompt response will be highly appreciated.

Thanks & REgards,

Varun Kumar

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Ranu Eugene Apr 20, 2017 at 07:36 AM
0

Hi Varun,

You have already answered your question.

Please follow the steps you have mentioned.

For prerquisite:-

Company code, look for BSEG-BUKRS and choose this and then givee your company code.

Transaction code, look for SYST-TCODE and choose this and then give the transaction code.

Please do this for all the prerequisite and choose message as error.

Hope this will solve your issue.

Regards

Eugene

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Eugene,

I followed the exact same steps but nevertheless i could not successfully set up the validation rule. Kindly find below snap for your reference :-

so please suggest what the changes are required in above setup.

Thanks & Regards,

Varun

cap1.png (15.5 kB)
0

By the way, why don't you deal with this issue simply via field status? Why only with F-21 you should have a cost centre?

0
Hemanthkumar Chittibomma Apr 20, 2017 at 08:03 AM
0

Dear Varun,

1. Go to OB28 screen and specify the company code , call point , give desired name,click menubar environment --> validation ,hit yes.Click create step and double click on pre requisite will route you to table fields tab. Click on BKPF -BUKRS field , click = ,click constant , specify company code , click AND, come back, (AND should display on prerequisite screen)now click on structure syst - Abap system fields choose T code ,click = , click constant, specify transaction code, click AND ,come back (AND should display on prerequisite screen), click BSEG search for posting keybseg- bschl, click = , click constant, specify posting key, click AND ,come back (AND should display on prerequisite screen),click BSEG search for g/l account, click = , click constant, specify g/l account.

In the same screen , click check and follow the above procedure but here after searching for cost center, click < >, click constant, leave it blank, Now click message and specify the message save it.

Finally come back to main ob28 screen and activate it by specifying 1 in activation level column.

Hope this will fulfill your requirement.

Best Regards,

Hemanthkumar

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Dear Hemanth Kumar,

Thanks for your prompt response.

I followed the exact same steps but nevertheless i could not successfully set up the validation rule. Kindly find below snap for your reference :-

so please suggest what the changes are required in above setup.

Thanks & Regards,

Varun

0

Dear Varun,

I am not sure but you have specified bracket for posting key bseg - bschl. Remove the bracket and then give an attempt.

Is system throwing any error during saving or set up validation rule is not working? Could you elucidate ?

Best Regards,

Hemanthkumar

0

Enable debugging to find out why it's not working :

https://blogs.sap.com/2016/08/09/fi-validation-trouble-shooting-debug/

0
Eli Klovski
Apr 25, 2017 at 11:57 AM
0

Make sure that you introduce G/L account with leading zeros in your rule. If it still doesn't work, set a trace on the variant and check why the rule is not fulfilled.

Share
10 |10000 characters needed characters left characters exceeded