File to IDOC - multiple source fields to 1 field

Hello,
I implement scenario from file to IDOC.
In source side I have 2 fields (in different levels) that I want to map to 1 field in the IDOC.
Is it possible to do it? And how?
Regards
Elad

Hello,
The sorce file is xml:
<?xml version="1.0" encoding="UTF-8"?>
<PLM_Out_MT>
   <Quotation/>
   <TransactionHeader>
      <TransDateTime/>
      <Sender/>
      <Receiver/>
   </TransactionHeader>
   <QuotationHeader>
      <DocTyp/>
      <ContractNo/>
      <PurcNo/>
      <PurcDat/>
      <ValToDate/>
      <GenHeadText/>
      <PlmUser/>
   </QuotationHeader>
   <QuotationLines>
      <QuotationLine>
         <ItemNum/>
         <ItemCat/>
         <Quantity/>
         <ReqDelDate/>
         <OrgReqDate/>
         <Version/>
         <QuotationTexts>
            <QuotationText>
               <TEXT_ID/>
               <TEXT_LINE/>
            </QuotationText>
         </QuotationTexts>
      </QuotationLine>
   </QuotationLines>
</PLM_Out_MT>
The target is:
<?xml version="1.0" encoding="UTF-8"?>
<ZCUSTQUOT_WITH_REF01><IDOC BEGIN="1"><Z1ZCUSTQUOT_WITH_REF SEGMENT="1"><E1BPSDHD1 SEGMENT="1"><DOC_TYPE></DOC_TYPE><PURCH_DATE></PURCH_DATE><PP_SEARCH></PP_SEARCH><REF_DOC></REF_DOC></E1BPSDHD1><E1BPSDITM SEGMENT="1"><ITM_NUMBER></ITM_NUMBER><MATERIAL></MATERIAL></E1BPSDITM><E1BPSCHDL SEGMENT="1"><ITM_NUMBER></ITM_NUMBER><REQ_QTY></REQ_QTY></E1BPSCHDL><E1BPSDTEXT SEGMENT="1"><ITM_NUMBER></ITM_NUMBER><TEXT_ID></TEXT_ID><TEXT_LINE></TEXT_LINE></E1BPSDTEXT></Z1ZCUSTQUOT_WITH_REF></IDOC></ZCUSTQUOT_WITH_REF01>
I need to map in the first time from <GenHeadText/> to  <TEXT_LINE> and in the second time from <TEXT_LINE/> to <TEXT_LINE>
Is not possibole to use with concatenate  because i need all the time to map diffrebt field.
Elad

