winshuttle studio 11 transaction developer basic training€¦ ·  · 2017-01-03winshuttle studio...

52
Copyright ADSOTECH Scandinavia Oy 2016 Winshuttle STUDIO 11 TRANSACTION Developer Basic Training 1 Copyright ADSOTECH Scandinavia Oy 2014

Upload: dangquynh

Post on 02-Apr-2018

232 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Copyright ADSOTECH Scandinavia Oy 2016

Winshuttle STUDIO 11TRANSACTION Developer

Basic Training

1

Copyright ADSOTECH Scandinavia Oy 2014

Page 2: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Contents

2

Winshuttle Studio 11

TRANSACTION Developer

Basic Training

Creating the First Script

Problem Investigation

Recording Modes

Winshuttle Studio 11

TRANSACTION Developer

Advanced Training I

Multiline Recordings (Loops)

Script Linking

Backup SAP Data

Data Validation

Read From SAP

Winshuttle Studio 11

TRANSACTION Developer

Advanced Training II

Cell Based Mapping

Dynamic Recordings (Conditions)

Managing Long Texts (Read and Update)

Making Scripts Available for RUNNER Users

GUI Scripting (Optional)

Page 3: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Today’s Agenda

Creating the First Script

Problem Investigation

Recording Modes

3

Page 4: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

4

User Interface Overview

Page 5: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

User interface overview

5

Start creating a new script:

File – New

Open an existing script:

File – Open

-> select Recent Scripts or Computer

Page 6: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

User settings

6

File – Options – Locations

Important to know where all your data and script files are getting

stored by default. Recommended to save everything in one place.

Page 7: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

User settings

7

If you wish to log off from SAP after each script run, untick this option.

Staying logged on means you won’t be asked for credentials or SAP

system again as long as you keep the Winshuttle application open.

Look for these icons

on the bottom of

the screen to know

whether you are

connected to SAP

or not.

Page 8: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

8

Creating the First TRANSACTION Script

Page 9: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Creating the first TRANSACTION script

• Transaction MM02

• Update some basic data fields

• Perform the script creation steps

• Record

• Map

• Run

9

Tips!

• Know your transaction, rehearse the steps in SAP before recording

• Know your data, know what materials to use

• Check for tips and tricks from support.winshuttle.com

Page 10: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

10

STEP 1

Create the recording

• Start new recording

• Update some fields in SAP

• Save the data

Page 11: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Start recording

11

File – New – Transaction – Create from Recording

Page 12: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Start recording

12

If you are not logged on to SAP yet,

give your credentials.

Give Tcode. Use Standard

recording mode and

Excel as data type.

Page 13: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Update fields in SAP

13

Page 14: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Update fields in SAP

14

Give material number and

press Enter.

Main idea is to use SAP as

you are used to using it.

Page 15: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Update fields in SAP

15

Only select “Basic Data 1” on this

View selection screen.

It is always recommended to only

select this first view at this point. Even

if you need to access multiple views

you should select only the first here

and navigate to other views in the

actual data screen that follows.

Page 16: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Update fields in SAP

16

When you use your keyboard in a

field in SAP, the system will later

remember that field and have it

ready for you to map against your

Excel file.

Note that it is not enough to just

place the cursor in a field, you need

to change the actual value or

overwrite one of the characters

with the same character in order

for the action and field to be

registered.

Page 17: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Update fields in SAP

17

If there are less views

and no dropdown list

possibility, you can click

on your required tab

directly.

If the dropdown icon for views appears,

always use it to select the next view.

Page 18: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Update fields in SAP

18

Normally it is okay to

search for a specific value

while recording. However,

the recommendation

remains to know your

transaction and appropriate

values before hand.

Page 19: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Update fields in SAP

19

Page 20: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Recording step is completed

20

SAP window closes and Winshuttle compiles the

script. Be patient and wait for the Map view.

Page 21: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

STEP 2

Map fields

• Map SAP fields with Excel columns

• Mapping by drag-and-drop

• Save script and the newly created Excel template

21

Page 22: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Mapper – recorded fields

22

Field descriptionsTechnical names

Mapping typeField values

Choice of tab determines what fields and actions you see.

Page 23: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Mapper – data template

23

You can create a new Excel file here or use an existing one. In this

example we use the new empty Excel file (Untitled for now).

Page 24: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Mapping

• Connecting SAP fields to Excel columns

• Done in the View and Map menus

• Simple drag-and-drop

• Think about the direction of the drag

• Dragging Excel to SAP = data going from Excel to SAP

• Dragging SAP to Excel = data going from SAP to Excel

• Once dragged

• Mapping type shows data direction

• Value shows Excel column reference

24

Page 25: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Mapping

25

Drag with your mouse from Column A

to SAP field Material Number.

Page 26: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Mapping

26

Once mapped, the mapping type shows the direction of data flow

and value indicates the Excel column connected to this SAP fieId.

In Excel the column gets a headline and shows the original recorded

value on row 2.

Page 27: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Mapping

27

Drag-and-drop the rest of the fields in similar fashion. If there

are fields that should always get the same fixed value, leave

those as they are. Here Checkbox field should be left unmapped,

as fixed value (see the red icon). This field is the selection of

Basic Data 1 in the popup screen for the list of different views.

This selection should never be changed, therefore fixed value.

Page 28: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Save

28

Click the Save button.

In the popup window

give both files an

appropriate name.

It is recommended to

use the same name

