cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure Project Definition (PSPID) length in PS Validation

himalya_vashistha
Participant
0 Kudos

Dear Experts,

I got stuck in a different type of validation problem. Here is my problem scenario -

My project Coding mask is A-XXXXXXX-00-00-00-00.

when a user is create a project and He/She enter A-121 project definition created with A-121 and this is not business need.

Project definition should be in this format A-EXAMPLE after A- theres should be 7 character.

Any one can help me through this case so I can prevent the user to not create a project definition which not follow coding mask.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Paulo_Vitoriano
Active Contributor
0 Kudos

Hi Himanshu,

Please try to check that your substring from 2 to 8 belongs to the set defined as a range from "0000000" to "ZZZZZZZ".  I hope that is possible without boolean user exit.

And do not forget to share the code...

Regards,

Paulo

himalya_vashistha
Participant
0 Kudos

Hi Paulo,

Thanks for replying. I don't have idea about how to use range. Could you explain it in detail.

or It can be used like this PROJ-PSPID :2-8: IN (0000000,ZZZZZZZ) plase make me correct.

Thanks

Paulo_Vitoriano
Active Contributor
0 Kudos

Hi Himanshu,

PROJ-PSPID IN ZMYSET

Regards,

Paulo

himalya_vashistha
Participant
0 Kudos

Thanks a lot Paulo.

It works.

himalya_vashistha
Participant
0 Kudos

Hi Paulo,

It works for length A-XXXXXXX perfectly, but now If I enter A-EXAMPLE-01 It takes.

Can we also restrict system to take only A-XXXXXXX only in project definition.

Thanks

Paulo_Vitoriano
Active Contributor
0 Kudos

Hi Himanshu,

You always have an option for ABAP user exit that returns TRUE/FALSE as a boolean function.

Another idea is that you can add following statement AND PROJ-PSPID :9-9: = "".

And it would be better to validate not just from 9 to 9, but from 9 to max length (that depends on your coding mask).

Regards,

Paulo

himalya_vashistha
Participant
0 Kudos

I thing for this condition ABAP user exit is best option. If I am using AND PROJ-PSPID :9-9: =''.

It is like deadlock condition.

Thanks

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Himanshu,

You can restrict user to create any project with the defined project coding mask only.

Go to t code OPSK . There are two check boxes available - SL and Edit.

just tick mark in both boxes, save and test. This will fulfill your requirement completely.

Let me know if any further help requires.

himalya_vashistha
Participant
0 Kudos

Dear Ankit,

Thanks for replying, I already used shared method here mail problem is coding mask.

If you use coding mask Z-0000  and enter z-1 in project definition system will automatically convert into Z-0001 but in case of alphanumeric its different e.g. If you use coding mask Z-XXXX and you enter Z-1 in project definition system will pick Z-1 it is not convert to mask, and in my business case alphanumeric is need.

Thanks

sunil_yadav2
Active Contributor
0 Kudos

Hi Himanshu,

first of all you should check if you activated EDIT in special character in project number (OPSK).

now as per validation you can check for combinations.

thanks

Sunil