cancel
Showing results for 
Search instead for 
Did you mean: 

ps validation

former_member221039
Active Participant

Hi

I have to create validation for Project Definition level, my requirement  if user is creating project definition and if project profile is taken different one, then the validation has to check and throw an error.

enclosing the validation configuration as attachment, kindly note that i am not successful and request your inputs where i am gone wrong.

thanks/srihari

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Srihari,

I think the prerequisite is incorrect. Since you have mentioned alpha numeric values, system may not be able to perform greater than or less than functions. I suggest to either eliminate the prerequisite or it can be

PROJ-PSPID :1-4: 5020

The above check will confirm if first 4 digits are 5020. You can set the check length (:1-4:) by using FldComp button. Also you can change the length and check on this logic as required.

Hope this helps

Regards

Shrikant

former_member221039
Active Participant
0 Kudos

hi

my coding mask is

1. my project profile is

my requirement is

Case 1.user creates project definition 2020/LPGC/100001-PS (CJ01)  then the above project profile is right, if any other project profile is taken then the error message should come while saving

Case2.user creats project definition 2020/LPGS/100001-PS  (CJ01) then the below project is right, if any other project profile is taken then the error message should come while saving

i would like to understand whether validation will work on case sensitive ie.,

LPGC ----> project profile  - customer projects

LPGS ----->project profile  - investment projects

user creating projects and realizing later the project is wrong, hence i want to have validation to control right project profile before saving.  Earlier i have tried but i have given up.

kindly let me know the above requirement is achieved through Validations or not, please suggest.

Thanks/srihari

Former Member
0 Kudos

Hi,

You need to create 2 checks ie steps in validation.

1st Step -

If PROJ-PSPID :6-9: LPGC then check if profile = 0002020

2nd Step -

If PROJ-PSPID :6-9: LPGS then check if profile = 0000041

This should solve your issue.

Regards

Shrikant

former_member221039
Active Participant
0 Kudos

Hi Rakesh,

Thank you so much for quick reply,

please confirm in case of prerequisites, i can have same prerequisite as confirmed

PROJ-PSPID :1-4: 5020

thank you once again

srihari

Former Member
0 Kudos

Hi,

I am Shrikant not Rakesh

You can use the prerequisite that best suites your requirement. I had suggested based on the profiles which you had mentioned earlier. "1-4" means it will check first 4 characters and so on.

Regards

Shrikant

former_member221039
Active Participant
0 Kudos

HI Shrikant,

I am sorry and my apologies.

I will test as suggested

Thanks/srihari

former_member221039
Active Participant
0 Kudos

hi Shrikant,

as suggested i am not able give neither prerequisite nor checks (2), if you provide me with screen shots, as i have been trying since last evening, i am getting syntax error.

thanks/srihari

soubhagya_rout
Participant
0 Kudos

Hi Ediga,

Use steps as mentioned by Shrikant

1) Prerequisite is PROJ-PSPID :6-9: = ( use constant) LPGC and check PROJ-PROFL =(use constant) 0002020.

Similarly use this for the other profile also, only change LPGC to LPGS and change project profile.


former_member221039
Active Participant
0 Kudos

hi shrikant,

I am using sandbox, i am trying to create pre-requisite as

PROJ-PSPID :1-4: 5020

not able to as i am getting

If i put manually, then i am getting syntax error

please help

soubhagya_rout
Participant
0 Kudos

Hi Ediga,

put = before 5020 while you are maintaining prerequisite in expert mode. hope there won't be any syntax error.

former_member221039
Active Participant
0 Kudos

As advised, i have tried but still i am getting syntax error at prerequisites level only.

Kindly give me screen shots display.

Also confirm me whether Sandbox testing of this validation is allowed or not.

Please help

Thanks/srihari

soubhagya_rout
Participant
0 Kudos

Hi Ediga,

Please find the screenshot.

former_member221039
Active Participant
0 Kudos

hi Soubhagya Rout,

As suggested per screen, I have tested after assigning the validation at project profile, but i am not successful

soubhagya_rout
Participant
0 Kudos

Where is the problem? Is there any syntax error or the logic is not working?

