17 Replies Latest reply: Nov 2, 2011 1:19 PM by Anish Nair RSS

Characteristics and value selection controls

C L
Currently Being Moderated

I'm having difficulty doing the screen selection:

 

1) characteristics A to be made mandatory only when characteristics B is with a certain value.

 

2) characteristics C to have a default value as long as characteristics D is without a value. If D has a certain value, C will be defaulted to another value.

  • Re: Characteristics and value selection controls
    Praveen S
    Currently Being Moderated

    Hi

     

    You can use precondition and procedure for hidding / default the characteritic / characateristic values.

     

    Thanks and Regards

    Praveen S

  • Re: Characteristics and value selection controls
    Praveen S
    Currently Being Moderated

    Hi

     

    you can use precondition/procedure to default /hide the characteristic / characteristicvalues .

     

    Regards

    Praveen S

    • Re: Characteristics and value selection controls
      Praveen S
      Currently Being Moderated

      Hi

       

      for char A and Char B

      create precondition

       

      charB specified char B and assigned to charA or

       

      for Char C and Char D

       

      create a precondition

       

      char c eq 'char D value ' and specified char C --> assign to char C

       

      for different to be set for different value of char D

       

      $self.charC = 'char C value ' if character D = Char D value --> write this procedure for all the value for which you want to interfer across the charc and char d and assigned to configuration profile.

       

      please let em know if you any isssues.

       

      Regards

      Praveen S

      • Re: Characteristics and value selection controls
        C L
        Currently Being Moderated

        Hi, based on what you have written:

         

        1) precondition "specified char B" assigned to char A

         

        This means that char A will be hidden and appear only when char B has a value. I can still not enter anything for char A and have not problem with it.

         

        What I want is when char B has a value, char A must have a value also and cannot be left blank. I do not want to hide char A and char B.

         

        2)

        precondition "char c = 'value1' and specified char C" assigned to char C

        precedure "$self.char C = 'value2' if char D = 'value1'"

         

        This means char C will appear only when it has value1.

        When char D has value1, char C becomes value2.

         

        I do not want to hide char C and char D.

        So what if I now put char D to value1 and later put char D to blank.

        What I would expect is that char C will be value1 instead of value2 or blank.

        • Re: Characteristics and value selection controls
          Praveen S
          Currently Being Moderated

          Hi

           

          what is the data type used for these characters.

           

          For question 1

           

          try with this, write a procedure

           

          $self.charA > 0 if charB NOT SPECIFIED else

          $self.charA eq CharA val 1 if CharB val 1(you can also use variant table to infer the values if you hav so many )

          $self.Char A eq Char Val2 if Char B Val2

           

          Try this hope this will solve your problem.

           

          Regards

          Praveen S

        • Re: Characteristics and value selection controls
          Praveen S
          Currently Being Moderated

          Hi

           

          For Question no 2

           

          Char C and Char D

           

          1.you can make default value for char C in Ct04 or u you can write a procedure for the same (value can be overwritten )

           

          2.for the value to to be populate

           

          you can maintain the variant table for char C and Char D values

           

          and can include the following procedure in configuration profile

           

          Table <name >

           

          (char c= charc,

          charD = char D)

           

          Regards

          Praveen S

  • Re: Characteristics and value selection controls
    Brahmaji Devarapalli
    Currently Being Moderated

    Hi,

    Please do the following changes to rectify the difficulties

     

    1) Create a selection condition with the following coding and assign it to the characteristics A  basic data tab at the class level in CL02

    CHAR_B = u2018Xu2019

     

    When Char B has value X then char A will become Mandatory otherwise Non Mandatory

     

    2) Write a procedure with the following coding and assign it in Configuration  profile with proper sequence number

     

    $SET_DEFAULT ($SELF, CHAR_C, '1') if not CHAR_D  specified,

    $DEL_DEFAULT ($SELF, CHAR_C, '1') if CHAR_D  specified,

     

    $SET_DEFAULT ($SELF, CHAR_C, '2') if CHAR_D = 'E',

    $DEL_DEFAULT ($SELF, CHAR_C, '2') if not CHAR_D = 'E'

     

    Note: The values mentioned in the code to be replaced with actual values

     

    Regards

     

    Brahmaji D

     

    Edited by: Brahmaji Devarapalli on Oct 31, 2011 9:33 AM

    • Re: Characteristics and value selection controls
      C L
      Currently Being Moderated

      1) In characters of A, set CHAR_B = u2018Xu2019 through selection condition.

       

      I'm wondering how X can make char A become mandatory?

      Is X a keyword or something?

       

      2) $SET_DEFAULT

      That could be used in procedure and not actions.

      I saw SAP help has warned the use of actions and procedures together.

      I wonder if that means if they are used in the same class? So if i were to convert all of actions to procedures within that class, will there be problems?

      Is it possible to use them in same class but in different characteristics?

       

      Thanks

      • Re: Characteristics and value selection controls
        Brahmaji Devarapalli
        Currently Being Moderated

        Hi,

         

        1) In the Selection condition code you have to mention the value of the CHAR_B to which the CHAR_A should be mandatory. What i have mentioned X value is an example.

         

        CHAR_B = 'Value'

         

        When user select  a specific value for CHAR_B then CHAR_A will become mandatory.

         

        2) As Suggested by SAP better to convert existing Actions to Procedures and assign them centrally in Config profile. Assignment of procedures in class some times gives problem.

         

        I hope this clarifies your requirements

         

        Regards,

         

        Brahmaji D

         

        Edited by: Brahmaji Devarapalli on Oct 31, 2011 10:40 AM

  • Re: Characteristics and value selection controls
    Anish Nair
    Currently Being Moderated

    Hi There

    1. To make Char A mandatory if Char B has Value X.

    To achieve this create  a selection condition which has the following syntax.

    $SELF.CHAR_B ='X' and specified $SELF.CHAR_B. Attach this to the CharA.

    This will make the Char A entry required only when Char B has the value X.

    But this will not stop the user from entering the value into Char A. To ensure that User does not enter any value in Char A till Char B gets a value X . You can add a Precondition with the same syntax .

    2.For the second part Create a procedure and assign it to the Config profile

    The procedure should have the following syntax .

    $SET_DEFAULT($SELF,CHAR_C,'Y') if not specified $SELF.CHAR_D,

    $DEL_DEFAULT($SELF,CHAR_C,'Y') if specified $SELF.CHAR_D,

    $SET_DEFAULT($SELF,CHAR_C,'Z') if specified $SELF.CHAR_D

     

    Award Points if found Useful

    • Re: Characteristics and value selection controls
      C L
      Currently Being Moderated

      1. To make Char A mandatory if Char B has Value X.

      To achieve this create a selection condition which has the following syntax.

      $SELF.CHAR_B ='X' and specified $SELF.CHAR_B. Attach this to the CharA.

      This will make the Char A entry required only when Char B has the value X.

       

       

      I could select char B to have value X and still go to the costing button in CU50 and proceed without entering anything in char A.

       

      If its mandatory, it should also prevent me from doing costing... right?

  • Re: Characteristics and value selection controls
    C L
    Currently Being Moderated

    Thanks for all the help! Let me try out first...

     

    But I like to confirm... if I were to convert all the actions into procedure...

    I would only have to convert those within the same class.

     

    Within that class, there are over 50 actions and this will take a lot of work and testing.

    So if i were to really do that, I must make sure there is no negative impact.

     

    I would consider that a major change... hahaha...

     

    Edited by: tildveryn on Nov 1, 2011 5:09 PM

  • Re: Characteristics and value selection controls
    C L
    Currently Being Moderated

    Is there anyways to ensure that I have converted all the action to procedure?

    there are too many of them

    • Re: Characteristics and value selection controls
      Brahmaji Devarapalli
      Currently Being Moderated

      Hi,

      As far I know there is no standard way to check the conversion you required. Need to carry manaul methods.

       

      1) Take the list of related Actions used in the models from PMEVC or from Table CUKB and export the list to Excel

      2) Similarly take the list of newly created procedures from CUKB table and export to excel

      3) Need to carry manual comparisions of both dependencies by putting them in side by side columns.

       

      May not be a good way.Just to give a thought.

       

      Regards,

       

      Brahmaji D

       

      Edited by: Brahmaji Devarapalli on Nov 2, 2011 6:33 PM

    • Re: Characteristics and value selection controls
      Anish Nair
      Currently Being Moderated

      If you have the list of names of the dependencies , then you can use the table CUKB in SE16 and enter the DEpendency names . The dependencies should have the relationship type as 7 for procedure . If any of the dependencies has rel type as 3 it means it is an action .

Actions