cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion in Receiver Adapter

Former Member
0 Kudos

Hi!

I have an XML with the following structure :


<CHA>
  <field1>value1</field1> 
  <field2>val2</field2>
</CHA>

I want the following result :


value1;val2

My content conversion parameters are :


Recordset structure : CHA
CHA.fieldSeparator = ;
CHA.fieldFixedLengths = 6,4

But no value in my output file.

Any idee of the reason?

Thanks in advance,

Laurence

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

<i>Recordset structure : CHA

CHA.fieldSeparator = ;</i>

These parameters are enough.

You do not need <i>CHA.fieldFixedLengths = 6,4</i>

Regards

Bhavesh

Former Member
0 Kudos

I have the same problem (no value in my output file) when I do not set the parameter "CHA.fieldFixedLenghts".

In SAP help, the document structure sample is the following :


<root>
   <nameA>
      <value1>value</value1>
      <value2>value</value2>
      <value3>value</value3>
   </nameA>
   <nameB>
      <value4>value</value4>
   </nameB>
</root>

In my case, I have only 1 level (CHA) instead of 2 levels (root and nameA/nameB).

Maybe is that the problem?

Kind regards,

Laurence

Former Member
0 Kudos

you need to add follwoing to our input file adapter content conversion

<CHA>.ignoreRecordsetName value:ture.

Regards

Sreeram.G.Reddy

null

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,.

try with these vales,

CHA.addHeaderLine = 0
CHA.fieldSeparator = ;
CHA.endSeparator = 'nl'

nl is 'nl' (within single Quotes.)

Also, if it still doesnt work can yhou let us know what the error in your Recieevr File Adapter is?

Regards

Bhavesh

Former Member
0 Kudos

always the same problem with CHA.ignoreRecordsetName set to true...

Kind regards,

Laurence

Former Member
0 Kudos

can paste yur input XML here from SXMB_MONI payload . what is the error you are getting in adapter .

or it creating blank file with out values.

you need compare XML from your test tab of mapping and XML from SXMB_MONI both should be "EXCATLY SAME".

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

It still doesn't work... and no error in Receiver File Adapter (I have checked the audit log).

bhavesh_kantilal
Active Contributor
0 Kudos

Launrence,

You would have surely got some Log.

I hope you are looking into Communication Channel Monitoring.

If not , check MONI and see if entries are available for the file.

Check the ooutput of the mapping and let us know how it looks.

Regards

Bhavesh

Former Member
0 Kudos

In transaction SXI_MONITOR, the status of the message is "Processed successfully" and the value of XML Message -> Technical Routing -> Payloads -> MainDocument is the following :


<?xml version="1.0" encoding="UTF-8" ?> 
<CHA>
  <Entete>CHA</Entete> 
  <Usine></Usine> 
  <CodeTransmission>1</CodeTransmission> 
  <LieuChargement></LieuChargement> 
  <Filler2></Filler2> 
  <NumeroWagon>318235174340</NumeroWagon> 
  <EtatChargement></EtatChargement> 
  <Produit>PALP</Produit> 
  <ChargeLimite>TODO</ChargeLimite> 
  <PoidsTheorique>TODO</PoidsTheorique> 
  <TolerancePlus>282</TolerancePlus> 
  <ToleranceMoins>282</ToleranceMoins> 
  <pre><code></code></pre> 
  <pre><code></code></pre> 
  <WagonChocAvant></WagonChocAvant> 
  <WagonChocArriere></WagonChocArriere> 
  <Filler12></Filler12> 
  <TrainComplet>0</TrainComplet> 
  <EtatWagon>00</EtatWagon> 
  <DatePesage>20070223</DatePesage> 
  <PostePesage>1</PostePesage> 
  <CodePesage>00</CodePesage> 
  <CodeReseau></CodeReseau> 
  <CodeGare></CodeGare> 
  <NumeroControle></NumeroControle> 
  <Filler1></Filler1> 
</CHA>

When I check in the Communication Channel Monitoring, I have no error, only the following :


2/23/07 3:50:27 PM 45de0e889cb94264e10000000a1a073c Processing finished successfully 
2/23/07 3:50:27 PM 45de0e889cb94264e10000000a1a073c Message with ID 45de0e88-9cb9-4264-e100-00000a1a073c processed 
2/23/07 3:50:27 PM 45de0e889cb94264e10000000a1a073c Processing started

If I clic on the message id, I get the following audit log, always without error :

2007-02-23 15:50:26 Opération effectuée Le message a été reçu par le système de messagerie. Profil : XI URL : http://dev01:51900/MessagingSystem/receive/AFW/XI justificatif d'identité (User): PIISUSER

