‎2007 Jun 01 12:35 AM
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,
‎2007 Jun 01 5:04 AM
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
‎2007 Jun 01 1:27 AM
Hi,
Its better to post in XI forums, so that you will get solutions quickly.
https://www.sdn.sap.com/irj/sdn/forums
Thanks
Donepudi
‎2007 Jun 01 5:04 AM
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
‎2007 Jun 01 2:32 PM
Thanks Shivika for you reply and guidance. This is what I was looking for.
‎2007 Jun 06 4:43 AM
Hi, Shivika,
I have one clarification to ask, In step 2 about using t-code SPROXY, I believe I have create Proxy on our SAP system and not in XI. Please tell me.
Can you tell me the steps to generate proxy. I am pushing data from SAP to XI.
I guess I have to generate an OUTBOUND proxy. Please confirm.
Thanks,
‎2015 Dec 28 3:06 PM
‎2007 Jun 02 5:01 AM
‎2007 Jun 06 4:43 AM
‎2007 Jun 06 4:56 AM
Hi there
Yes you need to generate your proxy in SAP through Tcode SPROXY.
Message Interface has to be created in XI by your XI team members else you wont be able to see any interface in sproxy that you can generate.
If they have created a message interface for you , then you simply need to right click on that and it will give you an option to 'Create' your proxy.
And since you are sending data from SAP to XI , it is definitely an outbound proxy.
Does this solve your query?
Cheers
shivika
‎2007 Jun 06 5:35 AM
Hi Shivika,
You are lighting fast in giving response.
I have rewarded points to you.
Thanks again.
‎2007 Jun 06 5:35 AM
‎2007 Jun 06 5:36 AM
hey thanx
lemme know if u have other queries...send me ur email id and i can send u few docs on proxies.
cheers
shivika
Message was edited by:
Shivika Bhorchi
Message was edited by:
Shivika Bhorchi
‎2007 Jun 11 11:29 AM
hi:Shivika Bhorchi
thank you for your guide of ABAP SPROXY,now ,i have write the report to trigger the abap sproxy ,but it catch the system error [System Error: System not configured as XI Integration Engine ], i have no idea with this problem ,can you do me a favor to see it ,thank you ! i just using outbound sproxy transfer data from R/3 to XI, thank you in advance !
if you would like ,please add my msn: 1234ming@163.com , i think we can make friends .
‎2007 Jun 15 8:17 PM
Hi Shivika,
Thanks for offering me the docs on proxies. I really appreciate it.
Please send it to me at my email address miniSAP@inbox.com
Also I want to know if I need to call the below method 3 times, if my internal table has 3 records.
call the asynchronous method of the proxy and send the data
CALL METHOD lo_senddata->execute_asynchronous
EXPORTING
output = ls_output.
Many thanks again.
‎2007 Jun 17 11:53 PM
Hi Mini
You(as in your XI team ) needs to define ls_output as a deep structure .
e.g:
DATA: ls_output TYPE ty_output.
This ty_output has a field X which is a deep structure with lets say another field 'Y' which in turn is a table type . So the hierarchy would be :
ty_output->X(is a field of ty_output with a deep structure)->Y( is a field of X which is a table type of lets say data type string)
Note: XI should define this in your proxy structure when yu generate it.
This Y will then take in multiple records just like a table. You can then send all your 3 records to this table at once and then call the method only once.
e.g : ls_output-X-Y[] = lt_data[] where lt_data has all your 3 records.
Hence you need to call your method only once.
Hope this clarifies your doubt.
Cheers
shivika
‎2007 Jun 18 3:14 PM
Hi Shivika,
Thanks for your reply. I am not able to declare the passing structure corrently. I think XI team created a structre of type STURCTURE instead of TABLE TYPE. I am an ABAPER, should I tell XI team to create stucture ZDT_HEIR of type - TABLE TYPE. I will appreciate if you can confirm.
Below I have tried to give the details of parameters passing to method EXECUTE_ASYNCHRONOUS. If it is not clear then please send me your email address to minisap@inbox.com and I will send you the screen shots.
zMT_HEIR is an OUTPUT Method parameter of method EXECUTE_ASYNCHRONOUS.
Double click on zMT_HEIR.
Structure: zDT_HEIR
CONTROLLER PRXCTRLTAB (DATA TYPE table type) MT_HEIR zDT_HIER1 (DATA TYPE Structure)
Double click on zDT_HEIR1.
Structure: zDT_HEIR1
CONTROLLER PRXCTRLTAB (DATA TYPE table type) zMD_HEIR ZDT_HEIR (Data type Structure)
Double click on zMD_HEIR.
Structure: zMD_HEIR
CONTROLLER PRXCTRLTAB (DATA TYPE table type) zfield1 (Data type STRING)
Zfield2 (Data type STRING)
Declaration:
data: ls_output type zMT_HEIR.
ls_output-MT_HEIR-zMD_HEIR[] = gi_outdata[].
gi_outdata is an internal table with 3 records.
Many thanks,