SAP Adapter Troubleshooting
IDOC XML/SOAP Structure is Reversed After Import
Problem
Due to an issue with the importer that mixes segment type with segment name for IDOC, the imported XML/SOAP is reversed.
Example:
Assumed we have an IDOC Parser file containing a snippet like this:
BEGIN_GROUP 1
LEVEL 02
STATUS OPTIONAL
LOOPMIN 0000000001
LOOPMAX 0999999999
BEGIN_SEGMENT E2BPE1MARAEXTRT000
SEGMENTTYPE E1BPE1MARAEXTRT
LEVEL 02
STATUS MANDATORY
LOOPMIN 0000000001
LOOPMAX 0000000001
BEGIN_FIELDS
[...]
END_FIELDS
END_SEGMENT
BEGIN_SEGMENT E2BPE1MARAEXTRT1000
SEGMENTTYPE E1BPE1MARAEXTRT1
LEVEL 03
STATUS OPTIONAL
LOOPMIN 0000000001
LOOPMAX 0000000001
BEGIN_FIELDS
[...]
END_FIELDS
END_SEGMENT
END_GROUP
There are 2 segments defined:
E2BPE1MARAEXTRT000
of type E1BPE1MARAEXTRT
and
E2BPE1MARAEXTRT1000
of type E1BPE1MARAEXTRT1
.
The importer will however create two types E2BPE1MARAEXTRT000
and E2BPE1MARAEXTRT1000
. The field names in the generated structures are correct and correspond to the segment names. There's however an External Name set for them which corresponds to the segment types.
This causes the XML/SOAP structure to basically be reversed.
Solution
There is no solution to this problem for the time being, and this will not be fixed anytime soon.
RFC Call Returns "field not found"
Problem
An RFC call to a SAP system returns no values, but an error message, e.g.
SAP error (Key: "RFC_INVALID_PARAMETER" Message "field 'EDI_DOCNUM' not found") occurred during request "INBOUND_IDOCS_FOR_TID...
This problem concerns only certain RFC calls like e.g. INBOUND_IDOCS_FOR_TID
. For this call, the SAP system does not return any parameter names, but simply all values in an array.
Solution
Runtime 2020.13 The only way to access the parameter value is via its offset in the parameter table. You can specify the offset of the parameter as an external name on the parameter to point the xUML Runtime to the correct value.
Use 0 for the first element.