Command: Transfer

Previous  Next |  Direct link to this topic

Go to list of all Commands

Syntax: Transfer(<source>|<target>);

 
Transfer data between two windows after an activate (or on same window if needed)

 

If, in your macro, you open a new window, you can use the Transfer command to copy a value from the initial window to the newly opened window.

For this you need 2 arguments:

Argument

Description

<source>

 

The ItemUid of the item/column located on the initial window you want to copy from

Alternative you can get the data from a previously stored value using the keyword STORE1 à STORE999 (See sample). This is useful if you wish to transfer data to screens that are more 2 windows always from the original screen

TIP: You can make the value to set come from an SQL-sentence if you start it with SQL:<SQL-statement>.

TIP: You can make the value to set come from an SQL-sentence if you start it with SQL_INVARIANT:<SQL-statement>. SQL invariant is used to ensure that decimal numbers are returned in the correct format depending on your system

TIP: STORE values persist between macro's so you can set a store value in one Macro and then use it in another.

<target>

The item/column of the item located on the current window you want to copy to

Alternative you can send the data to a store using the keyword STORE1 à STORE10. This is useful if you wish to transfer data to screens that are more 2 windows always from the original screen

Sample 1: Transfer($[$5.0.0]|$[$4.0.0]); will (if activated on a Business Partner window and macro opened an A/R invoice) take the CardCode on the BP and place it on the customer item in the A/R Invoice

Sample 2: Transfer($[$5.0.0]|$[$38.1.0]); will (if activated on an Item Master Data window and macro opened an A/R invoice and transferred the vendor) take the item code on the Item Master data and place it in the item-matrix on the A/R Invoice

Sample 3: Transfer($[$5.0.0]|STORE1); and afterward Transfer(STORE1|$[$38.1.0]); would essentially do the same as Sample 2 but several other windows and commands could happen in between the two commands (Example:  on a window you have some data. You will now open a new window and again from that window open yet another window and send the data to this window. Without the store system that would not be possible since it only works on sending data from previous window to current window)

Tip: You can in the dynamic syntax use the 4th .row syntax

In addition to a numbered row you can use the following keywords to refer to special rows:

 

Keyword

Description

.FIRST

Refer to the First row in the Matrix (does essentially the same a ".1")

.LAST

Refer to the Last row in the Matrix

LAST-1

Refer to the Second to Last row in the matrix (this is in many cases handy as SAP normally have an new empty line for new row entries)

.SELECTED

Refer to the Row that have a Selection (aka highlighted in Yellow). If no selection this will fall back to working with the first row

.FOCUSED

Refer to the Tow that have cell focus (the row where the "yellow" cell is). If no cell focus this will fall back to working with the first row

NB: You cannot set fields that are read-only in the UI. You can try and unlock the field using the "Enable" function but B1UP cannot break the SAP UI logic.

Known limitation: It is not possible to set/transfer custom values to fields SAP can overwrite with CTRL+Tab. This is due to a SAP SDK UI-API Limitation. Please go vote for the option to do this on SAP idea Place: https://influence.sap.com/sap/ino/#/idea/131306 so we can offer it in the future.

Video: Click here to learn more about using transfer commands

FAQ: When it is possible to read and write data using the dynamic syntax

 


Similar/Related Commands:
- Blank
- BlankUdfSideBar
- MultiSetFromSQL
- Set
- SetCaption
- SetUdfSidebar
- TransferBack
- TransferBackUdfSidebar
- TransferUdfSidebar