Skip to Content
avatar image
Former Member

How to set qty as char value

Hello Experts,

I am relatively new to variant configuration. I am learning by referring LOVC document. Unfortunately I don't have any VC expert in my team. I need a small help in my project. The requirement to set value of char automatically to same as qty,

E.g. if main configurable item LAPTOP is of qty 1. Then char MOUSE should have value as one 1. Can you please guide me on how to do it?

I can create a procedure and use $SET_DEFAULT ($SELF, <characteristic>, <term>). How to set the <term> value equal to main item quantity?

Regards,

Tushar

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 27, 2014 at 09:28 AM

    Hi Tushar,

    Do you have a characteristic for the main configurable item LAPTOP quantity?

    if so, and assuming it is something like LAPTOP_QTY, the dependency should look like this:

    $SET_DEFAULT ($SELF, MOUSE, LAPTOP_QTY)

    Hope this could be of any help.

    Thank you and bye,

    Flavio

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Tushar,

      Try with the following, in the dependency:

      $SET_DEFAULT ($SELF, MOUSE, MDATA $SELF.LAPTOP_QTY)

      According to the LO-VC doc, reference char's shall be used adding MDATA before the characteristic.

      Hopefully it will work.

      Thank you and bye,

      Flavio

  • avatar image
    Former Member
    Dec 27, 2014 at 06:16 PM

    Hi Tushar,

    Well, if you see this requirement is not logical since quantities proportion will be taken care by BOM itself. I mean that if you have created a BOM which would contain Mouse etc (as components), then based on header material quantities (in your case laptop) quantities of BOM will be set automatically (multiply as per header quantities). Considering that this case is for practice purpose, I have following possible solution.

    I'm answering with following assumption:

    The characteristic MOUSE already has values 1,2,3 and so on....

    Solution:

    Create a reference characteristic LAPTOP_QTY with reference to VBAP-KWMENG.

    Now, write a procedure as

    $SET_DEFAULT ($SELF, <CHARCTERISTIC (MOUSE)>, 'TECH NAME OF CHAR VALUE REPRESENTING 1') IF $SELF.LAPTOP_QTY = 1,

    $SET_DEFAULT ($SELF, <CHARCTERISTIC (MOUSE)>, 'TECH NAME OF CHAR VALUE REPRESENTING 2') IF $SELF.LAPTOP_QTY = 2 and so on...


    Characteristic value in dependency must be in single quotes. Note the red quotes in dependency above.

    Assign this procedure at Configuration profile level.

    Please note that this dependency will only work from VA01, not from CU50.


    I would like to inform you that even your characteristic values of mouse gets set based on Laptop quantity, this will not change the BOM component quantity of the component 'mouse' in that BOM.

    Awaiting your feedback in this regard.

    Regards

    SD

    Message was edited by: Samier Danish

    Add comment
    10|10000 characters needed characters exceeded