cancel
Showing results for 
Search instead for 
Did you mean: 

Create url for displaying PDF using 'WDY_CONSTRUCT_URL'

Former Member
0 Kudos

From my webdynpro i want to display a pdf file, in de FM a url is constructed, does anybody know where i can change the fact a url is http or https.

CALL FUNCTION 'WDY_CONSTRUCT_URL'

EXPORTING

application = 'ZHF_PDF'

PARAMETERS = lt_params

IMPORTING

out_url = lv_url

EXCEPTIONS

invalid_application = 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.

Accepted Solutions (0)

Answers (3)

Answers (3)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Consider using CL_WD_UTILITIES=>CONSTRUCT_WD_URL instead. There is an importing parameter IN_PROTOCOL that will let you choose HTTP vs. HTTPS.

Former Member
0 Kudos

where can i change http to https, in our production system the location is http while it should be https

abhimanyu_lagishetti7
Active Contributor
0 Kudos

if your server configured for secured access then the method call will return the protocol as https.

also, WDY_CONSTRUCT_URL will give the url with the protocol addition you need not worry about the protocol.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

data out_host type string.

data out_port type string.

data out_protocol type string.

call method cl_http_server=>if_http_server~get_location

exporting

server = cl_wdr_task=>server

importing

host = out_host

port = out_port

out_protocol = out_protocol.

out_protocol will have 'HTTP' or 'HTTPS'