on 05-13-2009 6:29 AM
hi all
jdbc adapter
my scenario is ECC---XI-- -
third party(DB)
The sender initiates a synchronous call to XI and the Response Details (role) are fetched from DB and sent back to ECC.
now i have configured the scenario on the XI ,but don't kown how to program on the ecc .
can anybody give some advices or supply some codes to me .
thank you .
Edited by: ALANWANG on May 13, 2009 7:30 AM
hi all
thanks a lot for your reply .
i have done the program .
when test , run sxmb_moni , sender message has been successful ,but response message failed
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
following is my code in ecc :
REPORT ZTEST.
DATA : l_send_req TYPE REF TO ZCO_MI_FY_OUT .
DATA : ls_output TYPE zmt_fy_out.
DATA : ls_input TYPE zmt_return .
DATA l_system_message(100) TYPE c .
DATA : l_s_e TYPE REF TO cx_ai_system_fault .
TRY.
create OBJECT l_send_req .
CATCH cx_ai_system_fault .
ENDTRY.
ls_output-mt_fy_out-statement-sql-access = 'select name from bb ' .
ls_output-mt_fy_out-statement-sql-action = 'SQL_QUERY'.
TRY .
CALL METHOD l_send_req->MI_FY_OUT
EXPORTING
output = ls_output
IMPORTING
input = ls_input .
CATCH cx_ai_system_fault INTO l_s_e.
CALL METHOD l_s_e->get_text
RECEIVING
result = l_system_message .
WRITE :l_system_message .
ENDTRY.
can anybody help me ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please check the following things.
1.Please make sure proper jdbc driver installed.
2.As it is syncronous scenario please check the response message type of Database.
For Example:
If your request message type of Database is "MT_db_Req" (Message type).
Then Your Response message type shoulb be like this.
<MT_db_Req_response>
---<StatementName_response>
-
<row>
So please make sure that you have respone message type(database) as mentioned above.
Thanks
Prasad Nemalikanti
And my response message type is following :
<MT_RETURN>
---<STATEMENT>
---<ROW>
<NAME>
This is not the correct response structure
whenever you get a response from DB.....DB attaches a _response to the request MT name..
So if your request MT is
<MT_JDBCRequest>
xyz
</MT_JDBCRequest>
Then in XI you should have your response MT as
<MT_JDBCRequest-response>
xyz
</MT_JDBCRequest_response>
If this is not followed then you are bound to get an error
>
> HI Prasad
>
> following is my request message :
>
> <?xml version="1.0" encoding="UTF-8" ?>
> - <ns1:MT_FY_OUT xmlns:ns1="http://test/test">
> - <STATEMENT>
> - <SQL>
> <ACCESS>select name from bb</ACCESS>
> <ACTION>SQL_QUERY</ACTION>
> </SQL>
> </STATEMENT>
> </ns1:MT_FY_OUT>
now response should be:
<MT_FY_OUT_response>.......
Edited After This:
Check this blog and have your structure accordingly:
/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
Edited by: abhishek salvi on May 14, 2009 12:45 PM
hi
i have changed my response message name to
<mt_fy_out_response>
---<statement_response>
-
<row>
-
<name>
but the error still exist
REPORT ZTEST.
DATA : l_send_req TYPE REF TO ZCO_MI_FY_OUT .
DATA : ls_output TYPE zmt_fy_out.
DATA : ls_input TYPE zmt_fy_out_response .
DATA l_system_message(100) TYPE c .
DATA : l_s_e TYPE REF TO cx_ai_system_fault .
TRY.
create OBJECT l_send_req .
CATCH cx_ai_system_fault .
ENDTRY.
ls_output-mt_fy_out-statement-sql-access = 'select name from bb ' .
ls_output-mt_fy_out-statement-sql-action = 'SQL_QUERY'.
TRY .
CALL METHOD l_send_req->MI_FY_OUT
EXPORTING
output = ls_output
IMPORTING
input = ls_input .
CATCH cx_ai_system_fault INTO l_s_e.
CALL METHOD l_s_e->get_text
RECEIVING
result = l_system_message .
WRITE :l_system_message .
ENDTRY.
ls_output-mt_fy_out-statement-sql-access = 'select name from bb ' .
ls_output-mt_fy_out-statement-sql-action = 'SQL_QUERY'.
are you executing SQL Query....then extremely sorry for ignoring this.....
Check out response of Rajeev Gupta from the below thread:
this response will solve your error....
Regards,
Abhishek.
following is my request message :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_FY_OUT xmlns:ns1="http://test/test">
- <STATEMENT>
- <SQL>
<ACCESS>select name from bb</ACCESS>
<ACTION>SQL_QUERY</ACTION>
</SQL>
</STATEMENT>
</ns1:MT_FY_OUT>
you should have the structure as:
- <ns1:MT_FY_OUT xmlns:ns1="http://test/test">
- <STATEMENT>
- <SQL>
<ACTION>SQL_QUERY</ACTION> --------------------------> *ACTION is not an element it is an Attribute*
<ACCESS>select name from bb</ACCESS>
</SQL>
</STATEMENT>
</ns1:MT_FY_OUT>
Proxy is nice option,for that
you can check the SPROXY tcode in ECC ,there you can see the interfaces which you designed in PI
double click and generate proxy class, that's it .. you can use that class for your cause.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Allan,
your question is "but don't kown how to program on the ecc" ..
As per your scenario's you are sending the DB Responce back to ECC . hence
i think RFC or Proxy you can use as IDOC is out of Question .........!
Regards,
Aziz khan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check out this :
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
Regards,
Sunil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U can use RFC for this...
In which RFC / BAPI will send request to XI and get response from XI.
Regards,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
now i have configured the scenario on the XI ,but don't kown how to program on the ecc .
one way is the creation of proxy....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.