Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BOPF Determination based on requested fields

florian_fuchs7
Advisor
Advisor
0 Likes
1,611

I've a performance intensive calculation implemented in a BOPF Determination. This determination calculates a transient field value.

In my OData DPC_EXT class I'm doing the retrieve_by_association. And passing the $select parameters to the it_requested_attributes. But BOPF is still selecting all fields irrespectively to the requested fields. And especially it's still calculating the transient field even if it's not requested.

I've redefined the /BOBF/IF_FRW_DETERMINATION~check but the requested fields are not available there,

Does anyone have any idea?

1 ACCEPTED SOLUTION
Read only

former_member190794
Active Participant
0 Likes
982

Hello Florian,

BOPF always loads the whole instance indepedent of the IT_REQUESTED_ATTRIBUTES to perform in case of a second request without checking the database again (as Martin described).

Regarding the calculation of the transient field:
In order to ensure, that after loading determinations are suppressed if IT_REQUESTED_ATTRIBUTES are provided, you have to maintain the write node attributes on the after loading determination configuration screen (not available in transaction BOB or Eclipse yet).

Best regards

Tilmann


3 REPLIES 3
Read only

cyclingfisch_
SAP Mentor
SAP Mentor
0 Likes
982

Hi Florian,

as far as I understand the framework behaviour, it will provide you the data even if you not requested them if they are already in the buffer. Because in this case it's not necessary to determine them again. If the data are already in the buffer depends on, if the were already determined and your transaction pattern.

In order to test if it is like this, you can set a break-point in your determination implementation of the transient data. I assume, the framework will not execute the determination if the data are already in the buffer.

Cheers,

Martin

Read only

former_member190794
Active Participant
0 Likes
983

Hello Florian,

BOPF always loads the whole instance indepedent of the IT_REQUESTED_ATTRIBUTES to perform in case of a second request without checking the database again (as Martin described).

Regarding the calculation of the transient field:
In order to ensure, that after loading determinations are suppressed if IT_REQUESTED_ATTRIBUTES are provided, you have to maintain the write node attributes on the after loading determination configuration screen (not available in transaction BOB or Eclipse yet).

Best regards

Tilmann


Read only

florian_fuchs7
Advisor
Advisor
0 Likes
982

Thanks guys for your answers.

@Martin: I've seen that behaviour in the debugger and it makes sense in a statefull scenario. I'm in a stateless scenario in my case but this is another topic.

@Tillmann: I've done the changes as you suggested and it works perfectly.

Thanks and best regards

Florian