cancel
Showing results for 
Search instead for 
Did you mean: 

Enjoy transaction (ME21N)

Meinrad
Participant
0 Kudos

Dear experts,

I am evaluating SAP Screen PErsonas in a demo scenario trying to develop a nice flavor for ME21N.

Maybe not the easiest one to start with :-). Requirements are not that dificult: We have fixed buyer and fixed vendor. And something like 10 matrial numbers to order. I was able to create some scripts to enter the data.Hiding some controls - also done.

But I struggle a lot with the layout. For example I do not have full control if the header is expanded or not. Same for the item details. It seems to depend on the selected tab (? really ?) controlled by the transaction itself before Personas kicks in. And this does not only influence layout. Header fields are simply not available anymore as you might know

Searching the archives "just" showed me that I am not the only one with problems like that. Also found some hints regarding "Overwrite Control ID". So maybe I have some rudimentarty information. But nothing like "best practice". And I could not find a flavor in the personas gallery.

My question:

Can anybody point me to information I've overseen? Any best practive? What is a good approach? Does it make sense to re-use controls of ME21N at all or should I create my own controls and script everything?

Kind Regards

Meinrad

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

A lot of transactions employing "Enjoy" controls have some kind of responsive features built in, which will automatically collapse certain screen areas if there is not enough space on the screen to show all areas. As you found (in the KB article), in ME2*N transactions there are function codes to expand or collapse each of these areas. This makes it actually easier to handle these transactions than some others, where there is no function code for explicitly expanding a certain area, regardless of whether it is already expanded or not. Other transactions may only have a toggle button for this.

So essentially, you have to make sure your script expands any of these areas before referring to a control included within. It sounds cumbersome but it is not THAT bad.

Indeed, these PO transactions are not the best to start your Personas journey with, since they are relatively complicated - but if you can handle them, you will be able to tackle most other tasks as well.

Meinrad
Participant
0 Kudos

Challenges are okay for me. At least I have some confirmation that I did not oversee some shortcut or better approach.

Sounds encouraging. Thanks!

Answers (3)

Answers (3)

cris_hansen
Advisor
Advisor
0 Kudos

Hi Meinrad,

I would test the scenario over SAPGUI for Windows (WINGUI) first. I mean, without Personas at all. What happens there?

The behavior should be the same, so I expect that via WINGUI, sections are also collapsed.

If this is true, then your approach is right: a script might be the way to tackle the issue.

Regards,

Cris

Meinrad
Participant
0 Kudos

Hi Cris, too bad that I can only accept one answer. Otherwise I would also accept yours.

Meinrad
Participant
0 Kudos

Let me please add some more to this question. Yes, I can expand all three areas.

I read this blog using Function Codes in OK Field as "shortcuts" (https://wiki.scn.sap.com/wiki/display/Img/Using+Function+Codes+in+OK+Field+as+shortcuts)

With standard screen ME21n it looks like this when all areas are expanded:

And then I can click on "Partners" in the header tab. This will collapse the Item details.:

Or the other way around: Click on Confirmations in item details tab causes the header container to collapse.

Right now I am lucky - both tabs are not required. I can hide them and hope that nobody will enter my flavor when one of them is selected. But... how many surprises like this are in ME21N or other enjoy transactions? Does it mean that I have to expand all three containers and select proper tabs via scripting?

Regards

Meinrad

cris_hansen
Advisor
Advisor
0 Kudos

Dear Meinrad,

I would suggest have a look at our wiki, as it presents more about the Overwrite Control ID - not sure whether you already visited or not.

There is also a video available, showing how to traverse a table in ME21N.

At last, maybe you can watch this other video, so you can render fields across tabs without using tab merging.

Kind regards,
Cris

Meinrad
Participant
0 Kudos

Hi Cris,

wow, that was a quick answer! Thanks!

I saw the video regarding overwrite control ID. My understanding was that it is useful for example when I want to press a button or fill data automatically from my Script. Or to get a control by ID when the Id changes based on the dynpro screen number..

But apart from that I am not sure how it will help me. When the header is collapsed then it's controls (like Purchase Org.) are simply not available anymore. So how to bring them back? My only idea is to expand the header (by some script). But then the item details might get collapsed automatically.

So it seems for me that I have to find a way to force layout logic of ME21N to always expand all three sections (Header, Item List and Item details). And this seems to be really complicated.

But the recommended video also made me think if it is a good idea to store relevant data in session variables and show them in my very own controls which I simply add to the flavor. Ultimately this could elad me to a vary strange approach: I hide all (almost) controls from ME21n and just use my own ones in whatever layout I want.

Regards
Meinrad

cris_hansen
Advisor
Advisor
0 Kudos

Hi Meinrad,

This is the beauty of Screen Personas: you can use the best approach that fits your needs.
Please give it a try on your idea.

You can also read more in archived discussions (how to get ME21N always expanded).
Maybe this one can give you additional ideas. This discussion involves Personas 2.0, but the principle is the same.

Kind regards,
Cris