cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug error of "cl_wd_runtime_services=>attach_file_to_response"

Former Member
0 Kudos

Hi Experts,

I use this method to open attached file. When I click on file link, an external browser is popped out with dump.

However, this dump could not be traced in ST22.

How can I debug this error?

Thank you very much.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Experts,

I would like to add one point to follow up this issue. I repeat these steps:

Step1: I try to open the attachment link from SAP GUI, an external browser is opened and then dump happens in the browser.

Warning is "Service cannot be reached".

Link:

http://ldai2sq7.wdf.sap.corp:50089/sap/bc/webdynpro/sap/ags_workcenter/~wd_key005056A501F602EEB99FC7...

Step2: I open the attachment link from IE. It works as expected.

Link:

http://ldai2sq7.wdf.sap.corp:50089/sap/bc/webdynpro/sap/ags_service_delivery/~wd_key005056A501F602EE...

Step3: I go to SAP GUI and try Step1 again. It works!!!

I compare the two link, the difference is about application name and wd_key.

"ags_workcenter" VS "ags_service_delivery"

Can anyone share any ideas?

Thanks a lot.

sahai
Contributor
0 Kudos

hi Vincent ,

Service cannot be reached this error generally occurs when we have transported the code from one server to another in this what happens .....our application also is transported but say .......my code was in server1....and i have transported to server2 ...after that i tried to execute my code in server 2 it will give me an error service cannot be reached.....check out that whether a similar case might ot be there with you...to rectify just delete your web dynpro application and create a new one...it once worked for me...hopefully it will work for you also...try it

also cross check your link which you have written in thread ....is it ok?

thanks and regards,

sahai.s

Former Member
0 Kudos

Hi,

The link is ok.

I go to sicf and re-activate the service. Then no dumps happens. I do not know why it is not statble. After some time , dump happens again.

Former Member
0 Kudos

can u show some code?

Former Member
0 Kudos

IF lo_el_attach_table IS NOT INITIAL.

lo_el_attach_table->get_attribute(

EXPORTING

name = `FNAME`

IMPORTING

value = lv_fname ).

lo_el_attach_table->get_attribute(

EXPORTING

name = `FTYPE`

IMPORTING

value = lv_ftype ).

lo_el_attach_table->get_attribute(

EXPORTING

name = `FCONTENT`

IMPORTING

value = lv_fcontent ).

ENDIF.

CALL METHOD cl_wd_runtime_services=>attach_file_to_response(

I_FILENAME = lv_fname

I_CONTENT = lv_fcontent

I_MIME_TYPE = lv_ftype "or what you need

I_IN_NEW_WINDOW = abap_true

I_INPLACE = abap_false ).

Former Member
0 Kudos

Hi seems to me that you are trying to access a session using a session key which is not existing or session is disconnected.

Looks to me that it is not easy as you posted here . It will be difficult for us to give suggestion with out knowing your application.

gill367
Active Contributor
0 Kudos

wt is the error message you are getting.

thanks

Former Member
0 Kudos

The error info is :

Service cannot be reached

What has happened?

URL http://ldai1sq7.wdf.sap.corp:50089/sap/bc/webdynpro/sap/ags_workcenter/~wd_key0050568A3F5B02EEB6C56B... call was terminated because the corresponding service is not available.

Note

The termination occurred in system SQ7 with error code 400 and for the reason Session not found.

The selected virtual host was 0 .

What can I do?

Please select a valid URL.

If it is a valid URL, check whether service /sap/bc/webdynpro/sap/ags_workcenter/~wd_key0050568A3F5B02EEB6C56BBC091CCA98/3.PNG is active in transaction SICF.

If you do not yet have a user ID, contact your system administrator.

Error Code: ICF-NF-http-ildai1sq7_SQ7_89-v0-d20110113-t092356-s400-rSession not found-X:0050568A3F5B02DEB6C351914F768094_0050568A3F5B02DEB6C351914A3F87BE_1-x:4D2B6967BE881976E10000000A4231DD

HTTP 400 - Session not found

Your SAP Internet Communication Framework Team

gill367
Active Contributor
0 Kudos

http://ldai1sq7.wdf.sap.corp:50089/sap/bc/webdynpro/sap/ags_workcenter/~wd_key0050568A3F5B02EEB6C56B...

hi

i am bit doubtful over the portnumber 50089

is it correct?

also check in the transaction sicf

whether the service is activate

thanks

sarbjeet

Former Member
0 Kudos

Hi,

I check the service in sicf, it is activated.(sap/bc/webdynpro/sap/ags_workcenter)

Then I try open application in browser, NO dump occurs. Only if I open application in SAPGUI, this dump happens.

What should be the reason?

Thanks

gill367
Active Contributor
0 Kudos

If you are testing the application from SICF, then also are you getting the dump.

Former Member
0 Kudos

Hi,

this can be easily a browser restriction !! See in the browser setting if anything to be enabled etc.