for both files and to

save them in the

default folders.

Page 29: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

DEMO

• MM02 recording and mapping

29

Page 30: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

STEP 3

Run the recording

• Prepare Excel data

• Run script in test

• Once tested, run in production

30

Page 31: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Prepare data

31

Go to Run menu and add a few rows of data to your

file. 3 rows should suffice. You can save the data file

by clicking the Save button above the Excel rows.

Page 32: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Execute

32

By default the script is set to run rows from 2 until

there is no more data. These can be changed as needed.

Click Run to execute the script. You will get

the log message in the first available column.

Page 33: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Error message

33

Checking the log messages, you see that most rows were ok.

On row 4 there is an error message pointing to a typo in the

data. This error message was retrieved from SAP.

We attempt to fix it by setting the

correct value for Base Unit of Measure.

Page 34: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Rerun error rows

34

After fixing the

data you should

rerun the script.

This time click on

the down arrow of

the Run button

and select Run

Only Error Rows.

Run Only Error Rows

option will only run the

rows that have the orange

error message on them.

Page 35: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Rerun results

35

After the rerun (Run Only Error Rows) everything

is fine if there are no more error messages in

orange but previously orange rows have switched

to light green background.

Page 36: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

DEMO

36

• MM02 running the script

Page 37: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

37

Problem investigation

Page 38: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Problem investigation

First things to check:

• The Excel log column

• Retrieve all messages from SAP = Extended log

• Run in foreground = Debug

• In some cases Start SAP GUI option helps

First excel row ok, others always fail:

Debug more than one row

38

Page 39: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Extended Log

Capture the warning, information and other messages

that appear during the execution of a transaction

39

In the Map menu, select Expert View and

you should see Extended Log listed as the

second field. Tick on the Enable tick box

and give an available Excel column as Value.

Page 40: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Extended Log

40

After running the script you will see both normal

and Extended logs in corresponding columns.

Normal log always contains just one message and

Extended may list several messages per item.

Page 41: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Error Handling

41

Running a script you will specify the

row range of your desired rows to run.

Within that row range you can decide

to only run the first 5 rows or only the

ones with orange error messages.

If you don’t know what is causing the

error you get or you simply want to

see the SAP actions happening, you

should click on Debug. This option

will open SAP GUI and show you the

actions taken.

Page 42: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Error Handling

42

If you cannot figure out what is causing the error you get or you simply

want to see the SAP actions happening, you should click on Debug.

This option will also run based on the defined row

range at any given time. You have 2 Debug options: to

run only the first row of your range or to run all of

the rows within the range. The range can be defined

as one row (Rows 5 to 5).

Debug will open SAP GUI and

perform the recorded actions

on your computer screen. The

run will pause on each SAP

screen giving you time to view

the screen and fields. Once you

are ready for the next step, you

can click the green tick button

in the popup window that has

appeared.

Page 43: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Debug Run

• Allows us to step through every screen in the script

• Useful in error situations, especially with new scripts

• You drive the execution with the OK code window

• Press Enter in the SAP window only if needed to

accept information and warning messages

• Besides the above, not seeing the OK code popup

means you have probably found the issue

• Carefully compare execution dialog with recorded

dialog in order to identify the difference

43

Page 44: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

When to use Start SAP GUI?

44

The option may be on or off

automatically. No need to touch

it unless you get error messages.

Common cases to consider Start SAP GUI:

• “Park” in Accounting Transactions

• File input/output dialogs or other Windows resources

• Normal run fails but debug is successful all the time

• Whenever you see runtime errors

Page 45: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Problem investigation

45

More help:

• Product online help

• Recreate the script using another recording mode

• Knowledgebase:

support.winshuttle.com

Page 46: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

DEMO

46

• Problem investigation using MM02

Page 47: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

47

Recording modes

Page 48: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Recording Modes

• Standard mode

• Upload, download, dynamic actions & user parameters

involved, Extended Log, Long Texts

• Batch Input mode

• Upload only, most Tcodes for creation of data

• GUI Scripting mode

• Must be enabled in the SAP system, special recording

requirements

48

Tips! Check Winshuttle Support site for recording

mode recommendations before recording your

transactions.

Page 49: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

Why use Batch Input mode ?

• Some of the SAP transactions are optimized to run

in this mode

• Does not remember individual user settings if sharing

the scripts

• SAP screens may look different compared to manual

operation

• Messages may be different in the transaction

• May suppress information or warning popups

49

Page 50: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

GUI Scripting mode

• Use when other modes don’t work

• Need to use dynamic treeview control

• Need to use Index Based looping

• Must be enabled in the SAP system and for user

• Execution slower, always in foreground

• More technical, error prone, low level

• All screens and popups are recorded

• Do as little as possible with GUI Scripting, link to

other scripts to complete the task at hand

50

Page 51: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

DEMO

51

• MM02 using GUI scripting

Page 52: Winshuttle STUDIO 11 TRANSACTION Developer Basic Training€¦ ·  · 2017-01-03Winshuttle Studio 11 TRANSACTION Developer Basic Training ... to SAP field Material Number. ... correct

Basic Training Advanced Training IIAdvanced Training 1

ADSOTECH Scandinavia OyPiispanportti 502240 EspooFinland+358 10 321 6260

Sales:Christer Mäkelä +358 10 321 [email protected] +358 40 900 9990

Support:[email protected] +358 10 321 6267

52

Contacts in the Nordics