We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-dev] Speed of Download to Desktop VS App Server

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by R. N. Wilhite (Senior Project Manager)
on Nov 29 at 3:25 PM
Hi all,
I suppose that this is due to network latency, but I thought I'd ask anyway.

My code does exactly the same things until download time. Then it forks either taking the data off to the APP Server or to the desktop. I was pretty surprised when the speed ratio came out 100:1 in favor of the App server. Is that really a reasonable expectation? Here's the two code bits:

For the local download:

FORM file_ldownload.

DATA: l_file TYPE string.

* Download file to presentation.
MOVE: p_lfile TO l_file.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
* bin_filesize = l_xml_size
filename = l_file
filetype = 'ASC'
trunc_trailing_blanks = ' '
CHANGING
data_tab = it_output
EXCEPTIONS
OTHERS = 24.
IF sy-subrc EQ 0.
WRITE: / 'Files written to the local drive:',
/ p_lfile.
SKIP 1.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

ENDFORM. " FILE_LDOWNLOAD


For the App Server download:

FORM file_sdownload.

DATA: l_error TYPE string.
* file download.
OPEN DATASET p_sfile FOR APPENDING IN TEXT MODE
ENCODING DEFAULT WITH WINDOWS LINEFEED
MESSAGE l_error.
IF sy-subrc NE 0.
IF sy-subrc = 8.
MESSAGE l_error TYPE 'E'.
ELSE.
MESSAGE ID '/SAPDMC/LSMW' TYPE 'E' NUMBER '056'.
ENDIF.
ELSE.

LOOP AT it_output INTO wa_output.
TRANSFER wa_output TO p_sfile.
ENDLOOP.
CLOSE DATASET p_sfile.
IF sy-subrc IS INITIAL.
WRITE: / 'Files written to the server:',
/ p_sfile.
SKIP 1.
ENDIF.
ENDIF.

ENDFORM. " FILE_SDOWNLOAD


Any thoughts on this?

Neal
__.____._
Copyright © 2011 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
View this online
  
R. N. Wilhite
SAP Development Helper

Posted helpful replies on 50 threads in a group to earn a Silver Achievement
Popular White Papers

In the Spotlight
Become a blogger at Toolbox.com and share your expertise with the community. Start today.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language