Skip to Content
avatar image
Former Member

Variable Substitution field shouldnot be written to the file

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 17, 2008 at 12:09 AM

    I tried as below

    MT_IN.fieldFixedLengths 0,*

    MT_IN.fixedLengthTooShortHandling cut

    Unfortunately still it doesn't work.

    Any clue?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Oct 16, 2008 at 05:50 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Oct 16, 2008 at 09:39 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 01:46 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Oct 17, 2008 at 01:59 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 02:50 PM

    Gaurav, thanks a ton. Your suggestion worked. 😊

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 02:51 PM

    Fixed by changing the structure

    Add comment
    10|10000 characters needed characters exceeded