cancel
Showing results for 
Search instead for 
Did you mean: 

Personas: Getting values from another transaction

Former Member
0 Kudos

Hi,

Another basic personas question. I'm trying to see if there is a way to get values from another transaction when you are already inside a transaction. For example, I'm inside transaction VD51 customer material info record. I have entered the customer number, sales org and dist channel on the first screen and hit enter. On the second screen, when I type in the material number, I want the system to lookup some values from the material master MM03 and populate the values back in VD51. In this example, I want the material description from MM03 to be pasted in the cust. material field of VD51.

So far I have looked at these helpful links:

When I type in the material number and hit enter, I have a script that opens up a new session with MM03 and pastes the material number and hits enter. That's where I have got to so far using the links above.

But even before I continue further, I'm wondering if this is a good design. Now I have another session with MM03 open and need to figure out a way to close it. Probably not a good solution.

Is there an easier/better way to accomplish what I'm after? Basically, when inside VD51 and I type in the material number, I need personas to be able to lookup this material number and grab the description (or any other info found in the material master) and paste it in a field inside VD51.

Any guidance would be helpful.

Accepted Solutions (1)

Accepted Solutions (1)

PeterSpielvogel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Srinivas,

Thanks for your question.

This blog explains the process with a very simple example.

http://scn.sap.com/community/gui/blog/2014/10/14/my-first-script-in-sap-screen-personas-30--a-javasc...

Regards,

Peter

Former Member
0 Kudos

Thanks Peter! This is helpful.

Your link explains getting to other transaction from SMEN and copying the info back in the SMEN screen.

But what about when you are already inside a transaction like VD51 and you want to grab information from say MM03 and paste the data back into VD51.

On the script, you can't simply say click on the transaction box and type MM03. It will not work when you are already inside VD51.

We also can't say /nMM03, since that will kill the current VD51 and go to MM03 (all info in VD51 will be lost).

The only other option is /oMM03, but that will open another session which is probably not a good idea.

Is this scenario even possible with personas?

PeterSpielvogel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Srinivas,

This is easy to do in SAP Screen Personas 3.0 using the CallTransaction method in a script.

In SAP Screen Personas 2.0, this capability does not exist. It is possible to do this in some cases by creating a (fairly complex) script that captures the desired information from the transaction 1 screen before you go to the transaction 2 screen. Then you visit transaction 2, and then paste it back onto transaction 1 screen which you access through a fake back button that is really executing the script.

Otherwise, there is always the ability to use a RFC.

Regards,

Peter

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the info Peter and Dong!

We were able to do the RFC deal and it works great. Will also try your other suggestions just to see how much Personas 2.0 can do.

Srinivas

Former Member
0 Kudos

Hi,

I have been facing such issure many times. For fetching simple info (say one value), I normally do fetch in SMEN first, then save the value in args.myvalue, then run the tcode where it can process the value. The other method is to use window.myValue, this is doen globally, menaing that you can in one tcode to save the value in window.myval, and come back. Kind of "Hack" but it worked in Personas 2.0.

Does this helps?

Dong Zhu