2007-02-23 15:50:26 Opération effectuée Avec la connexion File_http://sap.com/xi/XI/System. Tentative de placement du message dans la file d'attente de réception

2007-02-23 15:50:26 Opération effectuée Message mis en file dattente

2007-02-23 15:50:26 Opération effectuée Le message a été récupéré depuis la file dattente de réception.

2007-02-23 15:50:27 Opération effectuée Le statut du message a été activé sur DLNG

2007-02-23 15:50:27 Opération effectuée Livre au canal : CC_RADIS_CHA_FileReceiver

2007-02-23 15:50:27 Opération effectuée Récepteur de l'adaptateur des fichiers saisi: Traitement lancé. QoS requis : ExactlyOnce

2007-02-23 15:50:27 Opération effectuée Canal récepteur adaptateur des fichiers CC_RADIS_CHA_FileReceiver : Lancer traitement : parten. , service BS_RADIS_RECEIVER saisis

2007-02-23 15:50:27 Opération effectuée Écriture sur le serveur FTP ..., répertoire "/interfaces/testxi/RADIS/CHA", "->" fichier "CHA20070223-155027-076.txt"

2007-02-23 15:50:27 Opération effectuée Transfert : mode "TXT", taille 920 octets, codage caractères UTF-8

2007-02-23 15:50:27 Opération effectuée Début de la conversion du contenu du document XML en texte brut.

2007-02-23 15:50:27 Opération effectuée Traitement du fichier terminé

2007-02-23 15:50:27 Opération effectuée Le message a été diffusé vers l'application via File_http://sap.com/xi/XI/System.

2007-02-23 15:50:27 Opération effectuée Le statut du message a été activé sur DLVD

The output flat file is well created but contains only 26 carriage returns (= number of fields), instead of the value of the 26 fields...

bhavesh_kantilal
Active Contributor
0 Kudos

Laurence,

The problem is you need another ROOT node compulsorily,

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

<b><ROOT></b>

<CHA>

<Entete>CHA</Entete>

<Usine />

<CodeTransmission>1</CodeTransmission>

<LieuChargement />

<Filler2 />

<NumeroWagon>318235174340</NumeroWagon>

<EtatChargement />

<Produit>PALP</Produit>

<ChargeLimite>TODO</ChargeLimite>

<PoidsTheorique>TODO</PoidsTheorique>

<TolerancePlus>282</TolerancePlus>

<ToleranceMoins>282</ToleranceMoins>

<PremiereDestination />

<PremierDestinataire />

<WagonChocAvant />

<WagonChocArriere />

<Filler12 />

<TrainComplet>0</TrainComplet>

<EtatWagon>00</EtatWagon>

<DatePesage>20070223</DatePesage>

<PostePesage>1</PostePesage>

<CodePesage>00</CodePesage>

<CodeReseau />

<CodeGare />

<NumeroControle />

<Filler1 />

</CHA>

<b></ROOT></b>

Add this and it will work fine.

Regards

Bhavesh

Former Member
0 Kudos

you need to change your input structre i.e. our data type.

Add Root element make it 1..1 occurance and

under roor add CHA make it 1.. unbounded and reamining thing same as it is our fields.

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

HI,

As explained above if possible add all under one record set..and cha should be multiple occurrence..

Record set -- Newly added root,

record structure : cha,*

plz check did you have the input file with ; seperated ..??

if yes..

clear all processing perameters: try the below perameters

CHA.fieldfixedlengths : give exact lengths.. with ,

CHA.fieldNames : give exact field names in capital

CHA.processFieldNames : fromConfiguration

Please let me know ...the status

Regards

Chilla..

Former Member
0 Kudos

what is ur target structure and reciver file adapter content conversion parameters

Regards

Sreeram.G.Reddy

Message was edited by:

Sreeram Reddy

Former Member
0 Kudos

Laurence

i dont see the namespace for this

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

<CHA>

it should be something like this

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

<ns0:BAPI_COMPANY_GETDETAIL.Response xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<COMPANY_DETAIL>

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

indeed... with one level more, it works.

Thanks!

But it is a pity to have to change the XSD.

I would prefer to keep my first structure...

Former Member
0 Kudos

as your chaning the root element so you need to make whole XSD changes

please reeard points

Regards

Sreeram.g.Reddy

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

is it the same record set name and record structure name .

Plz check..And also occurrences for record set / record structure..

Please see the below links for content conversion..

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC

/people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario - FCC - MDM

/people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp - FCC

/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - FCC

/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter - EOIO - File

Regards

Chilla..

Former Member
0 Kudos

can you check in your mapping by taking the message from SXMB_MONI payload

and paste in test tab and see if your target elements are generated.

if target elements are not generated then their some problem in your mapping

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

Already checked, message mapping is right