cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Substitution field shouldnot be written to the file

Former Member
0 Kudos

Hello,

I am doing a proxy to file scenario.

Below is my datatype structure:

MT_IN

---Line 1..unbounded

---FileName 1..1

From the R/3 side, I send the entire file in the "line" element and the name of that file in the "FileName" element.

Now I want to use this "FileName" element in my variable substitution to dynamically generate my filename schema but I dont want to write this into the file which is written to the filesystem.

I only want to write the contents of "Line" element to the file and not the "FileName".

What all options are available to do this? Please detail out.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I tried as below

MT_IN.fieldFixedLengths 0,*

MT_IN.fixedLengthTooShortHandling cut

Unfortunately still it doesn't work.

Any clue?

Former Member
0 Kudos

Hi Laxmi

Do you have a Recordset type of structure. What you have defined in Record Structure and when you execute whats the error in CC.

MT_IN
   Items
        Line
        FileName

For this FCC will be

Recordset Structure - Items

Items.fieldNames                 Line, FileName
Items.fieldFixedLengths           *,0
Items.endSeperator                  'nl'
Items.fixedLengthTooShortHandling    Cut 

Thanks

Gaurav

Answers (6)

Answers (6)

Former Member
0 Kudos

Fixed by changing the structure

Former Member
0 Kudos

Gaurav, thanks a ton. Your suggestion worked.

Former Member
0 Kudos

Thanks Gaurav, I will try that and get back to you.

Former Member
0 Kudos

Gaurav, thanks so much for taking time to help me.

Below is my Structure

MT_OUT

-


fieldname 1...1

-


line 1...unbounded

In the Content Conversion Parameters:

Recordset Structure: MT_OUT

MT_OUT.fieldSeparator 'nl'

MT_OUT.fieldNames filename,line

MT_OUT.fieldFixedLengths 0,*

MT_OUT.fixedLengthTooShortHandling Cut

In PI, in sxmb_moni, it shows as message is successfully moved. But it doesn't write the file to the filesystem.

Former Member
0 Kudos

Hi Laxmi

I think you need to reframe the message

Do like this

MT_OUT
            Header
               FileName
            Items
               Line

Now you get Record Structure Header, Items

and apply FCC parameter. This will resolve. Your structure is not getting supported correctly by FCC. Try it

Thanks

Gaurav

Former Member
0 Kudos

Gaurav,

I tried specifying as below in the Content Conversion:

Name Value

MT_IN.fieldFixedLengths

FileName.fieldFixedLengths 0

Line.fieldFixedLengths

But it didnot work. Is it the right way?

Former Member
0 Kudos

HI

No its incorrect

This will help to understand

http://help.sap.com/saphelp_nw70/helpdata/EN/d2/bab440c97f3716e10000000a155106/content.htm

MT_IN.fieldFixedLengths <value for line>,0 (for filename)

MT_IN.fixedLengthTooShortHandling cut

Thanks

Gaurav

Former Member
0 Kudos

use this parameter in the File content conversion

"FILENAME.fixedLengthTooShortHandling" and the value is "Cut"

whilch will not write teh value of the file name in the file.

Former Member
0 Kudos

Hi

FILENAME.fixedLengthTooShortHandling

will shorten the value to a fixed field length but you dont want to write it to the file itself.

then you need to use MT_IN.fieldFixedLengths and define the length for FILENAME as 0 and you can use as shree said.

fixedLengthTooShortHandling will cut it to 0

Thanks

Gaurav