TRANSACTION Advanced Guide


Add to my manuals
122 Pages

advertisement

TRANSACTION Advanced Guide | Manualzz

TRANSACTION Script Command Reference

+BI0

Runs the transaction in Non-Batch Input mode. This is similar to running the transaction in GUI.

See Recording Modes for more information.

+DBnnnnnn (Delay before SAP log on)

Optional command.

This command delays the log on to SAP by nnnnnn milliseconds. Use this command to maintain the delay between various TRANSACTION sessions such as when the Scheduler cannot schedule sessions less than one minute apart, and sessions must be launched within that time frame. See

Scheduling runs for more information.

This TRANSACTION script command can be passed from the command line as a parameter. If this is done, the command line parameters take precedence over the values specified in the

TRANSACTION Scripts.

+DLnnnnnn (Delay between transaction run)

Optional command.

This command delays the calls to SAP between transactions by nnnnnn milliseconds. This command can be used to slow down the processing of the TRANSACTION scripts.

+Do-While Loop

Optional command.

This command provides a Do...While Loop mechanism for processing multiline transactions.

TRANSACTION enters the Do...While Loop when the specified condition is met. Normally, this condition is determined dynamically. Fixed value <Check value> is compared against the value in the Excel column as indicated by <Excel identifier column id>.

Recommendation: Use the Mapper to manage your Do-While Loop and avoid manual changes.

Example 1:

97

Winshuttle TRANSACTION Advanced User Guide

+Do While <A:Excel record type identifier column ID>,<H:Header identifier string>,<L:Line Item identifier string>

...

*Fv!<Excel column id>

......

@Fv!<Excel column id>

...

+Fv<Fixed Value>

...

*Fv!<Excel column id>

...

+Fv<Fixed Vale>

...

+LOOP

Example 2:

This example shows that column A in Excel has item records for looping as identified with character D in that column. TRANSACTION loops through all of the rows in Excel spreadsheet, while the value of column A for that row is filled with D.

+DO WHILE A,H,L

'Start Do While loop from next line, Row Identifier is stored in Excel column A, value of "H" indicates Header row while value of "L" indicates line item row

'----------------------------------------------------------------------------

+SpSAPMF05A

+Sn1200

-SpMain Screen for Single-Screen Transaction: Outgoing Invoice

+FnBDC_OKCODE

?

-FnOK Code for this screen

+Fv=0005

+FnACGL_ITEM-HKONT(01)

-FnGeneral ledger account

@Fv!C

98

TRANSACTION Script Command Reference

+FnACGL_ITEM-WRBTR(01)

-FnAmount in document currency

@Fv!F

+FnACGL_ITEM-MWSKZ(01)

-FnTax

@Fv!G

+FnACGL_ITEM-MARKSP(01)

+FvX

+LOOP

'End do while loop here..

'----------------------------------------------------------------------------

+SpSAPMF05A

+Sn1200

-SpMain Screen for Single-Screen Transaction: Outgoing Invoice

+FnBDC_OKCODE

-FnOK Code for this screen

+Fv=BU

'----------------------------------------------------------------------------

Key Points:

There must be separate Header and Line Item (detail) rows in Excel. There can be only one

Header record, followed by one or more line item records.

Header and Line Item records should be clearly marked in the identifier Excel column.

TRANSACTION ignores the case, while validating the Excel identifier value for Header or Line Item rows. Also, the loop row cannot contain data for Header. However, Header information can be used in each Line Item.

TRANSACTION starts building the transaction from the row identified as a Header. If a value other than H or D is encountered, TRANSACTION skips all rows until it finds the next Header row.

Do not leave an empty row between Line Item records.

While using the Do...While Loop, avoid making unnecessary key fields. (Skip the transaction if empty or *FV#<Column ID>). TRANSACTION uses the row type identifier column as the key column. If this column is left blank in any of the rows, TRANSACTION ignores the entire row and continue to the next record.

Key field (skip row, if value in Excel is empty for the field) has priority over Header/Line Item row types during the Do...While Loop. In other words, TRANSACTION first checks whether the row is selectable based on the key field settings. Then it performs validation based on the row type for

Do...While Loop processing. If the row is skipped due to key field validation, it is not used as part of Do...While Loop processing.

NOTE: Do not mark any of the fields used inside the Do-While Loop as a key field. If any of the fields inside the Do...While Loop is marked as a key field, there can be unexpected results.

If you want to use incremental Excel rows, use identifier @ instead of + or * while inside the

Do...While loop. The chart below shows which row in Excel is used to retrieve the data.

TRANSACTION script element falling between

Do- While Loop statement

Read from

99

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

advertisement

Table of contents