Similar Messages

  • FTP to IDOC : multiple source files

    Hi experts,
    I finished designing my File-FTP to idoc scenario.
    I still have one question left, I did tests with my FTP by putting one file in the directory called test.xml
    In the case I would have multiple source files (i.e. test2.xml, test3.xml, ...testn.xml), how can I handle these different files to be sent to SAP ???
    Thanks a lots, any help would be appreciated.
    Regards,
    Jamal

    hi,
      If you want to process all the ".xml" files in the folder then just give the file name "*.xml".It will process all
      the xml file in the folder.
      Advanced Selection for Source File:
       If you want to process only the file name will start "a" , "b" and extension is xml then,
       ".xml" is the file name and "a" ,"b*" is the Exclusion Mask.
    Regards,
    Prakasu
    Edited by: prakasu on Aug 7, 2008 12:15 PM

  • File Sender Adapter - Multiple Source Directory

    Hi all,
    I have the following file to IDoc Scenaraio:
    The source file might be in any of 3 directories in source system and so created file sender adapter as follows:
    File access parameters:
    Source Directory : Directory1
    File Name         : Filename*.XML
    Addiontal Directory:
    Directory2    Filename*.XML
    Directory3    Filename*.XML
    The porblem we are facing is the file adapter is picking the file from Directory1& 2 and not from Directory3.
    If the change Directory Order in adapter as follows:
    File access parameters:
    Source Directory : Directory3
    File Name         : Filename*.XML
    Addiontal Directory:
    Directory2    Filename*.XML
    Directory1    Filename*.XML
    ... then file from Directory 2 & 3 is getting processed and not from Directory1.
    Any thoughts on this will be greatly appreciated.
    Thanks
    Sarat.

    Why use BPM for this?
    Instead write an abap program to pick from any of 3 directories in source directory and place it in the shared XI folder and configure your file adapter pointing to XI shared folder...shecdule the abap report for every 5 min..
    Wanna know more /people/sravya.talanki2/blog/2005/08/23/sender-xi-ftp-adapter-with-regular-path-expression-150-abap
    Or write OS level scripts for doing same.

  • Mapping Multiple Source fields to Single Target Fields with differnt Values

    Hello Friends,
    I am having a senario  where I have to mapped multiple fileds from source str. to same Idoc Fields with ( differnt default values )
    E.g Source Str.
    - ShopNO
    - OrderTyp
    Has to mapped to Idoc Str E1EDK14-Orgid.
    E.g Mapping:
    So when ShopNo will mapped to E1EDK14-Orgid the default value should be "MOP" & E1EDK14-Qualf should be 019
    and when OrderType will be mapped to E1EDK14-Orgid the default value should be "STD" & E1EDK14-Qualf should be 012
    So I tried of using node "UseOneAsMany".....but there I cant define the vaule of field orgid, and seconly how to specify the values of field Qualf?
    Do i need to write my own specify function ? or I can sovle this issue using standard avaiable functions ?
    Regards,

    Hi Ravi,
    Thanks for your reply....
    I am facing following problem... when I try to duplicate the segment and do mapping....... and then when I save, I got following error msg:
    The source or target structure has been changed or could not be found in the Integration Repository. The mapping definition contains elements or attributes that do not exist in the changed structure. The relevant entries will be deleted
    Target structure has no such path: /ZARVO_ORD/IDOC/E1EDK05[1]/KSCHL. Skipping mapping
    Target structure has no such path: /ZARVO_ORD/IDOC/E1EDK05[1]/KRATE. Skipping mapping
    Any suggestion ?
    in other words, when I do duplicate it creates me the segment, but when I save it, it gets disappered .........
    Regards,
    Edited by: Shah H on Oct 26, 2009 3:17 PM

  • APEND the file depending upon the source field length

    Dear ALL,
    Scenario is IDOC to FILE(using File Content Conversion in receiver side)
    *Requirement:*
    Payment Id is the field from IDOC.
    1st time data for the field length is 6 digit that always end with '0' that is 6th character or 6th position '0'(this for the 1st transaction in a Day)
    2nd time data for the same field length is 5 digit(this is the 2nd transaction in the same day.this can be many times)
    End of the day the last transaction always the same field length should be 6 digit and end of the digit always 1.when the last transaction is over then appended files should be merged and send to target folder.
    All this transactions always same file and should append.
    Could you please give some idea.
    Note: with out BPM.
    thanks and regards
    walter stephen

    Hi Suraj
    R3 TO File using file content conversion.
    1st transaction to till last transaction all the file will store in local folder.As soon as the last transaction completed then the appended file file move to target folder using command line(DOS command)
    Note:
    all the transaction should be the same file.
    File construction mode will be append.
    this not merging using   partner profile.
    thanks and regards
    walter stephen

  • Mapping multiple source fields to one target field

    Hi,
    I'd like to take the XML content fromy my outbound message and put this into a single field within my inbound message.
    Please can someone suggest a suitable XSL mapping or user defined function I could use to achieve this.
    Thanks,
    Alan

    Hi,
    OK, so I now have the XML data in one wrapper tag called inbound but when this is passed to the inbound ABAP proxy I obtain the error as listed below.
    Any ideas how I overcome this?
    XML payload
    <?xml version="1.0" encoding="UTF-8" ?>
      <inbound>
      <![CDATA[ <n0:outbound xmlns:n0="http://homeoffice.gov.uk/immigration/migrant/cas/bulk-cas-re" xmlns:prx="urn:sap.com:proxy:NUD:/1SAI/TASDBA95DB1CF1834B8939A:700:2008/06/25"><ApplicantID>123</ApplicantID><FamilyName>Bloggs</FamilyName><GivenName>Blogs</GivenName><Nationality>GB</Nationality><Gender>1</Gender><CountryOfBirth>GB</CountryOfBirth><PlaceOfBirth>Gloucester</PlaceOfBirth><DateOfBirth><FullDate>1976-06-23</FullDate></DateOfBirth><ApplicantPassportOrTravelDocumentNumber>123</ApplicantPassportOrTravelDocumentNumber></n0:outbound>
      ]]>
      </inbound>
    Error
    Error during XML => ABAP conversion (Request Message; error ID: CX_ST_MATCH_ELEMENT; (/1SAI/TXS2EC9427C9FBC1EDCA9A0 XML Bytepos.: 48 XML Path: inbound(1) Error Text: System expected the element 'inbound')) System expected the element 'inbound'
    Thanks,
    Alan

  • Multiple Source Structure in single flatfile using lsmw idoc method

    Hi Abapers,
                we have a requirement for Business partner Data mIgration into CRM system using LSMW idoc method,I got a flat file
    which has multiple source structures like(header structure,Tax structure,Mailstructure,Identification structure,bankdetails structure,card strcuture........etc of 12 structures) with identification for each structure. can any one help me how to handle this in lsmw or any link of this kind of scenario will be helpful for me .
    Thanks and Regards,

    Hi Saeed,
    For example if you want t create bom through lsmw then we will *** two files one header and other item one.In the same way .In lsmw start by keeping the idoc method i will only propose at second step how many files it need. Just map the idoc and see. Post if need more help.
    Regards,
    Madhu.

  • Mapping issue in FIle to IDoc

    Hello friends,
    In file to IDoc scenario,
    Source structure is
    1: header
       n: itemdetails
    For Item details, IDoc structure has got 2 sub segments under E1EDP01 segment. as below.
    E1EDP01
    --E1EDP02
    --E1EDP26
    When I try to post message with multiple line items, I am getting  as below
    E1EDP01
    --E1EDP02
    --E1EDP02
    --E1EDP26
    --E1EDP26
    E1EDP01(no sub sement).
    But the expected result is  as below.
    E1EDP01
    --E1EDP02
    --E1EDP26
    E1EDP01
    --E1EDP02
    --E1EDP26
    Please help me in this regard.
    Many thanks
    Sam
    Edited by: Guest on Mar 18, 2008 7:41 PM
    Edited by: Guest on Mar 18, 2008 7:43 PM

    Hi,
    just put a split by value in the mappings for E1EDP02 and E1EDP26:
    field1>Split By Value\[Each Value\]>E1EDP02
    field2>Split By Value\[Each Value\]>E1EDP26
    Reward points if helpful.
    Sankar Choudhury

  • File to IDOC(MATMAS05)

    I'm trying simple scenario for File to MATMAS05 IDOC. I filled in the required fields it specified by Red in the message mapping, but still I get the following error when I try to test the mapping
    Structure with min!=max without mapping
    I dont understand what exactly this means..did anyone get  this before? how to fix this error?
    Thanks,
    Kalpana

    hi
    Below one is for Cremas
    u just follow the same procedure for u r Idoc with u r fields..
    I think it is helpful for u upto some Extend...
    2.11.4     Map the fields of the source document to the equivalent fields in the IDoc. This can be achieved easily by locating the target field in the IDoc structure and then drag-and-drop from the source field to target field. Please refer to the table below for the mapping rules (segments and fields are sorted according to their order of appearance in the IDoc).
    Source field in Vendor     Target field in CREMAS03
    VendorNumber     E1LFA1M à LIFNR
    Address à Country     E1LFA1M à LAND1
    LastName     E1LFA1M à NAME1
    Address à City     E1LFA1M à ORT01
    Address à Zip     E1LFA1M à PSTLZ
    SearchTerm     E1LFA1M à SORTL
    Address à Street     E1LFA1M à STRAS
    VendorNumber     E1LFA1M à E1LFB1M à LIFNR
    VendorNumber     E1LFA1M à E1LFM1M à LIFNR
    Currency     E1LFA1M à E1LFM1M à WAERS
    2.11.5     Now we have to assign constants to certain fields and attributes in the IDoc (for segment qualifiers, hardcoded values and XML attributes). This can be achieved by following the procedure below. Refer to the table below for more details on the mapping rules.
    2.11.5.1     Double-click on the target field in the IDoc.
    2.11.5.2     At the bottom of the screen, select “Constants” from the drop-down list for function type.
    2.11.5.3     Click on the function “Constant”.  Now the “empty” constant appears in the screen.
    2.11.5.4     Double-click on the “empty” constant and assign a specific value.
    2.11.5.5     Connect the constant to the target field.
    Constant     Target field in CREMAS
    1     CREMAS03 à IDOC à BEGIN
    1     E1LFA1M à SEGMENT
    009     E1LFA1M à MSGFN
    COMPANY     E1LFA1M à ANRED
    LIEF     E1LFA1M à KTOKK
    1     E1LFA1M à E1LFB1M à SEGMENT
    009     E1LFA1M à E1LFB1M à MSGFN
    3000     E1LFA1M à E1LFB1M à BUKRS
    31000     E1LFA1M à E1LFB1M à AKONT
    A1     E1LFA1M à E1LFB1M à FDGRV
    1     E1LFA1M à E1LFM1M à SEGMENT
    009     E1LFA1M à E1LFM1M à MSGFN
    3000     E1LFA1M à E1LFM1M à EKORG
    2.11.6     For the segments E1LFB1M and E1LFM1M please assign an empty constant. This is necessary because these segments are optional in the IDoc. Although some underlying fields have already been mapped, If the parent node is not explicitely used as the target of a mapping, the segment will not be instantiated at all.
    2.11.7     Finally, right-click on the segment ‘EDI_DC40’ and disable it (this segment is mandatory but will be filled out automatically by the IDoc adapter. Save your mapping.

  • Formatted Search Multiple Sources

    Hey all,
    I know that standard functionality in formatted searches in SAP B1 does not support multiple source fields.  However, I was hoping that someone had come up with a workaround for this scenario.
    Field A = Variable
    Field B = Variable
    Field C = Field A + Field B
    Can I get field C to update whenever field A OR field B is updated?
    Thanks,
    Kevin

    Thanks Gordon, that made perfect sense.  My solution was this:
    Field A -> Formatted Search refresh regularly when Field B changes
    Field B -> Formatted Search refresh regularly when Field A changes
    Field C -> Formatted Search refresh regularly when Field B changes
    This way, if you touch Field A or B, Field C will always be updated.  For the queries, I simply used the active screen syntax to pull the values that were already there.  For example:
    If Field B changes, then Field A = $[$38.Field_A.0]
    It's enough to register a change to field A which triggers the whole refresh.  Thanks for your recommendation Gordon!

  • Creation of multiple nodes in target IDOC as per field from sender file

    Hi SapAll.
    here i have  got a requirement in an File To Idoc Interface.
    the requirement is there will be one field under sender  file which will be repeating for multiple records(ItemCount),here pi need to check the value of this field for each record and if the value is 'x' THEN it should create the target node under idoc for the same no .of times as the occurance of this field(if the condition is true).
    i just used the if Condition,text function(Equals) in the message mapping but it was not working for the
    Case 1 :
    if the condition in the first record fails  but if it passes for the remaining records its not creating for the remaining records as it fails for the first record itself
    Case 2: it is only working when the condition for the first record is sucess .
    can any body help me in this.
    regards.
    Varma

    Could be a problem of context, are you queue display is in one context or different context. You can use the SplitByvalue
    regards,
    lpbuff

  • FILE  to  IDOC  SCENARIO   NEED  MANDATORY FIELDS IN  MATMAS IDOC

    Hi
       I'm  learning a scenario like File to Idoc  which is i need some what are the mandatory fields for  creting the message mapping.. between source file and MATMAS IDOC...  because it was showing several fields.
    is there any way to find out the  fields we need to map compulsory...  for sending IDOC successfully.
    Thanks
    Babu

    Hi Babu !
    Log into the R/3 system, transaction WE60, enter the idoc type MATMAS01 or 02, 03, 04, then press F8 or go to Documentation menu, HTML Format.
    It will display a document, telling you which fields are optional and which mandatory.
    Regards,
    Matias
    PS: please award points if helpful.

  • Creation of multiple Records in the file as per multiple segments in IDOC

    Hi SapAll.
    i have got a requirement to create a multiple records in a file based on multiple segments at sending Idoc in a File To Idoc Interface.
    the Scenario  is the reciever message type is mapped with fields of 3 segments in sending IDOC.
    SEG01   1.....1(PARENT SEGMENT)
      SEG02  0...999999(CHILD SEGMENT)
      SEG03 0...9999999(CHILD SEGMENT)
    in an instance where if the SEG01 exists for one time and SEG02 exists for 2 times and Seg03 Exists for 2 times PI is creating the file with 2 records in it but
    when if the SEG01 exists for one time and SEG02 exists for 2 times and Seg03 Exists for 1 time it is raising the error in message mapping where it is supposed to create 2 records in a file with empty values in the fields (mapping with seg03) segment.
    can anybody help me in this.
    regards.
    Varma

    you can create a UDF after you validate if the count match. if match you create the message if not, call de UDF.
    this UDF should receive two parameters -->Queue SEG2 and queue of SEG3.
    then you should loop by the count of SEG2. if you find a Supress Value in the queue of SEG3 add a "" to result. for example.
    for(i=0;i<=SEG2.count;i++){
    If SEG3<i>.equals(ResultList.SUPPRESS) {
           result.addValue(" ");
    }else{result.addValue(SEG3<i>);
    the result of UDF is a queue which should map to target field directly coz it has context changes
    I think that is what you are needing. if no let me know.
    RP
    Edited by: Rodrigo Alejandro Pertierra on Jun 17, 2010 11:56 AM

  • File sender ch. - specifying multiple source with *

    Hi folks,
    In my File2Idoc scenario I need to pick up files from an ftp server where I have about 20 partners which folders look the same.
    like
    root/p1/subd1/import
            p1/subd2/import
            p2/subd1/import
            p2/subd2/import
    In my file sender channel I wanted to specify /root///import but it didnt work.
    1. Is there a way to specify directories like above?
        Or do I have to enumerate all the directories (near 100) in the Advanced selection for source file in the adapter?
    2. I have to move the processed files to import/archive in each partners folder.
        If I specify multiple sources in the adapter, how can I reference them in the Archive directory field on Processing tab?
    thanks

    Hi ,
    While you are using the FTP File Adapter then in the sender Communication channel
    Go to source Directory : then mentioned the /direcotry/filename then under mentioned the File name.
    After that Go to Process Mode tab in the Sender CC Select the Process Mode like "Archive " then you mentioned the Archive directory Path like for ex: /dirname/interfaces/devision/inboundoroutbound/archive then choose the file Type Binary
    May be it helpful to you !
    Regards,
    Ravi.

  • Flat File to IDOC Mapping requirement to generate Multiple Segments

    Hi Experts,
    I got a requirement were i have 2 records in a file and i need to generate 2 IDOCs  with  multiple segments in it.
    FILE :
    10/01/2010     101  KRNA     ic_quantity          30-0257     3526     1     1     ea     110000     10
    10/01/2010     101     KRNA     ic_quantity          90-0005     3526     1     2     ea     110000     10
    Idoc should generate 2 IDOCs with multiple segments as shown below
    I have imported the IDOC and changed the occurrence to " unbounded "
    The Basic  IDOC Type :  WMMBID02
    I need to generate Multiple segments of  E1MBXY1
    i.e..,  First IDOC should contain two  E1MBXY1 segments
             Second IDOC should contain Four  E1MBXY1 segments
    IDOC1 :   WMMBID02
    Segment :   E1MBXY1( 2 segments)                                                       
    10/01/2010     101     KRNA     ic_quantity          30-0257     3526     1     1     ea     110000     10
    10/01/2010     101     KRNA     ic_quantity          90-0005     3526     1     2     ea     110000     10
    IDOC2 : WMMBID02
    Segment :  E1MBXY1 ( 4 segments)                                                  
    10/01/2010     101     KRNA     ic_quantity          30-0257     3526     1     1     ea     110000     10
    10/01/2010     101     KRNA     ic_quantity          30-0257     3521     1     1     ea     110000     10
    10/01/2010     101     KRNA     ic_quantity          90-0005     3526     1     2     ea     110000     10
    10/01/2010     101     KRNA      ic_quantity          90-0005     3521     1     2     ea     110000     10
    Can anyone suggest me how to generate IDOCs with multiple segments
    what are multiple ways of generating it
    Whether it can be achieved using Multi-mapping or I need go for UDF
    If any one has done has done this type of requirement ,please share the points.
    Thanks
    Sai

    Basically you need to generate idoc per record in the flat file. During fcc conversion you convert flat file to xml structure at the sender side. In the mapping use xml file structure source and idoc as receiver structure. You just export idoc and update the idoc segment 1 to unbounded.  Please follow the michael blog for file to idoc multimapping without bpm. Yes without bpm it is possible.
    see this link... This will answer your requirement.
    https://wiki.sdn.sap.com/wiki/display/XI/File%20to%20Multiple%20IDOC%20Splitting%20without%20BPM
    >Whether it can be achieved using Multi-mapping or I need go for UDF
    you dont need udf for this.

Maybe you are looking for