JDBC To IDOC Multiple segment

Hi All,
We have the requirement to  Create multiple segment which is under  one header if header change it create new idoc else it should add new  line item in same segment of  idoc.
Please suggest me Mapping Logic.
Regards
Laxmi Bhushan

Hi Gary
If you created a data type, try to change occurrence of STATEMENT node to 0..unbounded or 1..unbounded.
In the message mapping, map the target STATEMENT node with the source 1-many segment.
You can find [here|http://help.sap.com/saphelp_nw70/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/content.htm] more informations about the JDBC structure
Regards,
Giuseppe

Similar Messages

  • 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

  • JDBC to IDoc ( error when mapping multiple JDBC records to IDoc)

    Hi,
    I am working on JDBC to IDoc scenario, I have declared row as 0 to unbounded and by default the IDoc structure is 1..1.
    Inorder to map multiple rows from JDBC to get multiple IDoc's, I have changed the occurrence of IDoc in "Messages" tab of Message mapping to 0 to unbounded.
    I have mapped "row" to "IDoc".
    When I test the mapping, it works fine, giving the same number of IDoc's with that of row.
    When I test end to end, in SXMB_MONI, it gives me following error:
    <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
      <SAP:P1>MSGGUID 54A3A64E895D48EC3F20C69FEFE2E82B: Tag found instead of tag IDOC BEGIN=</SAP:P1>
    can any one help me out with this.
    Thanks in advance.

    Hi Jwalith,
    Check this blog from Michel
    The specified item was not found.
    Make sure that you changed occurance as per this blog.
    hope this is helpful
    regards,
    Venkat.

  • 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.

  • JDBC to IDOC Scenario - select data in jdbc based on multiple conditions

    Hello
         I have a JDBC to IDOC Scenario. I have to select the records in JDBC based on different conditions each time. For example I have to select based on company code '1000' and Employee claasification 'E1' and date range. After I post these records in SAP again I want to select other records for some other company code '2000' and different business area and different dates. Basically I want to extract data multiple times based on different conditions.
    Hiow do I achieve this?
    Another question is in the JDBC to IDOC scenario since the sender adapter is JDBC and the sender adapter polls depending on the duration of time ( say 60 secs ) in the adapter once after I extract the data based on a condition how do I control in such a way that the same data is not extracted again.
    Thanks
    Naga

    Hi Naga,
    I have to select the records in JDBC based on different conditions each time. For example I have to select based on company code '1000' and Employee claasification 'E1' and date range. After I post these records in SAP again I want to select other records for some other company code '2000' and different business area and different dates. Basically I want to extract data multiple times based on different conditions.
    -->
    Such requirements cant be handle through select query of the sender...but you can handle this in the message mapping area.....you can fire a select query in the database to pick up records in a batch of 10K (do not keep any condition on this except for sorting). After the records come into PI you can send the message to your target based on the unique combination of "Company code+ Employee clasification + date range" handling this in the message mapping.
    Another question is in the JDBC to IDOC scenario since the sender adapter is JDBC and the sender adapter polls depending on the duration of time ( say 60 secs ) in the adapter once after I extract the data based on a condition how do I control in such a way that the same data is not extracted again.
    You can use the N--> C logic
    The data records that you pick have a corresponding control table i assume. There should be a field STATUS where the initial status of record should be N.
    After you pick the records this status should be made C so that only those records present in the database with status = N are picked up.
    Mention the condition Status = N in the select query.
    Thanks
    Dhwani

  • XI Mapping to Idoc - Multiple Identical Idoc Segments

    I am debuuging XI mapping. I see the same idoc segments in the mapping multiple times. However, the way the fields are mapped in each one is different.
    Why? Is this to handle different scenarios?
    Thanks.

    in IDOCs each segment could occur multiple times. Lets say if its a address segment, u could see it multiple times for billing, shipping etc etc. so, depending on business logic the mapping will change. Some fields you'll map to one segment and some fields to some other segment.
    --Archana

  • JDBC to IDOC Scenario

    Hi Experts,
              I have tried JDBC to IDOC Scenario but it is giving No Segments Found Exception. I don't know where I am doing the mistake.
           can any body please send me a pdf document for JDBC TO IDOC Scenario with step by step procedure from scratch (including creation of LS,LI etc)
    Thanks in Advance,
    Murthy

    Hi Murthy
    The steps are pretty much the same as any other scenario with some exceptions
    1: You import the IDOC structure from the R/3 System. This acts as the DT, MT and MI.
    You also need to do some configurations on the ABAP Stacks of sender and XI system.
    Sender:
    WE20 Partner Profiles
    SM59 RFC Destination
    XI:
    SM59 RFC Destination
    IDX1 Ports
    IDX2 This is the metadata repository so you wont necessarily need this.
    Also because you IDOCs can be sent directly to the ABAP stack/Integration Server you do not need a sender comm channel or sender agreement.
    The rest is pretty much as any other scenario.
    Please see the below links
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    IDOc testing - /people/suraj.sr/blog/2005/12/29/generate-test-case-for-an-idoc-scenario
    idoc settings /people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi
    idoc mapping - /people/james.guanzon/blog/2006/03/23/how-to-support-industry-standards-in-xi-part-ii-of-iii--mapping
    Cheers..
    Vasu
    <u>** Reward Points if found useful **</u>

  • Mapping issue in jdbc to idoc scenario

    Hi
    we have a  jdbc to idoc scenario , we need to repeat the segment given below which has only two fields FLDGRP  and FLDVAL,
    both filed_Group and fieldgroup1 is coming simultaneously . when field group =BATCH, batch=FLDVAL and fieldgroup1=CUST cust_code=FLDVAL
    mapping is as follows :
    E1WXX01 (segment name) occurance 0:9999999999                                     
    fieldgroup----
    > FLDGRP
    batch----
    >FLDVAL
    fieldgroup1----
    >FLDGRP(same filed as above )
    cust_code----
    >FLDVAL(same filed as above)
    pl sugggest how to map using graphical mapping
    rgds
    arun

    I see the problem here... hmmm.. It is simple
    You need to just duplicate the E1WXX01 segment by right clicking and pressing Duplicate Subtree.
    Once you do duplication of segment then you will have two segments of E1WXX01.
    In first segment map
    > fieldgroup----
    > FLDGRP
    > batch----
    >FLDVAL
    and in second segment of E1WXX0, map
    > fieldgroup1----
    >FLDGRP
    > cust_code----
    >FLDVAL
    Regards,
    sarvesh

  • JDBC to Idoc Mapping error

    Hi all,
    i need help for my JDBC to IDoc-scenario.
    I Select some data from the db and everything is fine.
    Before the mapping I can see all in the payload, but after mapping only the constants were mapped.
    Hope someone can help me.
    Regards,
    Jörg

    Hi ,
    Please provide the mapping details in src mode.
    Please check these points -
    1) each row of the DB is set to one recursive segment of IDOC .
    2)Check wether you have set all the Mandatory fields of IDOC .
    Test the mapping in test Tab of mappiung using payload message in MONI ...
    Regards,
    Nanda

  • Regarding Moni issue -Jdbc to Idoc Scenario

    Hi  Experts ,
    I am working on one of the interface where my sender System is Database System (Oracle) and Receiver System is SAP ECC
    we are using  JDBC as Sender Channel to send Data to PI and Idoc as Receiver Channel which will Post the Idoc to ECC System (JDBC>PI>IDOC) .
    Both IR and ID part is Configured and  everything is working fine .
    Now the Problem i am facing is in sxmb_moni . once the Test Data is triggred from the Sender System  the Test Data is Passing through the Pipeline steps and i got the Success chequred Flag .
    But when i check the Payload (RequestMessageMapping Level in Pipeline)  i can see the payload in the below format as given below . even after mapping all the segments and nodes in Message mapping
    <ACC_DOCUMENT02>
    - <IDOC BEGIN="">
      <E1BPACHE09 SEGMENT="" />
      <E1BPACEXTC SEGMENT="" />
      </IDOC>
      </ACC_DOCUMENT02
    Where as the actual Output should  Come in the below format 
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ACC_DOCUMENT02>
    - <IDOC BEGIN="">
    - <E1BPACHE09 SEGMENT="">
      <HEADER_TXT>3030/0533/000000/533</HEADER_TXT>
      <COMP_CODE>1610</COMP_CODE>
      <DOC_DATE>20110704</DOC_DATE>
      <PSTNG_DATE>20110615</PSTNG_DATE>
      <DOC_TYPE>ZD</DOC_TYPE>
      <REF_DOC_NO>45834-A1</REF_DOC_NO>
      </E1BPACHE09>
    - <E1BPACAP09 SEGMENT="">
      <ITEMNO_ACC>01</ITEMNO_ACC>
      <VENDOR_NO>600040</VENDOR_NO>
      <ALLOC_NMBR>3030/0533/000</ALLOC_NMBR>
      <ITEM_TEXT>USD</ITEM_TEXT>
      <SP_GL_IND>0</SP_GL_IND>
      </E1BPACAP09>
    - <E1BPACCR09 SEGMENT="">
      <ITEMNO_ACC>01</ITEMNO_ACC>
      <CURRENCY>USD</CURRENCY>
      <AMT_DOCCUR>1545351.73</AMT_DOCCUR>
      </E1BPACCR09>
    - <E1BPACCR09 SEGMENT="">
      <ITEMNO_ACC>01</ITEMNO_ACC>
      <CURRENCY>USD</CURRENCY>
      <AMT_DOCCUR>1545351.73</AMT_DOCCUR>
      </E1BPACCR09>
    - <E1BPACEXTC SEGMENT="">
      <FIELD3 />
      <FIELD4 />
      </E1BPACEXTC>
      </IDOC>
      </ACC_DOCUMENT02>
    Kindly Let me know if any one has gone through such problem and have any inputs to solve the above issue .
    Help needed ..!!!
    Regards,
    Aziz khan

    I might want you to check first at JDBC sender level. GIving empty resultset or records will also show success status in jdbc side.  Do the following
    1) See your select statement  and check whether your sql is right... Paste the select sql command in toad or some database tool and see what do you get?  if you get empty records there is a possibility to have this kind of output.
    2) Check your mapping fields and make sure you mapped as per requiremetn and activate it again.
    3) Finally copy the output from sxmb_moni  and test in the mapping tool.

  • Error while executing a JDBC to Idoc scenario : No standard agreement found

    Hello SAP PI Gurus, 
    I am having a JDBC to idoc Scenario .And the interface is running at 10 min of duration. 
    <SAP:AdditionalText>No standard agreement found for ,
    BS_EXT_CTBSREPDB, , BS_ERPQAS_QE1_320, http://XYZ.com/FI/FI_FI_01/Charges, FIDCC2</SAP:AdditionalText>.
    While i test the configuration...i get an error in reciever agreement as mentioned above.
    Can you pls help me in resolving this issue.
    Regards,
    Ravi

    Hi,
        I think the problem is with namespace....for IDOC the namespace will be "urn:sap-com:document:sap:idoc:messages"...but in your case it is different.....i.e http:....etc.....please check whether you 've used the same IDOC withe above mentioned namespace in all the configuration objects like interface determination, receiveragreement etc.....
    Thanks
    Priyanka

  • Deleting data from a table(JDBC to IDOC scenario).

    Hi,
    For JDBC to IDOC scenario, the requirement is as explained below:
    1: There are 2 tables-> GDDB and CHANGES
    2: Poll the CHANGES table every 30 mins everyday.
    3: a)Publish the records for which the 'published' flag status is 'N'
       b)Update the status as 'Y' after publishing.
    4: On the first day of every month, delete the records from the CHANGES table if the record is 3 months old and 'published' status is 'Y'
    I would like to know how  update and delete can be done using one JDBC adapter?
    Regards,
    Vishal.P.Kulkarni

    Hi,
    update:
    there is a field in the sender jdbc adapter - SQL statement for update - put it there
    delete - On the first day of every mont
    create a job on the database which will trigger the delete statement
    it does not/ should not have to be done with XI
    Regards,
    Michal Krawczyk

  • JDBC to IDoc (Custom inbound function module)

    Hi,
    In my scenario JDBC to IDoc, I am using a custom function module to change the planned order. When I exectue the function module in WE19, it works fine and the IDoc status is also updated correctly.
    But when I execute the entire interface right from JDBC, the status of the IDoc is set to 51 and the description it is giving is "No status record was passed to ALE by the application".
    Can any one help me with this, where exactly is the error?

    For IDOC status 51 : Inbound IDOC
    In WE19, Give the IDOC number & execute ... then put the cursor on the idoc control record . then click on the Standard Inbound push button on the application tool bar.it will show show all the details like partner no,type , message type , process code & function module name ...
    now put a break point in the function module .. & debug .
    if u r using customised inbound function module , then click on inbound function module .. there u will get a pop screen with FM name & debugging option in both background & foreground mode...

  • JDBC - XI - IDOC scenario, SM58 error

    I am trying to set up a scenario with JDBC -> XI-> IDOC.  I seem to get the data, but when I look at it in SXMB_MONI, I get the checkered flag, for the overall status, but a red flag for the outbound status.  This led me to SM58 where I see this error "No authorization to send IDocs with message type Z...".  It shows the caller ID as being XIAFUSER (which is different from the ID I have created on the receiving SAP system) and is in function module IDOC_INBOUND_ASYNCHRONOUS.   On XI, I have the RFC (SM59) and Port (IDX1) setup for the receiving SAP system.  The receiving system has an ID setup (used in the RFC on XI), has a partner profile, port, logical system, and a RFC to XI setup.
    Any ideas on where to track this down?  I tried giving XIAFUSER sap_all, and it still fails and this ID does not exist on the receiving system.

    HI,
    Just to inform you that, if any SM58 error, mainly because of IDX1 entry and RFC destination .
    So that;s the reason , i just suggested to check this SAP note.
    Now you have given SAP_ALL access to test right ? Even you can check with this SAP note-837595
    Also check that SM59 (RFC destination) in XI system uses any User ID ? DO not select CURRENT USER option here.. and check it
    Regards,
    Moorthy

  • JDBC to IDOC Error

    Hi Guys
    On my Scenario Jdbc to Idoc (Asynch) I am using  FLCUSTOMER_CREATEFROMDATA.FLCUSTOMER_CREATEFROMDATA01
    as a Receiver Interface, now when testing on the sxmb_moni I get two flags the Black and While and the Red the one the is Back and While shows that the Sender is my JDBC Adapter which is right
    but now the Red flag show that the Sender is IDoc(FLCUSTOMER_CREATEFROMDATA.FLCUSTOMER_CREATEFROMDATA01)  is also Sender of which I used it as a Receiver Interface, I dont know how to stop this IDoc Adapter not to send but to receiver.
    Basical my scenario is meant to create an IDoc but is is not doing it when going to TCode WE02/WE05 I get message : "No IDocs selected"
    Thanks
    Yonela

    Hi
    I don't have any conditions, to Send and Receive, by the way I went to  TCode IDX5 my Outbnd is right but Inbound thats where I get the below error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Receiver Identification
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error
    I have done these:
    SM59- To Create RFC Destinations
    WE21- To Create IDoc Ports
    SALE- To Create Logical System
    WE20- To Create Partner Profiles
    IDX1- Port Maintenance in IDoc Adapter
    IDX2- Metadata Overview for IDoc
    On the ID I created the the IDoc Receiver:
    RFC Destinatin: IDOC_RECEIVER
    Interface Version: SAP Release 4.0 or Higher
    Port:   SAPPI1
    SAP Release: 701
    What could be the problem
    Thanks,
    Yonela

