IDoc to File scenario (External Definition)

Hi
I have a scenario which is a Idoc to file scenario. Here I want to continue with mapping only if the field MATNR exists on the source side (Idoc)  otherwise I should get a message on the target side that the "Mapping failed because  MATNR field does not exist " and the mapping should fail.
There are two independant MATNR fields and mapping should fail if I either of them does not exist.Please keep in mind that there indepandant of each other.
Please help
Thanks in advance

You have to write an UDF with exception. In exception you can write your message (the reasone of failure).
something like this..
//Mapping trace will add the warning to show in MONI (if trace level is set to 1 atleast in Tcode SXMB_ADM).
MappingTrace trace = container.getTrace();
for (int i = 0; i < MATNR.length; i++)
          if(MATNR<i>.equals(""))
               trace.addWarning("MATNR is missing.");
               throw new RuntimeException("MATNR is missing.");       
abvoe code is just an example, you have to modify and put the logic as per your need.
Regards,
Sarvesh

Similar Messages

  • IDoc-to-File scenario with external Partner ... PCK necessary?

    Hi all,
    I have a question concerning to a IDoc-to-File Scenario with an external Partner. Here is a short Description of the Scenario:
    The SAP ERP System creates an IDoc which should be send to the SAP Integration Server. The Integration Server respectively the IDoc-Adapter transform the IDoc in IDoc-XML. The Integration Server executes a Mapping and so on. In the final step the Integration Server should send the XML-File to a FTP Server in New York (external Partner) with the File/FTP-Adapter.
    Have I to install the Partner Connectivity Kit at a Server in New York or is it working without the PCK? Which are my possibilities?
    Thanks for your help
    with kind regards
    Christopher

    Hello,
    If the FTP server has connectivity to XI and if the
    port is open XI can directly do the FTP using File
    Adapter.
    Thanks,
    Himadri
    Hi,
    thanks for your quick answer.
    What means "connectivity to XI"? Our SAP-Environment is in Germany and the FTP-Server is in New York. Is it enough to open the port in the firewall?
    Thanks for your answer
    Christopher Kühn

  • Idoc to file scenario general query

    Hi All,
    I know about the basic settings needed for the Idoc to file scenario.
    My query is related the idoc /ALE settings.
    I have a scenatio wrking in my system where we have configured the port for B type partner and also the port as XML-HTTP
    I can not see any DM(BD64) created for it basically.I want to know that in what scenarios the BD64 configuration is required.
    Or it is the case that if we define the BD64 then we do not need to configure we20 and we21, it will be auto configured?
    Please let me know the use cases for these different configurations if any.
    Thanks in advance.
    Regards,
    Rahul Kulkarni

    Hi Rahul,
    BD64 uses mostly IDoc to IDoc scenarios because the IDoc consults the distribution model and determines whether any filter objects are specified for a receiver.
    WE20 and WE21 (Partner Profile,Port Definition) we have to define in any scenarios where ECC included.
    Thanks,
    Seshu.

  • IDOC to FILE Scenario-Error in defining Adapter specific Identfier

    Hi All,
    I am configuring IDOC to FILE scenario where IDOC will be send from ECC to PI System.I did following configuration
    I created RFC,PORT,LS and Partner Profile on R/3 System. I had maintained SLD and IR. In ID I created Configuration scenario and business system.When I click on menu->Adapter specific Identfier where I want to specify IDOC Adapter and RFC Adapter. But it is not allowing to edit it is not editable. As we provide LOGICAL SYSTEM,sender system ID and client number of the sender system.

    Hi Kavi,
    I assume you correctly filled the Logical System of your Business System in the SLD...
    Then in Integration Direction, use menu "SLD clear cache".
    Always in Integration Direction, open your Business System, go to menu "adapter specific identifier", and... close to button "close", you should have another button like something ''check'' or "compare to SLD' or ''retreive SDL data'' (I have not an openned PI to check the right term). Use this button to get value stored in SLD to this local definition.
    Mickael

  • IDOC TO FILE Scenario - No Message arrive at PI

    Hello,
    i want to create a IDoc to File scenario. I already sent an IDoc from an ERP System to the PI.
    The status text is ::000 and the information is 'IDoc sent to SAP system or external program'.
    In the PI i have a Business System that shoud receive this IDoc but i can't find an incoming Message for example in the message monitor???
    Somebody have an idea?
    Thank you!

    Problem is solved.
    I couldn't load the metadata for the IDoc, because their was no client in the RFC-Connection.
    I haven't found this problem earlier, because the connection test was working well.
    Anyway, thanks to all

  • DTD files as external Definition

    Hi ,
    Read lot of threads on this which are having same problem ,some of them got solved none of them posted how did they succeded on those.
    i am getting error like Name "ds:Signature" is incorrect, when i tried to inport the .dtd file as external definition,so I did try converting dtd file to XSD ,it is creating the 3 xsd files and none of them are valid each one of them are error.But however the DTD file is valid .
    Using Invoicedetail DTD file for my scenario.
    you can download the file from http://cxml.org
    Please let me knw on this.
    Thanks,
    Madhu

    Hi,
    Here are the errors for the 3 xsd's
    1.     Value 'ds:Signature' is not allowed for attribute 'ref'.
              Hint: A valid value would be 'xml:lang'.
              Error location: xs:schema / xs:element / xs:complexType / xs:sequence / xs:element / @ref
    2.     Value 'ds:Signature' is not allowed for attribute 'ref'.
              Hint: A valid value would be 'xml:lang'.
              Error location: xs:schema / xs:element / xs:complexType / xs:sequence / xs:element / @ref
    3.                   Value 'xades:Identifier' is not allowed for attribute 'ref'.
              Hint: A valid value would be 'xml:lang'.
              Error location: xs:schema / xs:element / xs:complexType / xs:sequence / xs:element / @ref
    these errors are coming in xml spy when i tried to validate .
    Thanks,
    Madhu
    Edited by: madhu204 on Jul 23, 2009 4:54 PM
    Edited by: madhu204 on Jul 23, 2009 4:55 PM

  • Using SAPR/3 IDOC in PI as External definition,type of communication channe

    Hi,iam using IDOC Structure as an external definition in PI ,I JUST want to know the procedure for file to idoc using external defintion for idoc structure in the reciever side and what is the communication channel needed for recieving external definition at reciever side.
    will be waiting for you rresponse.
    bye.
    regards.
    Varma

    Hi
    Use the following steps:
    1. Select the software component that you want to import an IDoc type for.
    Check the settings for the software component version. Make sure the
    attribute Import of RFC and IDoc Interfaces from SAP Systems Permitted
    is selected and that the technical connection data for importing from the
    SAP system is maintained.
    2. Under the Imported Objects node choose Import RFC/IDoc from the context
    menu.
    3. Enter a valid user and password and choose Continue.
    You need to use a receive IDoc Communication Channel but in case of sender no need to create a communication channel.
    Regards
    Monika

  • Idoc-xi-file scenario.  how to display file in html format

    I am not sure whether this is a valid question.........but want to confirm as it was asked by somebody
    In idoc-xi-file scenario.......  how to display file in html format ??
    Thanks in advance
    Kumar

    Hi Vijayakumar,
    Thanks for your reply !! You mean to say I got to use XSLT mapping and also .htm and .html extension together to produce the html file ?? or it is sufficient to use any one of them to produce the html file ??
    Regards
    Kumar

  • In idoc to file scenario, if XI system is down where do idocs pile up?

    In idoc to file scenario, if XI system is down where do idocs pile up (get stuck)
    what tcode can I use to reprocess it?

    Sender System ,Check  BD87 .. you will see alll the IDOCs in Yellow state ..
    You can reprocess all the IDOCs in go from there .. if only they are in yellow state ...
    regards
    PS

  • FIle Content Conversion Problem in IDOC-XI-File Scenario

    Dear All,
    I am doing IDOC-XI-FILE scenario.
    I am facing one problem related to File Content Coversion.My requirement was to generate a dynamic file like <b>%store_code%_%current_date%_sitemaster.xml</b> , I have completed the dynamic generation successfully .
    Now there is slight change in the requirement ,<b>we have to suppress the current_date node of the xml content</b> . i have tried to suppress the current_date using these <b>DATE.fieldFixedLengths 0 , Date.fixedLengthTooShortHandling Cut</b> , But I am unable to suppress it Can some body provide me the details on this .
    The output xml version generated by Reciever file adapter is as below :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_SITE_MASTER xmlns:ns0="http://sample-xitest.com/sitemaster">
    - <SITE_DATA>
    <STORE_CODE>N002</STORE_CODE>
    <TITLE_MEDI>Company</TITLE_MEDI>
    <STORE_NAME>Mount Road</STORE_NAME>
    <STREET>Chennai</STREET>
    <COUNTRY>IN</COUNTRY>
    <SALES_TAX_NO>12345678910</SALES_TAX_NO>
    </SITE_DATA>
    </ns0:MT_SITE_MASTER>
    Plz provide me the code I have to write in the file content conversion .
    Thanks in advance
    Regards
    Prabhat

    If u see my earlier reply, I mentioned that u can not suppress the field from the one node.i.e Form SITE_DATA data type u can not suppress the field called CURRENT_DATE.
    My suggestion is that , modify the Data type in such a way that you will be having two nodes as I have mentioned earlier.  Then use the Suppress Logic for the Current Date.
    So it will look like this-
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_SITE_MASTER xmlns:ns0="http://sample-xitest.com/sitemaster">
    - <SITE_DATA>
    <STORE_CODE>N002</STORE_CODE>
    <TITLE_MEDI>Company</TITLE_MEDI>
    <STORE_NAME>Mount Road</STORE_NAME>
    <STREET>Chennai</STREET>
    <COUNTRY>IN</COUNTRY>
    <SALES_TAX_NO>12345678910</SALES_TAX_NO>
    </SITE_DATA>
    <CURR_DATE>
       <CURRENT_DATE>20051105</CURRENT_DATE>
    </CURR_DATE>
    </ns0:MT_SITE_MASTER>
    So ur SITE_DATA is not having a field called CURRENT_DATE. This field is in separate node (segment ) called CURR_DATE. Now u can use the Suppress Logic for the same like this.
    CURR_DATE.fieldFixedLengths - 0
    CURR_DATE.fixedLengthTooShortHanling - Cut
    And in your Variable Substitution you can use the date from the other segment called CURR_DATE.
    Hope this solves ur problem.
    Regards,
    Moorthy

  • Error/Doubts in Idoc-XI-File scenario

    Dear All,
    I am doing one scenario in which DELIVERY idoc is posted from R/3 to XI and then from XI that idoc is to be sent as flat file to one local folder.
    For this scenario, I have done all ALE settings and I am able to see the idoc in XI in cXML format.Now I want to sent it as flat file.
    Now, for doing this I created 2 BS & 2 TS. 1 BS & TS of type Third Party for receiver & 1 BS & TS are of type Web as ABAP for sender. Then I have created one namespace in IR. I have not created any DT, MT, MI, MM becoz the structure of source and target file are same. Now, I created one IM in which I specified specified Type as "ABAP Class" & Mapping program name as one of the Z function module as specified in one of the SAP Guides.
    Then in ID, I created 2 Parties ie. one for Sender & one for receiver. Sender is having a communication channel of type Idoc & receiver is having communication channel of type File. And thn further Receiver Agreement, Inetrface Determination, Sender Agreement & Receiver Agreement are configured.
    In my system there is one scenario already configured which is using Delivery idoc so I have used party in my scenario for both sender & receiver.
    Now, when I am sending the idoc from R/3, I am able to see cXML in SXMB_MONI but it is taking receiver as the one which is defined for the already existing scenario but not the receiver defined by me.
    Can anybody guide if I have followed the correct steps & where I am doing the error.
    Warm Regards,
    N.Jain

    Hi ,
    Plese refer the following blogs ,
    IDoc to File
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    You have to do all this settings mentioned in the docuemnt:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/sapR3%28Idocs%29ToXI--Steps+Summarized&
    Also can you check this weblogs on the same:
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    /people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
    /people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
    /people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi
    /people/saravanakumar.kuppusamy2/blog/2005/01/20/configuration-tips-for-a-business-serviceintegration-process-to-send-back-ale-audit-idoc
    Thanks ,
    Suvarna
    Award pts if  it helps .

  • Integration server as logical system in IDoc to file scenario

    Hi,
    Will we configure integration server as logical system in IDoc to file scenario or the RFC destination related to the port will be suffice?
    For which logical system will the outbound partner profile configured?
    Regards,
    Gajendra.

    Hello,
    I feel that the RFC destination linked to the port is the key here.
    Because the scenario (IDoc to File) works in both the cases:
    Case 1: Used the logical system as Integration server
    Case 2: Used the logical system related to the file (third party) in the SLD.
    In both the above cases the RFC destination points to the integration server.
    Is this the case that in the XI scenarios (where IDoc are sent) the logical system name in the partner profile is just dummy and has not much significance??
    It is the port that matters and once the Idoc reaches XI the routing takes place based on the configuration in ID.
    Thanks.
    Regards,
    Gajendra.

  • How to suppress the Acknowledgement  Error in IDOC to File scenario?

    Hi -
    I got the status in SXMB_MONI as 'Processed Successfully' for the IDOC to File scenario but the Acknoledgement status throws an error saying 'Acknowledgement not possible'.
    I read one of the documents in the forums on how to suppress the acknowledgement using a table on R/3 side using IDXNOALE,
    i tried that option but i still get the 'Acknowledgement not possible' error.
    Is there any other way to suppress this error?
    Thanks,
    Tirumal

    Hi Tirumal,
    Receiver adapters that run on the Adapter Engine support system acknowledgments if they are requested by the sender. Acknowledgements are triggered when a message is successfully processed by the adapter or if an error occurs while it is being processed. Receiver adapters do not support application acknowledgments. The RNIF and CIDX adapters are exceptions to this rule, since they also support scenario-dependent application acknowledgments. Sender adapters of the Adapter Engine do not request any acknowledgments.
    This means, JDBC adapter does only send system acks, however IDoc adapter is requesting application acks. Therefore as mentioned by the previous poster, you have to disable acks for this scenario using report IDX_NOALE.
    Also go through these documents for any further help:
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how to handle acknowledgments for idoc.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/e6194119d8f323e10000000a155106/content.htm
    Regards,
    abhy

  • IDOC to file scenario

    Hi Experts,
    In IDOC to file scenario i did in this way.
    1)created logical system.
    2)Using SALE tcode I assign logical system to client ,created RFC destination,Port and Partner's profile.
    It is showing all the thing correct.
    3) In XI system , I configured using IDX1 and IDX2.
    Then I created the material and checked the status which is green in we05.
    But in tcode IDX5, the material is not coming.
    Here I am confused that why data is not coming to XI system.
    can anyone help me?
    Thanks
    Rabi

    Hi,
    The Following are the Possible checks
    1) Check in R/3 side SMQ1 & SMQ2
    2) Check in R/3 side SM58
       In R/3 system, Goto SM58 tcode and see if the IDOC have stuck up in Queue.
       If the entry is available then select it and press F6, to push it manually.
        This happens normally if IDOC stuck up in queues.
    3) Check in PI SMQ2 and IDX5
    regards,
    ganesh.

  • PI 7.1 scenario -- File to File , File to IDOC  and IDoc to File Scenario

    Hi All,
    *I have PI 7.0 . I have in that File to File , File to IDOC  and IDoc to File Scenarios*
    File to File -- This scenario is working fine.
    File to IDOC   --  Setting done in PI 7.0 like SM59,  IDXI, IDX2  and in R/3 like SALE (logical system)---  This scenario is working fine.
    IDoc to File  --  Seeting done in R/3 like SALE (Logical system, Distrubtion Model (Port, Partner Profile)) -- This scenario is working fine.
    Now I need to move to PI 7.1  -- for File to File , File to IDOC  and IDoc to File Scenarios.
    Please let me know do I require to make any changes in Design and Configuration and settings in PI 7.1 and R/3 for above scenarios or it will work fine as it is already working for PI 7.0
    If changes are required please let me know what changes to do for each scaenario and pls also send blogs for that.
    Regards

    >
    Rickkk wrote:
    > Hi,
    >
    > Idoc metadeta is updated through idx2?
    >
    > Regards
    If there is no metadata maintained for an idoc type, the metadata for that idoc type gets loaded when an idoc of that type is received by PI for the first time. If you are looking at loading metadata of all idoc types before the first run, its really not required. Just make sure that the port is configured properly. Although, there is no harm in preloading the metadata using IDX2.
    You need to use IDX2 mandatorily when the the metadata changes and the metadata in ECC and PI is different. In that case, you need to delete metadata for the changed IDoc type and then either you can update the metada through IDX2 or let the system take care of.

