Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Script: error due to popup

Former Member
0 Likes
1,108

Hi expert,

I am trying to mass generate (or clear) orders using SAP script fonctionality.

I first record one example, then amend the script, and then re run for multiple products in one go.

It works fine most of the time...

Unfortunately due to some master data setup the script sometime needs to be slighly changed from one orders to another (e.g if there is a minimum qty maintained I got a popup "are you sure you want to save", then my script bug...)

Most of the time just pressing enter or yes will help me, but I can't (or I don't want to) find out in advance when it will. So basically I want my script to be flexible enough to handle differents scenario.

I tried to modify the code to include a condition but I am not sure what the condition should look like... (obviously it should not look like anything I tried)

E.g:

If xxxxxxxx Then

session.findById("wnd[0]").sendVKey 0

(or session.findById("wnd[1]/usr/btnBUTTON_1").press)

End if

Can somebody help me to fill the xxxxxxxxxxxxx, or explain to me how I can find out by myself?

I hope it makes some sense for some of you (I am not sure to be very clear...)

If it does and you have a solution for me, please bear in mind that I am not an ABAP consultant and it is more or less my first day with SAP script, so please be gentle

Many thanks in advance

Julien

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
0 Likes
603

Could you explain what is "SAP Script" (this term is very well known by ABAPers but it means something else). Which SAP product do you use, which script language is it, which transaction (if applicable) is it ? Maybe you'll need to post to another forum if it's not related to abap.

Read only

0 Likes
603

Hi Sandra,

I didn't know there were different "SAP script", I don't know were to assign this one...

I use "SAP gui scripting" actually: it is a direct interface with SAP gui which can be used to emulate user interaction.

You can any actions that you do and execute them later on.

It is part of the SAP gui itself and works with any SAP system.

You access it through "customixe local layout (Alt + F12)> script recording and play back.

Well my explanations might not be very clear... you can go to: http://service.sap.com/sapgui and find some documentation there.

I will see if I can reassign it to another forum!

Thanks for your help

Julien

Read only

Former Member
0 Likes
603

Hi Again,

I will close the message and reopen it under the right forum.

(Expert Forums » Scripting Languages » Scripting, General )

Thanks for your help.

Julien