Hi community,
I try to create a script for creating central contracts (ME31K), i. e. a contract for an entire company code instead of just for a single plant. For organisational reasons we do not assign purchasing organisations to company codes. That is, when I leave out the plant number in the initial screen of ME31K the systems asks in a popup to state a company code instead.

Now the problem is, when I confirm/enter that popup the following header dynpro already processes any checks. That is, the error message Fill out all required entry fields is processed, although all required field values have been supplied. This leads to an error in the Winshuttle validation run.

In the debug mode, if I simply process the OK-Code, the transaction proceeds to the next step since all required fields are already supplied correctly, and I can move on with the debug session.

However, the validation run brings subsequent errors that are caused by the main problem. The contract is not created at all. (Field EKKO-KDATE is formatted correctly. This is not the cause.)

OSS Note 301968 addresses this issue stating that the OK-Code for the initial dynpro should be =KOPF instead of /00. However, that solution does not help because the popup's OK-Code =ENTER always processed that (unwanted) first check for obligatory fields.
How can I overcome this deadlock?
------------------------------
José Andujar Garcia | IT Consultant Source-to-Pay
K+S Aktiengesellschaft | [City] | +4956193011770
------------------------------