cancel
Showing results for 
Search instead for 
Did you mean: 

How to do the data-mapping if first the correct structure to be determined?

Former Member
0 Kudos

Dear experts,

I have question which I hope sounds familiar to at least one of you

I created an RFC connection between SAP and XI. Via an RFC SAP is sending an internal table. The structure of this table is a line of 1000 characters, with on position 1 the recordtype. If recordtype eq 1, it's a header (with a specific structure) and if it's 2 then the data is positiondata(also with a specific structure). I already imported the RFC into XI and created a messagetype both for the headerstructure and for the detailstructure.

But how do I do the mapping? On the lefthand side of the messagemapping, I get data in the form of a 1000 character line. I have to look at position 1 of this line and based upon that value I have to interpret the data either as headerdata or positiondata. How does my messagemapping and interfacemapping look like? Or am I doing something wrong here?

Thanks in advance,

William.

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

Your Left-side structure will be the RFC structure....Right-side (target) structures will be Header & Detail....basically you are doing a 1:2 mapping.

I hope that when you say two message types they mean the target message types and you want to send out two messages.

RecordType
                ---> equalS ---> IfWithoutElse  ----> Root node of Message Type for Header
Constant(1)                    Then(RecordType...or even Blank Constant will do)

Similarly have the logic for RecordType = 2

Regards,

Abhishek.

Former Member
0 Kudos

Thanks a lot Abhishek.

I implemented it like you said , but when I test the mapping, on the right hand side I get 1 line again with ALL data (in the node "MT_HEADER"). I expected to get a node MT_HEADER with filled fields underneath...

I defined the MT_HEADER structure as follows:

RECTYPE minlngth=1;maxlngth=1

DOCNR minlngth=10;maxlngth=10

YEAR minlngth=4;maxlngth=4

etc

But these individual fields don't get filled...

Thanks again

William

VijayKonam
Active Contributor
0 Kudos

Nothing happens automatically. You have to map each field with your business logic in it. Also, you need to only one message type on the right hand side with the proper node definitions (header and line) and associated fields beneath them.

Map each of the target fields. Then you would see the data. Make use of the predefined function given below in the mapping editor.

VJ

Answers (0)