How to download data to the presentation server in background?
Hi,
I would like to download data to the presentation server in background.
Currently, the report uses FM GUI_DOWNLOAD to download in foreground.
However, this FM does not work in the background.
But please let me know how to download to the presentation server in background.
Thanks and regards,
Anishur
Moderator message - FAQ - Please search before asking - post locked
Rob
Similar Messages
-
How to download data from the icloud?
How to download data from the icloud?
Settings>General>Reset>reset all content and settings. When iPhone restarts you will guide to restore from iCloud backup
-
CAN WE DOWNLOAD A REPORT TO PRESENTATION SERVER IN BACKGROUND
Hi
1. Can we download a report into presentation server in background mode and it should be saved in excel. If so plz let me know how to do.
2. When i look into spool SP01 the report is not in proper format because the report output width is more than 255 characters and now how should i solve the problem to make it in correct format. Can we do this or not?. If so how
Thanks in advance.Hi
when i wrote the
REPORT z_mm_rep_000047
LINE-SIZE 500
LINE-COUNT 65
MESSAGE-ID zca.
it is automatically increasing the width in the print settings when i increased to 500 from 255 but stil its not working. -
How to download n files to FTP server in background using single report?
Hi all,
I have one requriement where i have to download 7 different text ( *.txt ) files to FTP server weekly using single program in background mode.
I have populated all the 7 internal tables with their corresponding data. But i dont know how to proceed further.
Please help me out .....
Thanks in advance..hi,
U can store the Internal table name and File name in an internal table.
Then loop at that table and call function called 'GUI_DOWNLOAD' inside that loop.
Rgds,
Sanjeet -
How to downlad a string to the Presentation server
Hi all
How we can download a string to the presentation server <b>without</b> converting it to the internal table.
Am having a XML data as string. I want to bring that to the presentation server without converting it to internal table.
I have tried that by converting to table and downloaded the same as BIN file ......since we are disturbing the string while converting to itab am getting error while executing that XML file.
<b>Error as shown below.
Multiple colons are not allowed in a name. Error processing resource 'file:///D:/XXXXX.xml'. Line 705, Position 588
</w:fldData></w:fldChar></w:r><aml:annotation aml:id="3" w:type="Word.Bookmark.Start" w:name="Text9"/&g...</b>
Kindly help me in this regards.
Thanks in advance
Meikandanus the following code to convert the xml to itab which can then be use with gui_download with file type 'BIN'
data: coutput type string ,
xl_content type xstring ,
binary_content type solix_tab .
call transformation (`ID`)
source flights = flights[]
result xml output.
clear: xl_content .
* xl_content = output .
call function 'SCMS_STRING_TO_XSTRING'
exporting
text = output
* MIMETYPE = ' '
* ENCODING =
importing
buffer = xl_content
exceptions
failed = 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.
refresh binary_content .
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = xl_content
tables
binary_tab = binary_content.
Regards
Raja -
How to delete a local file in the presentation server.
Hi All,
How to delete a local file in the presentation server. As we do using 'delete dataset dsn' in application server. How can i achieve this. My requirement is after uploading file using gui_upload, i want to delete that source file. Please let me know, how can i achieve this.
Thanks in advance.
Regards,
Vishaldata: l_rc type i.
data: f_name type string.
move 'c:\YourFile.txt' to f_name.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_DELETE
EXPORTING
FILENAME = f_name
CHANGING
RC = l_rc
EXCEPTIONS
FILE_DELETE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
FILE_NOT_FOUND = 4
ACCESS_DENIED = 5
UNKNOWN_ERROR = 6
NOT_SUPPORTED_BY_GUI = 7
WRONG_PARAMETER = 8
others = 9
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to schedule a program for download a file to Presentation Server
hi all,
I need to schedule a program which will download a file to presentation server. How can i handle this or is there any other to download a file during scheduling?
Points will be rewarded
Thanks in advanceHi Jayasree,
You can download your file to application server in background scheduling.
In your program use OPEN DATASET command for achieving this.
How ever, as far as i know, it is not possible to download the file to presentation server in background job.
regards,
G@urav. -
Problem with downloading the internal table onto the presentation server.
Hey folks,
I have a problem where in i am downloading one year of sales done by the company. I wrote a program to download the file onto the presentation server . The error occurs in the FM GUI_DOWNLOAD where if the file exceeds 105843504 bytes its giving me a dump saying that
When the program was running , it was established that more memory was needed than the operating system is able to safely to provide.
The current program has to be terminted because of the program already requested 105843504 bytes from the operating system with malloc when the operating system reported after further memory request that there was no more memory space available.
Could somebody provide an alternative soltuion for this.
Its really urgent as i can download the file with 70,000,000 bytes
Regards
RockHi Rock,
Please download the files on to Application Server, else as suggested by Ashish download into 2 or 3 files and merge them manually.
Declare same internal tables may be 5 times.
When you fill the internal table check for a counter and when you hit a certain number stop appending to it and start appending to the next.
After you are done so download all the internal tables.
I guess this would be a good way. I am not sure if there are any ther alternative good methods.
Hope this helps.
Shreekant -
How to process data in the past based from data in the present
hello guys,
i have a problem in my labview programs. how to process data in the past based from data in the present ?
i have a formula self-organizing maps
this formula is looking for D1, D1 is neuron index that will be searched for the smallest value.and the result are D1=2 ,D2=5, D3=17 from calculating with formula .it means the smallest value is 2, "2" from weight [2 2] in file attached.
and then it will be in other formula
it mean [2 2] + 0.5 ( [1 1]-[2 2] ) = [1.5 1.5]
and the weight will be [1.5 2 2 ] in matrix
1.5 3 5
I would appreciate any input/help on solving this
thanks
Attachments:
dika.vi 16 KB
weight.txt 1 KB
data .txt 1 KBHi Ronny Hanks,
Moving your records from internal table into the database table depends upon various scenarios :-
1. If you use INSERT statement.
INSERT <database_table> FROM TABLE <internal_table>.
But in this case, you need to make sure that you don't have any duplicate entries in your internal table that violates data entry into database table, else you will get a dump.
INSERT <database_table> FROM TABLE <internal_table> ACCEPTING DUPLICATE KEYS.
In this case, you are forcefully inserting duplicate records into your database table which may lead to data redundancy in your database table.
2. If you use UPDATE statement.
UPDATE <database_table> FROM TABLE <internal_table>.
This will update the existing records in your database table from the internal table.
3. If you use MODIFY statement.
MODIFY <database_table> FROM TABLE <internal_table>.
This statement works both in combination of INSERT & UPDATE statements.
Existing records (in database table) will be eventually updated/modified and new records (not in database table currently) will be successfully inserted into the database table.
Hope this solves your problem.
Thanks & Regards.
Tarun Gambhir. -
"Bad data format" when reading txt file from the presentation server
Hello,
I have a piece of code which reads a txt file from the presentation server to an internal table like below:
DATA : lv_filename type string.
lv_filename = 'C:\abap\Test.txt'. "I created a folder called abap under C:\
CALL method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
FILENAME = lv_filename
CHANGING
DATA_TAB = lt_tsd. " lt_tab has the exact same fields as the Test.txt's. Test.txt has only one line, tab delimited.
When running this code, exception BAD_DATA_FORMAT is issued.
Is it because of the file encoding or delimiter or other reason?
Thanks,
YangHello,
If its tab delimited then use the has_field_seperator parameter and check
DATA : lv_filename type string.
lv_filename = 'C:\abap\Test.txt'. "I created a folder called abap under C:\
CALL method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
FILENAME = lv_filename
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = u2018Xu2019
CHANGING
DATA_TAB = lt_tsd.
Vikranth -
Downloading a file on presentation server
Dear All,
I have a requirement where in I need to run a custom report in the background (since it gives a short dump for max permitted time when run in foreground). However, I need to download a file with report output on the presentation server (user's desktop). Can you please help me know how can I download a file on user's desktop by running the report in background?
Thanks & Regards
SujayHi Suraj,
I had also researched a lot for this requirement for my project. This requirement, to download the file to a local system by running a job cannot be done.
But there is a work around for this requirement, you can write a program to download the data to a "AL11" active directory in your the server( using an open dataset ). This program can be executed in background too, since we are writing the file to the server directory. If its a normal .txt file, you can ask the user to check it in AL11 or you can ask the basis team to copy that file from the active directory and send it to the user.
I think this will help you a little bit.
Regards
Maneesh Chandran -
How to download data from abap-ouput to excel sheet with logo
how to download data from abap-ouput to excel sheet with standard logo
Edited by: Harish Kasyap on Nov 18, 2008 8:19 AM
Edited by: Harish Kasyap on Nov 18, 2008 8:20 AMFor saving the report you can goto System -> List -> Save -> Local File -> Location where you want to save in your presentation server.
You can also give a option in your selection screen to save the file to Presentation server using FM GUI_DOWNLOAD.
Hope it helps.
Thanks,
Jayant. -
File download to presentation server in BACKGROUND
Hello,
i'm trying to download a simple list to the presentation server, but in a background process (part of an update rule for an infopackage). I´ve tried WS_Download and CALL METHOD o->gui_download etc but the job cancels with them since they seem only to run in frontend. Does anyone know of a more suitable function module?
Thanks,
KevHi,
Tyr to download file to unix in background.
PARAMETERS: p_unix LIKE rlgrap-filename.
INITIALIZATION.
v_uzeit = sy-uzeit.
v_date = sy-datum.
v_client = sy-mandt.
v_sys = sy-sysid.
CONCATENATE c_str v_sys c_str4 v_client
c_str3 v_date c_str5 v_uzeit c_str6 INTO p_unix.
DATA: v_fnam LIKE rlgrap-filename,
v_filepht LIKE FILENAME-FILEINTERN, "File for p_unix
v_sys LIKE sy-sysid,
v_client LIKE sy-mandt,
v_date LIKE sy-datum,
v_uzeit LIKE sy-uzeit
FORM f3000_save_unix_file.
SORT i_output.
* Open the file in application server
OPEN DATASET p_unix FOR OUTPUT IN TEXT MODE.
IF sy-subrc <> 0.
MESSAGE s900 WITH p_unix. " File opening error
LEAVE LIST-PROCESSING.
ENDIF.
LOOP AT i_output INTO w_output.
TRANSFER w_output TO p_unix.
CLEAR w_output.
ENDLOOP.
IF sy-subrc = 0.
WRITE:/ text-075, p_unix, text-076. " File successfully created
ELSE.
WRITE:/ text-074, p_unix. " Error creating file
ENDIF.
* Closing the file
CLOSE DATASET p_unix.
ENDFORM. " f3000_save_unix_file
Also refer this link
http://www.sapdevelopment.co.uk/file/file_updown.htm
Try this might help u. -
ABAP Code for Backup the entire table data in the application server
Hello Friends,
I have to create the table data Backup and Store the entire table data in the application server and also be able to restore the data back if needed.
this should be dynamic program for any table based on the table name given on the application server.. I have developed a program for this but its having problems with the Quantity, amount. Its not writing it correctly at the application level.
ANy Suggestions on this.
Below is the program for this.
Thanks,
Ster.
* Report YWMM_TABLE_DUMP *
REPORT ywmm_table_dump .
TABLES :
dd03l.
* Type spool declaration
TYPE-POOLS:
abap, slis.
DATA: i_table_data1 TYPE REF TO data.
DATA : it_dd03l LIKE dd03l OCCURS 0 WITH HEADER LINE.
*DATA : gt_fieldcat TYPE lvc_s_fcat.
DATA : i_fcat TYPE STANDARD TABLE OF lvc_s_fcat,
l_dr_line TYPE REF TO data,
l_v_as4vers TYPE as4vers.
FIELD-SYMBOLS: <f_table_data1> TYPE STANDARD TABLE,
<f_wa_table_data1> TYPE ANY.
SELECTION-SCREEN: BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
PARAMETERS: rb_copy RADIOBUTTON GROUP map DEFAULT 'X',
rb_rest RADIOBUTTON GROUP map.
SELECTION-SCREEN: END OF BLOCK bl1.
SELECTION-SCREEN: BEGIN OF BLOCK bl2 WITH FRAME TITLE text-002.
PARAMETERS: p_table TYPE tabname OBLIGATORY,
p_plfld TYPE dd03l-fieldname.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_bkfile TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK bl2.
PERFORM get_data.
IF rb_copy = 'X'.
PERFORM backup.
ELSEIF rb_rest = 'X'.
PERFORM database_update.
ENDIF.
*& Form get_data
FORM get_data.
CLEAR i_fcat.
REFRESH i_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_table " Table Name
CHANGING
ct_fieldcat = i_fcat
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = i_fcat
IMPORTING
ep_table = i_table_data1.
IF sy-subrc = 0.
ASSIGN i_table_data1->* TO <f_table_data1>.
ELSE.
WRITE: 'Error creating internal table'.
ENDIF.
IF rb_copy = 'X'.
SELECT * FROM (p_table) INTO CORRESPONDING FIELDS OF
TABLE <f_table_data1> UP TO 20 ROWS.
ELSEIF rb_rest = 'X'.
CREATE DATA l_dr_line LIKE LINE OF <f_table_data1>.
ASSIGN l_dr_line->* TO <f_wa_table_data1>.
*Get Data from Application Server
* Opening the dataset P_BKFILE given in the selection screen
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR INPUT IN TEXT MODE." ENCODING DEFAULT.
IF sy-subrc NE 0.
* MESSAGE:
ELSE.
DO.
* Reading the file from application server
READ DATASET p_bkfile INTO <f_wa_table_data1>.
IF sy-subrc = 0.
APPEND <f_wa_table_data1> TO <f_table_data1>.
ELSE.
EXIT.
ENDIF.
ENDDO.
* Closing the dataset
CLOSE DATASET p_bkfile.
ENDIF.
ENDIF.
ENDFORM. " get_data
*& Form backup
* text
* --> p1 text
* <-- p2 text
FORM backup.
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR OUTPUT IN TEXT MODE.
IF sy-subrc NE 0.
WRITE: text-017.
STOP.
ELSE.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
ENDIF.
CLOSE DATASET p_bkfile.
ENDFORM. " backup
*& Form database_update
FORM database_update.
DATA : i_mara_u TYPE STANDARD TABLE OF mara WITH HEADER LINE,
i_ekpo_u TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
i_eban_u TYPE STANDARD TABLE OF eban WITH HEADER LINE,
i_resb_u TYPE STANDARD TABLE OF resb WITH HEADER LINE,
i_plpo_u TYPE STANDARD TABLE OF plpo WITH HEADER LINE,
i_stpo_u TYPE STANDARD TABLE OF stpo WITH HEADER LINE,
i_vbap_u TYPE STANDARD TABLE OF vbap WITH HEADER LINE,
i_vbrp_u TYPE STANDARD TABLE OF vbrp WITH HEADER LINE,
i_lips_u TYPE STANDARD TABLE OF lips WITH HEADER LINE,
i_afvc_u TYPE STANDARD TABLE OF afvc WITH HEADER LINE,
i_asmd_u TYPE STANDARD TABLE OF asmd WITH HEADER LINE,
* i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_qmel_u TYPE STANDARD TABLE OF qmel WITH HEADER LINE,
i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_esll_u TYPE STANDARD TABLE OF esll WITH HEADER LINE,
i_t165_u TYPE STANDARD TABLE OF t165 WITH HEADER LINE,
i_t165e_u TYPE STANDARD TABLE OF t165e WITH HEADER LINE,
i_twpko_u TYPE STANDARD TABLE OF twpko WITH HEADER LINE,
i_tpext_u TYPE STANDARD TABLE OF tpext WITH HEADER LINE,
i_ce4mxpa_u TYPE STANDARD TABLE OF ce4mxpa WITH HEADER LINE,
i_ce4mxpa_acct_u TYPE STANDARD TABLE OF ce4mxpa_acct WITH
HEADER LINE,
i_zaim_u TYPE STANDARD TABLE OF zaim WITH HEADER LINE,
i_s012_d TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_s012_i TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_dummy TYPE STANDARD TABLE OF mara.
CASE p_table.
WHEN 'MARA'.
* Non-Key
PERFORM move_to_table USING <f_table_data1>
CHANGING i_mara_u[]
i_mara_u.
PERFORM update_table USING i_mara_u[].
ENDCASE.
ENDFORM. " database_update
*& Form move_to_mara
FORM move_to_table USING p_tab_from TYPE STANDARD TABLE
CHANGING p_tab_to TYPE STANDARD TABLE
p_w_table.
DATA: l_wa_fcat TYPE lvc_s_fcat.
FIELD-SYMBOLS: <f_field_from> TYPE ANY,
<f_field_to> TYPE ANY.
LOOP AT p_tab_from ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_wa_fcat.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field_from>.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE p_w_table TO <f_field_to>.
<f_field_to> = <f_field_from>.
ENDLOOP.
APPEND p_w_table TO p_tab_to.
ENDLOOP.
ENDFORM. " move_to_mara
*& Form update_table
FORM update_table USING p_table_update TYPE STANDARD TABLE.
SELECT SINGLE *
FROM dd03l
WHERE fieldname = p_plfld
AND tabname = p_table
AND keyflag <> 'X'
AND as4local = 'A'
AND as4vers = l_v_as4vers
AND ( comptype = 'E' OR comptype = space ).
IF sy-subrc = 0.
* Do update
IF NOT p_table_update IS INITIAL.
UPDATE (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-003.
STOP.
ENDIF.
ENDIF.
ELSE.
*delete and insert.
IF NOT p_table_update IS INITIAL.
* DELETE (p_table).
IF sy-subrc = 0.
INSERT (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " update_table
Edited by: Julius Bussche on Jul 18, 2008 1:43 PM
Please use a meaningfull subject title!ARS,
I am struggling a bit to get this.
there is a syntax error,
Field "FIELDS_INT-TYPE" is unknown. It is neither in one of thespecified tables nor defined by a "DATA" statement.
Again you have asked to move to a diffrent table. What is that table and how to build it.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_fcat.
IF l_fcat-inttype EQ 'P'.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type
DECIMALS fields_int-decimals.
ELSE.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type.
ENDIF.
" Move <f_field> to a new table and use this table for download
ENDLOOP.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
Ster -
Prevent Editing the Presentation Server Administrators Group
In OBIEE 10.1.3.4, I have created a Catalog Group "Second Tier Administrators" and grant it access to "Settings -> Administration -> Manage Presentation Catalog Groups and Users". How can I prevent the users in the "Second Tier Administrators" group from adding themselves to the "Presentation Server Administrators" group?
Hi Evaldo,
I don't see a way of you being able to edit one line without reading the entire file into memory. You could hold the data you are writing to the file in a custom table in SAP, and when an edit is required, delete the old table and recreate a new one based on your custom table.
Best of luck.
SL
Maybe you are looking for
-
ADPrep Migration from Windows Server 2003 to 2012 Foundation Server fails with error 0x80004005
Hi all, Having a problem the forums and Google have been unsuccessful in helping me with. Server is Windows 2003 R2, migrating to Windows Server 2012 foundation. Have tried the AD Migration on the new 2012 Foundation server both as a standalone serv
-
Safari will not open websites saying can't find website
Safari will not open some websites saying can't findserver. It will open others like them. Will JavaScript cause this issue. How do I fix my safari and get my websites to open.
-
Haveing problems with siri not understanding me
having trouble with siri not understanding me. could there be a glitch?
-
I bought a 5700 XPress Music in Brussels. The device seems to have been imported from Germany (Bravo branded). The 3.76 firmware lacks.. 3G ! It's not possible to update it or reinstall software through NSU. Can anyone help me with a EMEA product cod
-
Hi, When I'm adding new login in SQL server it searches and gives the available AD groups in my domain in the Checknames box. Anyone knows what is the SP called when it searches the Group names from the domain?