Source Structure determination Dynamically

Hi ,
I got a requirement to develop a File to IDoc scenario. Below are requirement details.
1.  Source system application creates maximum 9 XML files of different strucure for each run. File name is generated dynamically by the source application.
2. Each file represents one message(MATMAS, ORDERS01,etc.,) in SAP R/3 (IDoc)
3. Each file has two sections one is header and another details section.
4. Header section structure is same for all the files.  and it has a key to determine the document type.
5. Details section structure differs from file to file.
6. PI has to process the source files in the order its created on the source system.
Process flow is : PI has to pick the file/s from the sources system and  post the data on SAP R/3 system after data transfermations.
Hope above details help in understaning the requirement.  Please suggest me how can i achive this functionaly.
Please give me some light....
Thanks & Regards
Sree

HI Jonnavarapu,
I dont think it is possible using the standard file adapter funcitonality because of the dynamic nature your items are having. For this you need to have an adapter module where you put your own code and then deploy the same and use it.
Else since your header is same for all the files and details are differnet. If you can ask the source file system guys to generate a file in this format:
first 10 fields are for Orders and next 10 fields are for matmas etc. Then you can create a source message type with 20 fields and read that file. Based upon the data inside the items you can route to the corresponding idoc. If they cannot generate this format then you cannot achieve your requirement.
Else you can request them to put the files in different folders and then you can create that many no. of interfaces.
or you need to come up with some generic file communication channel and then use java modules as mentioned in this blog:
/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
Regards,
---Satish

