Skip to Content
avatar image
Former Member

Variant Configuration for BOM

Hi Friends,

Having 3 fields in table Z_NFR_USE_EDI -

REF_SOLD_TO_PARTY REF_SALES_DISTRICT NFR_USE

Need to pick NFR_USE value based on either REF_SOLD_TO_PARTY or REF_SALES_DISTRICT

Getting error while setting OR condition while checking variant condition.

TABLE Z_NFR_USE_EDI ( ( REF_SOLD_TO_PARTY = $SELF.REF_SOLD_TO_PARTY or REF_SALES_DISTRICT = $self.REF_SALES_DISTRICT ), NFR_USE = $SELF.NFR_USE ) if REF_DOC_TYPE = 'GOR'

Error- E28069 Partial key expression <formal_param> = <partial_key> expected E28024 Syntax error in simple action/procedure

Below code is working fine with single condition.

table Z_NFR_USE_EDI( REF_SALES_DISTRICT = $self.REF_SALES_DISTRICT, NFR_USE = $self.NFR_USE ) if REF_DOC_TYPE = 'GOR'

Your help highly appreciated.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jan 31, 2017 at 01:41 PM

    Bhabani Biswal,

    As the table have 3 characteristic neither of the field could be blank then how you are expecting a OR condition between 2 characteristic's?

    What if both have values ? if this possibility doesn't exist try using a procedure with "specified".

    $SELF.NFR_USE = $SELF.REF_SOLD_TO_PARTY, if REF_SOLD_TO_PARTY SPECIFIED,

    $SELF.NFR_USE = $SELF.REF_SALES_DISTRICT, if REF_SALES_DISTRICT SPECIFIED.

    It will copy value from either of the characteristic specified.

    check and reply.

    Thanks

    Ritesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 30, 2017 at 01:24 PM

    Since the expressions "REF_SOLD_TO_PARTY = $SELF.REF_SOLD_TO_PARTY" and also
    "REF_SALES_DISTRICT = $self.REF_SALES_DISTRICT" are value assignments and not boolean checks in an IF statement, it is not possible to separate them with an "OR".

    I assume you can use this expression instead:

    TABLE Z_NFR_USE_EDI (
    REF_SOLD_TO_PARTY = $SELF.REF_SOLD_TO_PARTY,
    REF_SALES_DISTRICT = $SELF.REF_SALES_DISTRICT,
    NFR_USE = $SELF.NFR_USE )
    IF REF_DOC_TYPE = 'GOR'

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 20, 2017 at 11:13 PM

    Hi,

    We cannot use any keywords between the Tables inputs and output as mentioned above.

    Since by default all the characteristics used in a table will follow "AND" logic.

    Hence as stated above by Ritesh Dube try using a procedure.

    Regards,

    Vignesh

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 14, 2017 at 02:58 PM

    It is possible with variant function. Create a procedure and call the variant function in it. Pass REF_SOLD_TO_PARTY and REF_SALES_DISTRICT as inputs and it outputs the value into NFR_USE. All you need to do is create a function module for the variant function and add bit a logic to pull NFR_USE from the table Z_NFR_USE_EDI.

    Let me know if you need any help on this.

    Thanks,

    Shanthi Kumar Juluru

    Add comment
    10|10000 characters needed characters exceeded