Thanks gents for sending through your insights, unfortunately I still can't get it to work.
The standard behaviour for SAP in ME22N is to open in change mode and then every subsequent transaction also opens in change mode. It's only when you record a batch script that you need to go from display to change as there is no first PO record when recording. So I have tried the following scenarios with varying degrees of success.
1) If I record a ME22N script in batch mode, the switch from display to change mode (METOGG) command needs to be used. If I run that script the first record will update but no subsequent records will as the subsequent record when it activates the METOGG command will switch from change to display mode, correct me if I'm wrong but I believe this is expected behaviour for the transaction.
2) If I add the IF conditions as described in the video and help article
https://www.youtube.com/watch?v=51El0SoEvCshttps://support.winshuttle.com/hc/en-us/articles/360024518952-Using-If-Conditions-and-Examples
Every second record opens in display mode and fails.
3) If I remove the IF conditions and use the Renew Session feature as described in this article
https://support.winshuttle.com/hc/en-us/articles/360023695411-ME22N-failing-when-going-between-Display-mode-and-Change-mode All records fail, which leads me to believe that the METOGG switch between display and change mode is only required during the recording.
4) However If I remove METOGG altogether, every first record fails and the second record is successful, basically every opposite record from scenario 2 is successful.
5) With METOGG removed and using the Renew Session feature every record fails.
It's at this stage I am no longer sure what to test to get this to work.
I am using Winshuttle version 12.1 64 bit with SAP ECC 6, logo pad 760 and recently we deployed enhancement pack 8. It seems as if I can't get the script to understand the behaviour of how the transaction switches between display and change modes.
Any help greatly appreciated.
------------------------------
Ben
Woodside Energy Ltd
ben.crerar@woodside.com.au------------------------------
Original Message:
Sent: 04-15-2020 03:31
From: Nkosinathi Sithole
Subject: ME22N - Update delivery date
Hi Ben.
Please download video from the following link. it gives a great description of how to record ME21N and ME22N.
https://www.youtube.com/watch?v=51El0SoEvCs
Regards,
------------------------------
Nkosinathi Sithole | Master Data Officer
THE ROYAL SWAZILAND SUGAR CORPORATION | +26878253987
Original Message:
Sent: 04-14-2020 03:24
From: Ben Crerar
Subject: ME22N - Update delivery date
Thanks @Jan van Asseldonk and @Nkosinathi Sithole for sharing.
Unfortunately I can't seem to get the script to work properly having tried all the various troubling shooting items that can found in the Winshuttle knowledge base.
https://support.winshuttle.com/hc/en-us/articles/360024518952-Using-If-Conditions-and-Examples
https://support.winshuttle.com/hc/en-us/articles/360023690411-The-First-Record-Is-Uploading-Successfully-All-Other-Records-Are-Failing
https://support.winshuttle.com/hc/en-us/articles/360023695411-ME22N-failing-when-going-between-Display-mode-and-Change-mode
If I add the IF condition to the =METOOG and the IF NOT condition to the =METOGGON2 and METOGGON3 , the script fails on every second record.
If I remove the the conditions and use the Renew Session feature the first transaction will process and the subsequent ones will not.
The standard behaviour for ME22N is to open in change, I've tried removing the =METOOG altogether and then the all the transactions fail.
I am unsure if it's maybe our SAP environment that making it so difficult for this script to work correctly, the only way I can get it to work is using ME23N as you toggle to Change the PO for every transaction.
Any help greatly appreciated.
------------------------------
Ben
Woodside Energy Ltd
ben.crerar@woodside.com.au
Original Message:
Sent: 03-26-2020 06:35
From: Jan van Asseldonk
Subject: ME22N - Update delivery date
Hi,
when you're struggling with collapsing of the header and item overview sections I suggest you to use the keyboard shortcuts when recording the script instead ot the mouse. In the recording you will see the difference.
With command =METOGG you switch to change mode.
At that moment you can't see if subwindow sections is open or closed.
Using the mouse you will see =MEV4001BUTTON in the recording. This code is the same for opening or closing the subwindow.
When you use the keyboard shortcuts you will get the following codes:
Header window:
=METOGGON1 opens the window (Think Material Einkauf TOGGle ON window 1)
=METOGGOFF1 closes the window
Item window:
=METOGGON2 opens the windows
=METOGGOFF2 closes the windows
Itemdetailwindow:
=METOGGON3 opens the window
=METOGGOFF3 closes the window
When you use these commands you are sure the subwindow opens or closes as you want.
(If it is already open and you give the command for open nothing happens, if it is closed it will open.)
Hope this helps.
Kind Regards,
------------------------------
Jan van Asseldonk | Consultant
CTAC | +31629078169
Original Message:
Sent: 03-26-2020 02:36
From: Nkosinathi Sithole
Subject: ME22N - Update delivery date
Hi Ben
I had the same problem with the same script a few weeks ago. you just have to copy the lines within the If first transaction condition paste just after the condition then insert the If not First Transaction condition.
I have attached the final script that worked for me with the excel data file. i hope it works in your environment
------------------------------
Nkosinathi Sithole | Master Data Officer
THE ROYAL SWAZILAND SUGAR CORPORATION | +26878253987
Original Message:
Sent: 03-25-2020 04:18
From: Ben Crerar
Subject: ME22N - Update delivery date
Hi Winshuttle Community,
I've been looking at a few help articles for creating a ME22N script to change delivery dates as I'm suffering with collapsing of the header and item overview sections with subsequent transactions.
This is the specific article I'm referring to.
https://support.winshuttle.com/hc/en-us/articles/360023688671-ME22N-Scripting-Errors
Under the "Additional Information" section it describes using a "IF FIRST" and "IF NOT FIRST" transaction conditions to get around this issue, I've managed to find where to put the "IF FIRST" condition but can't work out where to put the "IF NOT FIRST" condition.
Script attached, any help greatly appreciated!
------------------------------
Ben
Woodside Energy Ltd
ben.crerar@woodside.com.au
------------------------------