on 12-30-2010 7:41 PM
Hi All,
Can anyone provide me sample ABAP proxy code for inbound synchronous. I have created inbound synchronous service interface, generated proxy in ABAP system. It has only one method in ABAP proxy class with input and output. When I write code ti take the input, process and send an output, its not getting delivered.
Please help me with sample code or guidence on this. Looks like there are changes in 7.1 when compared with previous versions that EXECUTE_SYNCHRONOUS doesn't exist anymore.Do we just eed to write code in single method with in the class?
Regards,
N@v!n
On Sproxy - >
Focus on your interface - >
go to your inbound interface name(service interface) -> double click
On PROPERTIES TAB -> INTERFACE -> PROVIDER CLASS -> DOUBLE CLICK ON IT ->
Now One method name is coming - > Double click on it ->
Congarts ! you will write your code Here ...
I am Pasting a sample code used in my case , similarly you can compare for your self. :
__________________________________________________________ Declare Area
DATA: IT_INPUT TYPE ZPROCESS_ORDER_FILE_ROW_TAB2,
WA_INPUT TYPE ZPROCESS_ORDER_FILE_ROW2.
DATA: IT_FINAL TYPE ZPROCESS_ORDER_RESPONSE_RO_TAB,
WA_FINAL TYPE ZPROCESS_ORDER_RESPONSE_ROW.
I get this Types from
go to your inbound interface name(service interface) -> double click
USED OBJECT TAB
Here you will get 2 table type Structure for Internal table Finaland Input Both.
as well as Work area Types.
_________________ Actual Code -
IT_INPUT = INPUT-PROCESS_ORDER_FILE-ROW.
This Structure you get in
go to your inbound interface name(service interface) -> double click
USED EXTRENAL VIEW TAB.
Use ABAP NAME HERE ..
Populate IT_FINAL according to you and pass it out.
SImialry for sending Out ....
OUTPUT-PROCESS_ORDER_RESPONSE-ROW = IT_FINAL.
____--
Hope it help...
Still Doubts , Write here ...
Regards
Prabhat Sharma.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>> I think we need to create receiver SOAP adapter and sender SOAP adapter as well for porxy communication with SAP for sync. Is that right?
If you are doing inbound sychronous ABAP Proxy , you dont NEED RECEIVER SOAP ADAPTER.
Looks like your are doing scenario webservice to proxy synchronous.
YOu need soap sender adapter
Proxy receiver adapter
Hi , What is about ID object , it woule be same like Others ....
Two Buisness System or Service( Sender and Receiver).
Two Communication Channel .
1. For SOAP - Service type Best Efforts .
2. For Proxy ( XI - Receiver) .
Other Objects ..
Sender Agreement - > Calling SOAP Channel.
Receiver Determination
Interface Determination
Receiver Agreement - > Calling Proxy( XI Receiver) Channel.
>>>> Could you please provide all the ID objects I need to create?
Integration Directory objects:
a) Two business system. One might be third party and other Business system is abap type
b) Two communication channels. One for Soap sender and one for the receiver (proxy)
c) one Receiver Determination
d) one Interface determination
e) one sender agreement and one receiver agreement.
Pretty much same as regular interfaces.
>>>> Can I do this in Integrated Configuration? or it has to be simple configuration.
if your server version is PI 7.1 EHP1 then you can go for Integrated configuration to achieve local processing and in that case you dont need receiver determination , iinterface determination ,sender and receiver agreements. You just need 2 communication channels, config scenario and Integrated configuration object.
If your server is not 7.1 EHP1 then you cannot go for local processing (Advanced Adapter Engine). Because proxy is not supported there.
Hope answered your question.
Hi Navin,
I think the correct answer was given by Prateek for your main question as,
"EXECUTE_SYNCHRONOUS doesn't work in PI 7.1. You have to use the Message Operation name as the name of method. Apart from this, the code should remain same and you can search that on SDN."
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PI 7.0 - EXECUTE_ASYNCHRONOUS method for ABAP PROXY (Async interface) and EXECUTE_SYNCHRONOUS method for ABAP PROXY (sync interface).
PI 7.1 - the same name from operation interface of service interface. Rest are all the same. No change in impementation procedure
Sure this link might be helpful for the server proxy (inbound)
http://wiki.sdn.sap.com/wiki/display/XI/Step-by-stepFTPtoABAPProxy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have told same thing to our ABAP team but they are not sure of how to implement it. I have created a inbound synchronous interface in PI as SalesOrderSysmtem1_In which has "SalesOrderSysmtem1_In" as Operation.
When we generate proxy in SAP system for the above service interface, we have Class as "ZPX_CL_SALES_ORDER_SYSTEM1_IN" with Method as "ZPX_II_SALES_ORDER_SYSTEM1_IN~SALES_ORDER_SYSTEM1_IN"
Do we just have to write ABAP proxy code for synchronous call within that single method??
Is it possible to habe two methods one for request and another for response.
I have the below code in the method:
DATA: lw_in_ord TYPE zpx_sales_order_sapreq_dt_reco,
lw_out_ord TYPE zpx_sales_order_sapresp_dt_rec,
lv_vbeln TYPE vbeln_va,
lv_kunnr TYPE kunnr.
LOOP AT input-sales_order_sapreq_mt-records INTO lw_in_ord.
SELECT SINGLE vbeln kunnr INTO (lv_vbeln, lv_kunnr) FROM vbak
WHERE vbeln = lw_in_ord-vbeln.
IF sy-subrc = 0.
lw_out_ord-vbeln = lv_vbeln.
lw_out_ord-kunnr = lv_kunnr.
APPEND lw_out_ord TO output-sales_order_sapresp_mt-records.
ENDIF.
ENDLOOP.
We have the above code, its taking the request from PI, but not sending the reposne back to PI. We are appending the reposne to "sales_order_sapresp_mt-records", but how to make the reponse call back to PI?
I am having some confusion around this, please help.
Regards,
N@v!n
Hi,
The method mentioned above(ZPX_II_SALES_ORDER_SYSTEM1_IN~SALES_ORDER_SYSTEM1_IN) is right , You can write your code inside this method.
Why you need two method for request as well as for response, you can have two parameters instead (output and input)
You can send data in one parameter and get data in second parameter. Also whatever you get as response you can store it somewhere.
I cannot say whether your code is right or not since i havent see your internal structure
Regards,
Shradha
EXECUTE_SYNCHRONOUS doesn't work in PI 7.1. You have to use the Message Operation name as the name of method. Apart from this, the code should remain same and you can search that on SDN.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.