Skip to Content

Error while executing the APLWRAPPER_APPLY_MODEL

Hello All,

I'm trying to replicate the below(as per the link) scenario in HANA studio using the APL Procedures.

https://blogs.sap.com/2018/10/31/hands-on-tutorial-sap-smart-predict-customer-churn-analysis-for-online-retail/

I have done the CREATE_MODEL_TRAIN successfully, but, when I'm trying to execute the APPLY_MODEL procedure I'm facing the below error.

Could not execute 'call APLWRAPPER_APPLY_MODEL( FUNC_HEADER, MODEL_TRAIN_BIN, APPLY_CONFIG, -- APL Inputs ...' in 548 ms 173 µs .

SAP DBTech JDBC: [423]: AFL error: search table error: _SYS_AFL.APL_AREA:APPLY_MODEL: [423] (range 3) AFL error exception: [APL error] Automated Analytics error (-2147024809): phase 'KxCPPInterf::IKxenModel::sendMode()' [[APLModel:New store already opened.][:Mapping Failed

Mapping Logical Variables to Physical Fields For data set ApplyOut (APL_ApplyOut)

The layout of an existing space does not match the expected one.

There are 1 unexpected fields that will be cleared.

Some mandatory variables have not been successfully mapped:KxIndex]]

Can anyone please advise?

Thanks,

Krishna.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Mar 05 at 12:53 PM

    It looks like your are using the APL wrapper method. I would suggest the APL procedure method that is simpler and less error prone.

    See the classification sample scripts under: ...\samples\sql\procedure\apl_insurance_fraud

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06 at 10:23 AM

    Hi marc,

    Thanks for your feedback. However, we have almost developed most of the model using the AFL Wrapper functions. Is there any way of calling only the APL function(APPLY_MODEL) using the stored procedures ?

    Thanks.

    Krishna.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 08 at 12:32 PM

    Yes you can build a model with the apl wrapper create_and_train_model, and then apply the trained model with the apply_model procedure.

    Add comment
    10|10000 characters needed characters exceeded

    • HI Marc,

      Thanks for your response.

      I remodeled the whole scenario using the proceduree method and got struck at the APPLY_MODEL step, where I'm facing the below error:

      Could not execute 'call "SAP_PA_APL"."sap.pa.apl.base::APPLY_MODEL_AND_TEST"( FUNC_HEADER, MODEL_IN, CREATE_CONFIG, ...' in 387 ms 396 µs .

      SAP DBTech JDBC: [423]: AFL error: search table error: "SAP_PA_APL"."sap.pa.apl.base::APPLY_MODEL_AND_TEST": line 37 col 4 (at pos 1859): [423] (range 3) AFL error exception: AFL error: search table error: _SYS_AFL.APL_AREA:APPLY_MODEL_AND_TEST: [423] (range 3) AFL error exception: [APL error] invalid/missing model format: empty model

      Thanks,

      Krishna.

  • Mar 08 at 04:32 PM

    I would suggest you double check the input table that provides the trained model. Please contact the technical support if it still doesn't work.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 20 at 09:10 AM

    Hello Khrisna, based on Marc's suggestion, can you please raise a support ticket with SAP support if not yet done?

    Thanks & kind regards,

    Antoine

    Add comment
    10|10000 characters needed characters exceeded