cancel
Showing results for 
Search instead for 
Did you mean: 

File IDOC

Former Member
0 Kudos

File ---> XI --> IDOC

In the File I have the following

Input File

-


VendorNumber

V1

V1

V1

V2

V2

V3

V3

V4

V5

V5

Need to get this output

-


Header

---V1

---V1

---V1

Header

---V2

---V2

Header

---V3

---V3

Header

---V4

Header

-


V5

-


V5

Could some one tell me what should I do in the Message Mapping to get the above output?

1) How should I Define my Data type for File & Idoc with occurences

2) How should I define the Message Types?

3) How should I define the Message mappings?

Also let me know where can I read more on Multi Mapping?

I tried various options, but I didnot get the desired output and I am running out of time.

Thanks for your Help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Karen,

1. import the IDOC structure /if you have to create more than one IDOC you need to export and change the IDOC structure - and import that modify file.

2. use functions VendorNumber -> RemoveContext -> SplitByValue to create a segment for each occurrences of VendorNumber. If you like to create IDOCS instead of segments the function chain is nearly the same.

Keep asking if their are something left...

Greets

Matt

Former Member
0 Kudos

Mathias Thanks for your response.

I have done the same way you have mentioned below, interestingly I am able to see only 3 IDOC segments in the output(in the Message Mapping/ TEST Tab)

For Example

Vendor Number

V1

V1

V1

V2

V2

V3

V4

V4

I am getting the output

Vendor Number

V1

v1

v1

V2

V2

V3

and for some reason After the 3 Idoc everything is discarded.

Please assist me.

Thanks Anand for your pointer. I will look into that tomorrow and will get back to you.

Former Member
0 Kudos

Hi Karen,

try this way for the top:

VendorNumber->removeContext->SplitByValue(Value change!)->collapseContext->exist->createIf->IDOC

and for segments:

VendorNumber->removeContext->SplitByValue(Value change!)->Segment

Hope this helps...

Regards Matt

Former Member
0 Kudos

Thanks Matthias. I am close to the Target. But not yet to the final landmard.

The Input I gave was

Vendor Number

11

22

22

22

33

44

44

55

The Result I got was

IDOC

11

IDOC

22

IDOC

33

IDOC

44

IDOC

55

The result what I expected was

IDOC

11

IDOC

22

22

22

IDOC

33

IDOC

44

44

IDOC

55

That means the Duplicate records are not written inside the IDOC segment. But number of IDOC segments that needs to be created has been created. I followed the same equation you have written above.

Please help me why I am not getting the Repeated records, inside the segment. Really appreciated.

Former Member
0 Kudos

Interestingly, when I look into the DISPALY QUE it appears differently(and this is the output I am looking for)

The Display Que out put is

11

Context Break

22

22

22

Context Break

33

Context Break

44

44

Context Break

55

Former Member
0 Kudos

Thanks Matthias Boettger. Yes now its working fine. Your Formula was perfctly correct. My data Structure Definition for file was earlier mentioned as 0..1 , I went and modified that to 0..Unbounded and now I got the Desired output. Hats off to you.

Former Member
0 Kudos

Matthias The result what I got is called MULTI Mapping? And if so for Multi Mapping why I need a BPM in XI 3.0, sp12.

Former Member
0 Kudos

HI MATTHIAS & KAREN,

I HAVE SIMILAR SCENARIO.

V1

V1

V1

V1

V2

V2

V2

V3

V4

V4

TARGET SHOULD LOOK LIKE THIS

IDOC1

--HEADER(V1)

-


V1

-


V1

-


V1

-


V1

IDOC2

--HEADER(V2)

-


V2

-


V2

-


V2

IDOC3

--HEADER(V3)

-


V3

IDOC4

--HEADER(V4)

-


V4

-


V4

I AM ABLE TO GENERATE SEPARATE IDOC'S AND HEADERS BUT NOT LINE ITEMS. EITHER I AM GETTIGN ALL V1-V4 UNDER

HEADER(V1) OR GETTING ONLY V1 IN HEADER(V1) NOT V2-V4. CAN YOU GUYS PROVIDE SOME INPUT OR HELP ME TO FIGURE IT OUT.

TAHNK YOU

INDRASENA

Former Member
0 Kudos

Try this

if your target structure looks likes below, then follow the mapping mentioned below. Most of the functions are coming from Node Functions.

Messages 1.1

---> Messag1 1.1

-


>ZSDSales 0..unbounded

-


> IDOC 1.1

-


> Begin (Attribute)

-


> EDI_DC40 1

-


> ZSDt001 1.999999

-


Vendornumber -


>Remove Context --->SplitbyValue(Property Value Changed) -


> Collapse Contexts ---> Exists ---> Createif -


> ZSDSales

-


Constant '1' ---> Begin

-


Constant ---> EDI_DC40

-


Vendor Number --->Remove Context ---> SplitbyValue(Value Changed) ---> ZSDt001

-


Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Karen,

Data Type and Message Type for File can be manually created in IR directly. The structure to be defined depends on your content conversion.

IDoc structure can be imported from your SAP system in IR. Go to your SWCV and Right Click on Imported Obeject->IDocs and enter the logon details to get the metadata for the required Idoc type.

Also check this thread on IDoc mapping..

For Multimapping apart from SAP help you an search through the forum there are lot of threads on multimapping..

Anand