cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP RAP field instance features dump

Kostiantyn_K
Participant
0 Likes
2,766

Hello, experts

I have a problem.

I have a management application with some associations. I tried to add behavior for the field which I want to set read-only if other field in this entity is being set to true/false (simple check box) if check box is true then field unrestricted else read-only such a simple requirement.

Behavior for entity you can find below

Kostiantyn_K_0-1720422530653.png

I implemented corresponding method in behavior pool, every object were activated class and behavior. When I ran application via testing environment, I mean I didn't deploy application just use testing in eclipse I had a short dump that "Handler not implemented; Method: INSTANCE_FEATURE, Involved Entities: ZC_PO_PLANNED_OFFER_PROD_CTP". Short dump is raised once I open entity where I added instance features for the field.

Kostiantyn_K_0-1720422806777.png

System is S4HANA on Premise version of ABAP platform 2022 SP02

Could somebody explain what I have been doing wrong? 

Thank you in advance for the response

Accepted Solutions (0)

Answers (2)

Answers (2)

Oleg_Vokh
Product and Topic Expert
Product and Topic Expert

@Kostiantyn_K  try to add %features- before %field

Oleg_Vokh_0-1720433083292.png

 

 

Kostiantyn_K
Participant
0 Likes

@Oleg_Vokh, thank you for help, but solution didn't work,

Kostiantyn_K_1-1720433733098.png

 

I added %features as you said but short dump is still here. That is odd because in FLIGHT examples everything works in our system/ FLIGHT example I downloaded from GIT.

Kostiantyn_K_0-1720433656995.png

I took my code from this example, and it works my code doesn't work

 

Kostiantyn_K
Participant
0 Likes

@Oleg_Vokh, looks like something went wrong during activation of behavior and behavior pool class. Look like during generation somehow relation between behavior pool class methods and behavior was not correctly registered in the system, I mean was not written to tables and kernel method couldn't found INSTANCE_FEATURE method for that behavior.

Kostiantyn_K
Participant
0 Likes
Also I have to add that features control for field I want to do in child entity not in root.
Oleg_Vokh
Product and Topic Expert
Product and Topic Expert

Hi @Kostiantyn_K !

You need to implement the get_instance_features method in your behavior implementation class. Declare it following the example in the screenshot below.

Oleg_Vokh_0-1720430261956.png

After that, add the implementation for this method.
I hope this helps you.

BR, 
Oleg

Kostiantyn_K
Participant
0 Likes

Hello,

Thank you for your replay, but what I meant in my post, that I've already implemented method get_instance_features in behavior class, and got short dump, method is not empty it reads data and fill structure %field in result table

Oleg_Vokh
Product and Topic Expert
Product and Topic Expert

Could you please paste the code here behavior class so we can check?
If comment out the logic in a method, will the error remain? Will the debugger work?

Kostiantyn_K
Participant
0 Likes

@Oleg_Vokh, sure

Kostiantyn_K_0-1720432055678.png