cancel
Showing results for 
Search instead for 
Did you mean: 

DP91 can result in going to 1 of two different t-codes - how do I know where I end up?

Former Member
0 Kudos

In DP91 (Resource Related Billing) when you hit the Billing Request button, if a DMR can be created, it will automatically go to VA02 with a message in ses[0]/wnd[0]/sbar of the VA02 flavour... "DMR 9999 has been created".

If however a billing request cannot, or is not created (in the case where, for instance, you reject everything and just want the RRB tables updated to reflect the fact that the expenses have been reviewed and rejected you go to the initial screen flavour of DP91 with a message in  ses[0]/wnd[0]/sbar of that flavour .... "the document flow has been updated".

How can I tell which t-code/flavour I'm on to be able to test if I've created a DMR or not?

A quick response would be mush appreciated as I've spent ages on this trying to figure out why the normal flavour error logic does not work so I am running behind.

Regards and Thanks.

Patrick.

Accepted Solutions (0)

Answers (1)

Answers (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

I'm not aware of an obvious way to query the transaction code or the current flavor name in the Personas 2.0 scripting engine... but for the described use case, wouldn't it be easier to query the content of the status bar to see what the outcome of the posting was? If you know what message you got, that should help you decide about the next script action, no?

Former Member
0 Kudos

Thank you Tamas - Your comment is helpful but I've come to this point as the status bar proved to be unreliable (sounds unlikely I know) but I felt as if I had to be on the right flavour before I could get a hold of it. Maybe my logic was wrong I could seem to rely on the msg variable being updated from the status bar.

Please see my new post/question Control Not Found Scripting Error for no obvious reason - SP3 and you will see an example of what I mean..

It maybe there is something fundamentally wrong in my understanding of refresh screen or switch flavour or something but I don't always get the result I expect or want.

The script referred to in my new post is a test script specifically designed to try and fully understand why my results with variables, scripts and buttons gives me inconsistent answers and at this stage I have stripped it back to just the copy and paste over a couple of screens (no PUSH at tis stage) and now I'm getting (what to me anyway) is an inexplicable error.

Regards.

Patrick.