Outbound interface using ABAP Proxy

Hi Guys,
I am trying to create an interface between a Z table and XI using ABAP Proxy. I suggested file based interface, but client is insisting using ABAP proxy. Z table is in IS-Retail side.
I will appreciate is somebody can share a program to do this.
Any advise/guidance is appreciated.
Thanks,

Hi There
From your  subject line i can see that you want to develop an outbound proxy which means you want to send data to XI from your SAP custom table. That means you need to extract all the information from your Z-table and send it to XI via  proxy.
If my understanding is correct then what you need to do is :
1.Ask your XI team team to generate a message interface for you of type 'outbound' and include the structure in the way they want you to send data to them. 
2.Once the message interface is created by them , you can generate the same in transaction SPROXY .  Search for your interface namespace and then right click
on it and say 'CREATE' . Give the appropriate package and prefix to it.Generate the proxy, save and activate
3. Now you can create a report and then according to the structure generated by XI , you can popluate your internal table to be passed back.
4. Call the method of the proxy in your report and send the data to XI.
I can give you an example of how to do this:
suppose you have built up an internal table by extracting data from your Z-table .Lets say it is tbl_output.
In your report you need to trigger the proxy method as follows:
Note: i am assuming i am triggering an asynchronous proxy method from my report:
DATA:lo_senddata  TYPE REF TO CL_DATA_OUT,
                  lo_system_fault TYPE REF TO cx_ai_system_fault,
                  lo_root         TYPE REF TO cx_root.
ls_output-output_file-data[] = tbl_data[].
CREATE OBJECT lo_senddata
TRY.
* call the asynchronous method of the proxy and send the data
          CALL METHOD lo_senddata->execute_asynchronous
            EXPORTING
              output = ls_output.
* get the system exceptions and display the error text
        CATCH cx_ai_system_fault INTO lo_system_fault.
          WRITE:/ 'System Error:'(E01),
                  lo_system_fault->errortext.
          RETURN.
* get the root exception and display the textid value
        CATCH cx_root INTO lo_root.
          WRITE:/ 'System Error:'(E01),
                  lo_root->textid.
          RETURN.
      ENDTRY.
COMMIT WORK.
<b>Note:</b> 1. CL_DATA_OUT is the message interface class.
                  2. ls_output is the output structure to be sent back to XI and data 
                     is an internal table with the same structure as tbl_data.
                  3. It is very imp to catch exceptions as i have shown u above.
Please let me know if you are a little clear or you need some more clarifications on this.
cheers
shivika

