cancel
Showing results for 
Search instead for 
Did you mean: 

Logical port definition dynamically

Former Member
0 Kudos

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

Message was edited by:

Mathias Glockner

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.