In order to capture specific segment keywords from an IDoc, you must use a specific xpath syntax to pull the appropriate value(s). Values can be specified by the instance number of the value within the IDoc. Providing no instance number will pull all of the instances. If [0] is specified as the instance number, none of the instances are pulled. The following examples are provided:
Example |
Description |
---|---|
FIDCCP02/IDOC/E1FIKPF/E1FISEG/BUZEI |
No instance number is specified for E1F1SEG, so this syntax will add ALL keyword values found in the BUZEI tags of the IDOC |
FIDCCP02/IDOC/E1FIKPF/E1FISEG[0]/BUZEI |
[0] is specified at the end of E1F1SEG, so this syntax will add NO keyword values found in the BUZEI tags of the IDOC |
FIDCCP02/IDOC/E1FIKPF/E1FISEG[1]/BUZEI |
[1] is specified at the end of E1F1SEG, so this syntax will add the first instance of the keyword values found in the BUZEI tags of the IDOC |
FIDCCP02/IDOC/E1FIKPF/E1FISEG[2]/BUZEI |
[2] is specified at the end of E1F1SEG, so this syntax will add the second instance of the keyword values found in the BUZEI tags of the IDOC |
FIDCCP02/IDOC/E1FIKPF/E1FISEG[3]/BUZEI |
[3] is specified at the end of E1F1SEG, so this syntax will add the third instance of the keyword values found in the BUZEI tags of the IDOC |
You can also capture keywords from a specific segment whose values are based on another element's values. This is accomplished by specifying the element that contains the variable value and the value to which it is equal in brackets, as in the following example:
//E1EDK14[QUALF="014"]/ORGID
Although it is not always strictly required to include quotation marks around the value to which the variable is equal, it is highly recommended to include the quotation marks at all times. Failure to do so may result in unexpected behavior.
In this example, a value is returned when the second segment is the QUALF element and equals 014 and it is followed by the ORGID element. The following is an example where this syntax would be useful:
In this example, 3000 would be pulled as a value for ORGID. All other values would not be pulled.