cancel
Showing results for 
Search instead for 
Did you mean: 

Validation when posting a document using T. Code FB50 or F-02

Former Member
0 Kudos
1,042

Dear Experts

Please let me know on how to validate when posting a Cross Company Transaction using T. Codes FB50 or F-02. The requirement is to restrict Branches (each Branch is a Company Code in SAP) to post any Cross Company documents by selecting HO Company Code in Line Item, system has to stop the User by giving Error Message.

We can't control this using User level Authorizations because, here the Authorization is provided to the Users to post the Transactions using T. Codes FB50 and F-02.

To restrict this, I created a Validation as below:

Prerequisite:

BKPF-TCODE = 'FB50' OR BKPF-TCODE = 'F-02' AND

BKPF-BUKRS = 'Br. Company Code' AND

BSEG-BUKRS = 'HO Company Code'

Check:

FALSE

Message:

You Can't post Cross Company Transactions using T.Code FB50 or F-02

And I activated the above Validation in OB28 for HO and Branch Company Codes. But the Validation is not working properly. Can anybody help me on how to proceed further in this regard please.

Accepted Solutions (0)

Answers (2)

Answers (2)

syedhamed_ahmed
Explorer
0 Kudos

Hi Madhukar,

the validation works if the PREREQUISITE is TRUE and CHECK is FALSE.

Looking at your prerequisite it looks fine but the check part is not clear, try with this paramaters in the check

SYST-UNAME =

This shoud serve your purpose.

cheers,

Ahmed

Former Member
0 Kudos

Hi Ahmed

Thanks for your reply. But, I need to validate between the Company Codes only and at the User level.

Regards

Ranganadh

Former Member
0 Kudos

Hi,

I haven't tried to use a transaction code for Validation purpose. Instead, I have used document type as prerequisite and then check:

BKPF-BUKRS = 'Br. Company Code' AND

BSEG-BUKRS = 'HO Company Code'

If the condition is met, it displays an error (per the message in validation) while completing the line item details on posting a document.

Please let me know if that helps. If not, I can try to replicate your scenario and let you know if there is anything missing.

Thanks,

Ashish

Former Member
0 Kudos

Hi, you can restrict with authorization for Company code.

"BKPF-TCODE = 'FB50' OR BKPF-TCODE = 'F-02'" this wouldn't work,because BKPF-TCODE is for TECHNICAL tcode. and there is no FB50 tech. code. Try to do validation using ABAP code in ob28

Former Member
0 Kudos

Hi

Here in our case, the problem is the Users at Branches are authorized to post Cross Company Transactions for Cash and Bank and this is the Business decision that they have taken. Hence, I am trying to control the above requirement through a Validation. With the given scenario above, please advise.

Thanks

Former Member
0 Kudos

Hi. try to do it via validation using abap code. I'm not sure about if it possible to get 'real' tcode, because I'm not abaper.

If it's not possible,then you can create ZFB50 tcode and check via this tcode