cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc to File - IDoc number : Variable substitution in File Adapter

manish_bhalla2
Contributor
0 Kudos

Hi,

I have an IDoc to File scenario. I want to use the IDoc Number as part of the target filename (using variable substitution) in the File Adapter. However, the target flat file does not have a field where I can store the IDOC number. I know the IDoc number is also stored in the message header ( under the IdocInbound tab), but is there any way I can access this in the variable substitution?

Failing this, if I have the Idoc number in the target XML, is there any way I can skip it in the flat file generated?

example...

XML looks like this...

<Root>

<Record>

<IdocNum>99999</IdocNum>

<HeaderRecord>

...

</HeaderRecord>

<LineRecord>

...

</LineRecord>

<LineRecord>

...

</LineRecord>

</Record>

...

</Root>

But the flat file should be..

HeaderRecord...

LineRecord...

LineRecord...

Cheers

Manish

Accepted Solutions (1)

Accepted Solutions (1)

STALANKI
Active Contributor
0 Kudos

Yes.Definetly.https:///people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

manish_bhalla2
Contributor
0 Kudos

It worked perfectly ! Thanks a million !!

I had thought of trying the 'fixedFieldLengths = 0', but it had not occured to me to use 'fixedLengthTooShortHandling'.

Thanks again, also for the lightning fast response

Cheers

Manish

Answers (2)

Answers (2)

former_member91687
Active Contributor
0 Kudos

Hi Manish,

Have a look at this blog..

/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi

Hope it helps.

Regards,

Chandra

manish_bhalla2
Contributor
0 Kudos

Hi Chandra,

Thanks for this

But this is standard stuff that is detailed in SAP help files (http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm)

What I was looking for was in Sravya's blog (refer the earlier entry).

Thanks anyway

Cheers

Manish

STALANKI
Active Contributor
0 Kudos

Sure Manish.I hope you know you trained me in India..:)

manish_bhalla2
Contributor
0 Kudos

Hi,

Yes, I do remember you (the lady who asked too many questions grin )... and that is why it is even more of a pleasure to read your blogs and posts. Even though I know a lot more than I did way back then... you have surpassed me by miles and miles. It is good to see one's friends doing well.

Where are you nowadays? UK? Can you send me your email address? You can contact me at manishbhalla AT gmail DOT com.