on ‎2004 Nov 28 2:52 PM
Hello,
I use this scenario flat file -> XI -> IDOC.
I have configured the parameters of the file adapter for converting the flat file into an intermediate xml structure used for a mapping. I want to map this structure to the IDOC FIDCCP01.
So for example for a flat file with two lines i have the intermediate structure :
<?xml version="1.0" encoding="utf-8" ?>
<ns:PAIE xmlns:ns="http://sap.com/xi/flat">
<MASTER>
<LINE>
<Code_Mouvement>CA</Code_Mouvement>
<Num_Trait_CPT>000001</Num_Trait_CPT>
<Code_Monnaie>E</Code_Monnaie>
<Code_Enregistrement>Z2M</Code_Enregistrement>
<Date_Paie>0804</Date_Paie>
<Journal>SAL</Journal>
<Folio>01</Folio>
<DJF>D</DJF>
<Jour_Ecriture>31</Jour_Ecriture>
<Num_Compte>4487100</Num_Compte>
<Num_Imputation>921110000000</Num_Imputation>
<Debit>0000000309063</Debit>
<Credit>0000000293486</Credit>
<Libelle_Compte />
<Num_Matricule />
<Num_Analytique>6328100</Num_Analytique>
<Ref_Logistique>JA</Ref_Logistique>
<No_Ref_Comptable />
<Ref2_Comptable />
<Num_DTR>0195</Num_DTR>
<Num_ZADIG>041014</Num_ZADIG>
<ABG>B</ABG>
<Filler />
<Siecle>20</Siecle>
</LINE>
<LINE>
<Code_Mouvement>CA</Code_Mouvement>
<Num_Trait_CPT>000001</Num_Trait_CPT>
<Code_Monnaie>E</Code_Monnaie>
<Code_Enregistrement>Z2M</Code_Enregistrement>
<Date_Paie>0804</Date_Paie>
<Journal>SAL</Journal>
<Folio>01</Folio>
<DJF>D</DJF>
<Jour_Ecriture>31</Jour_Ecriture>
<Num_Compte>4487100</Num_Compte>
<Num_Imputation>921120000000</Num_Imputation>
<Debit>0000000148862</Debit>
<Credit>0000000140545</Credit>
<Libelle_Compte />
<Num_Matricule />
<Num_Analytique>6328100</Num_Analytique>
<Ref_Logistique>JA</Ref_Logistique>
<No_Ref_Comptable />
<Ref2_Comptable />
<Num_DTR>0195</Num_DTR>
<Num_ZADIG>041014</Num_ZADIG>
<ABG>B</ABG>
<Filler />
<Siecle>20</Siecle>
</LINE>
</MASTER>
</ns:PAIE>
Now, i want to map this structure to the FIDCCP01 IDOC structure so for that i have imported the FIDCCP01 structure and what i want as result is one instance of FIDCCP01 with multiple instance of the IDOC record, for example :
<FIDCCPO1>
<IDOC>
<EDI_DC40>
....
</EDI_DC40>
<E1FIKPF>
....
</E1FIKPF>
</IDOC>
<IDOC>
<EDI_DC40>
....
</EDI_DC40>
<E1FIKPF>
....
</E1FIKPF>
</IDOC>
</FIDCCPO1>
If you see the DTD of any IDOC you have the definition of the IDOC record : (IDOC+) so it's possible to create multiple record IDOC in one instance of FIDCCP01 and for information i have already do that in the past with the business connector but after importing the FIDCCP01 defintion in the Integration Repository the defintion of the occurences of the IDOC record is 1..1 and i don't understand why ? and with this definition what i want to do is not possible, so what can i do ?
Regards
Vincent
Request clarification before answering.
Hi Vincent,
Did you set the File to IDoc senarios? I am doing the same senarios where I had changed IDOC occurance and mapped source file to IDOC multiple times but I am not sure to the functionality. You did in the same way or applied BPM? Please help me. Thanks.
Regards,
PKT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vincent,
At the start of our project we had also this problem, we solved it using custom Java classes and/or XSLT mappings.
When using one of these approaches, you are free to manipulate the output of your mapping the way you want (i.e. multiple IDOC elements). The IDOC adapter will accept the multiple IDOC elements and send them as IDOCs via RFC to R/3.
Regards,
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all,
I think that the best solution is to use xsl because if i modifie the wsdl of the IDOC the good part is that i can create one instance of a document with multiple instance of the IDOC segment but the bad part is if i want to create multiple instance of another sub-segment with different value so i have to duplicate this segment in the mapping tool and it is forbidden to do that because the mapping tool check the definition of the structure against the wsdl.... .
But why the R/3 doesn't generate a valid xsd as the DTD ?
Is it a bug from SAP ?
regards
Vincent
Dear Vincent:
Just a couple of comments.
1) You're doing something interesting with the EDI_DC40 segment by createing multiple instances of it in one IDOC? Based on the documentation you can only have one DC40 per IDOC:
Control record
General
IDoc control record for the IDoc interface of the SAP System R/3 to an external system.
The control record for Release 4.0 has the structure EDI_DC40. Each IDoc is initiated by exactly one control record. The record contains control information about outgoing and incoming IDocs as well as their processing in the SAP system and an external system.
2) You can generate a DTD for your IDOCS by navigating to WE60. (Props to Simon Scott for this tip.)
Then enter your IDOC or Z/Y IDOC and click "Documentation" --> Create DTD. With this interface definition, you can upload it to your XML editor do as you please then generate XSD for the upload to XI.
Cheers,
james
Hi VIncent,
The occurrence cannot be changed. You can download the WSDL from the IDOC, change the WSDL and upload the modified WSDL as external definition.
Be carefull, in XI 3.0 the 1-N mapping can only be done using message types, This is very strange but apparently needed!
Besides this you need a Business Process to split the XML file in more messages!
Kind regards,
Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.