Precisely Software Inc.
Original Message:
Sent: 10-13-2023 06:11
From: Iris Müller
Subject: Skript needed für ME22 or ME22N adding positions
Hi Sigrid,
wow! Thank you very much for this indept analysis. Awesome <3 !!
I did most of what you suggested. The "first transaktion" condition I already had in my scipt but I wasn't sure if WinShuttle needs a "then" order. But it appears to be not the case.
Next I did was more of a "trial and error" thing. E.g. changing some "go to tab" directions. I'll enclose the new script because ..... tadaaa... IT WORKS NOW :) I'm very happy and wanna thank all who helped directly or in case of Jan van Asseldonk indirectly. Thank you so much!
Have a great day, best regards,
Iris
------------------------------
Iris Müller
Specialist Data Management
THOMAS SABO GmbH & Co. KG
Original Message:
Sent: 10-12-2023 13:03
From: Sigrid Kok
Subject: Skript needed für ME22 or ME22N adding positions
Hi Iris
One thing at the start is that you only want to swap to edit mode for the first transaction - after that SAP remembers, so this needs an IF First Transaction

I don't believe you need these in your loop, and in fact in the last section, you have two OK codes
So I would get rid of the first two sections and get rid of METOGGON3 and have the first thing in the loop be the filter.
Also in the detail lines, it will remember the tab you left off on, so I recommend you go back to the first tab in the loop at the bottom
for me that's this

TABIDT3 took me back to the first tab.
You may consider also disabling all cursor rows - they're not needed.
That's all I have time for right now. Hope this gets you started.
HTH
Sigrid
------------------------------
Sigrid Kok
Precisely Software Inc.
Original Message:
Sent: 10-12-2023 12:25
From: Iris Müller
Subject: Skript needed für ME22 or ME22N adding positions
Dear Sigrid,
my script and the template are in German... I hope you'll still be able to read and see things.
As for the "break points": I can't provide anything, because if I go on debug-mode everything works fine.
Thank you so much. Your help is really appreciated!
Its closing time now over here in Germany. Have yourself a great day. Best regards,
Iris
------------------------------
Iris Müller
Specialist Data Management
THOMAS SABO GmbH & Co. KG
Original Message:
Sent: 10-12-2023 12:01
From: Sigrid Kok
Subject: Skript needed für ME22 or ME22N adding positions
Hi Iris
So great you're hanging in there and trying suggestions. :)
Can you please post your script and perhaps template (you can cleanse it of anything confidential)? Also please share where it's breaking, maybe a screen shot?
Thanks,
Sigrid
------------------------------
Sigrid Kok
Precisely Software Inc.
Original Message:
Sent: 10-12-2023 10:38
From: Iris Müller
Subject: Skript needed für ME22 or ME22N adding positions
Hi Rick,
its about time to reply to your helpful hint to use ME22N with the filtering option. That helped a lot. Thank you very much!!
But like I have forseen ... My skript struggels with the section opening or closing issue. I've found another thread, where Jan van Asseldonk gave some great tips. (https://community.precisely.com/communities/community-home/digestviewer/viewthread?GroupId=865&MID=45245&CommunityKey=4418e63a-9f6f-4468-b3f1-0186605ed001) so I think I'm gonna try and play with this. Will see if I'll be able to run more than one transaction succsessfully :D
------------------------------
Iris Müller
Specialist Data Management
THOMAS SABO GmbH & Co. KG
Original Message:
Sent: 09-27-2023 06:47
From: Rick Compen
Subject: Skript needed für ME22 or ME22N adding positions
Unless you have a very long PO you can use the filtering option and go to line 999.
The following document describes how to deal with header details for ME21N but it works the same for ME22N.
https://winshuttle-help.s3.amazonaws.com/step-by-step/en/studio/me21n-step-by-step_11.htm
------------------------------
Rick Compen
Lumileds Netherlands B.V.
Eindhoven
Original Message:
Sent: 09-27-2023 06:02
From: Iris Müller
Subject: Skript needed für ME22 or ME22N adding positions
Hello Community :)
Is there a way to add positions to an existing purchase order? I've tried to record a skript with ME22 but there's no command like "go to last row" or "new position".
Our purchase department often has to edit existing orders and also to add several new lines / positions.
Challenges are:
- I can't use "GUI scripting"
- I never worked with BAPI's
- I don't wanna use ME22N, as it always does what it wants :D but if someone has a good script where it handles the header/position/position detail - section, I'd take it <3
- If a command like "new position" can't be found, I guess, I'd need an additional script that downloads the existing positions, so I know what my new position number wourd be.
Hope I put my words so that you understand what I need :) Thank you all in advance, have a great day!
Best regards
Iris
PS: We're using Studio 20.2.9 :)
------------------------------
Iris Müller
THOMAS SABO GmbH & Co. KG
------------------------------