IDoc Scenario - how to jump in context

Hello,
I need help for my iDoc -> XML scenario.
follow situation
IDOC
---SEC1
VAL1=11
VAL2=aa
---SEC1
VAL1=22
VAL2=bb
---SEC1
VAL1=33
VAL2=cc
---SEC2
SEC2.1
VAL1=11
VAL2=ab
SEC2.1
VAL1=22
VAL2=bc
SEC2.1
VAL1=33
VAL2=cd
SEC2.2
VAL1=22
VAL2=xyz
I have to test
If IDOC/SEC1/VAL1=22  then write  IDOC/SEC1/VAL2 into INVAL1
If  IDOC/SEC1/VAL1=22 doesn't exist
then go down to  IDOC/SEC2/ and compare all VAL1 only in SEC2.1
if   IDOC/SEC2/SEC2.1/VAL1=22  then write  IDOC/SEC2/SEC2.1/VAL2 into INVAL1
It could be any number of SEC1 and  SEC2.1
Thanks for any ideas
Andrej

Hi,
Use If Then else:
First IF Condition will be as follows.
IDOC/SEC1/VAL1--> Fix values (Default false, 22 = true)
Then Pass,
IDOC/SEC1/VAL1 --> Target
Else Pass output of below mapping
Use If without else.
If
IDOC/SEC2/SEC2.1/VAL1 --> format by example = 22
Then,
pass IDOC/SEC2/SEC2.1/VAL1
-Gouri

