Skip to Content
author's profile photo Former Member
Former Member

IDOC mapping issue

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" ?>

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Nov 29, 2004 at 08:43 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2004 at 09:03 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2005 at 08:05 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.