6 Replies Latest reply: Nov 23, 2012 8:23 AM by Sep Gong RSS

Content Conversion-Ignore Fields

firdaus hashim
Currently Being Moderated

Dear Expert,

 

I'm woking on PI 7.0 & I want to ignore fields suing Content Conversion:

 

  <?xml version="1.0" encoding="UTF-8" ?>

- <ns0:MT_CLM_POCONTRACT_RESP_IB xmlns:ns0="http://tnb.com.my/xi/APPL/eSourcingIntegration">

- <HEADER>

       <NAME>#DataType[userdefined.md3]</NAME>

  </HEADER>

+ <COL>

  <COL1>DISPLAY_NAME</COL1>

       <COL2>DOCUMENT_DESCRIPTION</COL2>

       <COL3>EXTERNAL_ID</COL3>

       <COL4>TNB_TOTALVALUE</COL4>

       <COL5>TNB_VENDORNAME</COL5>

       <COL6>TNB_VENDORID</COL6>

  </COL>

- <POCONTRACT>

       <DISPLAY_NAME>0020000011</DISPLAY_NAME>

        <DOC_DESCRIPTION>Electrode Esab OK4600x2.5mm</DOC_DESCRIPTION>

       <EXTERNAL_ID>0020000011</EXTERNAL_ID>

       <TNB_TOTALVALUE>"20.00 MYR"</TNB_TOTALVALUE>

       <TNB_VENDORNAME>SYARIKAT MIZUN</TNB_VENDORNAME>

       <TNB_VENDORID>SG000175</TNB_VENDORID>

  </POCONTRACT>

- <FORMAT>

      <FNAME>PO_DET_</FNAME>

      <FDIR>PO</FDIR>

  </FORMAT>

  </ns0:MT_CLM_POCONTRACT_RESP_IB>

 

FNAME & FDIR is used for dunamic file name & file directory using PI Variable Subtition function and convert into .CSV file as

 

Filename:  PO_DET_2011.CSV

 

#DataType[userdefined.md3]

DISPLAY_NAME,DOCUMENT_DESCRIPTION,EXTERNAL_ID,TNB_TOTALVALUE,TNB_VENDORNAME,TNB_VENDORID

0020000011,Electrode Esab OK4600x2.5mm,0020000011,"20.00 MYR",SYARIKAT MIZUN,SG000175

PO_DET_,PO

 

my concern is to remove the FNAME & FDIR under fields FORMAT. i'm trying some function

 

Recordset Structure = HEADER,COL,POCONTRACT,FORMAT

 

**i want to remove FORMAT structure

 

Content Conversion Parameter

 

HEADER.fieldSeparator = ,

COL.fieldSeparator = ,

POCONTRACT.fieldSeparator = ,

FORMAT.fieldSeparator = ,

FORMAT.FNAME.fieldFixedLengths = 1

FORMAT.FNAME.fixedLengthTooShortHandling = Cut

FORMAT.FDIR.fieldFixedLengths = 1

FORMAT.FDIR.fixedLengthTooShortHandling = Cut

 

 

