Skip to Content
author's profile photo Former Member
Former Member

SAP PS Validation

Hi all,

I have looked at the forum and various others but I cannot seem to find a solution to my problem.

I am building a validation on the WBS element level to ensure that WBS follows the project definition.

I have created Coding Mask as follows C-XXXXX-00.00.00.00.00. Project Definition thus has C-00001 as the number. When I create WBS under the project definition I want to perform check to ensure that is has prefix equal to Project Definition. Thus Level 1 WBS = C-00001, Level 2 WBS = C-00001-01 etc. should be allowed.

I created the following validation PRPS-POSID :1-7: = PROJ - PSPID. This did not work as I got my custom validation error message on all WBS created even if correct as specified above. Subsequently change this to PRPS-POSID :1-7: = PROJ - PSPID :1-7: Did not receive error on Level 1 WBS anymore (C-00001) but still got in on Level 2 WBS C-00001-01.

Also thought the special character "-" might be the reason for the problem so I split the validation and created PRPS-POSID :1-1: = PROJ - PSPID :1-1: AND PRPS-POSID :3-7: = PROJ - PSPID :3-7: Still received the same results.

Thank you;

Werner

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 05, 2012 at 03:11 PM

    Hi,

    I think you were almost there. Just try this logic, it may help.

    Create 2 validation steps 1 for 1st level WBSE and another one for all other levels of WBSE.

    For 1st level WBS

    Prerequisite - PRPS-STUFE = '1'

    Check - PRPS-POSID :1-6: = PROJ-PSPID :1-6:

    For all other level WBS

    Prerequisite - PRPS-STUFE <> '1'

    Check - PRPS-POSID :1-8: = RCJ_PRPSUP-POSID :1-8:

    Try this once , if it works for 2nd level then it will definitely work for all other levels.

    Thanks,

    Soubhagya

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Soubhagya,

      Really helpfull! One minor change required to ensure it works though:

      Change

      Check - PRPS-POSID :1-8: = RCJ_PRPSUP-POSID :1-8:

      To

      Check - PRPS-POSID :1-6: = RCJ_PRPSUP-POSID :1-6:

      With the 1-8 option I still got the error but when I changed it to 6 it worked.

      Kind Regards;

      Werner

  • Posted on Jul 05, 2012 at 03:18 PM

    Write logic in U911 exist.

    Sample code: IF prps-posid+0(3) = 'C-5'

    AND prps-posid+3(5) CO ‘0123456789’.

    ELSE.

    b_result = b_false.

    MESSAGE ##### WITH prps-posid.

    ENDIF.

    ELSE.

    ENDIF.

    ELSEIF prps-stufe EQ '2'.

    DATA: i2 TYPE i.

    i2 = strlen( prps-posid ).

    IF i2 EQ 11.

    IF prps-posid+0(3) = 'C-5'

    AND prps-posid+3(5) CO '0123456789'

    ELSE.

    b_result = b_false.

    MESSAGE #### WITH prps-posid.

    ENDIF

    In validation check the exist u911 and maintain project profiles as prerequisites

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.