cancel
Showing results for 
Search instead for 
Did you mean: 

send message with abap proxy client

Former Member
0 Kudos

I'm trying to send message to XI, but no message in sxmb_moni.

I have created logical port with LPCONFIG.

ABAP code


REPORT  Z_HTTP_SEND.
DATA:

* Reference variables for proxy and exception class
  lo_clientProxy     TYPE REF TO ZPCO_MI_COMPANY_OB,
  lo_sys_exception   TYPE REF TO cx_ai_system_fault,
* Structures to set and get message content
   ls_request         TYPE ZPMT_COMPANY_ID,
   ls_response        TYPE ZPMT_COMPANY_DETAILS.
*Complete the structure ls_request for the request message.
*DATA: zmt_id type ZPMT_COMPANY_ID,
*zdt_id type ZPDT_COMPANY_ID,
*z_id_tab type ZPCOMPANY_ID_TAB,
*z_id type ZPCOMPANY_ID.
*z_id-COMPANY_ID = '3000'.
*append  z_id to z_id_tab.
*  zdt_id-RECORD = z_id_tab.
*zmt_id-MT_COMPANY_ID = zdt_id.
DATA tab TYPE ZPCOMPANY_ID_TAB WITH HEADER LINE.
tab-COMPANY_ID = '3000'.
APPEND tab.

ls_request-MT_COMPANY_ID-RECORD = tab[].

TRY.
* create proxy client
*CREATE OBJECT lo_clientProxy( u2018LOGICAL_PORT_NAMEu2019 ).
    CREATE OBJECT lo_clientProxy.
* do synchronous client proxy call

    CALL METHOD lo_clientProxy->execute_synchronous

             EXPORTING output  = ls_request
             IMPORTING input   = ls_response.

    CATCH cx_ai_system_fault INTO lo_sys_exception.

*   Error handling

ENDTRY.

Any ideas? Thanks very much,

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Please do these steps first

Connection to Integration Builder

1.From your ECC 6.0 system you have the TCP/IP connections SAPSLDAPI and LCRSAPRFC maintained in SM59 transaction and their program id's used are using the correct/up to date details in teh Visual Administrator of the SAP XI Java Stack.

2. In SXMB_ADM transaction of your ECC6.0 system have you maintained the role as Applicaiton Sytem and corresponding integration server as http://<xiserver ip>:<http port of XI server>/sap/xi/engine?type=entry

4. Make sure the XIAPPLUSER is having all the authorizations in the XI box as mentioned in the configuration guide of XI.

5. Do check whether you have the INTEGRATION_DIRECTORY_HMI RFC destination is maintained in your ECC6.0 box and the connection user is maintained as XIAPPLUSER and its password.

Thanks

Sudharshan

Former Member
0 Kudos

Thank you. But [3022|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3022] [original link is broken] [original link is broken] [original link is broken]; is basic setting for XI. my XI system is already a productive system.

Former Member
0 Kudos

hi,

Have you checked in debugger if you are getting any exceptions after proxy call

:

CATCH cx_ai_system_fault INTO lo_sys_exception.

also you can verify if there is a commit work.

Either explicit:

commit work.

or implicit in the end of the program.

/wg

Former Member
0 Kudos

Hi,

I hope you must have gone through this blog.

How to Activate Proxy.

Secondly if you have not gone thourgh this wiki which talks abut sync abap proxy then it will help you.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-%2bp...

Regards,

Sarvesh

Former Member
0 Kudos

Hi,

Proxies communicate with the XI server by means of native SOAP calls over HTTP .RFC does not, so you have to convert from SOAP to RFC calls and vice versa. So XML conversion is required.

ABAP Proxies uses Webservice and Http Protocols. And if you use RFC it is mainly meant for Sync. call. But Proxies is used for both Sync and Async.

If you use ABAP Proxy , you can reduce the overhead calling the function again and again.

- Activate Proxy

- ABAP Server Proxy

- ABAP Client Proxy

If u generate proxy for outbound interface then its client proxy and for inbound interface its server proxy.

In client proxy u can call the method to send messages but u can't modify it but in server proxy its possible to write a user code within the method to execute proxy.

CLIENT PROXY:

A WSDL description from a UDDI server (or an Internet page) is usually used to make a service executable in the Internet and to describe the interface of this service. You require a client proxy and not a server proxy to call this service by using the Web service infrastructure.

SERVER PROXY:

You can only generate ABAP server proxies from a WSDL description if they originate in the Integration Repository.You can also generate server proxies for Java and client proxies for ABAP from message interfaces.

s refer these doc about ABAP proxy ..

- Activate Proxy

- ABAP Server Proxy

- ABAP Client Proxy

http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm

http://help.sap.com/saphelp_nw04s/helpdata/en/ba/f21a403233dd5fe10000000a155106/frameset.htm

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/41e08c90-0201-0010-9197-d8774336...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ae9874-109c-2910-f48a-e91f0cdd...

regards,

Surya

Former Member
0 Kudos

Hi,

Debugg the Report, first of all the report is able to pick the data or not from the Dbase.

And then check in SXMB_MONI at R/3 side whether the message reached to IE of R/3 or not.

Then if the messages are ther and not come to xi means

1) check in SMQ1 of R/3

Regards

Seshagiri