former_member221039
Active Participant
0 Kudos

hi Soubhagya

Certainly, there is no syntax error, i doubt logic is not working, because I am able to create & save project (project definition using 2020/LPGC/100001-PS with other project profile), but validation, which is assigned at project profile (00002020), should not be allowed to save if different Profile is taken (0000041). My validation should stop saving if i have different project profile.

Please help in resolving my issue,

thanks / srihari

soubhagya_rout
Participant
0 Kudos

Have you assigned that validation name ZPSPROF in that particular project profile 00002020 in OPSA?

Please check that and revert me back.

Thanks,

Soubhagya

Former Member
0 Kudos

You might have done this, but a quick check .. ensure Autom Validation is checked

former_member221039
Active Participant
0 Kudos

i have ensured assignment of validation at project profile OPSA, and also check ticked automatic validation, still not successful.

former_member221039
Active Participant
0 Kudos

i have ensured assignment of validation at project profile OPSA, and also check ticked automatic validation, still not successful.

former_member221039
Active Participant
0 Kudos

btw I am assigning this validation in OPSA profile "0002020"  and checked box automatic validation. hope I am doing right, please correct me if i am wrong.

soubhagya_rout
Participant
0 Kudos

can you send the screen shot of project profile "0002020" ?

former_member221039
Active Participant
0 Kudos

validation assignment profile, i have only assigned here

soubhagya_rout
Participant
0 Kudos

Assign this validation in other project profile (0000041) also.

Hope this will definitely work.

former_member221039
Active Participant
0 Kudos

as advised, assigned validation to project file (0000041) in opsa, still i am not successful.

i am having abaper with me, he would like to know  how to debug the validation code before the error message.

soubhagya_rout
Participant
0 Kudos

I think system does not consider special characters as character here. So please use this last time----rather than :6-9: use :5-8: in PROJ-PSPID :5-8: = LPGC and assign it in all the relevant project profiles. I've just tested another scenario and it is working.

former_member221039
Active Participant
0 Kudos

hi Soubhagya Rout,

I am successful after modifying the from 6-9 to 5-8 along with to steps created as advised by Shrikanta Rakate,

we are successful for two project profiles by assigning the validation, but whereas we have nearly 40 profiles in total (20 profiles are related LPGC & 20 profiles related LPGS).

please suggest whether we need to create for each profile one Step in validation.

Thanks to you & Shrikant Rakate

soubhagya_rout
Participant
0 Kudos

If I'm right, you have 20 customer project profiles and 20 investment project profiles and you want to use LPGC for 20 customer projects then you can do it by using single validation by just changing the check scenario but you have to assign that validation in all the project profiles.

Thanks,

Soubhagya

former_member221039
Active Participant
0 Kudos

Thanks a lot.

My issue is resolved, I am successful in PS validation for my business requirement.

Answers (2)

Answers (2)

Former Member
0 Kudos

Ediga, Try this method, This will Work

In Prerequiste check project profile

PROJ-PROFL= "0002020"

In Check Use Set values. Create a Set in GS01--> Basic Set---> Table PROJ---> Field "PSPID".

In the value screen , Maintain the values between from and to( Like from  2020/LPGC/100001-PS to 2020/LPGC/109999-PS) & Save. You can change this in GS02-Change Set

PROJ-PSPID  IN  " SETNAME"

In Message- Activate your error message.

N Ranjith

Former Member
0 Kudos

Hi,

I could not find any attachment.

Your Pre requisite should be Project profile = Enter relevant profile.

Check = Project definition should start with (I mean coding mask) ....enter relevant alphabet.

Message = your wish...

Hope this helps you.

Regards,

Murthy.

former_member221039
Active Participant
0 Kudos

hi

i am giving below my configuration screens

i am testing your solution and will back

thanks/srihari

Makal
Active Contributor
former_member221039
Active Participant
0 Kudos

hi Amaresh Makal,

I have searched the forum and i had not got the clue, even i have referred the sap.help document, also i had posted a thread by me on Jan 2, 2008.

I am working on input giving by murthy.

thanks/srihari