Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Bex doesnu00B4t get Link from RFC

Hello everyone,

i have a problem with a RFC Call and BEX. Bex should open a Link which It get back from a RFC.

Following activity constellation.

Bex open a Connection to a RFC. The RFC call a defined Application (Webdynpro Applikation) and look for the Url of the Application. Then Bex get this Url back from RFC. Bex should open this URL. The Problem is it doesn´t works and I don´t know why. BEx say´s no error (The Programm run´s, but Bex get not back the Url from the RFC).

-

-


>The RFC has the 'remote status'.

VBA Code

SAP Connection

...........

If sapConnection.Logon(0, False) <> True Then

MsgBox "Keine Verbindung zum R/3!"

Else

Set theFunc = functionCtrl.Add("SS_RFC_URL_TEST")

objQueryTab = "200"

'theFunc.Exports("E_PAR") = objQueryTab

theFunc.Exports("I_PAR") = objQueryTab

sReturn = theFunc.call

If sReturn = True Then

objQueryTab = theFunc.Imports("E_PAR")

End If

sapConnection.logoff

End If

End Sub

-

-


Code of RFC

DATA:gv_url_string TYPE string,

gv_url_c(250) TYPE c.

CONSTANTS:gc_login_auth TYPE string VALUE '?sap-system-login-basic_auth=X',

gc_client TYPE string VALUE '&sap-client=',

gc_lang TYPE string VALUE '&sap-language='.

**Get the Url of Webdynpro Applicaion with HTTPS Protocol

CALL METHOD cl_wd_utilities=>construct_wd_url

EXPORTING

application_name = 'ZESP_HELLOWORLD_VIEW'

in_protocol = 'HTTPS'

IMPORTING

out_absolute_url = gv_url_string.

**Build the URL

CONCATENATE gv_url_string

gc_login_auth

gc_client sy-mandt

gc_lang sy-langu

*INTO gv_url_c.

INTO E_PAR.

**Call the Browser

CALL FUNCTION 'Z_ESP_STSC_CBW'

EXPORTING

url = E_PAR

EXCEPTIONS

frontend_not_supported = 1

frontend_error = 2

prog_not_found = 3

no_batch = 4

unspecified_error = 5

OTHERS = 6.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDFUNCTION.

--The Import and Exportparameters are defined. The connection to the RFC is correct.

What is wrong?

Thanks

Former Member
Not what you were looking for? View more on this topic or Ask a question