7.1 Client ABAP proxy code sample (outbound)
Hi guys,
has somebody implemented new 7.0(7.1) abap proxies using ws runtime?
Could you please post some sample code of client abap proxy?
The 3. proxies were quite easy, but I'm a little bit confused in 7.0 and it's ws-rm.
Thanks a lot, Olian
Create a client proxy (for eg. the name would be like ZCO_MI_EMP_OUT_SYNC).
Create a report program for the client proxy.
report yh_proxyclient.
* tables: ZEMP_DTLS_COPY.
data: input type zmt_emp_tar1 .
data: output type zmt_emp_src1 .
data: client type ref to zco_mi_emp_out_sync .
output-mt_emp_src-dept_id = 'SAP EP'.
data wa_emp type zdt_emp_tar_employee.
data wa_empinsert type zemp_dtls_copy. "ZDT_EMP_TAR_EMPLOYEE.
try.
create object client
* EXPORTING
* logical_port_name =
catch cx_ai_system_fault .
endtry.
try.
call method client->execute_synchronous
exporting
output = output
importing
input = input
catch cx_ai_system_fault .
catch cx_ai_application_fault .
endtry.
loop at input-mt_emp_tar-employee into wa_emp.
write: / wa_emp-emp_id, wa_emp-dept_id, wa_emp-emp_name, wa_emp-emp_address.
endloop.
commit work.
endmethod
the above code is taken fron this wiki (step by step guide using an example)
[https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/abapClientProxytoABAPServerProxy+Scenario]
Similar Messages
-
Sample Client ABAP Proxy Program - PI 7.1
I created Proxy. I need to call in a Report Program. I am using PI 7.1
Can anyone send me a sample Client ABAP Proxy program to use with PI 7.1Hi,
>>>Can anyone send me a sample Client ABAP Proxy program to use with PI 7.1
it's exactly the same as for 7.0 and there are blogs that show such sample reports on SDN
just do a little search and I'm sure you can find it
Regards,
Michal Krawczyk -
ABAP proxy code using internal table
Hi XI guru's,
Good Afternoon,
My Scenario is ABAP Proxy to file using ztable.
i am getting data from Sap R/3 data base as Ztable. using this Ztable i have to write ABAP Proxy code. I generated ABAP Proxy and mentioned all below.Please send me ABAP Proxy code using this details. This is very urgent. Please help me.
ABAP proxy class: zco_mioa_tata
structure : zmt_tata
structure : zdt_tata
structure : zdt_tata_employee
Table : zdt_tata_employee_tab
Ztable : zcnu_proxy_table
outbound structure:
mt_tata
employee
thanks and regards
saiSai,
I guess this will help you.
1. Proxies can be a server proxy or client proxy. In our scenarios we require proxies to send or upload the data from/into SAP system.
2. One more thing proxies can be used if your WAS ≥ 6.2.
3. Use Tcode SPROXY into R/3 system for proxy use.
4. To send the data from R/3 system we use OUTBOUND PROXY. In Outbound proxy you will simply write an abap code to fetch the data from R/3 tables and then send it to XI. Below is the sample code to send the data from R/3 to XI.
REPORT zblog_abap_proxy.
DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
CREATE OBJECT prxy.
DATA it TYPE zblogemp_profile_msg.
TRY.
it-emp_profile_msg-emp_name = 'Sarvesh'.
it-emp_profile_msg-empno = '01212'.
it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = it.
commit work.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY.
Receiver adapter configurations should be done in the integration directory and the necessary sender/receiver binding should be appropriately configured. We need not do any sender adapter configurations as we are using proxies.
5. To receive data into R/3 system we use INBOUND PROXY. In this case data is picked up by XI and send it to R/3 system via XI adapter into proxy class. Inside the inbound proxy we careate an internal table to take the data from XI and then simply by using the ABAP code we update the data inot R/3 table. BAPI can also be used inside the proxy to update the data into r/3.
I hope this will clear few doubts in proxy.
Just go through these links:
http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
ABAP Server Proxies By Siva Maranani
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
/people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
File to R/3 via ABAP Proxy with good example
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
Generating java proxies..
/people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
/people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
Synchronous Proxies:
Outbound Synchronous Proxy
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-%2bpurchase%2border%2bsend
Inbound Synchronous Proxy
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2binbound%2bprogram%2b-%2bsales%2border%2bcreation
Regards,
Sarvesh -
What is package structure for Client ABAP Proxy?
1. What is the package structure need to be followed for creating abap client proxy.
2. I read some where in the form, it need to be 4 levels. Why is it?
Thank you
Ganges LeavesHi
U hav to create a 4 level package structure for client ABAP proxy.
U can create ur on packages
1st level-structure package.
2nd level-main package.
3rd and 4th level-sub packages.
To the 4th level only u hav to create proxy.
The classes and code wil be automatically generated at the time of proxy creation.
I think the 4 level structure bcz while in r/3 everythin in integration builder like software component version and all wil be takin as different levels.
Also u can go through the weblogs in the above replies u got.
Regards
Victoria. -
Dynamic Configuration from Client ABAP Proxy
Hello Experts,
Is it possible somehow to set Dynamic Configuration values to Message Header when calling Client ABAP Proxy from SAP system?
Best RegardsI managed to get the dynamic header configuration at least with inbound proxies:
DATA:
server_context TYPE REF TO if_ws_server_context,
proxy_framework TYPE REF TO if_proxy_framework,
internal_protocol TYPE REF TO if_wsprotocol_internal,
lo_inb_pxy TYPE REF TO cl_xms_inbound_proxy_plsrv,
lo_dyn_header TYPE REF TO if_xms_msghdr30_dynamic.
server_context = cl_proxy_access=>get_server_context( ).
internal_protocol ?= server_context->get_protocol( 'INTERNAL' ).
lo_inb_pxy ?= internal_protocol->get_framework( ).
lo_dyn_header ?= lo_inb_pxy->xmb_message->get_dynamic_header( ). -
Hi,
I have problem in ABAP Proxy. When i upload a XML and test the ABAP Proxy code it is working fine, but when i trigger the change from sender, its updating the wrong value in the database.
I checked the incoming and the converted XML, everything is correct and there is no prob in the XI.
Please tell me is there any way to debug the ABAP Proxy during the actual proccessing i,e. when the change is triggered from the sender.
Thanks and Regards,
ArunsriI've had the same problem before...everything seemed fine but the xml was not updating the desired values - you have 2 choices - 1. Enable the debugging, but if you have a high volume scenario, then it may cause some issues. Also, I am not sure if you plan to do this in production - as you know, debugging in production is a big No-No.
Option 2 is to just take the stream and store it as a file in the OS. This is what we followed and we were able to figure out the issue with the xml. Make sure you write it in such a way that you can turn it off immediately. In our case, it worked fine for all suppliers but one and this one supplier was sending a double spaced character in between, which was causing the issue.
Regards,
Srini -
Outbound Client ABAP Proxy Timeout Error
Hello everybody we have the next scenario:
R/3 Client Synchronous ABAP Proxy->XI-> Synchronous RFC
and we are having problems cause the Sender R/3 is not waiting for the RFC in the Receiver system to process so XI is in log status fot this messages, is there a parameter to increase the time for R/3 Sender to wait for the Call method sentence to complete succesfully??????, thanks in advance.
Regards,
Raul AlvaradoHi,
do changes as below
In SXMB_ADM
go to Configure Integration server
in change specific identifiers Set Runtime parameter: HTTP_TIMEOUT and then restart XI server, changes will be updated.
Regards,
Sukarna. -
Client ABAP Proxy : how to know which program is calling that service interface proxy
Hi All,
I have prepared some client proxy in ECC to communicate with PI.
But, if I am not wrong, unlike server proxy which is written directly in the class Provider class in SPROXT transaction, in client proxy we write abap code to trigger proxy in SE38 .
My question is : If I am in SPROXY and looking at any outbound SI, of which proxy is already generated, then how can in SE38 can I find which program is triggering that interface or proxy?Hi,
check below thread for calling client proxy
ECC outbound abap proxy (client) - Get ECC messageID from Protocol
Regards, -
My simple Inbound ABAP Proxy code doesn't work in PI 7.1 EHP1 SP3 ?
Hi,
I just installed and configure new PI 7.1 EHP 1 SP3 and i tried some simple abap proxy but seems like doesn't work.
Please advise what is missing base on my simple abap code below :
=================================================================================================
METHOD zpi711ii_si_syn_in_aaeproxy~si_syn_in_aaeproxy.
**** INSERT IMPLEMENTATION HERE **** ***
DATA: inputdata TYPE ZPI711MT_REQ_1,
outputdata TYPE ZPI711MT_RES_1.
CONCATENATE inputdata-mt_req_1-firstname ' ' inputdata-mt_req_1-lastname INTO outputdata-mt_res_1-fullname.
ENDMETHOD.
=================================================================================================
i have put some break on the CONCATENATE seems like inputdata-mt_req_1-firstname is empty ? why ?
The sample xml input is :
=================================================================================================
<n0:MT_REQ_1 xmlns:n0="http://www.abeam.com/sample/pi" xmlns:prx="urn:sap.com:proxy:ST6:/1SAI/TAS1190827B531A473B357B:700:2008/06/25">
<FIRSTNAME>This is a string 4</FIRSTNAME>
<LASTNAME>This is a string 5</LASTNAME>
</n0:MT_REQ_1>
=================================================================================================
Please advise
Thank You and Best Regards
FernandHi Fernand ,
Few things to check :
1. hope you are accessing the correct node of proxy structure and the correct message type too.
2.. If the occurrence of node is 1 to many than it will be a table type in that case your need to use a loop to access row values.
Make sure that you have used the correct message types for creating variables..
DATA: inputdata TYPE ZPI711MT_REQ_1,
outputdata TYPE ZPI711MT_RES_1.
--->inputdata-mt_req_1-firstname ' ' inputdata-mt_req_1-lastname
>once you have created the variable of particular messagetype than you have to use in this format inputdata-firstname and inputdata-lastname. seems some thing fishy here...inputdata-mt_req_1-firstname/lastname.
Regards , -
Hi,
i need to write a report program to trigger client proxy
input parameters for the report company code and based on company code FM extract information which is defined in tables option.
how do i map the proxy table to FM table.
below mentioed are reference details.
class: ZSVCO_FILE_BR_OUT_ASYNC
Message Type: ZSVFILE_BR
proxy Table: BR_DETAILS
i am following the blog by ravikumar .
REPORT Z_BR_RECON .
DATA prxy TYPE REF TO ZSVCO_FILE_BR_OUT_ASYNC.
CREATE OBJECT prxy.
DATA it TYPE ZSVFILE_BR.
TRY.
it-BR_DETAILS-field1= map to functoin module table
it-BR_DETAILS-field1= map to functoin module table
it-BR_DETAILS-field3= map to functoin module table
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = it.
commit work
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY.Hi-
Check out this blogs,hope its helpful to you...
ABAP Proxy
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
Client Proxy
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
Server Proxy
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
Proxy code
/people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies -
Hi All,
Good afternoon. I have one requirement to work on to work on FILE->XI---->RFC(synch) scenario using BPM. I am new into BPM. Any body have the step-by-step documentaion, please send me ASAP.
I am very thankful to you in advance.
Thanks & Regards,
Nagarjuna.Hi,
Ur subject is about Proxy and in thread ur asking about File to RFC,
Check this link.
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
- File to RFC
About abap proxy.
ABAP Proxy
How do you activate ABAP Proxies?
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
ABAP Proxy Runtime
http://help.sap.com/saphelp_nw04/helpdata/en/02/265c3cf311070ae10000000a114084/frameset.htm
ABAP CLIENT PROXY
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
ABAP SERVER PROXY
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
To test a connection - /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
Client Proxy - /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
Server Proxy - /people/siva.maranani/blog/2005/04/03/abap-server-proxies
Some links on BPM
/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
/people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi
/people/michal.krawczyk2/blog/2005/09/04/xi-do-you-realy-enjoy-clicking-and-waiting-while-tracing-bpm-steps
/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/daea5871-0701-0010-12aa-c3a0c6d54e02
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/e8515171-0701-0010-be98-e37bec4706cc
/people/prasadbabu.nemalikanti3/blog/2006/03/10/bpmsingle-sender-and-multiple-receivers-based-on-synchronous-exchangeswitch-part-1
/people/daniel.graversen/blog/2006/09/07/using-a-bpm-to-collect-messages-for-a-set-interval-of-time
Regards,
Phani
Reward points if Helpful
Edited by: phani kumar on Feb 25, 2008 11:44 AM -
Hello SAP community. Does anyone have a step-by-step code sample for creating either a jsp or web dynpro application in Netweaver to use a java proxy to connect to XI that will calls a RFC or BAPI in SAP R3?
Hi
See the Code sample and pdf help it the SDN samples and tutorials
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
Kind Regards
Mukesh -
Client ABAP proxy error handling. Please help!
Hi Experts,
I have following scenario:
SAP ECC (ABAP Client Proxy) -> PI(XI)-->(SOAP) Third party web service System
This is Asynchronous.
What will happen when ABAP client Proxy in ECC sends data to PI but PI is down?
Will the message be queued in ECC? Can the queued message be processed automatically when PI is UP later?
Please help.
Thanks & Regards
GopalHello Gopal,
Correct, it should be an automatic entry into the queue!
refer below for a detailed understanding!
/people/arulraja.ma/blog/2006/08/18/xi-reliable-messaging-150-eoio-in-abap-proxies XI: Reliable Messaging u2013 EOIO in ABAP Proxies
/people/krishna.moorthyp/blog/2005/12/23/monitoring-for-processed-xml-messages-in-abap-proxy Monitoring for Processed XML messages in ABAP Proxy
Weblog to send Response from RFC to File in Asyn Mode Using Proxy [original link is broken] Weblog to send Response from RFC to File in Asyn Mode Using Proxy
/people/michal.krawczyk2/blog/2009/06/20/pixi-abap-proxies-say-goodbye-to-executeasynchronous-method PI/XI: ABAP Proxies say goodbye to Execute_Asynchronous method
/people/krishnakumar.ramamoorthy3/blog/2008/11/02/error-handling-framework-for-abap-proxies--part-1 Error handling framework for ABAP proxies - Part 1
/people/krishnakumar.ramamoorthy3/blog/2008/12/19/error-handling-framework-for-abap-proxies--part-2 Error handling framework for ABAP proxies - Part 2
Regards,
Jilan -
Hi,
I have successfully tested an ABAP client proxy by executing an ABAP report. However when I execute the report, XI login credentials are asked for.
How can I avoid this, so that ABAP developer need not know XI login ? Is there any setting to be done ?
Regards,We have also been having the same problem it sounds like you had.
When we do a function module test, it works fine set to use Exchange Infrastructure in LPCONFIG, but we always get prompted for an ID and password.
As you mentioned, when we change LPCONFIG to use Web Service Infrastructure and our Call Parameters to use the HTTP Destination with path suffix /sap/xi/engine?type=entry we now get an error 'Soapfaultcode:4 Error during conversion of XI message' and nothing seems to get to XI.
Is this something you ran into or know something about for fixing this issue?
Any ideas of where to start looking at this?
Thanks,
Jake -
Hi,,,
does anyone guide me with abap sample code using EOIO?
thanks
dennis
ogawa DennisHI,
It is performance problem, if it is large database,
See the below links
/people/sap.user72/blog/2005/05/02/useful-sap-notes-for-xi
/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
/people/arulraja.ma/blog/2006/08/18/xi-reliable-messaging-150-eoio-in-abap-proxies
Regards
Chilla
Maybe you are looking for
-
Why we will go for Queue delta instead of Unserialized and Direct delta ?
Hi Experts, Why we will go for Queue delta instead of Unserialized and Direct delta ? specify any reasons for that ? What happens internally when we use Queue delta , Direct delta ? I will allocate points to those who help me in detail. My advance th
-
Beginner: Getting syntax error on WHERE clause in SELECT
I'm very new to php and mySQL. Am using DW master/detail to generate to basic code I need. One thing I need to do is modify a select statement in the master to include a WHERE clause to limit the selection to a particular value in one field. I'm ge
-
Hi, I need to execute the query to find the particular string in the xml data. The query i used is given below. select create_dt from wms_out where xml_data like '%lpad(270,3,0)||lpad(5,2,0)||lpad(63,4,0)%' and trunc(create_dt ) = trunc (sysdate-3) a
-
If we run the same query in oracle 9i and 10g versions it returns the same result set and number of rows . But the order by differs b/w the oracle 9i and 10g versions Query select distinct * from vw_name where col_1 = 1 and coll_2 = 50 and col_3=1 re
-
Why is iTunes trying to update
I have iPod Touch 2G and iTunes is asking to update to 10.5. According to the Apple website, 10.5 does not support Touch models pre 2009. Anyone any thoughts on this. Cheers.