no error appear but FORMAT field still exist. please help, thanks.

  • Re: Content Conversion-Ignore Fields
    Anupam Ghosh
    Currently Being Moderated

    Hi Firdaus,

                      Could you please check this wonderful blog by Sravya Talanki where she uses fieldFixedlengths property of the attribute and sets it to  zero. Please kindly, if possible, rate the blog if you find it useful.

     

    Regards

    Anupam

    • Re: Content Conversion-Ignore Fields
      firdaus hashim
      Currently Being Moderated

      Dear Anupam Gosh,

       

      still not resolved. i'm also try to  change the XML structure by remove the FORMAT Structure and let the FDIR & FNAME become main structure as below

       

        <?xml version="1.0" encoding="UTF-8" ?>

      - <ns0:MT_CLM_POCONTRACT_RESP_IB xmlns:ns0="http://tnb.com.my/xi/APPL/eSourcingIntegration">

      - <HEADER>

             <NAME>#DataType[userdefined.md3]</NAME>

        </HEADER>

      + <COL>

        <COL1>DISPLAY_NAME</COL1>

             <COL2>DOCUMENT_DESCRIPTION</COL2>

             <COL3>EXTERNAL_ID</COL3>

             <COL4>TNB_TOTALVALUE</COL4>

             <COL5>TNB_VENDORNAME</COL5>

             <COL6>TNB_VENDORID</COL6>

        </COL>

      - <POCONTRACT>

             <DISPLAY_NAME>0020000011</DISPLAY_NAME>

              <DOC_DESCRIPTION>Electrode Esab OK4600x2.5mm</DOC_DESCRIPTION>

             <EXTERNAL_ID>0020000011</EXTERNAL_ID>

             <TNB_TOTALVALUE>"20.00 MYR"</TNB_TOTALVALUE>

             <TNB_VENDORNAME>SYARIKAT MIZUN</TNB_VENDORNAME>

             <TNB_VENDORID>SG000175</TNB_VENDORID>

        </POCONTRACT>

         <FNAME>PO_DET_</FNAME>

         <FDIR>PO</FDIR>

        </ns0:MT_CLM_POCONTRACT_RESP_IB>

       

      Communication Channel - Content Conversion

       

      Recordset Structure = HEADER,COL,POCONTRACT,FNAME,FDIR

       

      **i want to remove FNAME,FDIR structure

       

      Content Conversion Parameter

       

      HEADER.endSeparator = 'nl'

      HEADER.fieldSeparator = ,

      COL.endSeparator = 'nl'

      COL.fieldSeparator = ,

      POCONTRACT.endSeparator = 'nl'

      POCONTRACT.fieldSeparator = ,

      FNAME.fieldFixedLengths = 0

      FNAME.fixedLengthTooShortHandling = Cut

      FDIR.fieldFixedLengths = 0

      FDIR.fixedLengthTooShortHandling = Cut

       

      unfortunately still same result as the first one. No Error & FNAME & FDIR still exist

      • Re: Content Conversion-Ignore Fields
        Sep Gong
        Currently Being Moderated

        Do you try to change as

        Recordset Structure = HEADER,COL,POCONTRACT,FORMAT


        FORMAT.fieldFixedLengths = 0,0



        FORMAT.fixedLengthTooShortHandling = Cut

        • Re: Content Conversion-Ignore Fields
          firdaus hashim
          Currently Being Moderated

          hi Sep Gong,

           

          I'm try with

          Recordset Structure = HEADER,COL,POCONTRACT,FNAME,FDIR

           

          **i want to remove FNAME,FDIR structure

           

          Content Conversion Parameter

           

          HEADER.endSeparator = 'nl'

          HEADER.fieldSeparator = ,

          COL.endSeparator = 'nl'

          COL.fieldSeparator = ,

          POCONTRACT.endSeparator = 'nl'

          POCONTRACT.fieldSeparator = ,

          FNAME.fieldFixedLengths = 0,0

          FNAME.fixedLengthTooShortHandling = Cut

          FDIR.fieldFixedLengths = 0,0

          FDIR.fixedLengthTooShortHandling = Cut

           

          & the result still same with No Error.

          • Re: Content Conversion-Ignore Fields
            Sep Gong
            Currently Being Moderated

            Sorry , i mean try the case. 

             

            <?xml version="1.0" encoding="UTF-8" ?>

            - <ns0:MT_CLM_POCONTRACT_RESP_IB xmlns:ns0="http://tnb.com.my/xi/APPL/eSourcingIntegration">

            - <HEADER>

                   <NAME>#DataType[userdefined.md3]</NAME>

              </HEADER>

            + <COL>

              <COL1>DISPLAY_NAME</COL1>

                   <COL2>DOCUMENT_DESCRIPTION</COL2>

                   <COL3>EXTERNAL_ID</COL3>

                   <COL4>TNB_TOTALVALUE</COL4>

                   <COL5>TNB_VENDORNAME</COL5>

                   <COL6>TNB_VENDORID</COL6>

              </COL>

            - <POCONTRACT>

                   <DISPLAY_NAME>0020000011</DISPLAY_NAME>

                    <DOC_DESCRIPTION>Electrode Esab OK4600x2.5mm</DOC_DESCRIPTION>

                   <EXTERNAL_ID>0020000011</EXTERNAL_ID>

                   <TNB_TOTALVALUE>"20.00 MYR"</TNB_TOTALVALUE>

                   <TNB_VENDORNAME>SYARIKAT MIZUN</TNB_VENDORNAME>

                   <TNB_VENDORID>SG000175</TNB_VENDORID>

              </POCONTRACT>

            - <FORMAT>

                  <FNAME>PO_DET_</FNAME>

                  <FDIR>PO</FDIR>

              </FORMAT>

              </ns0:MT_CLM_POCONTRACT_RESP_IB>

             

            and in channel, configurate like this:

            Recordset Structure = HEADER,COL,POCONTRACT,FORMAT


            FORMAT.fieldFixedLengths = 0,0

            FORMAT.fixedLengthTooShortHandling = Cut

  • Re: Content Conversion-Ignore Fields
    Shabarish Vijayakumar
    Currently Being Moderated

    one of the reasons why i recommend Dynamic configuration Have you tried using that?

     

    scn.sap.com/community/pi-and-soa-middleware/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

Actions