cancel
Showing results for 
Search instead for 
Did you mean: 

FCC - every single Line of File to IDoc

Former Member
0 Kudos

Hi well my client wants to have read a file from FTP and each row of this file should fill a single IDoc.

The source looks like:

@C0B21061115054001775

@G0B11061115054001676

@E0B11061115054002005

...

Actually i have no idea how to say XI to read one line, make an IDoc out of it and read the next line. In my understanding XI is not able to do this!

Am i wrong? does someone has a solution on this?!

br Jens

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

this will be handled in your mapping

you can also ref: /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change to see how you can put up with multiple IDOCs !!!!

Former Member
0 Kudos

Hi, well thx for ur hints!! Never read of it before!

One question left: Can i only change the occurence and add the changed XSD to the mapping and everything works fine as like in typicall file2IDoc Scenario?!

Or do i have to build everything new because of having to use the external definition?!

br Jens

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>Can i only change the occurence and add the changed XSD to the mapping and everything works fine as like in typicall file2IDoc Scenario?!

exactly

that's the beauty of this approach

you only need to change it in the mapping

(in interface mapping you leave standard IDOC - not external definition - as per my blog)

>>>>Hi, well thx for ur hints!! Never read of it before!

that's why you need my book:

<a href="/people/michal.krawczyk2/blog/2006/10/11/xi-new-book-mastering-idoc-business-scenarios-with-sap-xi"><b>Mastering IDoc Business Scenarios with SAP XI</b></a>

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Michal, actually i already have ur book - but not always with me!

One problem left: mapping! Do i have to map the MT to the now unbounded "IDoc-Field".

What constants do i have to map to the Begin or Segment fields?! 0 or 1?!

sry, i am kind of unsure.

br Jens

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>>One problem left: mapping! Do i have to map the MT to the now unbounded "IDoc-Field".

to idoc unbounded you need to map your lines

(so it will create as many IDOCs as lines)

Regards,

michal

Former Member
0 Kudos

hm, there is my problem.

Source looks like:

MTRecord

-RecordSet

-- DetailsStructure

--- Data1

--- Data2

--- etc.

Traget IDoc-xsd:

ZIDOC01

- IDOC

-- EDI_DC40

-- ZIDOC01

--- Data1

--- etc.

I map RecordSet to IDoc

and DetailsStructure to ZIDOC01 (second listed!), and Data1 to Data1 etc.

So what is wrong? I am receiving error like: target-element ZIDOC01/IDOC can't be created. But the mapping seems to be right to me!

sorry for this....

thx Jens

MichalKrawczyk
Active Contributor
0 Kudos

Hi Jens,

I cannot do mappings without seeing them as

it's always too easy to do and so hard to explain

Regards,

michal

justin_santhanam
Active Contributor
0 Kudos

Jens,

Did you mapped the Node EDI_DC40. If not just map with Constan[] to the the target node EDI_DC40 it will work.

Best regards,

raj.

Former Member
0 Kudos

Yes ur right. It works now but perhaps because i found an error in test-data while testing the mapping

I guess i will have some problems in converting the content inside File-Adapter....perhaps i write some lines concerning this

br Jens

Former Member
0 Kudos

Ok, no FCC question but back to the old topic.

I am not getting single IDoc but single Segments in my IDoc. But i wanna have single IDoc per row in source file!

Another problem: the LS-Name is written from SLD into SenderPartner-Field, but i need another name specified from the client!

There a discussion came up about the approach of using partners in WE20.

1. for every incoming file from single system one entry in WE20 or

2. having one entry for incoming and one for outgoing, managing the IDocs via Incoming and Outgoing Parameters.

What are ur suggestions?!

br Jens

Former Member
0 Kudos

Can somebody give me a hand this morning?!

ty Jens

MichalKrawczyk
Active Contributor
0 Kudos

hi Jens,

you can do it like this:

1. read the whole file

2. in mapping map each line to one IDOC (with trick from my blog):

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

this way each line will create one IDOC for sure

approach also described in my book:

<a href="/people/michal.krawczyk2/blog/2006/10/11/xi-new-book-mastering-idoc-business-scenarios-with-sap-xi"><b>Mastering IDoc Business Scenarios with SAP XI</b></a>

so it's pretty easy and standard I'd say

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>