Skip to Content
avatar image
Former Member

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

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 22, 2017 at 06:03 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded