Skip to Content

Lookup_ext function not working in validation transform

Dear Experts

I have requirement to create multiple rules inside the validation transform. All the rules i need to create is a lookup_ext function with multiple column validation. I create the same logic in query transforms its works fine. But when i use the same logic inside the validation transform with custom function its giving me the error. Kindly help to achieve it correctly.

The automatic code generated for lookup_ext

lookup_ext([SE1EXTR.SE1EXTR.SE_KNVV_TABLE1,'PRE_LOAD_CACHE','MAX'], [KUNNR],[NULL],[KUNNR,'=',Query."Sell-to Customer No_",VKORG,'=',Query.SALES_ORG,VTWEG,'=',Query.DIST_CHAN,SPART,'=',Query.DIVISION],[],[New_Kunnr]) SET ("run_as_separate_process"='no', "output_cols_info"='<?xml version="1.0" encoding="UTF-8"?><output_cols_info><col index="1" expression="no"/>

</output_cols_info>' )

The screen shot gives the correct error message.

Thanks and Regards

Vijay Mukunthan

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Jan 03, 2015 at 04:46 PM

    Hi Vijaya,

    you have not passed any comparison operator after lookup_ext() in validation transform.

    you syntax should be

    lookup_ext([SE1EXTR.SE1EXTR.SE_KNVV_TABLE1,'PRE_LOAD_CACHE','MAX'], [KUNNR],[NULL],[KUNNR,'=',Query."Sell-to Customer No_",VKORG,'=',Query.SALES_ORG,VTWEG,'=',Query.DIST_CHAN,SPART,'=',Query.DIVISION],[],[New_Kunnr]) SET ("run_as_separate_process"='no', "output_cols_info"='<?xml version="1.0" encoding="UTF-8"?><output_cols_info><col index="1" expression="no"/>

    </output_cols_info>' ) = is not null.

    Validation transform is used for validating an imput but you are trying to mapping same as QUERY transform.

    Please let us know if you still has question or my understanding was not correct.

    Regards,

    Shiva Sahu

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      In a validation transform you are validating by the field. So if you are validating that one column against a complex condition criteria involving other columns, it will be better to hold the output in the query transform and then validate it in the validation transform.

      kind regards

      Raghu

  • avatar image
    Former Member
    Jan 30, 2015 at 03:00 PM

    Hi VijayKumar,

    Seems like you are using a variable, 'New_Kunnr' in your custom validation though its not visible in the screenshot that you shared for lookup_ext in the mapping section of the Query transform. Remove this variable from the custom condition and I think, you are good to go.

    Regards,

    Tarun.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 31, 2015 at 07:19 AM

    Dear All

    Thanks for your valuable information. But i found the solution myself. Inside the validation transformation if you use lookup function it cannot return other than success or fail message or Null or NOT Null. In the quary transformation only the required output from the lookup function can be achieved. I resolved the issue by using the below code inside the validation transform.

    ifthenelse(kunnr = qry.kunnr and sales_org = qry.sales_org and division = qry.division and dist_chan = qry.dist_chan,1,0) = 1

    This result will give 2 one for success and another for fail. Based on that i filled by template table. The issue got resolved.

    Thanks and Regards

    Vijay Mukunthan

    Add comment
    10|10000 characters needed characters exceeded