cancel
Showing results for 
Search instead for 
Did you mean: 

Error while executing the APLWRAPPER_APPLY_MODEL

vkris215
Participant
0 Kudos

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-onl...

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.

Accepted Solutions (0)

Answers (5)

Answers (5)

achab
Product and Topic Expert
Product and Topic Expert

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

marc_daniau
Advisor
Advisor
0 Kudos

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.

vkris215
Participant
0 Kudos

Hi Marc,

I see no issue with the input table of the trained model.

Thanks.

Krishna.

marc_daniau
Advisor
Advisor
0 Kudos

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.

vkris215
Participant
0 Kudos

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.

vkris215
Participant
0 Kudos

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.

marc_daniau
Advisor
Advisor
0 Kudos

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