Similar Messages

  • Determining Source Structure u0096 for LSMW to upload Purchasing Info records?

    I am trying to use program RM06IBI0 through LSMW to upload Purchasing Info records. While configuring LSMW, how do I determine the source structure? Can anybody please help me with an example?
    Thanks,
    Ketan

    hi dear
    first of all record all the fields which you require through shdb including your vendor code and esokz.
    now
    generate a structure for mapping the fields through table maintainence generator option.you can add any number of fields there.
    actully this must include all the fields which are being fetched from the your flat file.
    please revert back if u find problem.
    reward points if it find useful
    regards
    amit singla

  • Same source structure and different target structure without BPM

    Hi Experts,
    I am using PI 7.11.My requirement is at sender side the source structure is same.Basically invoice data coming from ECC to PI as a proxy message.
    Receiver side adapter is JMS.At target side ,PI has to send the invoice data to 2 receiver systems.Payment node is coming in source XML,which always comes from ECC.For one of the business system ,Payment node should be sent.For the other BS,this node should be supressed.how to achieve this with single mapping?Payload based routing is not possible in my case as i dont have any field which differentiate the receiving system name.
    Regards,
    Karthiga

    Hi,
    In receiver determination, just input the two receivers (no conditions). In message mapping, you can use the constant function called receiver to suppress or create the node. You can only test it by editing the parameters in test tab e.g
    At runtime, this value (receiver) will be filled out by the entries in receiver determination. So only one mapping is needed.
    Hope this helps,
    Mark

  • How to handle 1 Source Structure and N ( multiple Target Structure

    Hi           I have One source structure , Which is Source1 and mulitple target structure which Target1 , Target2 and Target3
    I need Map this Source1 to Target1 and Target2 and Target3 based on the condition of one field of source1
    ianyone please tell me how to do it
    Thanking you
    Sridhar

    Hi Sridhar,
    Yes Multimapping is possible without BPM from SP14 and above. But there are certain limitation on that as well. You can do only 1:N multi mapping and N:1 is not possible without BPM. In the case of 1:N mapping you would need to go for Enhanced Interface Determination and you will have a full advantage of that mapping if you use a adapter other than IDOC, HTTP and XI. In otherwords this holds good for adapters that runs on Adapter framework and not on Integration Engine.
    BPM involved:
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Without BPM:
    http://help.sap.com/saphelp_nw04/helpdata/en/42/f3b31d48fb1bc8e10000000a11466f/content.htm
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Thanks
    Ravi

  • Ensure field sequence is correct for data for mutiple source structure

    Hi,
    I'm using LSMW with IDOC message type 'FIDCC2' Basic type 'FIDCCP02'.
    I'm getting error that packed fields are not permitted.
    I'm getting Ensure field sequence is correct for data for mutiple source structures.
    Source Structures
           HEADER_STRUCT            G/L  Account Document Header
               LINE_STRUCT              G/L Account Document Line
    Source Fields
           HEADER_STRUCT             G/L  Account Document Header
               BKTXT                          C(025)    Document  Header Text
               BLART                          C(002)    Document Type
               BLDAT                          DYMD(008) Document Date
               BUDAT                          DYMD(008) Posting Date
               KURSF                          C(009)    Exchange rate
               WAERS                          C(005)    Currency
               WWERT                          DYMD(008) Translation Date
               XBLNR                          C(016)    Reference
               LINE_STRUCT               G/L Account Document Line
                   AUFNR                          C(012)    Order
                   HKONT                          C(010)    G/L Account
                   KOSTL                          C(010)    Cost Center
                   MEINS                          C(003)    Base Unit of Measure
                   MENGE                          C(013)    Quantity
                   PRCTR                          C(010)    Profit Center
                   SGTXT                          C(050)    Text
                   SHKZG                          C(001)    Debit/Credit Ind.
                   WRBTR                          AMT3(013) Amount
    I have changed PAC3 field for caracters fields of same length to avoid erreur message of no packed fields allowed.
    Structure Relations
           E1FIKPF FI Document Header (BKPF)         <<<< HEADER_STRUCT G/L  Account Document Header
                   Select Target Structure E1FIKPF .
               E1FISEG FI Document Item (BSEG)          <<<< LINE_STRUCT   G/L Account Document Line
                   E1FISE2 FI Document Item, Second Part of E1FISEG   (BSEG)
                   E1FINBU FI Subsidiary Ledger (FI-AP-AR) (BSEG)
               E1FISEC CPD Customer/Vendor  (BSEC)
               E1FISET FI Tax Data (BSET)
               E1FIXWT Extended Withholding Tax (WITH_ITEM)
    Files
           Legacy Data          On the PC (Frontend)
               File to read GL Account info   c:\GL_Account.txt
                                              Data for Multiple Source Structures (Sequential Files)
                                              Separator Tabulator
                                              Field Names at Start of File
                                              Field Order Matches Source Structure Definition
                                              With Record End Indicator (Text File)
                                              Code Page ASCII
           Legacy Data          On the R/3 server (application server)
           Imported Data        File for Imported Data (Application Server)
               Imported Data                  c:\SYNERGO_CREATE_LCNA_FI_GLDOC_CREATE.lsmw.read
           Converted Data       File for Converted Data (Application Server)
               Converted Data                 c:\SYNERGO_LCNA_FI_GLDOC_CREATE.lsmw.conv
           Wildcard Value       Value for Wildcard '*' in File Name
    Source Structures and Files
           HEADER_STRUCT G/L  Account Document Header
                         File to read GL Account info c:\GL_Account.txt
               LINE_STRUCT G/L Account Document Line
                           File to read GL Account info c:\GL_Account.txt
    File content:
    Document  Header Text     Document Type     Document Date     Posting Date     Exchange rate     Currency     Translation Date     Reference     
    G/L Account document     SA     20080401     20080409     1.05     CAD     20080409     Reference     
    Order     G/L Account     Cost Center     Base Unit of Measure     Quantity     Profit Center     Text     Debit/Credit Ind.     Amount
         44000022                    1040     Line item text 1     H     250
         60105M01     13431     TO     10          Line item text 2     S     150
    800000     60105M01                         Line item text 3     S     100
         60110P01     6617     H     40          Line item text 4     S     600
         44000022                    ACIBRAM     Line item text 5     H     600
    The file structure is as follow
    Header titles
    Header info
    Line titles
    Line1 info
    Line2 info
    Line3 info
    Line4 info
    Line5 info
    Could someone direct me in the wright direction?
    Thank you in advance!
    Curtis

    Hi,
    Thank you so much for yout reply.
    For example
    i have VBAK(Heder structure)
              VBAP( Item Structure)
    My file should be like this i think
    Identification content         Fieldnames
         H                               VBELN      ERDAT     ERNAM        
                                          Fieldvalues for header
          H                              1000          20080703   swapna
    Identification content         Fieldnames
        I                                   VBELP     AUART 
                                          Fieldvalues for item
        I                                  001             OR
                                           002             OR
    Is this format is correct.
    Let me know whether i am correct or not

  • Error while creating WBS element.. regarding source structure

    I am creating a project and then a WBS element. Its a investment project. While creating WBS element XXX, it gives me error that "WBS element XXX: SOurce assignments for source structure A1 missing in Investment Profile ZZZZZ."
    What shall I check? what could be the reason?
    Thanks,
    A

    hi,
    In this IMG activity, you define the source structures used when settling and costing joint products.
    A source structure contains several source assignments, each of which contains the individual cost elements or cost element intervals to be settled using the same distribution rules
    Just consult with your CO Consultant...
    Venkatesh

  • Source structure of XML file as different from Message type?

    Hi,
    We are picking an xml file from the FTP server of the client.
    We have source message type 'MT_Invoice' with data type as 'DT_Invoice'.
    When we open the message mapping test tab, the source structure is as shown below.
    <ns0:MT_Invoice xmlns:ns0="urn:maxxium:nordic:invoice:inbound">
       <Invoices>
          <Invoice>
          </Invoice>
       </Invoices>
    </MT_Invoice>
    My question is "What should be the structure of the XML file that the client is depositing on to the FTP server?".
    Should it start with the tag 'MT_Invoice' with the namespace or should it simply start from    <Invoices> tag.
    I have tried various combinations for the source xml structure. But all are failing.
    (This is evident from the fact that the mapping is failing. That's why I have given the structure from the source structure of the message mapping tab.)
    Kindly help.
    Thanks,
    John

    >
    john j wrote:
    > Hi,
    >
    > We are picking an xml file from the FTP server of the client.
    >
    > We have source message type 'MT_Invoice' with data type as 'DT_Invoice'.
    >
    > When we open the message mapping test tab, the source structure is as shown below.
    >
    > <ns0:MT_Invoice xmlns:ns0="urn:maxxium:nordic:invoice:inbound">
    >    <Invoices>
    >       <Invoice>
    > .
    > .
    > .
    > .
    >       </Invoice>
    >    </Invoices>
    > </MT_Invoice>
    >
    > My question is "What should be the structure of the XML file that the client is depositing on to the FTP server?".
    >
    > Should it start with the tag 'MT_Invoice' with the namespace or should it simply start from    <Invoices> tag.
    >
    > I have tried various combinations for the source xml structure. But all are failing.
    >
    > (This is evident from the fact that the mapping is failing. That's why I have given the structure from the source structure of the message mapping tab.)
    >
    > Kindly help.
    >
    > Thanks,
    > John
    you are picking an XML file. So you should create the MT which would represent exactly the XML format of the source file.
    So ideally if your file starts with <invoice>, then name your MT as invoice

  • Message Mapping of Recursive Source Structure?

    Hello,
    a mapping needs to be implemented from a custom source structure to an IDoc. An XSD has been provided for the source structures which contains recursive elements --> an element of a specific type contains another element with the same type.
    If I import the XSD then the type of the recursive element is displayed in "red", but I still can expand it. If I want to use the source structure in the message mapping I cannot expand the recursive elements anymore. Does anyone of you have an idea how to handle this? I want to avoid XSLT if possible.
    Thank you!

    Hi again Florian,
    please have a look at [Structure Overview in Message Mappings on SAP help|http://help.sap.com/saphelp_nwpi71/helpdata/en/e3/92be7c6cd34fd485c967144e302fb6/content.htm]. There is a paragraph on Recursive Structures:
    ...It is possible to map these elements in the mapping editor in a rudimentary fashion by using the context menu to expand a specific number of subnodes and then use them in target-field mappings...
    That works for both source and target message.

  • Mapping problem with source structures in LSMW thru idoc

    Hello,
            I am using crmxif for bp saving. I have flat file with one line. But it has many segments. do i need to mapp all segments with different source structures.
    Even for any other transactions with crm xifs, how to fill the segments .  do i need to create source  structures for all the segments.
    do i need to create different flat files for all the segments filling.   plz suggest with flat file, and source sturctures.
    thanks
    ram

    Hi RAM,
    Please refer notes 554635 and see if this helps.
    regards,
    Muralidhar Prasad Chatna

  • Problem in work flow of PE while mapping 2 source structure into 1 target

    We have scenario in BPM where in we have to mapp 2 source structure's into target.
    To be more specific one structure occurance is 0 to unbounded and other one is of single occurance.
    We have done the mapping with target structure and tested it manually in mapping . its working fine..
    While testing it in Configuration scenario, In the workflow process i.e PE process flow, we were not able to get one of the source message structure as the input Message. Instead of two source messages, it is seen only one. Please guide us in this issue.

    actually we are receiving only one message, henece we do not need a correleation. But once we receive this message we are splitting into multiple messages in the transformation step. and we use these split messages in different transformation steps. but in one of the transformation steps we are unable see one of the split messages in the transformation step(though we have used the proper container element.). Please let me know if any ideas on this.

  • How to map multiple source structures to single target structure

    Hi all,
    I have the scenario of 2 input files so i am using BPM for it. I have created the message types of the 3 input files. I have to finally generate an XML file which will contain the data of all the 2 files. That is i have to do 3:1 mapping.
    Source Structure of File 1:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>CUSTOMER</u>
       <i><b>REF_NO</b></i>
       <i><b>CUSTOMER_NO</b></i>
    Source Structure of File 2:
    <b>DT_PWC_Customer</b>
    <i>RECORDSET</i>
      <u>METER</u>
       <i><b>REF_NO
       METER_NO</b></i>
    Target Structure of Final Output File:
    <b>DT_PWC_CustomerMeterData</b>
    <i>RECORDSET</i>
      <u>CUSTOMER_METER</u>
       <i><b>REF_NO
       CUSTOMER_NO
       METER_NO</b></i>
    Above nodes i have shown in a heirarchical order..nodes with same indentation are at same level.
    Can anybody tell me how to do this mapping in IR in graphical editor.
    RAJEEV GUPTA

    Hi,
    To elaborate my requirement, I want to tell that since i will be having 2 input files- one for Customer & one for Meter. I want to finally generate one XML file which will have data from both these 2 input files. That is, if Customer file has 3 records(3 REF_NO, 3 CUSTOMER_NO) and Meter file has 4 records(4 REF_NO, 4 METER_NO), the final output XML file  will   have 7 records(7 REF_NO, 3 CUSTOMER_NO,4 METER_NO).
    Thanks,
    Rajeev Gupta

  • Mapping 2 source structures to a single target database

    Hi Experts, My scenario is a Proxy to JDBC in which I need to send data from 2 source structures to 1 target table.
    Source structures :                                           Target:
    ABC                                                                 XYZ
      row1                                                                 InsertStatement
        Item1                                                                  DBTable
                                                                        Action
       (Fields)                                                     Table
                                                                                    acess
    DEF                                                                              -
      row2                                                                          -
       item2                                                                         -
      (Fields)
    (Fields)
    Please let me know how to map the 2 source nodes to the target access node to transfer data from the source tables to target database.
    Regards,
    Krishna

    You should make use of BPM to collect the two source structures.
    One of the BPM examples mentioned in IR --> SAP BASIS ---> SystemPatterns can be referred for this purpose.
    Once the messages are collected, perform a 2:1 mapping (two Proxies as source message and one JDBC message as target).
    If you want the mapping logic then please provide a proper format of both your Source and Target messages and the expected mapping, so that someone from SDN can help you out.
    The target structure provided is a bit confusing.
    Are you going to receive two different proxy messages (i.e. two different calls) or just one Proxy call and there you will have two different nodes within the same message??? ...... me confused
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Sep 25, 2009 11:51 AM

  • Message mapping---1 source structure and n target structures

    I would like to know how many message mappings we need if we are mapping one source structure to 3 different target structures of a single receiver. I am assuming its just one message mapping.
    Depending on the above answer how many interface mappings do we need.

    Kalyan,
    you need multi-mapping that maps one source structure to multiple target structures. Just search multi mapping in SDN and you will find many good posts.
    Basically, in MM editor, go to signature tab and in the target messages add additional message types. Simple.  --> Only one MM and one IM
    Jayson

  • Correctness of the source structure

    Dear Experts,
    Its a case of synchrounous communication between SOAP application to PROXY.
    The source interface was designed bases on the below reqr:
    The sender would send 1 sales order and 1 sales order would contain multiple Material Number.
    Sales order and Material Number are mandatory fields. The source structure look like:
    MT_Send------(1:1)
    SalesOrd-----(1:1)
    Field2-------(1:1)
    Field3-------(1:1)
    Field4-------(0:1)
    Line Item-----(0:unbounded)
    MatNo-------(1:unbounded)
    Field6-------(0:1)
    The source request and receiver request are same in structure.
    MT_Recv-------(1:1)
    SalesOrd-------(1:1)
    Field2-------(1:1)
    Field3-------(1:1)
    Field4-------(0:1)
    Line Item-----(0:unbounded)
    MatNo-------(1:unbounded)
    Field6-------(0:1)
    1. Need suggestions from experts whether the occurence of the fields in the soruce is correct.
    2. when configuration was tested ( Mapping is 1:1),I receive the following error text in the operation mapping level:
    IllegalInstanceException: Cannot create target element /ns0:MT_SAP_PROXY_REQUEST. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML
    instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD. I have put the correct payload.
    3. Testing message maapings works fine between source and receiver structure. Also I debugged thru Display queue.
    Kindly provide me all your valubale inputs.
    Regards
    Alice Rebecca

    Dear Raj and Experts,
    Could you throw some light on my querry.
    The sender would send 1 sales order and 1 sales order would contain multiple Material Number.
    Sales order and Material Number are mandatory fields. The source structure look like:
    MT_Send------(1:1)
    SalesOrd-----(1:1)
    Field2-------(1:1)
    Field3-------(1:1)
    Field4-------(0:1)
    Line Item-----(0:unbounded)
    MatNo-------(1:unbounded)
    Field6-------(0:1)
    The source request and receiver request are same in structure.
    MT_Recv-------(1:1)
    SalesOrd-------(1:1)
    Field2-------(1:1)
    Field3-------(1:1)
    Field4-------(0:1)
    Line Item-----(0:unbounded)
    MatNo-------(1:unbounded)
    Field6-------(0:1)

  • To create a deep structure for dynamic internal table.

    Hello
    My ALV has fields which are defined dynamically during execution.
    so, i did it in the following way,
    Declared Field symbolds, DREF and fieldcatalog as,
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,
                  <fs_dyntable>.
    DATA:   dref_dyntab    TYPE REF TO data,
            dref_dynwa     TYPE REF TO data.
    DATA: ts_fieldcatalog TYPE lvc_t_fcat.
    DATA: wa_fieldcatalog TYPE lvc_s_fcat.
    Updated Fieldcatalog dynamically as,
    *function module to read segment structure
        CALL FUNCTION 'SEGMENT_READ'
          EXPORTING
            segmenttyp           = v_segment_name
          TABLES
            segmentstructure     = ts_seg_structure
          EXCEPTIONS
            no_authority         = 1
            segment_not_existing = 2
            OTHERS               = 3.
        IF sy-subrc <> 0.
          CASE sy-subrc.
            WHEN '1'.
              MESSAGE e024.
              STOP.
            WHEN '2'.
              MESSAGE e025 WITH v_segment_name.
              STOP.
            WHEN OTHERS.
              MESSAGE e023.
          ENDCASE.
        ENDIF.
    *FETCH FIELDS FROM STRUCTURE OF SEGMENT AND CREATE FIELDCATALOG FOR
    EACH FIELD OF SEGMENT (DYNAMIC FIELD CATALOG)
        LOOP AT ts_seg_structure INTO wa_seg_structure.
          ADD 1 TO v_counter.
          wa_fieldcatalog-fieldname = wa_seg_structure-fieldname.
          wa_fieldcatalog-col_pos   = v_counter.
          wa_fieldcatalog-ref_table = wa_seg_structure-segtyp.
          APPEND wa_fieldcatalog TO ts_fieldcatalog.
          CLEAR wa_fieldcatalog.
        ENDLOOP.
    and generated dynamic internal table using fieldcatalog as,
    *--Method to get the structure of table using fieldcatalog.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ts_fieldcatalog
        IMPORTING
    *--Variable of type REF TO DATA.
          ep_table        = dref_dyntab.
      IF sy-subrc <> 0.
        MESSAGE e023.
      ENDIF.
    *--Dynamic internal tables required when show segments selected
      IF p_selseg IS NOT INITIAL.
        ASSIGN dref_dyntab->* TO <t_dyntable>.
    *--Create dynamic work area and assign to FS
      CREATE DATA dref_dynwa LIKE LINE OF <t_dyntable>.
        ASSIGN dref_dynwa->* TO <fs_dyntable>.
    And then i populated this <t_dyntable> which is being passed as data-table to method
    CL_GUI_ALV_GRID => SET_TABLE_FOR_FIRST_DISPLAY
    for ALV grid Display along with above used filedcatalog ts_fieldcatalog.
    Things are fine till here, but now i have the requirement to edit selected rows of the ALV display..
    As you might be aware, we need a field
            TS_STYLEROW  TYPE lvc_t_styl, (i.e, a field of type 'h' and we can say as an internal table inside an internal table or else as a deep structure)
    in the output internal table <t_dyntable> to meet our requirement.
    My issue is about declaring one such field of type 'h' in this dynamically created internal table ''<t_dyntable>".
    I tried in the following way by adding one such field to fieldcatalog :
    *Field for Styling
      ADD 1 TO v_counter.
      wa_fieldcatalog-fieldname   = 'TS_STYLEROW'.
      wa_fieldcatalog-tabname     = 'TS_STYLE'.
      wa_fieldcatalog-col_pos     = v_counter.
      wa_fieldcatalog-no_out      = 'X'.
      wa_fieldcatalog-inttype     = 'h'.      " I even mentioned this
      APPEND wa_fieldcatalog TO ts_fieldcatalog.
      CLEAR  wa_fieldcatalog.
    But this is creating a field of type 'C' in the table <t_dyntable> instead of what i was expecting
    Guyz and respected,
    Please advice me with the solution or ur ideas....
    Note : The overall requirement is create a deep structure for dynamically generated internal table.
    Your help is highly appreciated and unforgettable..!!!!!!!

    hi,
    Dynamic append
    Dynamic internal table
    Dynamic internal table
    dynamic columns in ALV
    Variant for dynamic selection
    thanks

Maybe you are looking for

  • I cannot get airport extreme to work. Can you help me?

    I have a G5 Power PC. I recently purchased a macbook and an Airport Extreme. I cannot get the airport to work. Can somebody help me please?? G5 Power PC and macbook   Mac OS X (10.3.9)   new OS X on Macbook

  • Is there a way to connect 4gs to a 3gs via bluetooth

    just wondering if i can connect two iphones via bluetooth.

  • Video Download Does Not Play.

    So apparently the digital copy of Star Trek is a two hour and six minute gray rectangle. On my system, at least. I can't figure it out, here's a screenshot. I am hesitant to re-download 1 gigabyte all over again. img695.imageshack.us/img695/5940/trek

  • PeopleSoft Reconciliation via Compent Interface

    All, I would like to know if anyone has performed reconciliation using the PeopleSoft Component Interface Adapter in IdM 6.0 or IdM 6.0 SP1. Would like to get an idea of what the performance is when reconciling at high volumes (e.g. 100,000 - 600,000

  • Tagging Dynamic Calc using scripts

    Hi,<BR><BR>I frequently need to tag certain members within a dimension as Dynamic Calc. Is there a script, an ESSCMD type of script which I can use to make it easy? Right now I constantly have to use Administration console to do so.<BR><BR>Thanks,<BR