Skip to Content
1

Avoid dump -> Use IsSet() -> method is permitted

Oct 26, 2017 at 12:28 PM

160

avatar image

Dear experts,

I wrote an ABSL where I ran the performance check.

The check tells me to avoid dump for the following code, line 2:

1 var customer = query.Execute(params);

2 var attributesItems = customer.MarketingAttributes.Item;

...

-> Avoid dump: Use IsSet() to check the value returned by association Item

-> Avoid dump: Use IsSet() to check the value returned by association MarketingAttributes

So I tried to fix it with following code but then I get an error message for line 2:

1 var customer = query.Execute(params);

2 if(customer.MarketingAttributes.IsSet()) {

3 var attributesItems = customer.MarketingAttributes.Item;

...

-> Method or action is not permitted.

Am I using method IsSet() the wrong way?

Thank you and best regards

Fabian

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Gaurav Gera
Feb 15 at 08:10 AM
0

You can use the below code:

customer.MarketingAttributes.GetFirst().IsSet();

if (this.Identification.GetFirst().IsSet()) { EmployeeIdent = this.Identification.GetFirst().EmployeeID.content; }

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Gaurav,

thank you for your advise.

I am just wondering when I use customer.MarketingAttributes.GetFirst().IsSet() would that not lead to a dump because I then try to retrieve the first instacne of null?

Also the performance check will still complain that I should avoid dump for association MarketingAttributes by using IsSet().

Thank you and best regards

Fabian

0
Anant Acharya
Oct 27, 2017 at 03:39 AM
0

Dear Fabian,

Can you please refer to this blog :

https://blogs.sap.com/2015/08/27/sap-cloud-application-studio-performance-best-practices/

Thanks and Regards
Anant

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Dear Anant,

thank you for your repsonse.

I know this blog but I still don't understand why I get the error message that IsSet() is not permitted. Would you mind to give me a short description what I am doing wrong?

Thank you and best regards

Fabian

0
avatar image
Former Member Jan 23 at 08:45 AM
0

Hello Anant,

I am currently having the same issue and cannot figure out a solution with mentioned link above.

In order to avoid dump I wrote:

if (that.Identification.IsSet())

{ EmployeeIdent = that.Identification.GetFirst().EmployeeID.content;

}

This leads to the error: Method or action 'IsSet' is not permitted. I would highly appreciate any advise on this topic.

Thank you very much in advance and kind regards

Lars

Share
10 |10000 characters needed characters left characters exceeded