TRANSACTION Developer Advanced Training I 1 Copyright ADSOTECH Scandinavia Oy 2014
Contents Winshuttle TRANSACTION Developer Basic Training TRANSACTION User Interface Creating the First Script Problem Investigation Recording Modes Reporting a Script Problem to ADSOTECH Winshuttle TRANSACTION Developer Advanced Training I Multi-line Recordings (Loop Functionality) Script Linking Backup SAP Data Data Validation Read From SAP Winshuttle TRANSACTION Developer Cell-Based Mapping Dynamic Recordings (Conditions) Managing Long Texts (Read and Update) Making Scripts Available for RUNNER Users GUI Scripting (Optional) 2
Today s Agenda Multi-line Recordings (Loop Functionality) Script Linking Backup SAP Data Data Validation Read From SAP 3
Multi-line functionality 4
Multi-line functionality Multi-line concept Multi-line example Multi-line tips 5
Multi Line concept Many SAP transactions have multiple line items G/L Entries (FB50), Invoices (FB70), Sales Orders (VA01) Use Loop construct in TRANSACTION 6
Loop definition in the Mapper Select the repeating set of lines in the mapper 7
Loop definition in the Mapper Press Loop button The Start and End rows for the loop is given Indicate which Excel column contains the record type and the values for header/item indicator 8
Multiline Transaction FB50 1. Header Section 2. Line Item Section 9
Inserting New Lines Always try to find an Insert Line button. If not available, look for Find Line, Find Next, or Filter or Add Line New lines generally at first row, but sometimes on second row. It could be on the last row also. 10
Inserting New Lines Steps: 1. Fill header section first Enter 2. Fill at least two items as: a. Fill first line, Enter, Select b. Click insert line or equiv. c. Fill newly inserted line 11
Multi Line - Mapping 12
Multiline Excel File Format 13
Result Logging : Multi-Line transaction One result per transaction. 14
Multi-line demo FB50 transaction G/L postings How to make the recording 15
? 16
Multi-Line Tips (1) Investigate transaction, make process repeatable Always try to find Insert Line, Find Line, Add Line, Find Next, or Filter. Always add new line item on same physical screen line Maybe add on first line Maybe add on second line Maybe add on last line Sometimes need to press eg. Page-down to insure line is free Recommended to record at least two to three line-item entries. Makes it easier to understand repeating pattern. Identify the repeated pattern to put the loop around. 17
Multi-Line Tips (2) Changing existing line items is usually more difficult than adding new Ability to locate correct line item depends on transaction The index based loop feature in GUI scripting mode may in some cases be the best solution when locating existing row In some cases you may know that for example max three rows of data will be added. Maybe easier to define three fields in excel and not use the loop construct Potentially need for Skip field indicator Potentially need for some conditions in recording 18
Sample applications with Multi-Line Enter general ledger items Enter or modify invoices Enter or modify sales orders Enter or modify purchase requests Enter or modify bill of materials Many, many more Examples : FB50 General Ledger documents (demo) MM02 language update using index based loop (GUI scripting) Bill of material CS01, CS02 Scales in transactions ME12, TK11, VK11... 19
Script linking 20
Script linking Implement business processes by linking multiple scripts Script linking alternatives 21
Script Chaining MM01 ME11 ME21N 22
Link Scripts Chaining of Scripts Launch another TxR once first is finished. Can chain many TxR files, one after another Carry-on settings apply to: Excel/Access file name Sheet name, start row and end row 23
Script linking alternatives Each recording uses own Excel input file (this is not possible on Central) Each recording share the same Excel input file Each recording share the same Excel input file but use different worksheets in that file Different combinations if three or more scripts linked The right solution depends on your need 24
Script linking examples HR PA30 Multiple info types Material creation MM01 and MM02 25
DEMO MM02 using script linking First script only reads from SAP Second script updates using first scripts excel as input 26
Backup SAP Data 27
Backup SAP data Automatically backup current data in SAP to separate excel worksheet before performing data upload Works in situations where data can be updated repeatedly. If data create type of transaction -> nothing to backup! Requires non-batch input mode Activate in run menu, Advanced Run Options 28
DEMO MM02 using Backup option 29
Data validation 30
Data validation Helps insure data is valid before actual data upload Result of validation: Success or error message on each row in excel Must be enabled for each script explicitly Define in mapper, Validation On After this, validate button appears in run screen 31
Data validation rules No data update on last screen in recording Press eg. PF3/Back to get prompt for save when ending transaction. Only a single commit (=save) in recording Validate the validation 32
Data validations limitations Not GUI scripting Not linked scripts Not multiple un-nested loops. Nested loops are ok. Transaction with multiple saves (e.g PA40). Posting of multiline data (eg. FB50) validation is not 100%. Heading info and line items are validated separately. For example if balance is not 0, this does not get caught by the validation. 33
DEMO Validation using MM02 34
? 35
Read from SAP 36
Read from SAP Read from SAP functionality Read from SAP usage Example 37
Read from SAP functionality Powerful option to extract data from SAP, no complex queries needed. Can read from read-only fields too. Read-only fields may have to be enabled in expert mode Can use Read from SAP in complex situations to read additional data into excel before actual upload. Execution conditions can depend on downloaded data 38
Read from SAP usage Material master modifications, first read and then modify HR applications, mass changes in payroll records applying formulas to current values. Applying tax rate changes Reading a purchase request, applying conditions, converting it into a purchase order. 39
Use F1 in SAP to identify technical field name Use SAP GUI Place cursor on field, press F1 Press Technical information button 40
Read from SAP, in Mapper SAP to Excel Read from SAP 41
Read from SAP, the results The columns E & F have the values downloaded from SAP during the upload 42
Demo Read From SAP using MM02 example 43
? 44
Where to find more information Product itself Starting tour Online help Product manual www.winshuttle.com Step-by-step guides Case studies Etc. support.winshuttle.com Knowledgebase 45
Adsotech s services Training Tailored on-site training Certification training at Espoo, Finland Web trainings Consultancy Script/Workflow development Best practices Installation services Winshuttle User Group meetings User Groups in Finland, Denmark, Norway & Sweden 46
Further contacts in Nordic Countries ADSOTECH Scandinavia Oy Piispanportti 5 02240 Espoo Finland +358 10 321 6260 Sales: Christer Mäkelä +358 10 321 6262 christer.makela@adsotech.com +358 40 900 9990 Support: support@adsotech.com +358 10 321 6267 47