File to custom IDOC  or File to abap proxy

Hi there,
I would like to know best approach for the following scenario.
1) i have file coming from legacy system
2) On target side SAP , I have BAPI's available  (Create, Save, Commit )(No standard IDOC available)
I can create Custom IDOC and call those BAPI's in Custom Function Module
or
I can use ABAP proxy and call BAPI's
What is the best way of doing this? and Is there any other way?
Thanks
Kumar

hi,
Abap Proxy is better than RFC in terms of performance.
proxy is that it always by passes the Adapter Engine and will directly interact with the application system and Integration engine - so it will and should give us a better performance.
In your case , if there want to crate idoc from scratch level then we go for proxy  and proxy support large volume of data (more than 5 mb).
One more  reason is RFC , the data is converted between RFC and XML in RFC adapter. In proxy XI communicates with the R/3 in native XI language (SOAP XML).

Similar Messages

  • Error in File to Custom IDoc

    Hi All,
    I am getting following error while doing File to Custom IDoc Scenario
    No authorization to send IDocs with message type Z
    Can any one tell how to resolve this error?
    Regards,
    Sai

    Hi Krishna,
    The RFC destination that you have put in IDoc communication channel must be present in your SAP XI system, transaction SM59 also.
    Please check if the user id/Password that you have given has all the authorization.
    Also check the User ID and passwrord in SM59 in R3 and see if a Remote Login is possible.
    There is also some configuration by which the clients are allowed / blocked from receiving Idocs from XI. Basis guys can do it for you. Please approach your basis consultant. Hopefully that helps..
    Regards,
    Abhy
    Message was edited by: Abhy Thomas

  • RFC (using AAE) vs IDoc (Using IE) vs ABAP Proxy (using IE) in PI7.1

    Hi All,
    In previous versions of SAP PI, SAP recommends the use of IDoc or Proxy over RFC mainly due to performance reasons, but with PI 7.1, RFCs can use AAE which significantly boost its processing.
    So the question is, with PI 7.1, is the performance of RFC adapter using AAE good enough that is should be considered over IDocs (using IE) & Proxies (using IE)? Please provide elaborate reply.
    Thanks,
    Rahul

    >>>>>So the question is, with PI 7.1, is the performance of RFC adapter using AAE good enough that is should be considered over IDocs (using IE) & Proxies (using IE)? Please provide elaborate reply.
    Answer: If your major objective is only the performance factor then you can go for AAE using RFC. But RFC's individual processing performance is slightly lower than idocs and proxy.
    Though AAE monitoring is just only in RWB,  But due to less persistence steps involved in the entire processing, RFC with AAE supercede other options.
    IDOc using IE vs Abap Proxy using IE --- I would recommend only Abap Proxy using IE. Plus you get all the monitoring features here.

  • IDOC-File - records in Idoc to file based on some condition

    Hello experts,
    I have a idoc to file scenario. the incoming Idoc can have multiple records in it and i have to map these records to a csv file. Now the problem is not all records has to be mapped to the file. Based on the value of a perticular file (which is not root), i need to decide if the entire record has to be processed or not. Like the idoc structure is say:
    IDOC
       E1WPA01            0....9999
          E1WPA04         0...99
              KONDART     0..1
    Now for all valid E1WPA01 where the value of KONDART equals to some spacified value (known) , there has to be one record in the target csv file.
    How can this be done at the root level?
    One way of doing is we give empty values in the target file where the condition of KONDART is not fulfilled. Say if there are 10 records of E1WPA01 and only 4 satisfies the condition, we will ahve 10 records in the output file but only 4 records will have value and the rest 6 will be blank like (,,,,,,,). But I dont want this. I want only 4 records in the output file.
    I tried mapping like this:
    E1WPA01----
    >Advanced -
    > Root
    E1WPA04-KONDART---->UDF
    The problem i am facing here is if 4 records fulfill the condition, the first 4 are taken and the revelent 4.
    Please help.
    Regards,
    Yash

    Hi Chirag,
    I wrote the following code in UDF:
    for(i=0;i<a.length;i++)
    if(a{i}.equals("Specified Values"))
    result.addValue("a{i}");
    else
    result.addValue(ResuktList.SUPPRESS);
    And its working partially. I mean the queue of the UDF looks like
    1. AAAA                      SUPPRESS
    2. <Specified value>     <Specified value>     
    3. AAA                        SUPPRESS
    4. AAA                        SUPPRESS
    5. AAA                        SUPPRESS
    6. AAA                        SUPPRESS
    7. <Specified value>     <Specified value>
    8. AAA                        SUPPRESS
    9. AAA                        SUPPRESS
    and it creates 2 ROOT nodes. But the root nodes are created for line 2 and line 8 insteed of 7.
    What can be problem??
    Yash

  • Idoc syntx error me21 , abap proxy call transaction

    Hi Experts,
    I am struck with the below problem, could you please shed some light on the issue, appreciate your help and  rewarded.
    scenario:
    XI sends NEW PO message to abap proxy, in abap proxy we populate bdc_tab
    and call ME21 as below
    CALL TRANSACTION  'ME21' using bdc_tab mode 'N' update 'S'  messages into messtab.
    problem:
    EKSEKS01 idoc is getting created with syntax error status code :26  in ECC5.0
    only 5 sigments are generated in the idocs. the three segments ( E1PISHO, E1PISIO,E1PISSO not generated).
    after transaction executed it returns subrc 1001, msgid--> ME, MSGNO --> 218.
    Thanks In Advance.
    Ranjit.

    Hi Atish and Nishant,
    Thanks much  for the immediate response.
    1.Would like to know what is the mandatory data to be passed for PO creation in BDC table.
    2. Is there any user exit or where the idoc creation happens during me21 execution.
    I have verified the po in we02 , as before mentioned the three sigments are not getting created and i am not sure the reason.
    Note: We didnot have any output configured in ECC 5.0 for this idoc to be created.
    I am really not able to locate in debug mode FOR  ME21, where this ekseks01 idoc getting created and triggered.
    Appreciate your help.
    Thanks in Advance.
    Ranjit.

  • Problem with Configuration in Production ( ABAP Proxy - XI - FILE)

    Hi All,
    I have a ABAP Proxy -> XI -> FILE scenario wich is working perfectly in DEV and QAS environment.
    When the person responsible for transporting tried to transport the objects in QAS to PRD, the following error happened:
    Direction of communication channel |BS_MA_FileServer_PRD | CC_File_PedidosServ_MA_FileServer_IA is incorrect.
    Correct the direction or choose another communication channel
    BS_MA_FileServer_PRD - Business System (FILE)
    CC_File_PedidosServ_MA_FileServer_IA  - My FILE Communication Channel
    This was what the Basis person sent to me. I don't have access to know exactly what happened. And I really don't know what could be wrong or if maybe a component was created wrongly in Production.
    Hope you can help.
    Points will be given.
    tks.. Daniela

    You have mentioned FILE is on the receiving side and ABAP proxy is on sender side.
    But the error pasted by you clearly shows syntax of a Sender Agreement .
    For receiver agreement it should be |<Sender Service>| |BS_MA_FileServer_PRD | CC_File_PedidosServ_MA_FileServer_IA
    Bipin

  • Idoc to file scenaro ( sending IDOC as it is to NON-SAP)

    Hi Experts,
    I am doing idoc to file scenario.
    I am having SAP R/3 system with 3 clients(100, 200 & 300), IDOC is comming from SAP R/3( any one of the client)
    In this is scenario, I am sending IDOC-XML as it is to the NON-SAP system.
    I heard that, i can do in 3 ways. those are
    1. Without any repository objects: you can go ahead with No interface mechanism on the target side.
    2. Without message type: create a message interface whose message type would be idoc itself
    3. With message type: export the IDOC as xsd file and re import the xsd file as an external definition.
    If i  go without IR objects,Please tell me whether i need to create Interface objects(i.e. DT,MT & MI) & Mapping objects (MM & IM) or not for the reciever.
    MY ASSUPTION:
       step1: I will import the IDOC into IR.
       step2: Directly i will go to the ID without desiging any object in IR ( is it ok).
      Is my assuption or correct or not?, please tell me.
    So please tell me the entire scenario how to achieve this.
    Please help in this issue.

    Hi Laxmi
    1. Without any repository objects: you can go ahead with No interface mechanism on the target side.
    -- Not Possible
    2. Without message type: create a message interface whose message type would be idoc itself
    -- No need for the Message Interface for IDOC. You will directly import the IDOC and do the Mapping
    3. With message type: export the IDOC as xsd file and re import the xsd file as an external definition.
    -- This is Possible. you are export the IDOC as XSD File and reimport the same. so there is no difference. If you are going to change the IDOC Structure then this is possible.
    Here I am sending some links which are useful for IDOC to File Scenario. Please go thru the links given below..
    While doing an IDOC -> XI -> File scenario, The Points to noted are:
    1. You don’t need a DT, MT or a message interface for the IDOC as it itself acts as the Message Interface.
    2. You import the IDOC and use the same in your mapping.
    3. In this configuration note that you don’t have a sender agreement as you don’t have a sender IDOC adapter.
    If it is that you wanted to send an IDOC from XI (File to IDOC) , then in this case:
    points 1 and 2 will remain, but the 3 will not. You will need a sender agreement for the file and a receiver agreement for the IDOC.
    IDOC -> File scenario ref:
    IDoc-XI-File scenario
    File -> IDOC ref:
    File to IDOC
    To be able to trigger your IDOC from the SAP ISU system, you will have to set the partner profile in we20. Select your Business System (mostly under Logical system) and then create Outbound entries for whichever IDOC you want to trigger.
    You define your basic type also in your partner profile settings, Please go thru the following links to get a better idea about partner profile:
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b833243d711d1893e0000e8323c4f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7cd343d711d1893e0000e8323c4f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/32/692037b1f10709e10000009b38f839/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/5e/b8f8bf356dc84096e4fedc2cd71426/frameset.htm
    Also, I would suggest that you go through this blog by michal if any issue arises,
    /people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
    /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    I hope this answers your query.
    Award the POINTS if it is useful **
    Cheers
    Vasu

  • Performance problem in File to ABAP Proxy scenario

    Hi gurus,
        I have a scenario where the sender is sending a file and the receiver is ABAP Proxy.The file is a simple DAT file containing banking data.The file sample is as belo
    00000MM21901 PYM0901021531     
    704401020100005510000040000D0002
    704401020127147391000033500D0003
    704401020127147391000045000D0004
    704401020109341157000038800D0005
    70420!!!!10200000182174D
    704401021100006040000015158D0001
    704401021100006040000005034D0002
    7042010210000020192D
    The above file need to be split and mapped to the fields of the ABAP Proxy after doing some validations.
    Is Receiver Determination using mapping required? What is the most efficient way of splitting the file?
    Please give your replies keeping better performance of the interface in mind.What is the best way of doing the validations?
    regards
    Debansu

    Hi Satish,
        As you can see in my question above,the sender side contains a flat file(the file format is given in the question),I need to split the file into strings which can then be mapped to specific fields of the ABAP Proxy.A sample output of the xml file that is passed on to the ABAP proxy after mapping transformations is given below:
    <BATCH_TOTAL_RECORD_420>
      <BATCH_REPORT_DISTRICT>70</BATCH_REPORT_DISTRICT>
      <KEY_VALUE>420</KEY_VALUE>
      <BATCH_NUMBER>1021</BATCH_NUMBER>
      <BATCH_TOTAL>0000020192</BATCH_TOTAL>
      <FILLER_BATCH_TOTAL_SIGN>D</FILLER_BATCH_TOTAL_SIGN>
      <FILLER />
      </BATCH_TOTAL_RECORD_420>
    - <BATCH_TOTAL_RECORD_420>
      <BATCH_REPORT_DISTRICT>70</BATCH_REPORT_DISTRICT>
      <KEY_VALUE>420</KEY_VALUE>
      <BATCH_NUMBER>9999</BATCH_NUMBER>
      <BATCH_TOTAL>0000202366</BATCH_TOTAL>
      <FILLER_BATCH_TOTAL_SIGN>D</FILLER_BATCH_TOTAL_SIGN>
      <FILLER />
      </BATCH_TOTAL_RECORD_420>
    I hope now you can provide me some answers.
    Regards
    Debansu

  • Receiver File Adapter - Tab delimited Text file

    I am using receiver file adapter to convert message created by ABAP PROXY to convert tab delimited text file format.
    XML message is in following format.
    - <DT_R3_ROLES_OUTBOUND_REC>
      <LIST_CATEGORY>SAP_HR</LIST_CATEGORY>
      <USRID>MRUDULAP</USRID>
      <EMAIL>[email protected]</EMAIL>
      <NAME>MRUDULA PATEL</NAME>
      </DT_R3_ROLES_OUTBOUND_REC>
    - <DT_R3_ROLES_OUTBOUND_REC>
      <LIST_CATEGORY>SAP_HR</LIST_CATEGORY>
      <USRID>HCHD</USRID>
      <EMAIL>[email protected]</EMAIL>
      <NAME>H CHD</NAME>
      </DT_R3_ROLES_OUTBOUND_REC>
    I have used file content conversion in the adapter configuration.
    Recordset structure = DT_LISTSERV_INBOUND_REC
    DT_LISTSERV_INBOUND_REC.addHeaderLine = 0
    DT_LISTSERV_INBOUND_REC.fieldSeparator = ','
    How to use Tab as the delimiter in the fieldSeparator field?
    Now the output in the file is as follows :
    [email protected]'MRUDULA PATEL
    [email protected]'H CHD
    What I need to do to make the file as the tab delimited file?
    Thanks in advance!
    Mrudula Patel

    Hi Mruddula,
    Use fieldSeparator: '0x09' for horizontal tab
    <b>DT_LISTSERV_INBOUND_REC.fieldSeparator: '0x09'</b>
    Naveen

  • PI needs to obtain a zip file via FTP using the File adapter

    I have a scenario where PI needs to obtain a zip file via FTP using the File adapter, this zip file contains a number of txt files that I need to process, and the content of one of them send it to an ECC, now I'm using the PayloadZipBean Module in the Sender FIle Adapter, and I have two things if I use the Message Protocol as File, I get a Payload for each txt file in the zip file, but this payload has no structure, and if I use the File Content Conversion I get an XML strcuture with only one field and a strange string in it, and somewhere in this string the names of the files I assume all the content of the zip file, can anyone help on how could I achieve what I need that is to pull the zip file via SAP PI, then unzip it, and with the content of one of the txt files send it to an ECC via ABAP Proxy, thanks in advance for your answers.
    Regards,
    Raul Alvarado

    Hello Raul,
    you can do it in futher way ...
    pickup zip file and simply extract and dump it in another temp folder (can use scripts on OS level).
    @ then Use another sender communication channel to pickup all these text file .
    for further clarification you can use these links also. -
    Process txt files in zip file
    Accessing File using FTP from Java Mapping
    File Sender Adapter with FTP protocol
    BR
    Raj

  • FTP to ABAP Proxy Scenario - getting error CO_TXT_CHANNEL_PASSWORD_ERROR

    We have transported PI and EP data from development server to respective production, every thing is running fine except the abap proxy scenarios i.e. PI reads file from ftp location and calls the abap proxy but we are getting following errors:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Call Adapter
      -->
    <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="OUTBINDING">CO_TXT_CHANNEL_PASSWORD_ERROR</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Unable to read user password from communication channel of type Error when accessing the secure store (access ID = FD768D4A8772DB50E1000000AC10041E) Error while reading from the secure store: ERROR_UNKNOWN: Cannot find entry in secure store (SECSTORE,023)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Any solution?
    Please note that I have searched and applied solutions given on SDN forums but didn't get any success. So I am looking for new suggestions.
    Regards,
    Jawed Ali

    Jawed ,
    Please test the HTTP destination of your receiver comm channel.
    Which is the RFC connection to your R3 system.
    Transaction SM59 and check the logon parameter for the connection you are using.
    Regards,

  • Abap Proxy exception Handling

    Hi guys,
    I've implemented the following scenario:
    BPM Process where I've got a async receive (from a file receiver), a sync send (to an ABAP PROXY) and a send async (to a file sender).
    The scenario is working great, I've catched 'Communication exceptions', and the proxy contemplates the necessary exception throwers too, but I'm now trying to Handle one specific exception. Imagine you force a dump, with a divide by zero in the proxy code...the proxy will dump and the XI gets a mapping exception (like is supposed to).
    The exception is:
    <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
    <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
    <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
    The thing is, I want to catch this exception on the mapping and handle it, so the bpm process sends the handle response with the file sender.
    I've looked to Alessandro Guarneri blog, but it's a little bit different, because I don't want to throw an exception but I'd like to handle it....
    Can you guys help me with this question?

    Hi Vijaya,
    I was able to catch the exception like you said, on the proxy side.
    I'm trying to conceive some real and feasible dumps scenarios and for that I'm forcing dumps, and catching exceptions. Divisions by zero was one of the examples.
    For division by zero I was able to catch it with a cx_sy_no_handler exception, but I've another example which I'm not being able to catch it.
    I'm sendind an message e001(zisa), which will exit automatically from the function module. Am I able to catch that message? Meaning, can I catch it and treat it, instead of the system exiting the function and showing the corresponding message?Is there any cx_* ?
    Even better, on sxmb_moni I get:
    <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="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText><html> <body> <H1> 500 SAP Internal Server Error </H1> <B> Error message: </B> O centro nao existe ou nao esta preenchido. ( <B> type of termination: </B> ERROR_MESSAGE_STATE ) <BR /> </body> </html></SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP response contains status code 500 with the description Internal Server Error Error when sending by HTTP (error code: 500, error text: Internal Server Error)</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    So, the SOAP adapter receives something. If it's not possible to catch this exception on the abap proxy side, can I catch and map that soap adapter error text on the BPM side?
    Thanks a lot for all of your attention

  • Consume an external web service with an ABAP proxy

    Hello,
    I'm working on creating an ABAP Proxy to consume my first web service.  In searching SCN I haven't found a comprehensive list of steps to complete the process, but I have found information on generating a proxy from a WSDL and creating a logical port.
    My first issue arises when I go to SPROXY to generate a proxy from a WSDL, I see the message 'Local objects only (No Connection to ESR)', and I have no ability to 'create'.  The Enterprise Service Repository seems to be the new name for the Integration Repository, if that helps.  Do I need the ESR installed to create a proxy?
    A follow-on question, assuming I do need the ESR, would be what do I do with it?  It appears to serve the purpose of design for interfaces, messages, and mapping, but I thought that happened when I created a proxy in SPROXY.
    We're on ECC 6.0, with a 702 / 0007 basis release.  I appreciate and light you can shed on the topic.
    Thanks

    ESR is part of the PI system, and it is where all interfaces details are stored.You could create an ABAP Proxy from a pre-defined WDSL yet stored in PI as part of some communication, but you can also import directly a WSDL from a local file or even from a URL.
    ABAP proxy generates a proxy class and a set of abap structures , fields and data elements. Simply by filling the data and call a method in the proxy class (depends of syncrhonization a different method name) you can consume your service. No PI is needed if you use the local option.
    There is a very good Tutorial from Thomas Jung. I'll try to find it.
    http://scn.sap.com/people/thomas.jung/blog/2005/05/13/calling-webservices-from-abap-via-https
    Here you have a lot of tutorials
    Best regards

  • Testing SOAP/ XML in ABAP  Proxy!

    Hi Experts,
                In an interview I was asked a question on abap proxy.
    In a scenerio where data from file gets into R/3 ztable through abap proxy, when data has already left XI and about to enter r/3, there is some SOAP XML format , and data can be tested/ debugged at this point. I was not sure about the exact point, but surely not the payload in SXMB_MONI.
    Can any1 tell me more about this part of Abap proxy testing.The interviewer said, this is popular testing of abap proxy scenerio .  I am also sure, I am not asking for how to debug Abap coding in the method endmethod part in SPROXY .
    Can any1 help!
    Regards,
    Arnab.

    Hi Arnab,
    In sproxy choose your interface and
    go with menu proxy---> Test interface
    follow the link which gives u step by step procedure
    XI: Debug your inbound ABAP Proxy implementation
    Regds,
    Shiva

  • IDOC-XI-FILE Scenario: Error in ABAP Mapping

    Dear All,
    I am working on IDOC-XI-Flat FIle scenario in which I am using ABAP Mapping as per document "How To Convert an IDoc-XML
    structure to a flat file and vice versa in XI 3.0".
    I created one customized Idoc for this. The Idoc is reacing XI but its flat file is not getting created. Its giving me following error:
    <SAP:Stack>Error in mapping program Z_ABAP_MAPPING_PACKING_LIST (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference.</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    I have also gone thru threads posted for the same topic earlier but still I am not been to resolve this error.
    Please help me out in resolving this error.
    Regards,
    N.Jain

    HI,
       Log saying that, u have problem in the mapping program.
      i.e Z_ABAP_MAPPING_PACKING_LIST
       the problem is due declaration of data.
       i hope that, you have some methods.
       those are declared under intialization section in mapping program.
      please use start of selection before the method.
    other wise, it will come under intilization section.
    warm regards
    mahesh.

Maybe you are looking for