on 11-23-2017 1:35 PM
Hello experts,
I'm looking for a way to use a custom field defined via KUT in an ABSL query in the Cloud Application Studio.
I've read the following posts, but they don't give a definitive answer:
https://archive.sap.com/discussions/thread/3871694 https://answers.sap.com/questions/215431/sap-c4c-extend-kut-field-to-query-and-using-on-sdk.html
The field is an extension field on the Customer Business Object and is already made available via a .ref file in the Cloud Application Studio.
query2 = Customer.QueryByIdentification;
param2 = query2.CreateSelectionParams();
param2.Add(query2.HeaderExtSubChannel.content, "I", "EQ", this.AccountType.content);
result2 = query2.Execute(param2);
Above code is what I'm trying.
Where "HeaderExtSubChannel" is the extension field defined via KUT.
But... It's not working.
Any suggestions are more than welcome!
Thanks in advance.
Hi Glenn,
Add the KUT field to the QueryCustomerIn Service by going into KUT field definition -> Services tab. Once field is added to the query, you can check the same in Code completion in SDK as well
Regards,
AbdulRasheed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I am using also KUT fields in my QuerybyElements.
My impression is, that KUT fields are not indexed, so full table scan happens, If I rund a query on such field.
How can I add the KUT to be indexed by the HANA DB?
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Glenn,
You have to implement a reference to Customer-Specific Fields. This is an object addable in the add new item Pop-Up.
There you have to select the Key User Tool created fields.
Now you should be able to select them.
Kind Regards,
Johannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Johannes,
First of all, thank you very much for the reply.
However, like I said I already made a reference to Customer-Specific Field. And I've checked the "HeaderExtSubChannel" field there.
"The field is an extension field on the Customer Business Object and is already made available via a .ref file in the Cloud Application Studio."
And I can access the field in ABSL code in general.
E.g. works:
var subChannel = Customer.HeaderExtSubChannel
But I can't use it in a query!
When you define an extension field via the Cloud Application Studio (instead of via KUT), you can annotate the field with an extension scenario. In that extension scenario you can check the options to enable the extension field for query.
So I need some way to achieve the same for the KUT field.
Johannes,
No that's not the problem...
In code below when I type "query2." and use code completion, the field isn't even showing up.
While all other extension fields are showing up. That's because they are made with the Studio and are included in the Extension Scenairo.
param2.Add(query2.HeaderExtSubChannel.content, "I", "EQ", this.AccountType.content);
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.