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

Logical port definition dynamically

Former Member
0 Likes
753

Hi all!

In ABAP I'm using a Web Service proxy class to call the web service. I'm aware that a logical port must exist that points to the location of the service.

I'm looking for a way in ABAP (not Web Dynpro) to determine / set the correct logical port dynamically at runtime.

I invoke the proxy as follows:

create object lo_clientproxy.
call method lo_clientproxy->aMethod
 exporting
   input  = ls_request
 importing
   output = ls_response.

I know that in web dynpro the logical port can be determined at runtime:

 wdContext.current<Node>Element().modelObject()._setEndPoint("<Your URL>");

Is there a way in ABAP as well to set the logical port dynamically?

Regards,

Mathias

Hi all!

In ABAP I'm using a Web Service proxy class to call the web service. I'm aware that a logical port must exist that points to the location of the service.

I'm looking for a way in ABAP (not Web Dynpro) to determine / set the correct logical port dynamically at runtime.

I invoke the proxy as follows:

create object lo_clientproxy.
call method lo_clientproxy->aMethod
 exporting
   input  = ls_request
 importing
   output = ls_response.

I know that in web dynpro the logical port can be determined at runtime:

 wdContext.current<Node>Element().modelObject()._setEndPoint("<Your URL>");

Is there a way in ABAP as well to set the logical port dynamically?

Regards,

Mathias

1 REPLY 1
Read only

Former Member
0 Likes
465

I've found it:

CREATE OBJECT lo_clientproxy

exporting

LOGICAL_PORT_NAME = LPORT.

LPORT would need to be a variable of type PRX_LOGICAL_PORT_NAME and contain the name of an existing logical port that had already been configured in LPCONFIG.