11-12-2010 5:39 AM
Hi All,
I am using GUI_DOWNLOAD FM in a BADI... and the BADI is getting triggered by some status change......
The problem is when i use breakpoint id and try to execute..the file is created and i can see it....... in presentation server......
But when i try to remove the breakpoint id and execute.... it doesnt create a file..... but there are no dumps nor any errorsss...
can anyone tell me what wrong hereee????
11-12-2010 5:58 AM
11-12-2010 5:43 AM
Dear,
After the statement for create file in presentation server, put the below statements.
WAIT UP TO 1 SECONDS.
11-12-2010 5:58 AM
Hi i used this statement...after GUI_DOWNLOAD..
Its not working.. still the file is not created....
11-12-2010 5:58 AM
11-12-2010 6:02 AM
how should i use these statment exactly...
comiit what???
and just write wait??
should i write this after GUI_DOWNLOAD or where?
11-12-2010 6:11 AM
11-12-2010 6:19 AM
>
> commit work and wait.
Absolutely rubbish!!! You should never use COMMIT inside BAdIs.
11-12-2010 6:23 AM
11-12-2010 6:27 AM
Hello,
Without further inputs viz., BAdI name, method implemented, code snippet etc. i'm sure you wont get good responses.
BR,
Suhas
11-12-2010 6:35 AM
ok..
Definition : EXEC_METHODCALL_PPF
Method : EXECUTE
inside this execute... i have written the code...
CALL TRANSFORMATION zfocus_ii_transformation
SOURCE
root1 = it_final
root2 = it_final1
root3 = it_final2
RESULT XML xml_string.
Convert the encoding standard to "UTF-8".
SPLIT xml_string AT c_aux INTO TABLE i_result IN BYTE MODE.
Convert to ASC
LOOP AT i_result INTO wa_result.
v_xleng = XSTRLEN( wa_result ).
Pass each line and convert encoding to UTF-8 format.
v_conv = cl_abap_conv_in_ce=>create(
encoding = c_utf8
endian = c_l
input = wa_result
).
Get the converted data.
CALL METHOD v_conv->read(
EXPORTING n = v_xleng
IMPORTING data = wa_output
).
Insert the converted data into output table.
INSERT wa_output INTO TABLE i_output.
CLEAR wa_output.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = gv_fullpath
filetype = 'ASC'
TABLES
data_tab = i_output
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
ENDIF.
hope now i will get someinputs...
11-12-2010 7:43 AM
If your program is running in background then GUI_DOWNLOAD will never work. That case you have to use datasets and store the file at application server.
If program is running in foreground, please check if you are getting any exception. you can check it by coding a WRITE statement when sy-subrc NE 0 instead break-point.