Maybe you are looking for

  • Solaris 8 x86

    Dear Everybody, Would you please tell me, does oracle 9i support solaris 8 for intel x86? Thank you very much. Yours Sincerely, Stephen Hsu

  • Dunno what's going on with this trigger

    I created the following trigger: CREATE OR REPLACE TRIGGER common.auto_entity_types_type_id BEFORE INSERT ON common.ENTITY_TYPES FOR EACH ROW begin      if :old.type_id > 0 THEN           null;      else           select SEQ_ENTITY_TYPES_TYPE_ID.next

  • 'Invalid node structure', 'Invalid B-tree node size', Disk Warrior useless

    Hi everyone, I am getting sick of this, it's the second time it's happened to me in a relatively short space of time, the first time with an Iomega external 500GB drive, this time with a 1.5TB Western Digital. I gave the Western Digital drive two par

  • Free 3rd party photo frames

    The standard IWeb and Page and Keynote applications have only about 12 frames for applying to photos. Nearly 80 free 3rd party frames are available at Frames and strokes installer for :iWork '08, iWork '09, iWeb '08 et iWeb '09. Click to view full si

  • Setting values in bindings

    Hi, I have a jspx file that has a backing java file. In the jspx file I have inputText components whose values are binded to a database. In the java file, I can get the values of these inputText components like this: String fn = bindings.get("firstNa