Similar Messages

  • Interface using ABAP proxy

    Hi,
    We have a requirement where we need to send the customer data to XI system through ABAP proxy. Here a file sequence number is required to be generated in the R/3 system whenever a file is sent to the system.
    If the file received was not correct, then we need to re-send this file again with the same file number.
    The approach we have used just now is this - After running the Z transaction, store the customers that were sent through the proxy in the Z table and generate a unique number in the code itself. If it has to be re-run then read from this table and select the data again and re send it.
    Is there any better way of doing it? Are there any number objects that can be created? Can there be a central system where these file numbers are generated?
    Any help would be appreciated.
    Thanks a lot,
    Shivali

    Hi Shivali
    Just a small question here , how do you check if the file that you have sent to XI is correct or not?
    Regards
    shivika

  • Is EOIO messaging possible using ABAP Proxy in WAS 620?

    Hello,
    I am trying to implement an outbound EOIO interface using ABAP Proxy on a SAP R/3 470 running on WAS 620. We have XI 3.0 running on WAS 640. I followed the SAP documentation available at http://help.sap.com/saphelp_nw04/helpdata/en/c9/74246d8ad2447799063d39013e9a11/frameset.htm
    I find that the interface IF_WSPROTOCOL_ASYNC_MESSAGING required in this exaple does not exist in our R/3 system. I also notice that proxy classes generated on WAS 640 have the superclass of CL_PROXY_BASIS. But the proxy object generated in WAS 620 have no superclass at all.
    Does anybody know how I can get EOIO interfaces to work on the WAS 620? Did you use these objects? Can I import / install them somehow? Or, is EOIO just not possible in WAS 620?
    Please let me know.
    Regards
    Cerish Chemparathy

    HI,
    have a look at this link to the ABAP Proxy Runtime based on WAS 6.20 (Xi 2.0) http://help.sap.com/saphelp_xi20sr1/helpdata/en/02/265c3cf311070ae10000000a114084/content.htm
    There is a help entry called Guatanteeing the Order of Asynchronous Messages. Seems that you somehow can set a queue id for this messages and as long as theses messages are all in the same queue, the order will be maintained.
    Your observations are right, there are differences between the Proxy Runtime in WAS 6.20 and in WAS 6.40 and as far as i know, there is no way to downport the 6.40 runtime to 6.20. You will need to stick with wath 6.20 offers.
    Regards
    Christine

  • When to use ABAP proxy?

    currently we have MQ > XI > ECC 5.0(using RFC adapter which calls a BAPI)
    the above scenario works sometimes, but other times the data is inconsistent. We are using BPM collection in XI and then transferring the order via RFC adapter.
    I am wondering if we can use ABAP proxy and see if this method is more viable.
    regards,
    tony

    Hi Tony,
    >>>I am wondering if we can use ABAP proxy and see if this method is more viable.
    Sure you can use proxies
    if you are calling bapis and you don have sp14
    then your server proxy will look very similar to
    your RFC wrapper
    Regards,
    michal

  • Web Service consumer using ABAP-PROXY

    Hello,
    I want to test Web Service consumer using ABAP-PROXY . So I do what is explain in the weblog :
    [http://wiki.sdn.sap.com/wiki/display/Snippets/WebServiceconsumerusingABAP-PROXY]
    But when I execute the programm, the message : 'No valid source context supplied'.
    But, proxy and port are ok and activate.
    Can you help me.
    Thanks.

    Hi Jitesh,
    Thanks for the link.  I checked but did not find helpful info there.
    I have managed to make it work yesterday.  Two issues were identified. 
    1. The namespace in the WSDL file imported into ESR as an external definition.  I need to create the same namespace in ESR before importing the WSDL and then import the WSDL into that namespace.
    2. The authentication method.  The authentication method in the IIS configuration of the .NET web service has to be set to Basic Authentication.  Then I set logical port of the consumer proxy in the OSAMANAGER to use Basic Authentication also.  So far only the Basic Authentication works in my test scenario.
    I am closing this question.
    Regards,
    Jiannan

  • How to do an inbound and outbound interfacing using UTL_FILE ?

    dear members,
    How can we do interfacing from a legacy system to oracle and vice versa using the UTL_FILE package. I mean how to do an INBOUND and OUTBOUND interfacing using utl_file.
    regards
    sandeep

    in/
    file/
    bad/
    done/
    out/
    file/
    bad/
    done/
    I would start by ftping / putting the file in in/file/ folder, once ftp has completed move it to complete/ folder and process the file. If errorrs are generated move the file over to bad folder. If completed successfully move over to done folder.
    Having said that you would use UTL_FILE_DIR init parameter to set your directory.
    ALTER SYSTEM SET UTL_FILE_DIR='directory1','directory2' scope=spfile;
    Then you would use the regular utl_file packages to read / write to the files.
    UTL_FILE.FOPEN and so on.

  • How to do inbound and outbound interfacing using UTL_FILE?

    dear members,
    How can we do interfacing from a legacy system to oracle and vice versa using the UTL_FILE package. I mean how to do an INBOUND and OUTBOUND interfacing using utl_file.
    regards
    sandeep

    Hi Sandeep,
    I do not know if I got your question correct.
    Here is my understanding of it, pls correct me if I am wrong:
    You want to read from and write to the OS from inside the DB? Right?
    There are differnt waysa to do so, depanding on your Oracle version:
    1. you can use the initialization parameter UTL_FILE_DIR to specify a directory on OS where you can read from and write to through the package UTL_FILE.
    2. You can use a directory object in the DB to manage read write access to the OS. This is also usable with the package UTL_FILE as location where to read from and write to.
    => CREATE DIRECTORY my_dir AS '/home/oracle/my_directory';
    GRANT read , write ON DIRECTORY my_dir TO scott;
    SELECT * FROM dba_directories;
    You need CREATE ANY DIRECTORY system privilege for this.
    You can use directory objects also for external tables.
    With these you can read from flat files in teh directory on OS with a select statement as if it were a table inside the DB.
    Does this go into the direction you were thinking of?
    Hope it helps for the first.
    Regards,
    Lutz

  • Pros & Cons for consuming web services in ABAP using ABAP PROXY

    Hi,
    Other then performence  is there any other disadvantages like security,etc for consuming web services in ABAP using ABAP proxy?
    I really appreciate if some one provide the more details(Pros & Cons ) regarding cosuming web services and I also want to know is there any other way to consume web services in ABAP.
    Thanks.

    <i> is there any other way to consume web services in ABAP</i>
    you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
    Regards
    Raja

  • Transaction Update Error using ABAP Proxy

    Hi Experts,
    I am facing an issue using ABAP Proxy.
    File is coming from PI to SAP system and it will update the Transaction IE02 using this inbound ABAP Proxy. If records fails then a mail is going to concerned team.
    Issue:
    When File has been sent from PI to SAP through ABAP Prxoy, it shows that record has been updated in the Transaction IE02 but when I checked manually the record, it has not updated the same. But when I test the same record through my ABAP Prox, it updates the record and when I checked it, Reocrd hs been updated.
    Can anybody help me in this case?
    Regards
    Sachin

    Hi Anup,
    Can you please explain me for the same? If I need to put External Commit then how It is working when I running it manually
    Regards
    Sachin

  • Issue with FM 'STATUS_CHANGE_EXTERN'  using ABAP Proxy

    Hi Experts,
    I am using the FM 'STATUS_CHANGE_EXTERN'   & 'STATUS_CHANGE_INTERN'  to change the user status & system status using ABAP Proxy.
    But SAP is updating the system status using ABAP Proxy through ''STATUS_CHANGE_INTERN'' but not updating the User stauts 'STATUS_CHANGE_EXTERN' using ABAP Proxy but when run the same in foreground then it's working fine..
    I have already used the External Commit for the same.
    Please help me in this case.
    Thanks in Advance
    Sachin

    After call of CRM_STATUS_CHANGE_EXTERN you need to call BAPI_TRANSACTION_COMMIT.
    call function 'CRM_STATUS_CHANGE_EXTERN'
        exporting
            objnr               = iv_guid
            user_status         = iv_status
        exceptions
            OBJECT_NOT_FOUND    = 1
            STATUS_INCONSISTENT = 2
            STATUS_NOT_ALLOWED  = 3
            OTHERS              = 4
    if ( sy-subrc = 0 ).
        call function 'BAPI_TRANSACTION_COMMIT'
            exporting
                wait  = ABAP_TRUE
    else.
        "!+ Handle error
    endif.
    Best regards,
    Tomas.

  • FTP to SAP using ABAP Proxy

    Hi SDN,
      I am new to XI can any one provide me clear documentation or link on "FTP to SAP using ABAP Proxy" on this senario. I mean the steps to create ABAP Proxy etc..
    Thanks in Advance
    Regards
    Basha

    Hi Shaik
    Please go through the information provided in the blogs below which explains clearly the Scenario you want to try.
    <a href="/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy Proxies in XI</a>
    <a href="/people/siva.maranani/blog/2005/04/03/abap-server-proxies Server Proxies</a>
    <a href="/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy to R/3 via ABAP Proxy</a>
    Please do let me know if you want any more help regarding the same.
    Regards,
    Abhy

  • HTTP GET using ABAP Proxy

    Hi,
    Has anyone tried invoking an HTTP GET using ABAP Proxy?
    It seems we can do it using the func module HTTP_GET....
    I have seen a blog using java proxy but I want to do it using ABAP proxy...
    regards,
    Piyush

    Hi All,
    With my research on SDN, I came to know that we can either do it using HTTP_GET or the calss CL_HTTP_CLIENT.
    But can I do it for a very long HTTP url????
    Please response frends... Dont let me down :/
    regards,
    Piyush

  • Output type using ABAP proxy

    Hi All,
    Is it possible to create an output type for delivery or invoice using ABAP proxy? If yes do we need to follow some special steps(apart from the usual setting we do for EDI or print outputs) to be followed for this?
    Regards,
    Sajith.

    Hi Sajith Hari,
    I am not aware about the ABAP option but you can certainly use NACE tcode and select V2 or V3 accordingly for deliveries or invoices>go to output types and create your desired output types.
    regards,
    US

  • Invoking Webservice using ABAP Proxy

    Hi,
        I have a synchronous scenario with ABAP proxy invoking the external webservice.In the SOAP receiver target URL confiuration,do I need to give the operation(method)name in the webservice? I have read in the forum that we need to give the target URL with .asmx extension.What is the meaning of .asmx extension?
    Thanks,
    Leo

    Hi Teresa,
    We meet again !!
    Right, we have a simple solution for this without using BPM.
    In the proxy, set a field on the outbound data structure from the proxy to indicate to XI which receiver determination in XI can use to send the message to the right interface.
    We have exactly the scenario you are talking about and it works like a treat.
    Send me an e-mail @ [email protected] and I will send you a screenshot of how simple this is without using BPM.
    Cheers
    Colin.

  • Using ABAP Proxy

    I am researching a way to integrate SAP system with ABAP Proxy. I have sevareal questions.
    1. Is it possible to use XI alerting for ABAP
    2. Is it possible to use application acknowlendgement with asynch ABAP Proxy.
    3. When I generate ABAP class in SPROXY transaction do I need to change it by hand or I can to map this proxy to RFC function or BAPI? Is it possible to generate interface in XI by BAPI or RFC and then generate ABAP Proxy?
    What is  the advantage of ABAP Proxy? I think it requres more ABAP coding...
    I have read some blogs but I haven't got answer

    Hi, Sergey.
    I can try to answer questions 2 and 3. Regarding 1, unfortunately, I haven't tried yet.
    <b>2. Yes, definitely.</b>
    If you are programming a client proxy (outbound, that is sending data to XI and then to another system) you can require ack and in case the receiver system is able to produce ack (for instance inbound ABAP or Java Proxy), it will be routed back to the sender system.
    If you are programming a server proxy (inbound, that is receiving data from XI), raising an exception inside ABAP code will put the R/3 message in "Application Error". The fact that this ack is routed back to XI and to the sender depends on who sent the original data to your proxy: as far as I know, just BPM is able to require ack.
    <b>3. Don't confuse RFC with Proxies.</b> The technology behind is really different. Either you use RFC/BAPI stuff (and in this case from an XI perspective you are using RFC Adapter) or proxies (using XI Adapter).
    When you generate with SPROXY you have to:
    1. write your own abap code to manage data if that's an INBOUND MESSAGE INTERFACE
    2. nothing if it's an OUTBOUND MESSAGE INTERFACE, except find the right point in the system where to invoke it (report, customer exit, module pool or whatever).
    Finally, the great advantage of proxies is XI native protocol usage. It doesn't require more ABAP. The ABAP code is the same you would put in a function module. The difference is that with proxies you are in an ABAP Object context, which is not the case of functions.
    Hope this is exhaustive for you!
    Alex
    Message was edited by: Alessandro Guarneri

Maybe you are looking for