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

test function dumps after succesfully executing an action.

Uli_42
Participant
0 Likes
1,380

Hello together,

due to an SCn error my Question just have been lost 😞 so i try ask again far shorter:

For understanding, i am totally beginning trying to use BOBF and the most valuable information  for me are the blog entries of Oliver Jaegele.

So, the chance is very high that i just cause trouble because of a lack of understanding..

I

I wanted to model some action preconditions and i tried to this not on validation but on base of a transient Determination.

Reason: i wanted to have the check if the action is allowed on load of the node , so i have the action disabled without any call of validation directly in the model (the "model" for me is the bobf  itself).

I did not want to have any persistent change made in the determination, just to set the action inactive or active and thought, that should be allowed, even i will do change data persistent later in the action.

Result was:  a dump with no information after executing the action in the test environment ( BO component local or unknown, Application Information empty). Debugging leads to a point, where a success message is sent but then after raise of event /bobf/if_tui_events~instances_changed , /BOBF/CL_TUI_CTRL_BO_TREE  handels that event and dumpy accessing /BOBF/S_FRW_PROPERTY_K typed data of a node and dumps because a node type 'F'  is found ..

After i changed to have the determination persistent and changed the triggering, the dump is gone and the action is processed as wanted.

Just the function is not what i wanted.

Is the use of the determination completely wrong and a action check validation has to be used?

As described above i intended to have the actions disabled on load, if some fields are not filled sufficiently.

No i need to ract on cahnges, even i do not need to make any change to evaluate, if the action shall be nabled or not

Any better solution, how i can keep the inforamtion, if the action is 'ok' in the model others than also add a validation, that does the "same" as the determination?

Thanks for any advice

Ulrich Becker

1 ACCEPTED SOLUTION
Read only

cyclingfisch_
SAP Mentor
SAP Mentor
0 Likes
1,233

Hi Ulrich,

just to make sure I understood you correctly:

  • you want to load transient data into your BO
  • based on those data you want to check if an action can be executed
  • in case the data are OK, you want to execute the action

For the loading of transient data the determination if your artifact of choice. But as the name says, it only determines the data (i.e. loading them in this case). As the name says a determination only determines data, it never persists them. This is done via an action. Even if it might be the standards action "save". A determination also never validates anything. This is done by a validation. You should be very strict with the separation of concerns. Otherwise you will mess up your model and you will loose some of the flexibility BOPF offers and last but not least the framework might throw errors.

So after you determined the data, you have to options: if you just want to disable the corresponding button, you should implement a property determination in which you disable the button (but the consumer of your model might ignore that). Or you implement a validation (action validation)and configure it that it is called before your action. If you do it that way, you can even issue a message to the consumer and the consumer (meaning e.g. the UI layer) cannot ignore it.

also described that in his blog posts.

4 REPLIES 4
Read only

cyclingfisch_
SAP Mentor
SAP Mentor
0 Likes
1,234

Hi Ulrich,

just to make sure I understood you correctly:

  • you want to load transient data into your BO
  • based on those data you want to check if an action can be executed
  • in case the data are OK, you want to execute the action

For the loading of transient data the determination if your artifact of choice. But as the name says, it only determines the data (i.e. loading them in this case). As the name says a determination only determines data, it never persists them. This is done via an action. Even if it might be the standards action "save". A determination also never validates anything. This is done by a validation. You should be very strict with the separation of concerns. Otherwise you will mess up your model and you will loose some of the flexibility BOPF offers and last but not least the framework might throw errors.

So after you determined the data, you have to options: if you just want to disable the corresponding button, you should implement a property determination in which you disable the button (but the consumer of your model might ignore that). Or you implement a validation (action validation)and configure it that it is called before your action. If you do it that way, you can even issue a message to the consumer and the consumer (meaning e.g. the UI layer) cannot ignore it.

also described that in his blog posts.

Read only

0 Likes
1,233

Hello Martin,

thanks for your answer.

No, i do not want to load transient data into my bo, i just want to set the property of the action to disable.

I got this idea by reading the in fact for me most helpful information at all of Oliver Jägle, where he sets an attribute and disables the enable property of an action. .

So, i did not want to use the determiniation for a validation, but just wanted to try how to disable the action. (Actually the errors are really not very helpful, as if i execute the disabled action, it dumps with not vey helpful information.  I hope, in the message are better information. I started to test only in the test environment before reacting in the code. And of cause i should use a validation for that purpose.

I have to mention, that i am useing the actual case to play around with the posibilities. So i am also trying stuff, that is not really needed or maybe not even useful for now... I hope, i still will learn something on my very simple example.  )

So can you tell me, how to make a property determination?
That is, what i intended to do and i just followed the blog of Oliver Jaegle part5 8.2.6.

I can only choose between Persistent, Transient, admin data and authority check..

My kind of determination, changing the Enable property in a  determination, is described there as a "property determination".

What i do not get clearly know, is how he wants to share the logic for the determination and the validation. (I will try to implement the validation and the determination in the same class, so i can share the ("am i active?" )logic  ).

I just still do not understand, why , if i declare the property determination as transient, it causes a dump , as mentioned after succesfully executing the determination and the action ... (I do not see how the enable -Property of an action can be persistent).

In my intended szenario i tried to do it differently: setting the enable property on load and in the validation just check the propery of the action , instead of using any shared method or repeating the logic. But this seems not to be working , at least in the test environment.

Message was edited by: Ulrich Becker hmmh inserting the link to the blog seems not to be working

Message was edited by: Ulrich Becker I did not read the blog correctly: It's important to have the triggering settings correctly. I'll change the triggering to on retreive of the property node, as it is described, keeping the determination transient and try again. It's clearly described  in  the excelent blog. Sorry for posting unchecked stuff. Maybe someone else will make the same mistakes, then it might be helpuf. Still, analyzing the dumps is not helping fast (without having experience) 

Read only

0 Likes
1,233

Hi Ulrich,

so the issue is solved now? Then please mark the question as answered so others see that there was a solution found.

Cheers Martin

Read only

0 Likes
1,233

Yes, i just got to try the coerected settings first..

Using the right settings for the determination solves the "issue".