Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

USE:

int4 Int4 IFTT uses XPath expressions to extract specific values from xml XML files. For fetching values from flat file messages int4 Int4 IFTT uses our simple language (explicitly created specifically for this purpose) for fetching values from flat file messages

PROCEDURE:

Following tags can be used in flat-file expressions:

  • CSV_COLUMN - in CSV file column number for further extraction 
  • CSV_SEPARATOR - optional separation character different than a comma
  • CSV_SKIP_HEADER - skips the first row in the CSV file
  • START_TAG - determine string , as the starting point 
  • START_FROM - determine from which character after string defined in START_TAG derivation should start. First The first character is 1 
  • LENGTH - determine the length of string , that will be saved
  • END_TAG - determine string, as the ending point
  • REGEX - match specific part parts of the file using regular expression. 
    By default whole regular expression is matched and used for variable replacement. It is possible to use subgroups to extract/replace part of the expression. If there is a subgroup defined, it is used instead of the whole full result.See example 5 below.
    More information about regular expressions syntax in ABAP: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenregular_expressions.htm

...

Info

Each tag should be separated by &&

START_TAG or START_FROM are obligatory tags (unless REGEX is used)


Example 1: In order to To derive string IFTT001 from the example exemplary flat-file below, the following expression could be used: START_TAG(BGM+220+)&&START_FROM(1)&&LENGTH(7)

This expression can be used for extracting to extract values with no ending tag , or to extract only a part of the value. 


UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT001+9'


Example 2: In order to To derive string IFTT002 from the example the exemplary flat-file below, the following expression could be usedSTART_TAG(BGM+220+)&&END_TAG(+)

In this case, the expression will work work independently of the length of the values length.

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT002+9'


Example 3: In order to  To derive string IFTT003 from the example the exemplary flat-file below, the following expression could be used: START_FROM(9)&&LENGTH(7)

This expression can be used for extracting to extract values with no starting and ending tags , or to extract only a part of the value. This statement is especially useful for This statement is handy for handling very long strings.

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT003+9'


Example 4:  In order to To derive string IFTT004 from the example exemplary flat-file below, the following expression could be usedSTART_FROM(9)&&END_TAG(+9)

In this case, the expression will work work independently of the length of the values length , just starting from specify a specific point till the end tag.

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT004+9'


Example 5:  In order to To derive string IFTT004 from the example flat-file below, the following expression could be usedREGEX(BGM\+220\+([A-Z0-9]+)\+9)

UNA:+.? '
UNB+UNOA:3+000000000B:ZZ+0000000ECC:ZZ+20051107:1159+6002'
UNH+000000101+ORDERS:D:96A:UN:EAN008'
BGM+220+IFTT004+9'

Expression The expression used in this example uses subgroup subgroup to extract part of the matched string. Subgroups are defined using  using the (   ...   ) operator. REGEX(BGM\+220\+([A-Z0-9]+)\+9)
Expression REGEX(BGM\+220\+[A-Z0-9]+\+9) without subgroup matches entire line: BGM+220+IFTT004+9'


Info

Please note that the LENGTH tag works only combined with START_FROM.

...

Info

It is possible to use multiple expressions for a single variable processor and join them with the || operator operator. All matching values are collected and saved to the same variable then.

...