cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Personas Course - PO Lookup limitation - PO different Order Units

Former Member
0 Kudos

Hi All,

I took the Screen Personas for Advanced Scenarios course a while back (great work by the way!). I noticed a limitation for the scripting example for a PO (ME23N) lookup on the dashboard. When a Purchase Order has multiple items, and not all items have the same Order Unit, the script does not return values to the dashboard (SMEN flavor) and stays in ME23N. Does anyone have a solution for this? I have some scripting knowledge, but need some guidance for this scenario. Thanks much!

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert

The problem in this case is that the area where the example is taking the values from is dynamically built and if the ordering units are different, then the values we care about are not in the same fields. One example is document 4500000015 where the ordering units are PC and CAR, respectively - so in the header status tab, the column for unit of measure is missing and only the value is present.

We noticed this when building the examples, but decided to ignore this case because most documents in the training system don't have such a scenario and it would have made the script more complicated to handle these documents. However, if you want to do this properly, then the solution is first checking whether the "delivered" and "invoiced" values are on the screen in the usual fields, i.e. do those fields exist on the screen?

Usually, the values would be in fields with ID ending with ...VALUE02 and ...VALUE04. In the other, rarer cases, they are in ...VALUE01 and ...VALUE03. So, you'd check with session.idExists and if ...VALUE02 is not there then take ...VALUE01 and so on.

Former Member
0 Kudos

Thanks Tamas! Forgot about the SAP Screen Personas 3.0 Utility Methods.

https://wiki.scn.sap.com/wiki/display/Img/Scripting+Utility+Methods

Answers (0)