on 02-09-2010 6:20 AM
Dear Friends,
Previously, I have written the validation for one company code which has worked fine. Now, I have to write validation for two company codes.
Here the code which is not working.
1000,2000 - Company Code.
ABC,DEF,GHI,JKL,MNO,PQR,STV = Business Area
Prerequisite: BSEG-BUKRS = '1000' AND BSEG-BUKRS = '2000'
Check: BSEG-GSBER = 'ABC' OR
BSEG-GSBER = 'DEF' OR
BSEG-GSBER = 'GHI' OR
BSEG-GSBER = 'JKL' AND
BSEG-GSBER = 'MNO' OR
BSEG-GSBER = 'PQR' OR
BSEG-GSBER = 'STV'
Error Message : Please Check Business Area.
Please advise what is wrong in the code and what should i correct to get the validation working for two company codes?
Thanks
Sridhar
Hi Sridhar,
Your Prerequisiteis : BSEG-BUKRS = '1000' AND BSEG-BUKRS = '2000'.
But I think it should be OR instead of AND because you can give only one company code in a document not both together.
In Check: BSEG-GSBER = 'ABC' OR
BSEG-GSBER = 'DEF' OR
BSEG-GSBER = 'GHI' OR
BSEG-GSBER = 'JKL' AND
BSEG-GSBER = 'MNO' OR
BSEG-GSBER = 'PQR' OR
BSEG-GSBER = 'STV'
It should be OR not AND.
Regards,
Akhila.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Friends,
The Code which is given is not working.
The requirement is that
When user enters Comapny code = 1000, he must be able to select business areas ABC,DEF,GHI,JKL.
When user enters Comapny code = 2000, he must be able to select business area MNO,PQR,STV .
From my side, i have created only one validation ZBREA and only one prequiste,check and message . In only one Validation, I am trying with two company codes validation rule.
Does it work?
Please advise me on these and sample code also.
Thanks
Sridhar
Hi Sridhar,
In that case you can do one thing.
For one validation you can create multiple steps.
In step 1,
Prerequisiteis : BSEG-BUKRS = '1000'
In Check: BSEG-GSBER = 'ABC' OR
BSEG-GSBER = 'DEF' OR
BSEG-GSBER = 'GHI' OR
BSEG-GSBER = 'JKL'
In step 2,
Prerequisiteis :BSEG-BUKRS = '2000'
In Check: BSEG-GSBER = 'MNO' OR
BSEG-GSBER = 'PQR' OR
BSEG-GSBER = 'STV'
I hope it works.
Regards,
Akhila.
Hi Akhila.,
As per your advise, I have created step
Step 002 2000 - Restrictng Business Areas
Prerequisite : BSEG-BUKRS = '2000'
Check : BSEG-GSBER = 'MNO' OR
BSEG-GSBER = 'PQR' OR
BSEG-GSBER = 'STV'
Message:023-Please check business area.
Step 001 is working fine, whereas Step002 is tasking the wrong the business area.
Please advise how to reslove.
Regards
Sridhar
Hi Sridhar,
Have you checked whether all the business areas are created and assigned to company code 2000. Assigning business area to compnay code will be done through plant.
The Businees Area will be assigned to Plant (Tcode OMJ7) and Plant to Company Code(OX18).
Regards,
Akhila.
Edited by: Akhila Doppalapudi on Feb 10, 2010 5:54 PM
Edited by: Akhila Doppalapudi on Feb 10, 2010 6:00 PM
Hi,
In the step 02, I have given the validation rule and in the simulation , I enter the co.code and wrong business area.
The system is showing step 002 - Condition False, but no message as mentioned in the Message.
In the Message i have selected the message 'Mismatch in Section Code and Business Area'
Ths message is not getting displayed after simulation.
AND
I have activated the trace and posted the document. I used the T.code F-02,FB50
yet, I am unable to see the errors in the validation.
Can you explain the process how to see the errors when using the validation.
Thanks and regards
Sridhar
Edited by: Sridhar M on Feb 11, 2010 2:58 PM
Dear,
Check: BSEG-GSBER = 'ABC' OR
BSEG-GSBER = 'DEF' OR
BSEG-GSBER = 'GHI' OR
BSEG-GSBER = 'JKL' AND (AND will mean two business are in the line item)
BSEG-GSBER = 'MNO' OR
BSEG-GSBER = 'PQR' OR
BSEG-GSBER = 'STV'
That should be OR I think....
Please also tell if system issues an error or not and also requirement in words like what validation you want in non-technical language.
Regards,
Chintan Joshi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.