Problem Mapping FTP to IDoc

Hi well i have following incoming structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_EPOSYS xmlns:ns0="http://XXX">
   <EPORecordSet>
      <EPOFileHeader>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>T</BDART>
         <TEXT>Bestellung</TEXT>
      </EPOFileHeader>
      <EPOFileHeader>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>T</BDART>
         <TEXT/>
      </EPOFileHeader>
      <EPOFileHeader>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>T</BDART>
         <TEXT>4510</TEXT>
      </EPOFileHeader>
      <EPOFilePos>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>S</BDART>
         <BDIDENT>000000000050504200</BDIDENT>
         <BDMENGE>0000002</BDMENGE>
      </EPOFilePos>
   </EPORecordSet>
</ns0:MT_EPOSYS>
this one should be mapped into IDoc Structure:
<ZBC11_EPOSYS_HEADER SEGMENT="">
         <KUNNR>0000007531</KUNNR> [ = BDKDNR]
         <BDART>T</BDART> [= BDART]
         <DATA>1</DATA> [ = TEXT]
         <ZBC11_EPOSYS_POSITION SEGMENT="">
            <BDKDNR>0000007531</BDKDNR>
            <BDART>S</BDART>
            <MATNR>000000000050504200</MATNR>
            <MENGE>0000002</MENGE>
         </ZBC11_EPOSYS_POSITION>
      </ZBC11_EPOSYS_HEADER>
   </IDOC>
</ZBC11_EPOSYS>
where it should be mapped to the fields in the brackets [].
Incoming occurence (File):
<EPOFileHeader> occurence should be 1...9
and <EPOFilePos> has occurence 0..9999999
Target Structure Occurence:
<ZBC11_EPOSYS_HEADER SEGMENT> 1..9
one level down:
<ZBC11_EPOSYS_POSITION SEGMENT=""> 1..9999999
so that there should be no problem to map several Header data and FilePos-Data to the IDoc structure.
Problem is that XI only takes one header and map all the FilePos-data right. But how to configure the mapping that the Header of the IDocs takes more than one incoming header and following FilePos-Data?!
Can somebody help me?!
br Jens

Hi Jens,
>>Problem is that XI only takes one header and map all the FilePos-data right. >>But how to configure the mapping that the Header of the IDocs takes more than >>one incoming header and following FilePos-Data?!
i couldn't understand what do you mean by <b>XI only takes one header</b>.
Do you mean IDOC occurrence 1..1,if yes then
  export imported IDOC as external definition,
  Change IDOC occurrence as per your requirement and
  import modified IDOC as external definition in IR.
Thanks,
Jag