Similar Messages

  • Idocs with errors added status-56 in file to idoc scenario- how to rectify

    hi ,
    in file to idoc scenario when i m sending the file from ftp server to IS Retail,  file is successfully getting processed but the idoc is showing error ,when we see using WE05 tcode or BD87 , pl sugggest how to rectify it to make the status 53

    Hi,
    Have you configured the partner profile details? check these steps..
    1. In the receiver system you must configure the partner profile for your sender system in WE20.
    2. Add the IDoc message type to inbound parameters of the partner profile and configure the appropriate process code.
    2. Fill the Logical system name for your senderservice-->Adapter Specific identifiers in ID.
    <a href="/people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi File-to-IDOC Scenario</a> By Venugopalarao
    <a href="/people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi Steps for Posting IDOC's</a> By Ravikumar Allampalam
    Regards
    San

  • PI-ECC connection (IDOC scenario), how to debug? (External BP)

    Hello everybody,
    In PI -> ECC IDOC scenario I have encountered a debugging problem
    Delivery IDOC is being sent from PI to ECC.
    It is processed with IDOC_INPUT_DELVRY FModule.
    The question is how to debug this communication?
    I try to set external breakpoint in IDOC_INPUT_DELVRY with the user I can see in IDOC processing log
    (IDOC Status details -> 'Logging' tab -> 'Message from' section -> 'User name').
    This user is used to serve communication with PI.
    User is set as dialog and has debugging rights
    When I trigger communication from PI - IDOC is sent but debugger does not popup
    Is my debugging approach incorrect?
    I would appreciate every comment on this.
    Kind Regards,
    P.

    Pothana Yadav
    Thanks a lot for reply!
    What do you mean by checking at Master_Idoc level?
    I am setting a BreakPoint in IDOC_INPUT_DELVRY FModule at the very beginning. Also tried to set BP insidy my BAdi method (which is for sure being call during communication).
    Or maybe you know some other way how to debug such IDOC communication triggered from PI into ECC?
    I know I could use 'endless loop / sm50' trick but then I need to transport source code, which in case of Production is not feasible.
    Regards,
    P.

  • XI-- IDOC scenario, how to link process code with function module

    Hi Forum,
    I have a XI--->IDOC (R/3) scenario,
    where i m creating a IDOC in XI and sending it to R/3,
    i have done all settings to send the IDOC from XI to the R/3,
    i also have the function module to process that IDOC in R/3,
    the problem is:
    I want to know in details (step by step) how to make a Idoc Inbound process code, link it with the function module and use the process code in the Partner Profile in R/3,
    pls help

    HI,
    FOr this u need to go to transaction WE41 for inbound and WE40 for outbound there u assign the function module.
    Now u go to WE20 transaction for partner profile and u can assign the proces code to the inbound message.
    Go to the below help for more information:
    http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
    Inbound process code:
    http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
    Thnx
    Chirag

  • File to idoc scenario . how to create logical system

    logical system asking user authorization what should i do.
    what should be logical for whic we should degine partner profiles
    apoclnt800 or xi7clnt001

    Hi,
    The partner profile to be maintained in we20 (in backend systems -ECC/CRM etc) should be based on logical system for the sender.
    For ex: Src (File) -> PI -> Tgt(ECC)
    In SLD you have created Technical System(TS) and Business System(say BS) for Src. Also a Logical System name (Say LSNAME) is associated with BS.
    In ECC, goto tcode - sale, create a logical system of name LSNAME. Now goto we20 and create a partner profile of name LSNAME. Provide the message type of Idoc in the required place.
    Souvik

  • Reg File to IDOC scenario with Acknowledgment

    Hi Experts!
    In  a File to IDOC scenario , how to get the  acknowledgment back to PI after posting the IDOC to SAP system and send the acknowledgment to the sender system.
    What setting needs to be done in Sap  and PI? Is it better if we have a BPM or is it good to have another interface to pass the acknowledgment IDOC back to the file sender.
    Regards,
    Srini

    Dear All,
    For file to idoc scenario is there any possibility to get line items details or xml details i.e the segments and its related field details using reference id, transaction id or interface name or message id in SAP PI 7.0. I know we need to click each and every message in sxi_monitor and look for details.
    For SAP(R3 System) I can create a report and set the job for specific time period so automatically it throws the details(like reference no, document date, invoice no from) in ftp path as .csv file. The same ftp path is maintained in program.
    I wanted to check FTP--->PI postings and I have set the job at r3 system it is working fine and Im monitoring it too.
    Now the end to end scenario is FTP--->PI--->ECC(R3 system). Please help.Many Thanks.

  • How to handle the control records in case of file to idoc scenario.

    Hi All,
    can you please clarify me how to handle the control records in case of file to idoc scenario.

    Hi,
    In File to Idoc scenario even though you selected apply control record values from payload and you are not getting those correct values which you have provided in the mapping.
    Also check the checkboxes Take sender from payload and Take receiver from payload along with the Apply control record values from payload checkbox
    Regards
    Seshagiri

  • How can I include the Header Information....for a File to IDOC Scenario

    Hi,
    I made a File to IDOC Scenario with DEBMDM06 for MDM>XI>SAP R/3. The Header Information in the XML File which is at the XI end is Missing. For that reason In Tcode SXMB_MONI we are getting an Error that <b>"HEADER Information Missing: Message should Start with EDI_DC40"</b> i.e the Header Information.
      My Question is that whether we can do some changes in the Message mapping Step in the Integration Repository. I HardCoded the Few mandatory Fields that were there but it Again gave me the Same Error as above.
    Can you please Suggest some Solution for this. Since the data is Coming in from MDM part the Header information is not there but It actually Important as it has got all the Port Information.
      Kindly Inform me some Solutions.
    Thanks & Regards
    Somnath

    Hi Suraj,
      Thanks for ur Reply, but Since we are Doing a File to IDOC Scenario the IDOC DEBMDM is on the Right Side in Message Mapping and as U know it is Mandatory to Map an IDOC on the Right Part. EDI_DC40 is coming as it is there in the IDOC but our XML File Does not have that. If we Don't Map then it Becomes RED, which is an Error.
      Furthermore in the Receiver Agreement we have put the Necessary Details such as Sender Service and Receiver Service along with the IDOC Communication Channels.
      Can U give as a Better Insight on this Note how to check the Header Part as it is mandatory to MAP.We also tried to HARDCODE it by putting those Values and Mapping them to a Constant but it is Giving the Same Error.
    Thanks and Regards
    Somnath

  • How to reduce processing time  in case of jms to idoc scenario

    hi all,
    i am doing jms to idoc scenario.
    in this i'm using xslt and graphical mapping.
    while perfroming E2E testing the messages are taking lot of time to get processed.
    please tell me as how can i reduce this processing time or in short how can i overcome this problem.this is a critical issue in production.
    regards
    madhu

    Hi,
    1. To reduce the processing time for JMS -> IDOC scenario, try to get the Average processing time taken by JMS adapter, IE, IDOC adapter for the messages that are processed so far by going thro the Adapter Audit logs, SXMB_MONI race and Time in WE02 in R/3 system. Calculate this for 5 - 10 messages at different time to get the clear idea of which step is consuming more time. Then it will be helpful to focus on tuning that specific step.  If you are using BPM, check the processing time taken by PE.
    2. Check the Inbound and Outbound queues used by this interface, if required try to configure Prioritized Queue with more time allocated for this interface in Integration Engine.
    3. Check the load on the Integration Server when this Interface messages are getting processed, to understand/ isolate the interfaces which are consuming more processing time and system resources.
    4. If this is not in Production try to perform the Mapping/ transformation in graphical mapping itself, it will be helpful to minimise use of XSLT mapping to get better performance.
    5. Check if the Archive and Delete jobs are running successfully in the Integration Server, since this will free up the occupied resources in the system.
    6. If possible post seperate Forum questions for issues in different Interface scenarios, it will be easy to understand the problem for all of us.
    Hope this will be helpful,
    Regards,
    S.Santhosh Kumar

  • File to IDOC scenario : Error with mapping due to Context handling

    Hi Experts.
    I have a file to IDOC scenario which need your advice.
    Source File structure as follows:
    Control_Header     <1:1>
    Invoice_Header     <1:unbounded)
    Invoice_Line          <1:unbounded)
    Trailer                    <1:1>
    Payload as follows capture from SXMB_MONI
    - <Control_Header>
            <Key>999</Key>
            <TransactionID>RCTV</TransactionID>
      </Control_Header>
    - <Invoice_Header>
        <Key>000</Key>
        <BusinessUnit>HDB05</BusinessUnit>
        <InvoiceNo>64471</InvoiceNo>  
    </Invoice_Header>
    - <Invoice_Line>
          <Key>001</Key>
          <UnitPrice>7.00000</UnitPrice>
          <Quantity>1.0000</Quantity>
          <GSTAmount>0.49</GSTAmount>
          <GSTRate>0.07</GSTRate>
      </Invoice_Line>
    - <Invoice_Line>
          <Key>001</Key>
          <UnitPrice>8.00000</UnitPrice>
          <Quantity>1.0000</Quantity>
          <GSTAmount>0.56</GSTAmount>
          <GSTRate>0.07</GSTRate>  
    </Invoice_Line>
    - <Invoice_Header>
          <Key>000</Key>
         <BusinessUnit>HDB21</BusinessUnit>
         <InvoiceNo>6Y0575</InvoiceNo>
    </Invoice_Header>
    - <Invoice_Line>
        <Key>001</Key>
        <UnitPrice>49.50000</UnitPrice>
        <Quantity>1.0000</Quantity>
        <GSTAmount>3.47</GSTAmount>
        <GSTRate>0.07</GSTRate>
    </Invoice_Line>
    - <Trailer>
         <Key>TRL</Key>
         <TransactionID>RCTV</TransactionID>
         <TotalFeedLine>96</TotalFeedLine>
         <HashTotalValue>212.00</HashTotalValue>
    </Trailer>
      </ns:MT_EINVOICE>
    Mapping as follow:
                                                   IDOC
    <Control_Header>   ->    <Control_Header>
    <Invoice_Header>   -->  <Header_Invoice>
    <Invoice_Line>      --->        removeContext  -->  <Line_Invoice>       this is the child node of <Header_Invoice>
    <Trailer>               -
    >    <Trailer>
    The result of the using the above Payload get the following result which not wht I seek
    <Control_Header>
    <Header_Invoice>
          <Line_Invoice>
          <Line_Invoice>
         <Line_Invoice>   *** This belong to the Invoice_Line of the second <Header_Invoice> at the payload
    <Header_Invoice>
         <Line_Invoice>   *** THis segment is empty
    <Trailer>
    I required the Line_Invoice to belong to the child of the second <Header_Invoice>, I have tried using
    removecontext with splitVaue and collaspeContext but to no avail.
    May I know what is my mistake on the mapping of the Invoice_Line to Line_Invoice>
    Rgds
    FNG

    Hello,
    There should be something that could correlate the Invoice_Header/Key and Invoice_Line/Key. In your example, both are the same for the first and data set. If the sample looks like the one below, it is possible to sort things by correlating the Invoice_Header key and Invoice_Line key
    <Invoice_Header>
      <Key>000<Key>
    </Invoice_Header>
    <Invoice_Line>
      <Key>000<Key>
    </Invoice_Line>
    <Invoice_Line>
      <Key>000<Key>
    </Invoice_Line>
    <Invoice_Header>
      <Key>001<Key>
    </Invoice_Header>
    <Invoice_Line>
      <Key>001<Key>
    </Invoice_Line>
    An example mapping could look like this
    For Header
    Invoice_Header --> Header_Invoice
    For Line
    /InvoiceLine/Key --> removeContext --> splitByValue:valueChanged --> Invoice_Line
    The subfields of the invoice line would also follow a similar logic, you just need to use formatByExample --> splitByValue:eachValue so that the context levels are the same.
    Hope this helps,
    Mark

  • How to start an File- XI- IDOC -Scenario manually?

    Hi,
    we have a File->XI->IDOC -Scenario with a polling time of 60 minutes.
    Now it should be possible, that the enduser can start this scenario manually (by report or something else), because sometimes the user has to edit the file and then he/she cannot wait till the loop restarts.
    How can we manage it?
    Regards
    Wolfgang

    Hi,
    Wow - that's great!
    BUT.... it's working only in XI/2004 >=SPS17. We have PI 700/2004s SPS7
    Do you know the corresponding SPS for this feature in PI 700?
    I wanna ask my admin to upgrade - it's a feature the enduser (special endusers) really needs.
    Thanks a lot!
    Regards
    Wolfgang

  • How to move Idoc scenario's

    Hi,
    My client is moving from IBM server to HP's  SUPERDOM.
    Now I have to run certain Idoc- XI- File and File-XI- Idoc scenario's to the new server.
    I would like toi know what all configurations have to be done....

    Hi Snehal,
    You could find all the needed config in the below links!!
    Check this blog on IDOC to File.
    Introduction to IDoc-XI-File scenario and complete walk through for starters.
    A Step-by-Step Guide on IDoc-to-File Using Business Service in the XI Integration Directory
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e07dcaa0-a92b-2a10-3a96-b3d942bd1539
    How Tou2026 Convert an IDoc-XML structure to a flat file and vice versa in XI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    For troubleshooting
    Troubleshooting  File-to-IDOC Scenario in XI.
    Thanks,
    Sathish Raj..

  • How to fill controlrecord in File to Idoc scenario

    Dear experts,
    Currently I have a working file->Idoc scenario in which I fill Idoc-controlrecordvariables as follows:
    - field SNDPOR: name of XI developmentsystem (via a constant)
    - field RCVPOR: name of SAP developmentsystem (also via a constant)
    - same for fields like SNDPRN and RCVPRN etc.
    In Development this works fine. Then I transport the design objects to the next environment. But when I want to test the same in Acceptence or Production, it won't work because the fields are still filled with the settings for the Development system.
    Can I fill these fields via some systemvariable in stead of a constant? Or is there another way?
    Thanks,
    William
    Edited by: JWD on Aug 31, 2010 2:20 PM

    Hi,
    1)Uncheck option Apply contraol record values from Payload in IDoc receiver channel.
    2)Disable EDI_DC40 control record in message mapping.
    this two steps will solve your problem at configuration time it will take the values irresctive of environment.so you no need to maiantain constant values..
    Regards,
    Raj

  • How to catch Posting error in File to IDoc Scenario?

    I have successfully completed File to IDoc Scenario. Now I am interested in catching posting error. i.e., if mapping goes well and when IDoc is being sent to Recipient system then if any posting error is encountered, then a mail should go to a recipient.
    Can anybody suggest the solution.
    Regards,
    Suraj Kumar

    Hi Suraj,
    this can be done by triggerring an alert to the recipient.chk out these links to trigger a alert
    /people/sap.user72/blog/2005/01/14/alert-management--improving-monitoring-of-your-landscape
    /people/sap.user72/blog/2005/01/14/alert-management--improving-monitoring-of-your-landscape
    regards
    jithesh

  • Runtime Error: How to Reprocess File-XI-IDoc scenario

    Hi All,
    I'm working a file adapter to XI to IDoc scenario.  My XI message has about 2,000 records in it and one of those records contains an error (due to an invalid character in a description).  My question is in a production environment would it be somehow possible for me to reprocess this erred message and post the remaining 1,999 records that do not have an invalid character?  What are my options to progress?

    Thanks Bhavesh,
    Not sure what additional details you need but I'll give it a go.  I've got an input file that contains lets say 100,000 rows of data and each row is a separate record.  I use sender file adapter using file content conversion with fixed length definition.  I send that through a simple mapping program that will generate 100,000 IDocs.  I'll get 50 XI messages each containing 2,000 records (recordsets per message)
    Because of an invalid character in the source file (an "escape" character) in SXMB_MONI I get a red flag.  The error message is essentially "com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x1b".
    Since the XI message errors none of the IDocs for the 2,000 records in that message gets created even though 1,999 of them are OK.
    So my question is basically is there a way for me to restart this message via SXMB_MONI (or another way) so the other 1,999 records will process OK leaving me with the error to deal with later?
    Thanks again!

Maybe you are looking for

  • How can I hide a subvi in the hierarchy window?

    I want to hide a subvi of my top level vi in the hierarchy window. I know by calling it dynamically that it won't be in the hierarchy window until it is called but I want to keep it in the hierarchy. I just don't want to display it in the hierarchy w

  • My Ipod does'nt get recognized by windows or Itunes.

    When i plug my Ipod in with my USB-device, it makes the sound that it normally does when the Ipod is plugged in, but it is not recognized on windows nor Itunes. I have tried to Uninstall and re-install. Please help!!

  • AppleTV in the Enterprise

    Does anyone have any experience deploying a large number of AppleTV's in a business setting?   I want to use the AirPlay mirroring in a sales environment.   Each sales person has an large monitor with AppleTV attached.   The iPad is running a custom

  • Update Opportunity Totals button on Opprtunity Product Revenue line items

    Hello, In our application, the sales process is managed at the product revenue level. Each product line item goes through various stages and could be in the intiall state or get cancelled as well. I need to exclude these product revenue line items wh

  • Alv grid background column headings

    HI EVERYONE, I was able to execute the ALV grid report in background .But columns heading is reeating for each page. Can't we just just have the Column Headings once for all pages.?