Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Synchronous Inbound Proxy: Request Responce Type

Former Member
0 Likes
663

Hi,

I am new to ABAP and i have to work on a inbound proxy which is synchronous

ie a request-responce scenario has to be implemented.

Can some one guide me how to initiate.

Regards,

vickey

-


Any replys will be highly appreciated and rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
608

hi

check with this wiki page:

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/09/19/request-responseSCENARIOININBOUNDPROXY

If there is a scenario in which the request coming from the other system and based on that request, a response is to be send from ABAP to that system, inbound proxy with Synchronous method is used.

The class is created by the XI and in the method execute_synchronous, the ABAP code is written.

The XI provides the input and output structures.

The ABAP side receives the request from the input structure and sends back the response to the output structure. We will go through these steps one by one. If clearly understood the whole concept is very easy.

Step1: To declare the internal table/work area of the type of input structure:

wa_input like input-mt_get_notification-message_payload.

(Here we have given the whole path as highlighted through ovals in the figure above)

Step2: To move the data coming from the input structure to the defined workarea/internal table:

move input-mt_get_notification-message_payload to wa_input.

Now the input data is in the desired internal table /work area which can be used to fetch the desired values and send the result back to XI through output structure.

2) To send the data to XI through output structure.

Step1: Like input structure, the naming convention for output structure also follows the

whole path

call method me->get_notif_or_task_details

exporting

p_input = wa_input

importing

p_output =

output-mt_notification_response-message_payload-sapresponse

changing

it_l_bapiret2 = it_bapiret2

exceptions

errors_occurred = 1

others = 2

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

(Code Snippet for Method)

Here this method fetches the required data in the table p_output and assign it to the internal table

SAPRESPONCE of the output structure which goes to XI.

In this way, the synchronous method can be used for inbound proxy in case of request-response scenario.

regards

Manish

Hi,

I am new to ABAP and i have to work on a inbound proxy which is synchronous

ie a request-responce scenario has to be implemented.

Can some one guide me how to initiate.

Regards,

vickey

-


Any replys will be highly appreciated and rewarded.

3 REPLIES 3
Read only

Former Member
0 Likes
608

hello vickey, welcome to sdn....

The working of Inbound synchronous proxy is similar to that of an asynchronous

one.

The data which received from the proxy structrure is filled into an internal table of similar data type .

Now according to the requirement, you will fetch the desired data and put it in an internal table of the data type(output proxy structure) and move that table to the output proxy structure.

We declare flat structure like this :

wa_input like input-mt_get_notification-message_payload.

To move the data from proxy to work area :

move input-mt_get_notification-message_payload to wa_input.

Now ucan do your desired operation in a method passing it the input and receiveing the output from the method.

call method me->get_task_det_for_notif_no

exporting

p_input = wa_input

importing

p_output =

output-mt_notification_response-message_payload-sapresponse

Hope this will help.

reward if useful.

Read only

Former Member
0 Likes
609

hi

check with this wiki page:

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/09/19/request-responseSCENARIOININBOUNDPROXY

If there is a scenario in which the request coming from the other system and based on that request, a response is to be send from ABAP to that system, inbound proxy with Synchronous method is used.

The class is created by the XI and in the method execute_synchronous, the ABAP code is written.

The XI provides the input and output structures.

The ABAP side receives the request from the input structure and sends back the response to the output structure. We will go through these steps one by one. If clearly understood the whole concept is very easy.

Step1: To declare the internal table/work area of the type of input structure:

wa_input like input-mt_get_notification-message_payload.

(Here we have given the whole path as highlighted through ovals in the figure above)

Step2: To move the data coming from the input structure to the defined workarea/internal table:

move input-mt_get_notification-message_payload to wa_input.

Now the input data is in the desired internal table /work area which can be used to fetch the desired values and send the result back to XI through output structure.

2) To send the data to XI through output structure.

Step1: Like input structure, the naming convention for output structure also follows the

whole path

call method me->get_notif_or_task_details

exporting

p_input = wa_input

importing

p_output =

output-mt_notification_response-message_payload-sapresponse

changing

it_l_bapiret2 = it_bapiret2

exceptions

errors_occurred = 1

others = 2

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

(Code Snippet for Method)

Here this method fetches the required data in the table p_output and assign it to the internal table

SAPRESPONCE of the output structure which goes to XI.

In this way, the synchronous method can be used for inbound proxy in case of request-response scenario.

regards

Manish

Read only

0 Likes
608

Thanks for a wonderful link