Similar Messages

  • Mapping to an IDOC using an externally created XSL file

    I want to map a message to an IDoc using an ABAP XSLT transform. I am creating the XSLT in an external tool.
    I need to use an XSD definition of the IDOC as the target document of the mapping. I can get that in two ways:
    1) Get the XSD definition of the IDOC from transaction WE60 and use the menu command 'Documentation -> XML Schema'
    2) In the Integration Repository, export the XSD of the imported IDOC.
    The problem is, there are significant syntax differences between these versions, and I don't know which is the correct version. For instance, the XSD exported from the Integration Repository has a mandatory attribute 'SEGMENT' for each segment that must be filled to create a valid XML message; this is not the case when the XSD definition is created in WE60.
    Can somebody advise which is the correct version to use?

    Hi Anthony,
    This is really strange...
    In both case XSD should be same...can you please tell for which idoc you are generating xsd?
    Eventhough if you generate XML Schema using WE60,  mandatory attribute 'SEGMENT' for each segment has to be there....this validation would be done while posting idoc. It will check for all mandatory fields.
    I have some different thoughts that what wojciech has suggested...
    "If were your shoes I would use xsd from integration repository because that's the expected result...."
    But final goal is not to achieve mapping but posting idoc with proper data in R/3 system successfully.
    Your second question..
    "Do I assume then that placing a constant value of 1 in the SEGMENT attribute is just to satisfy the validation of the XML message against the XSD:..?
    ummm...I think if you assign constant "1" to segment it will generate that segment while creating idoc. Its mandatory to assign constant value to segment which you want to generate...
    "Can I assume that the IDoc adapter will fill the SEGMENT attribute with the correct value?.."
    I dont think so Idoc adapter will fill this attribute automatically...you need to assign constant to field segment.
    Nilesh

  • Problems mapping 2 messages into 1

    Hi.
    I'm facing a problem mapping 2 messages into 1.
    I have a BPM that has 2 abstract messages. In a transformation step, i transform this two messages into one but when i check the IDOC that finally has arrived to R3 backend, the fields that belogns to one of the source messages doesn't appear.
    In message mapping i select the two source messages and the target message and the same in interface mapping.
    Because is a transformation step inside the BPM, i can't see in SXI_MONITOR what's happening.
    any idea of what's happening?
    Regards.
    Inigo.

    Inigo,
    Though its in BPM u can where well test the transformation mapping
    wht are the messages going in what is coming out
    Check How to monitorcc BPM
    https://websmp206.sap-ag.de/~sapdownload/011000358700003141152005E/HowToMonitorccBPM.pdf
    This PDF is very handy
    Regards
    Kavitha

  • Problem in generating an IDOC from Output type

    Hi Experts,
    I am trying to generate an IDOC of basic type "OILSHI01" using the custom output type. in my scenario the output type gets issued , but IDOC does not get generated , i have checked the configuration in NACE transaction .
    Can you please help me understand what can be other reason why this IDOC does not get generated?
    Regards,
    AshiSh Shah

    Hello,
    Did you try to debug the idoc generation program & where it fails to put together the internal data into IDoc?
    That should help you identify problem.
    If  configuration settings is correct ,port settings are correct & partner profiles are correctly mapped for necessary Idoc creation,it should work.
    Hope this helps.
    Thanks.

  • Message Mapping - JDBC to IDoc

    Hi,
    I trying to map the resultset from a JDBC adapter (sender) to Inbound IDoc into SAP. I have problems with message mapping and after reading through a number of threads, I followed the following steps:
    1. Download the IDoc definition as XSD.
    2. Change occurrence of node IDOC to 1..unbounded.
    3. Upload changed XSD as external definition and
    4. use the external definition in the mapping.
    After importing the external XSD definition the IDOC node turned red. How do I map this node, now that it is  unbounded?
    Example from Message mapping:
    MT_ETA_RMX................ZSDETA01
    ..EtaNode........................IDOC     (unbounded =  RED)
    ....CARID.................................BEGIN
    ...............................................EDI_DC40
    ...............................................Z1RETA
    .................................................SEGMENT
    .................................................CARID
    Thanks,
    Henk

    Hendrik,
    whichever data record is occuring multiple on your sender JDBC message should be mapped to IDoc segment. It really depends on your JDBC message structure.
    If EtaNode is occuring multiple times, and if based on EtaNode an IDoc has to be created, map that to IDOC and if per every CARID one idoc needs to be created, then use CreateIf and exists node functions to IDoc.
    regards
    SKM

  • Problem to concatenate data (IDOC)

    Hi experts,
    I am facing the following problem :
    i'm designing IDOC to JDBC scenario. On the source message of my mapping, I have the segment E1KNVVL of my idoc that contains the data TDLINE (the occurence of the segment is 0...9999). The problem is that I would like to concatenate all the TDLINE together if they exist.
    Example :
    I have one segment KNVVL that contains abc in TDLINE.
    I have a second segment KNVVL that contains def in TDLINE.
    I would like to have abcdef in my target message.
    The problem is that def does not always exist or can exist several times.
    I could not figure out the right conditions, I even tried java mapping but did not work.
    Any help would be greatly appreciated,
    Regards,
    Jamal

    use the below graphical mapping
    TDLINE->remove context->add  -
    >targetmessage
    KNVVL----
    >
    here add is the udf which has 2 inputs
    1) TDLINE(use remove context node function after TDLINE)
    2) KNVVL
    add
    use cache parameter context
    public void add(String () a,String () b,ResultList result,Container container)
    String c = " ";
    for(int i=0;i<b.length;i++)
      c = c + a(i) + " ";
    result.addValue(c);
    Edited by: malini balasubramaniam on Jul 31, 2008 11:14 AM
    Edited by: malini balasubramaniam on Jul 31, 2008 11:18 AM

  • Problem with FTP Adapter in creating a new Folder

    Hi all,
    I have a requirement in which a BPEL process shud create a folder named as sysdate dynamically and write a
    CSV file into that.(ex: PO/2010-03-09/PO_1.csv).I created a header variable for Oubound FTP adapter and
    passing the file directory as concat('PO/',xp20:current-date(),'/') to outbound header directory variable.Problem is FTP
    adapter is not creating the sysdate folder its says:1.check u have privileges 2.file name is too long....Blah....Blah.
    But i have all the privileges for that user.If i manually create the sysdate folder the FTP adapter is placing the CSV
    file.The same works fine with file adapter...but i need to use FTP since the FTP server can change in future.Seems to
    be a problem with FTP adapter....can some one help.
    Iam using SOA 10.1.3.4
    Regards,
    Edited by: 0racler on Mar 9, 2010 4:46 AM
    Edited by: 0racler on Mar 9, 2010 5:49 AM

    any thoughts????

  • Problem mapping USB external drive connected to Airport Extreme on my PC

    I am having a problem mapping my USB external drive in my PC running WIndows Vista.   Here is what I have so far:
    USB External Drive connected to my AirPort Extreme which is connected to my Century Link modem/router.
    I have installed the USB drive using the Airport Utility.  In the Disks section the Enable File Sharing is checked, Secure Shared Disks is set to With a Disk Password, I have entered the password in the next 2 rows, and finally AirPort Disks Gues Access is set to Not Allowed.  The section below named These Settings Configure Windows File Sharing is empty.  Am I supposed to put something here?
    I was also told I need to map the drive in my PC, but when I go to do that via the Computer and the Map Network Drive, I get stuck where it asks me to enter a folder name.  I read many of the posts which tell me I need to enter among other things the disk's ip address, but I am unable to find it anywhere.  Where do I find what to put here?
    Can someone please help this frustrated user?

    I had my USB drive on my APE working with Time Machine under 10.5.1 very reliably. A few days ago however, I needed to suspend a backup operation, and when I came back to restart it, time machine refused to mount the disk image on the drive. After several attempts to get it to connect with no luck I decided to delete the image (the sparce image file) and start over. Now TM refuses to create a new image.
    BTW, on the Mac OSX hints site there have been suggestions to start a backup with the drive directly connected, then stop the backup, move the sparce image file to the root of the drive, reconnect the drive to the APE base station to get it working. I tried this again, but I think Apple has changed something in 10.5.2, because when directly connected TM no longer creates a sparce image file.
    Anybody else seen this behavior after upgrading to 10.5.2?

  • Problem in FTP adapter ( Duplicate)

    Hi all,
    We have a composite that query the events from Oracle on demand CRM. Event contains key column which is used to fetch all related values.
    Using FTP adapter, we are placing the file in SAP and also one copy using file adapter in our local server for our reference.
    Problem :
    SAP is receiving two files in their inbound folder at same time stamp for one transaction.
    But in our local server, we are receiving one file only.
    So we isolated the problem to FTP adapter.
    When we analyzed the process and its audit trail, everything looks fine and FTP operation is called one time only.
    We are clueless regarding this problem.
    Also same interface works well in Production instance. We even tried deploying new composite that is freshly downloaded from Production.
    We need this to fix this by Wednesday as UAT begins in Test environment and that needs this interface to work fine.
    We have clustered environment and 2 SOA servers.
    Please someone help us identifying the problem. Its very urgent
    Thanks,
    Sundar

    Hi it may be the problem with the environment. Try adding the property <property name ="singleton">true</property name> in the composite.xml for the FTP adapter or at the server level.
    Swami

  • Mapping issue in idoc to JDBC scenario

    mapping issue in idoc to JDBC scenario
    source structure
    E1KNB1M
      BUKRS = 1000
    E1KNB1M
      BUKRS=  9000
    E1KNB1M
      BUKRS=  2000
    THE NODE E1KNB1M is repeated many times and the field BUKRS is also repeated with E1KNB1M as above
    TARGET field : ISFRANCHISE
    if any where value of BUKRS =9000 we have to pass Y to the target filed, else N
    if BUKRS = 9000   THEN ISFRANCHISE= Y
                   ELSE
                ISFRANCHISE=N
    I've done the mapping as below
    BUKRS = 9000--> IF THEN Y ELSE N--
    > ISFRANCHISE
    BUT everry time the target value is N only
    pl suggest
    rgds
    mojib

    mapped like this
    BUKRS--->SORT---->
                                                 EQUALS --------IF---THEN    Y
    9000------------------------>                                               ----------------->ISFRANCHISE
                                                                  ELSE   N
    context of BUKRS set to parent node
    its worked
    thanks to all for valuable suggestions
    rgds
    mojib

  • Problem in processing incoming IDOC

    Hi All,
    I have a problem while processing Incoming IDOC in the system.
    While I try to process and FI IDOC (without purchase order) in the system, by giving the appropriate GL account and cost centre where the document should get posted to (in transaction WE19), I find that the system creates the IDOC successfully with status 53. However, it creates a parked document in the system for the vendor.
    When I try to post the document through transaction FBV0, the system asks for a cost centre. Can you please clarify, why the system is asking for a cost object though it is given in WE19 transaction. Ideally while processing the IDOC the system should post the document directly as it has all the relevant details in the IDOC right?
    (Just for info, I have given the GL account details in segment E1EDP19 with qualifier 002 and the cost centre in segment E1EDP30 with qualifier 045)
    Expecting your help in this regard.
    Regards
    Nagarajan N

    Hi
    You can use WE19 to debug the Idoc FM.
    Check this link if it is helpful:
    Debugging Idocs
    Regards
    Neha

  • Mandatory fields  for mapping in ORDERS idoc.

    Hi
    I m working on File to idoc scenario for creation of sales order in ECC 6.0 , now I want to know what are the mandatory fields in ORDERS idoc which needs to be populated or else disbaled so that the sales order gets created properly in the ECC 6.0..
    Pl let me know the method of finding mandatory field for mapping for  any idoc  and which fileds of idoc are to be disabled.
    Pl help ..
    ans will be rewarded .
    thanks & rgds
    mojib

    HI,
    U can disable the control record segment and in the IDOC adapter use the option apply control record from payload.
    If you have set the Apply Control Record Values from Payload indicator in the receiver IDoc adapter, the following fields are filled from the IDoc-XML payload:
    ·        MESCOD
    ·        MESCFT
    ·        TEST
    ·        EXPRSS
    ·        STD
    ·        STDVRS
    ·        STDMES
    ·        SNDSAD
    ·        SNDLAD
    ·        RCVSAD
    ·        RCVLAD
    ·        REFINT
    ·        REFGRP
    ·        REFMES
    ·        STATUS
    ·        DIRECT
    ·        OUTMOD
    ·        CREDAT
    ·        CRETIM
    read the information in below link:
    http://help.sap.com/saphelp_nw70/helpdata/EN/ab/bdb13b00ae793be10000000a11402f/frameset.htm
    thnx,
    chirag

  • Mapping issue: FCC: Idoc for each record in file

    Hi,
    I have file to Idoc scenario.
    I receive csv file with multiple records.
    The requirement is to create an Idoc for each record.
    For eg.
    source file
    A1,B1,C1
    A2,B2,C2
    A3,B3,C3
    After FCC
    <MT>
    <TRANS>
    <ROW>
    <A>A1</A>
    <B>B1</B>
    <C>C1</C>
    </ROW>
    <ROW>
    <A>A2</A>
    <B>B2</B>
    <C>C2</C>
    </ROW>
    <ROW>
    <A>A3</A>
    <B>B3</B>
    <C>C3</C>
    </ROW>
    </TRANS>
    <MT>
    I have first tested it with only 1 record to test end to end connectivity. It works as expected and Idoc is posted to target system.
    Now when I am trying to send multiple records, I am getting some issues.
    Below are the steps that I have taken to process multiple records:
    1. Changed the cardinality of ROW (child of RecordSet) from 1 to Unbounded.
    2. Changed the occurance of Idoc to Unbounded.
    3. Mapped ROW to Idoc root.
    I have tested the mapping in IR and it generates multiple IDOCs.
    When I send the test file, it fails with error Tag found instead of tag IDOC BEGIN=
    I can see the xml message created with multiple ROWs in XI by File adapter in sxmb_moni.
    When I do Test Configuration in ID, with the XML message extracted from sxmbmoni, the result that I got was:_
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1></ns0:Message1></ns0:Messages>
    This means that idoc was not created while mapping.
    But the same sample message works OK in IR!
    Pls help where I have missed.
    Regards,
    Anirudh.

    Sudhir,
    Thanks for your response.
    FCC is working fine. I have taken the XML message in XI created after FCC from csv sample message.
    I have tested this message in IR by placing it between
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
    </ns0:Message1>
    </ns0:Message>
    It is working fine and Idocs are created in mapping in IR.
    But the same sample message is creating below output ID!
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1></ns0:Message1></ns0:Messages>
    Regards,
    Anirudh.

  • Problems in file to idoc scenario

    hi all
    I am doing file to IDOC Scenario. In that I am getting the successful message but the Fields which I mapped to the IDOC is not populated in the IDOC.
    In message mapping also it was showing the same thing. when I entered the fields of the file manually it was coming into the idoc and if i gave any file then it was not populated.
    Can any one help us.
    Regards
    Vasu

    Hello
    For that u will have to change the occurunces in messages tab in mappings and do a split by value in mappings to generate 4 different messages.
    secondly i hope ur using BPM for the same. in that case u can use parForEach to post 4 IDocs at a time.
    regards
    rajeev

  • Problem with HR inbound IDoc

    Hi,
    I have a problem with processing inbound IDocs from an external payroll system to infotype 0008.  The process is quite simple; salary changes from the payroll system is recorded to the corresponding employee's infotype 0008.  When testing I noticed that that the new record is recorded as is.  For example if there is already an existing record with the validity dates 01.01.2010 - 31.12.9999 and the new record in the IDoc is 01.01.2011 - 31.12.9999, the new record is written as is.  I would expect the system to delimit the old record correctly - similar to what would happen if you maintain records online.  There is no error checking or any kind of processing done by the system. 
    I did some debugging and found out that the function module linked to process code HRMD writes the information directly to the database.  If this is a standard way of doing this, it is really unusual.
    Has anybody else encountered this?  Any pointers?
    Thanks.
    Edited by: Theo Droste on Jan 20, 2011 11:56 AM

    Hi
    This is correct, the ale programme writes the data directly to the database, I have faced this isssue on occassion. I once raised an oss message on this as well, and sap confirms this is what happens. If it is a sap to sap ale, it somehow seems to work, - this could be because the outgoing idocs are created by sap itself  but if it is a non sap to sap ale the onus is on us to ensure that the external system sends the correct data to sap in the way we intend it to be displayed.
    that is how it has been in my experience. It is unusual, but apparently not impossible. Please let us know if you find out anything different.

Maybe you are looking for