Maybe you are looking for

  • Word document links won't open in IE 9

    I got a user who cannot open up a word document link in sharepoint online that should display a word  dialog box basically in IE 9. When clicking, nothing happens even if pop up blocker is off, but he can access the word documents from the link in Fi

  • Question : Service Accounts for SQL Server 2012

    Hello, I am planning to create AD accounts for SQL Server 2012 services that will be installed on Windows 2012 server. I was reading the following Configure Windows Service Accounts and Permissions and Windows Privileges and Rights Is there a recomme

  • Simulating Acccounting Document before billing is created ( VF01 )

    Hi All,   We are on ECC6.00 . As it is a standard feature that SD billing is created and then the billing details are submitted to create accounting document .  If the system fails to create the the FI document, the billing docuemt still exists in th

  • NetStorage doesn't allow login

    Hi, In trying to log into NetStorage the login window just recycles instead of proceeding. This is in /var/log/apache2/error_log [Wed Aug 04 10:35:00 2010] [crit] [client 123.12.124.124] configuration error: couldn't check user. No user file?: /oneNe

  • Print dialog (Proof) Simulate Black Ink

    I got an Epson 4880 to do some tests for proofing.Its not serious proofing or anything like contract-proof,its just to serve as guideline for some customers but I think Im missing something. I plan to get a spectrophotometer some time soon but for no