cancel
Showing results for 
Search instead for 
Did you mean: 

Get global variables in Personas Script

ashok_mohan
Participant
0 Kudos

Hi,

For example, when we debug VA01(create sales order), we get the internal table xkomv, vbap etc in the debugger(global variables). Like that, when we create a flavor for VA01 and inside the script, how do we get values from these global variables?

Accepted Solutions (0)

Answers (2)

Answers (2)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert

Those are ABAP global variables in the backend. The Personas JS running in the browser has no visibility of them.
I could only imagine some custom code / hacking in the backend that you'd access via an RFC executing in the same session to read those values.

ashok_mohan
Participant
0 Kudos

Dear Tamas Hoznek,

Is it possible to get the backend internal tables by using an RFC in which we can use field symbols to get the data?

nabheetscn
Active Contributor

Hello Ashok

Using field symbols it will not work as your RFC and frontend screen are in different session. Please understand the basic concept of screen personas JS is primarily to read screen fields and do some logic based processing. What exactly you are trying to achieve? Please provide complete detail, may be you are not doing it the right way.

Nabheet

tamas_hoznek
Product and Topic Expert
Product and Topic Expert

Well, if you'd utilize an enhancement or user exit in VA01, storing the values you need (in a custom table or maybe in table INDX as a data cluster etc.), then you could read that via an RFC and use the values in your flavor... but it's true, there is no direct access to the backend transaction's variables.

ashok_mohan
Participant
0 Kudos

Dear Nabheet/Tamas Hoznek,

I am trying to build flavor for VA01. In that, when the user enters a material and quantity, i need to populate summary details of the header conditions next to the item overview screen. Currently I am achieving by using script, in which I go to the header conditions, extract the table control into JS table click back and populate the data in the summary. But this is taking too much time. If I get the backend variables directly, then it would be good.

Regards

Ashok