Apply Dynamic Formula (DF)
This topic describes how to use the dynamic formula feature of Process Runner that allows you to assign specific validations to specific mapping types. Also, the assigned mapped values can be dynamically changed at runtime.
Process Runnersupports the following predefined dynamic formulas on field that you can use to transform the data before posting it to SAP. Process Runner also supports custom formula to write your custom transformation function in VB.NET.
Name of Dynamic Formula |
Description |
|---|---|
A-Add Leading Zeros |
Prefixes specific number zeroes to the field value. The number of zeroes depends on the Length value in the Mapper tab. |
B-Decimal Transform . to , |
Converts decimal Let us consider the example of B-Decimal Transform . to , option. When the Process file is run, Process Runner converts the |
C-Decimal Transform , to . | |
D-Transform Excel date to DD.MM.YYYY |
Converts Excel date to the SAP date format according to the dynamic formula selected. Note: These formulas are not supported for Data Extractor. Let us consider the example of D-Transform Excel date to DD.MM.YYYY option. The Excel date can be in the When the Process file is run, Process Runner converts the date to |
E-Transform Excel date to MM/DD/YYYY | |
F-Transform Excel date to MM-DD-YYYY | |
G-Transform Excel date to YYYY.MM.DD | |
H-Transform Excel date to YYYY/MM/DD | |
I-Transform Excel date to YYYY-MM-DD | |
J-Transform YYYYMMDD to DD.MM.YYYY |
Converts date to the SAP date format according to the dynamic formula selected. Note: These formulas are not supported for Data Extractor. Let us consider the example of J-Transform YYYYMMDD to DD.MM.YYYY option. The Excel date can be in the When the Process file is run, Process Runner converts the date to |
K-Transform YYYYMMDD to MM/DD/YYYY | |
L-Transform YYYYMMDD to MM-DD-YYYY | |
M-Transform YYYYMMDD to YYYY.MM.DD | |
N-Transform YYYYMMDD to YYYY/MM/DD | |
O-Transform YYYYMMDD to YYYY-DD-MM | |
P-Convert to absolute value (remove negative sign) |
Removes negative sign and converts the Excel cell value to a positive value. For more information, see P-Convert to absolute value (remove negative sign). |
Q-Transform to debit/credit indicator (S/H) |
Transforms debit or credit indicator to |
R-Split & Append Long Text Line(s) |
Splits and appends the long text value to a new line (maximum length of 72 characters per line) for the same line item when the source records contain multiple line items. For more information, see R-Split and Append Long Text Line(s) . Note: This formula is not supported for GUI Scripting and Data Extractor. |
S-Transform date from current regional format to YYYYMMDD |
Transforms date from regional format. Note: This formula is not supported for Transaction, BAPI/RFM, and GUI Scripting. |
S-Remove Spaces / Accounting Formats |
Removes spaces and accounting format. For more information, see S-Remove Spaces / Accounting Formats . Note: This formula is not supported for Data Extractor. |
T-Get Internal Value |
Gets internal value of Excel cell that must be passed to SAP. For more information, see T-Get Internal Value . Note: This formula is not supported for Data Extractor. |
U-Transform decimal as per the user configuration |
Transforms the decimal notation format according to the user-defined configuration in the following:
For more information, see U-Transform decimal as per the user configuration. Note: This formula is not supported for BAPI/RFM, GUI Scripting, and Data Extractor. |
V-Transform date as per the user configuration |
Transforms the date format according to the user-defined configuration in the following:
For more information, see V-Transform date as per the user configuration. Note: This formula is not supported for BAPI/RFM, GUI Scripting, and Data Extractor. |
Z-Custom formula |
Allows you to write custom code and apply custom business rules to transform the data. For more information, see Z-Custom Formula. |
You can use the A-Dynamic Row Splitter option for loops. For more information, see A-Dynamic Row Splitter.
P-Convert to absolute value (remove negative sign)
This topic describes how to use the P-Convert to absolute value (remove negative sign) dynamic formula to convert an Excel cell value to positive value and remove any negative sign before posting to SAP.
Let us consider an FB50 transaction (with Company Code). For information about how to record an FB50 transaction (with Company Code), see FB50 - Create Multi-Line GL Document .
To configure P-Convert to absolute value (remove negative sign),
- Open the Process file that you want to update.
- Go to the Mapper tab and select P-Convert to absolute value (remove negative sign) dynamic formula in the Dynamic Formula column.
- Save the Process file. The changes are saved.
For example, when you run the FB-50 Transaction Process file and select the P-Convert to absolute value (remove negative sign) for the Amount in document currency column that contains negative values, Process Runner removes the negative sign and posts the data to SAP.
Data posted to SAP does not contain the negative values.
Q-Transform to debit/credit indicator (S/H)
This topic describes how to use the Q-Transform to debit/credit indicator (S/H) dynamic formula to transform to S (credit) and H (debit) based on the sign (positive or negative) of the amount value.
Let us consider an FB50 transaction (with Company Code). For information about how to record an FB50 transaction (with Company Code), see FB50 - Create Multi-Line GL Document .
To configure Q-Transform to debit/credit indicator (S/H):
- Open the Process file that you want to update.
- Go to the Mapper tab and select Q-Transform to debit/credit indicator (S/H) dynamic formula in the Dynamic Formula column.
- In the Transform to debit/credit indicator (S/H) window, select Single column and specify the Excel column containing debit(S) and credit(H) amount.
- Select OK. The changes in the Transform to debit/credit indicator (S/H) window are saved.
- Save the Process file. The changes are saved.
For example, when you run the FB-50 Transaction Process file and select the Transform to debit/credit indicator (S/H) for the Amount in document currency column that contains negative values, Process Runner transforms the value to S (credit) and H (debit) based on the sign (positive or negative) of the amount value.
R-Split and Append Long Text Line(s)
This topic describes how to append the long text value that exceeds the 72 characters when working with text fields in SAP. You can use the R-Split and Append Long Text Line(s) dynamic formula to split the long text and append to a new line for the same line item when the source records contain multiple line items. This formula is supported for only Transaction and BAPI Process files.
For many transaction codes, Process Runner automatically configures the R-Split and Append Long Text Line(s) dynamic formula when you enter text in a long text field as part of the recording process. The following procedure is an example of the MM02 transaction that includes the R-Split and Append Long Text Line(s) formula as part of the recording itself.
Procedure
- In Process Runner, start the recording for
MM02. - In the SAP GUI, enter the material number and press Enter. The Select View(s) window is displayed.
- Select Purchase Order Text and press
. The Organizational Levels window is displayed.
- Enter the plant number in the Plant box and press
. Do not press Enter.
- Click the Editor icon. The editor screen is displayed.
- Enter the long text and click Save button. The tags are displayed.
To configure R-Split and Append Long Text Line(s),
- In Process Runner, open the Transaction or BAPI/RFM Process file that you want to update.
- Go to the Mapper tab and select R-Split and Append as Long Text Lines(s) dynamic formula in the Dynamic Formula column.
- For a Transaction Process file, the functionality of R-Split and Append as Long Text Lines(s) depends upon the tag column field and values. Consider the tags that are configured as shown in the following screenshot.
Screenshot: R-Split and Append as Long Text Lines(s) option for Transaction Process file
-
*: Indicator used for the start line of a long text paragraph; in this case, it is an asterisk (*). The asterisk (*) tag column value refers to Default Paragraph in SAP. -
=: Indicator used to continue the line; typically, it should be equal sign (=). This Indicator is used when the paragraph text should be displayed in continuous format. The equal sign tag column value refers to Extended Line in SAP. -
/: Indicator used for new line in long text paragraph. If the long text consists of multiple paragraphs, then each paragraph is started with a slash/. -
1: Indicator used to decide whether the given text should be inserted before the existing long text. You must maintain1as the fourth indicator in the Process file.
-
- For a BAPI/RFM Process file, to edit the default settings, select Define character settings to display long text in the Advanced Settings for Long Text window that is displayed, and select OK.
-
Start line character: Indicator used at the start line of a long text paragraph. If you enter a slash and an asterisk (
/*) symbol, every new paragraph begins with a slash and an asterisk (/*). -
Continue line character: Indicator used to continue the line. If you enter an equal symbol (
=), when the paragraph text exceeds the maximum limit, the text is split and displayed on a new line with an=symbol. -
New paragraph character: Indicator used to start a new paragraph. If you enter slash
/, when the text consists of multiple paragraphs, then each paragraph is started with a slash/symbol.
-
Start line character: Indicator used at the start line of a long text paragraph. If you enter a slash and an asterisk (
- Select OK. The details are saved.
Note: You can insert the multiple lines of long texts in single cell of excel using Alt + Enter key and can map that single column with the data in Excel file.
S-Remove Spaces / Accounting Formats
This topic describes how to use the S-Remove Spaces / Accounting Formats dynamic formula to remove spaces and accounting format.
Let us consider an FB50 transaction (with Company Code). For information about how to record an FB50 transaction (with Company Code), see FB50 - Create Multi-Line GL Document .
To configureS-Remove Spaces / Accounting Formats:
- Open the Process file that you want to update.
- Go to the Mapper tab and select S-Remove Spaces / Accounting Formats dynamic formula in the Dynamic Formula column.
- Save the Process file. The changes are saved.
For example, when you run the FB-50 Transaction Process file and select the S-Remove Spaces / Accounting Formats for the Amount in document currency column that contains the currency symbol, Process Runner removes the currency symbol and posts the data to SAP.
Data posted to SAP does not contain the currency symbol.
T-Get Internal Value
This topic describes how to use the T-Get Internal Value dynamic formula to get the internal value of Excel cell.
Let us consider an FB50 transaction (with Company Code). For information about how to record an FB50 transaction (with Company Code), see FB50 - Create Multi-Line GL Document .
To configure T-Get Internal Value,
- Open the Process file that you want to update.
- Go to the Mapper tab and select T-Get Internal Value dynamic formula in the Dynamic Formula column.
- Save the Process file. The changes are saved.
For example, when you run the FB-50 Transaction Process file and select the T-Get Internal Value for the Quantity column that contains fraction values, Process Runner obtains the internal value and posts the data to SAP.
U-Transform decimal as per the user configuration
This topic describes how to use the U-Transform decimal as per the user configuration dynamic formula in the Process file that allows users to select the decimal notation when running the file. The decimal notation format can be set globally or at the system-level.
To configure U-Transform decimal as per the user configuration,
- Open the Transaction Process file that you want to update.
- Go to the Mapper tab and select U-Transform decimal as per the user configuration dynamic formula in the Dynamic Formula column.
- Save the Process file. The changes are saved.
The users can then configure the decimal notation format for the field in the following ways:
- To configure the format for all the SAP systems, go to Tools > Options > Transaction tab, and select the required format. For more information, see Transaction.
- To configure the format for a particular SAP system, select the system in Connector for SAP window, and select the required format on the Transaction Settings tab. For more information, see Sign in without Logon Shortcut.
When the Process file is run, the decimal notation format for the selected field is transformed according to the format configured, and the value is uploaded to SAP.
V-Transform date as per the user configuration
This topic describes how to use the V-Transform date as per the user configuration dynamic formula in the Process file that allows users to select the date format when running the file. The date format can be set globally or at the system-level.
To configure V-Transform date as per the user configuration,
- Open the Transaction Process file that you want to update.
- Go to the Mapper tab and select V-Transform date as per the user configuration dynamic formula in the Dynamic Formula column.
- Save the Process file. The changes are saved.
The users can then configure the date format for the field in the following ways:
- To configure the format for all the SAP systems, go to Tools > Options > Transaction tab, and select the required format. For more information, see Transaction.
- To configure the format for a particular SAP system, select the system in Connector for SAP window, and select the required format on the Transaction Settings tab. For more information, see Sign in without Logon Shortcut.
When the Process file is run, the date format for the selected field is transformed according to the format configured, and the value is uploaded to SAP.
Z-Custom Formula
This topic describes how to use the Z-Custom Formula option to access the custom formula editor to write custom code and apply custom business rules to transform the data.
Let us understand the pre-defined variables and return types that can be used in custom dynamic formula on field with VB.NET code.
Variable |
Description |
|---|---|
iValue |
Current value pertaining to mapping |
iSheet |
Current Excel sheet |
iCurrentExcelRowNumber |
Current absolute Excel row number |
iMap Type |
Mapping Type |
iMap Value |
Mapping Value |
IsTestRun |
Checks whether current run Is Test Run. This is for Transaction Only. |
iLoopExcelHeaderRow |
Looping header row. This is for Transaction Only. |
iLoopExcelEndRow |
Looping end row. This is for Transaction Only. |
ReturnScreenName |
Returns screen name. This is for Transaction Only. |
ReturnScreenNo |
Returns screen number. This is for Transaction Only. |
ReturnFieldName |
Returns field name (without table name).This is for Transaction Only. |
ReturnTableName |
Returns table name (without field name). This is for Transaction Only. |
IsFirstCall |
Executes Custom Dynamic Formula only once (first time). This is for Transaction Only. |
iExcelLogColumn |
Excel Log Column |
iExcelStatusColumn |
Excel Status Column |
IsLineLevelTestRun |
Whether line level test run or whole document level test run |
IsDRSActive |
Is DRS active in current file |
DRSBlockValue |
DRS Block length |
IsDRSBalancingRow |
Whether current executing row is DRS Balancing Row |
IsRowSelectionPass |
Whether the row selection passed in analyzing or preparing rows for run |
IsHeaderLevelTestRun |
Whether line level test run is executing and header row is executing in loop |
SAPProcess |
Return SAP Transaction/BAPI/Table name |
SAPSystem |
Return logged-in SAP System ID |
SAPClient |
Return logged-in SAP Client |
SAPUser |
Return logged-in SAP User |
SAPLang |
Return logged-in SAP Language |
SAPSystemNo |
Return logged-in SAP SystemNo |
For example, consider a custom formula that uses IsFirstCall and ReturnFieldNamevariables for Gross Weight field of MM02- Change Material Process file.
IsFirstCall = True
ReturnFieldName = iSheet.Cells(1, "B").Text
In this example, when the Process file is run, custom formula is run only once and BRGEW field name is returned from the Excel cell. For the file to run successfully, user must change the column name in external Excel file with the field name BRGEW as shown in the following screenshot; else, an error is displayed if any other value is returned. In the following screenshot, an error is encountered if Field Description is used instead of Field Name.
A-Dynamic Row Splitter
Process Runner supports DRS (Dynamic Row Splitter) for loops. Process Runner automatically splits your large document into two or more parts with configurable Dynamic Row Splitter (DRS). DRS implementation offers an enterprise grade error processing.
To configure A-Dynamic Row Splitter,
- Open the Process file that you want to update.
- Go to the Mapper tab and select A-Dynamic Row Splitter dynamic formula in the Dynamic Formula column.
- In the Dynamic Row Splitter window, perform the following steps:
- In the Automatically split rows in block of box, enter the number of blocks that you want to split the rows into.
- Select Auto add Balancing/Suspense account and amount in each block when the document contains both debits and credit items for transactions, such as FB50, FB01, FV50, and FB01.
- Select Auto add only balancing amount for each block when the document contains header amount of total line items and line item has only credit or debit amount for transactions, such as FB60, FV60, FB65, FV65, FB70, FV70, FB75, or FV75.
- Select Do not balance to not balance the amount for each block
- In the Balancing Account Details section, select the following options:
- Perform whole document balance check: Indicates that the document is not uploaded to SAP when balance is not zero.
- Do not continue if negative value is found: Indicates that the document is not uploaded to SAP when negative value found in Amount field.
- Enter the details for the other options and select OK. The changes are saved.