Download & upload of an excel file
Hi,
I have a requirement where the data needs to be downloaded into an excel file and user will upload the same excel file after making required changes in the data.
I have used 'GUI_DOWNLOAD' to download the data to excel file. I have tried to upload the same excel file using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'TEXT_CONVERT_XLS_TO_SAP' function modules. But it is giving exceptions if I upload the same downloaded file directly. If I copy the data in the downloaded file to another excel file and upload this file, it is working.
I have tried using 'GUI_UPLOAD' with field separator which was also specified in 'GUI_DOWNLOAD' but in this case the data is uploaded into the internal table like,.
###&jkj, 0000 .......
Please suggest any other alternative.
Thanks & Regards,
Vishnu Priya
Hi,
You may like to give a try to this FM
RH_START_EXCEL_WITH_DATA.it will take care of your formatting problem.
go thru this program..
*& Report RHVERI_EXCEL_DOWNLOAD *
REPORT rhveri_excel_download.
DATA: g_excelpath TYPE string,
g_excelversion TYPE string,
g_codepage TYPE abap_encod, "XMK#754232
g_return_code TYPE i, "XMK#754232
BEGIN OF gt_data OCCURS 0,
f1 TYPE char20,
f2 TYPE char20,
f3 TYPE char20,
f4 TYPE char20,
END OF gt_data.
END-OF-SELECTION.
gt_data-f1 = 'C1'.
gt_data-f2 = 'C2'.
gt_data-f3 = 'C3'.
gt_data-f4 = 'C4'.
APPEND gt_data.
gt_data-f1 = '10'.
gt_data-f2 = '11'.
gt_data-f3 = '12'.
gt_data-f4 = '13'.
APPEND gt_data.
gt_data-f1 = '20'.
gt_data-f2 = '21'.
gt_data-f3 = '22'.
gt_data-f4 = '23'.
APPEND gt_data.
"XMK#754232
gt_data-f1 = 'AEIOU'. "#EC NOTEXT
gt_data-f2 = 'aeiou'. "#EC NOTEXT
gt_data-f3 = '*?#/&§$#'. "#EC *
gt_data-f4 = 'äöüÄÖÜßaé'. "#EC *
APPEND gt_data.
"XMK#754232
CALL FUNCTION 'RH_CHECK_EXCEL_SUPPORT'
IMPORTING
excel_exe_path = g_excelpath
excel_version = g_excelversion
EXCEPTIONS
no_batch = 1
internal_error = 2
excel_not_installed = 3
wrong_frontend_os = 4
OTHERS = 5.
IF sy-subrc <> 0.
WRITE / 'Testaufruf von Excel endete mit Fehlercode:'(002).
WRITE: sy-subrc, / sy-msgv1, sy-msgv2, sy-msgv3, sy-msgv4.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ELSE.
WRITE: / 'Pfad von Excel'(005), g_excelpath.
WRITE: / 'Version von Excel'(006), g_excelversion.
ENDIF.
"XMK#754232
IF cl_abap_char_utilities=>charsize <> 1.
WRITE / 'Unicode system'(007).
CALL METHOD cl_gui_frontend_services=>get_saplogon_encoding
CHANGING
file_encoding = g_codepage
rc = g_return_code
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
g_codepage = '4110'.
ENDIF.
WRITE: / 'Codepage is'(009), g_codepage.
ELSE.
WRITE / 'Non-Unicode system'(008).
ENDIF.
"XMK#754232
CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
EXPORTING
data_filename = 'TEST.DAT'
data_path_flag = 'W'
DATA_ENVIRONMENT =
wait = 'X'
data_table = gt_data[]
EXCEPTIONS
no_batch = 1
excel_not_installed = 2
internal_error = 3
cancelled = 4
download_error = 5
no_authority = 6
file_not_deleted = 7
OTHERS = 8.
IF sy-subrc <> 0.
WRITE / 'Aufruf von Excel endete mit Fehlercode:'(003).
WRITE: sy-subrc, / sy-msgv1, sy-msgv2, sy-msgv3, sy-msgv4.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ELSE.
WRITE / 'Aufruf von Excel lieferte keinen Fehler.'(004).
ENDIF.
Regards,
Amit
Similar Messages
-
hi guru,
I want to upload data from excel file for mm02.. first of all help on the matter of how to upload data from excel...
i hv used the FM ALSM_EXCEL_TO_INTERNAL_TABLE.. but its not working it uploading garbage value ... so tell me how to used it...
help me on this matter.Check below example.
parameters : p_file LIKE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM get_file_name.
PERFORM get_file_to_excel.
*& Form get_file_name
FORM get_file_name.
DATA: lv_name LIKE sy-repid.
lv_name = sy-repid..
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = lv_name
dynpro_number = syst-dynnr
static = 'X'
CHANGING
file_name = p_file.
ENDFORM. " get_file_name
*& Form get_file_to_excel
FORM get_file_to_excel.
DATA: idata LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = '1'
i_begin_row = '2' "Do not require headings
i_end_col = '2'
i_end_row = '60000'
TABLES
intern = idata
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
STOP.
ENDIF.
* Get first row retrieved
READ TABLE idata INDEX 1.
* Set first row retrieved to current row
DATA: gd_currentrow TYPE i.
gd_currentrow = idata-row.
LOOP AT idata.
* Reset values for next row
IF idata-row NE gd_currentrow.
APPEND f. CLEAR f.
gd_currentrow = idata-row.
ENDIF.
CASE idata-col.
WHEN '0001'.
f-belnr = idata-value.
ENDCASE.
ENDLOOP.
APPEND f. CLEAR f. -
Upload data from excel file to mii without UDS and PCo
Hi Experts,
I am trying to upload data from excel file to mii db without using UDS and PCo. Is there any other ways that we can achieve it.
I am thinking one solution , writing stored procedure. any other solutions?
Thanks in advance,
Eswar.Hi,
Thanks for reply.
I tried to create OLEDB data server which will point to my excel file in D drive.Its created successfully and i tried to query the datasource using sql query, I am not getting any modes in sql query template.
can u provide some steps..how to access this file.
Thanks, Eswar -
Upload data from excel file to Oracle table
Dear All,
I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
Could you tell me please how can i do this using PLSQl or SQL Loader.
Thnaks in Advance..Dear All,
I have to upload data from excel file to
Oracle table without using third party tools and
without converting into CSV file.
Could you tell me please how can i do this
using PLSQl or SQL Loader.
Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
Khurram -
Report to display PO details and download details in an excel fil
Hi,
I have been asked to develop a report for "Develop report to display PO details and download details in an excel file".
Could any one guide me technically what are the different tables i need to take to generate the report. Treat this is very urgent. Pls provide sample code too....
Thanks in advance....Purchase Order PO
Tcode for creation ME21,ME22,ME23. tables EKKO,EKPO.
refer this program
REPORT ZPOCHANGE.
This is a subroutine perform in the Purchase order Layout sets.
Description : To retreive the details of changed remarks in PO output and to capture the retrival date
Additional features with the previous changed appearing. e.g. from .... to
Note : If the latest modification details required
Please Uncomment the lines mentioned under 'Last Modified Remarks only'
Information
/: PERFORM CHDATE IN PROGRAM ZPOCHANGE
/: USING &EKKO-EBELN&
/: CHANGING &RVDATE2&
/: ENDPERFORM.
/: IF &RVDATE2& EQ ' '.
/ Revision Date: NIL
/: ELSE.
/ Revision Date: &RVDATE2&
/: ENDIF.
Main Window
/E CHANGE_REMARKS
/: PERFORM CHDET IN PROGRAM ZPOCHANGE
/: USING &EKPO-EBELP&
/: USING &EKKO-EBELN&
/: USING &T166T-CHTXT&
/: USING &T166T-CTXNR&
/: CHANGING &ITAB1-F_NEW&
/: CHANGING &ITAB1-F_OLD&
/:ENDPERFORM.
/:IF &ITAB1-F_NEW& NE ' '
= &ITAB1-F_OLD(C)& CHANGED TO &ITAB1-F_NEW(C)&
/:ENDIF
You might need to apply Note 373524 - Message determination and printing
TABLES : CDSHW , "Change documents, formatting table
CDHDR , "Change document header
EKPO , "Purchasing Document Item
EKKO , "Purchasing Document Header
T166C . "Print-Relevant Purchasing Document Changes
DATA : ITAB1 LIKE CDSHW OCCURS 100 WITH HEADER LINE.
DATA : ITAB2 LIKE EKPO OCCURS 100 WITH HEADER LINE.
DATA : DOCUM LIKE EKKO OCCURS 100 WITH HEADER LINE.
DATA : TABKEY LIKE CDSHW-TABKEY.
data : begin of ctab occurs 10,
tname like t166c-tname,
fname like t166c-fname,
TABKEY LIKE CDSHW-TABKEY,
FLAG(3),
end of ctab.
DATA : VAL1(15), VAL2(15).
DATA : M1(20), M2(10), M3(10),M4(5).
DATA : RVDATE(10),RVDATE2(10) , EBELN LIKE EKKO-EBELN, COUNT TYPE I.
Text number for change text(CTXNR), CHANGE TEXT(CHTXT), Purchase order
Number and item number are passed from Layoutset
FORM CHDET *
--> ITAB *
--> OTAB *
FORM CHDET TABLES ITAB STRUCTURE ITCSY
OTAB STRUCTURE ITCSY.
LOOP AT ITAB.
CASE ITAB-NAME.
WHEN 'T166T-CHTXT'.
MOVE ITAB-VALUE TO M1.
WHEN 'T166T-CTXNR'.
MOVE ITAB-VALUE TO M2.
WHEN 'EKKO-EBELN'.
MOVE ITAB-VALUE TO M3.
WHEN 'EKPO-EBELP'.
MOVE ITAB-VALUE TO M4.
ENDCASE.
ENDLOOP.
Throught this function change details are retrived into itab1.
CALL FUNCTION 'ME_CHANGES_READ'
EXPORTING
DOCUMENT_CATEGORY = 'F'
DOCUMENT_NUMBER = M3
TABLES
XCDSHW = itab1.
SELECT SINGLE * FROM T166C WHERE CTXNR = M2.
IF SY-SUBRC = 0.
CONCATENATE M3 M4 INTO TABKEY.
********Last Modified Remarks only**********************
read table ctab with key tname = T166C-TNAME
tabkey = tabkey
fname = T166C-FNAME.
if sy-subrc ne 0.
LOOP AT ITAB1 WHERE TABNAME = T166C-TNAME
AND TABKEY+3(15) = TABKEY
AND FNAME = T166C-FNAME.
*********Last Modified Remarks only**********************
ctab-tname = t166c-tname.
ctab-fname = t166c-fname.
ctab-tabkey = tabkey.
append ctab.
delete itab1.
exit.
endloop.
Captured details are exported to Layoutset
LOOP AT OTAB.
CASE OTAB-NAME.
WHEN 'ITAB1-F_OLD'.
OTAB-VALUE = ITAB1-F_OLD.
MODIFY OTAB.
CLEAR : ITAB1-F_OLD.
WHEN 'ITAB1-F_NEW'.
OTAB-VALUE = ITAB1-F_NEW.
MODIFY OTAB.
CLEAR : ITAB1-F_NEW.
ENDCASE.
endloop.
endif.
******Last Modified Remarks only****************
ENDIF.
clear ctab.
ENDFORM.
FORM CHDATE *
--> ITAB *
--> OTAB *
Form for revision date retrival. PO no. is passed from layoutset
and in the change document header latest modified date is captured
and passed to revision date field in Layoutset.
FORM CHDATE TABLES ITAB STRUCTURE ITCSY
OTAB STRUCTURE ITCSY.
CLEAR : RVDATE, EBELN.
LOOP AT ITAB.
CASE ITAB-NAME.
WHEN 'EKKO-EBELN'.
MOVE ITAB-VALUE TO EBELN.
ENDCASE.
ENDLOOP.
SELECT UDATE INTO CDHDR-UDATE FROM CDHDR WHERE OBJECTCLAS = 'EINKBELEG'
AND OBJECTID = EBELN.
IF RVDATE < CDHDR-UDATE.
RVDATE = CDHDR-UDATE.
ENDIF.
COUNT = COUNT + 1.
ENDSELECT.
LOOP AT OTAB.
CASE OTAB-NAME.
WHEN 'RVDATE2'.
CONCATENATE RVDATE6(2) '.' RVDATE4(2) '.' RVDATE(4) INTO RVDATE2.
IF COUNT = 1.
RVDATE2 = ''.
ENDIF.
MOVE RVDATE2 TO OTAB-VALUE.
MODIFY OTAB.
ENDCASE.
ENDLOOP.
CLEAR : COUNT.
ENDFORM.
Message was edited by:
Karthikeyan Pandurangan -
How to upload data in excel file to an internal table
hi,
how can we upload data in excel file on presentation server to an internal table..?
Any pointers on this would be helpful.
Regards,
Anil.hi
use the fm ALSM_EXCEL_TO_INTERNAL_TABLE
check this example
TYPES: BEGIN OF ty_mara,
matnr LIKE mara-matnr,
mbrsh LIKE mara-mbrsh,
mtart LIKE mara-mtart,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
END OF ty_mara.
DATA: it_mara TYPE table of ty_mara WITH HEADER LINE.
parameters : p_file like RLGRAP-FILENAME.
data : itab type table of ALSMEX_TABLINE WITH HEADER LINE.
start-of-selection.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = 1
i_begin_row = 1
i_end_col = 5
i_end_row = 4
tables
intern = itab.
loop at itab.
CASE ITAB-COL.
WHEN '1'.
it_mara-matnr = ITAB-VALUE.
WHEN '2'.
it_mara-mbrsh = ITAB-VALUE.
WHEN '3'.
it_mara-mbrsh = ITAB-VALUE.
WHEN '4'.
it_mara-maktx = ITAB-VALUE.
WHEN '5'.
it_mara-meins = ITAB-VALUE.
ENDCASE.
AT END OF ROW.
APPEND it_mara.
CLEAR it_mara.
ENDAT.
endloop.
regards
prasanth -
Download SAP data to Excel file in Presentation server
Hi gurus,
I need to download SAP data to excel file. for that im using SAP_CONVERT_TO_XLS_FORMAT function module. I have to download with column header and also date should be in YYMMDD format. Im changing the format in ITAB but when populating to excel leading zero's were removed.(EX. 12102007 is converted to 071012 and it was populated as 71012). can someone explain how to use this function module or give someother solution for this....And if possible explain the parameters of the function module SAP_CONVERT_TO_XLS_FORMAT. Is there any function module for converting date as required format?
Thanks,
AmalHi Amal...
The Problem you are facing is because of Display properties of Microsoft Excel itself. I believe this can not be solver with in SAP. Instead I would suggest you to go for a .csv format. which can also be viewed in Excel.
In any case if you get to find a different solution for this, I would appriciate if you can share it with me :).
Santosh -
Change Value While Uploading data From Excel File
Dear Expert,
Please guide me is it Possible?, if yes then How?
We have one BDC Uploader there After uploading data from Excel File, i want to check one field like this....
if it_f65data-newbs contains any Alphabet.
then user Should be able to change value on the same time while executing Program in table.
Please tell me how i can change value in running program
Regards'
Shelly MalikHi,
What you can probably do is, perform a consistency check on your data in the internal table and segregate all those rows that have inconsistent data (in your case, the field NEWBS containing albhabets) into another temporary internal table. Display the temporary internal table in an editable ALV grid saying that these data have not been inserted to the database, coz they have inconsistent data in the field NEWBS. Allow the user to edit and then save the data which will consequently refresh the internal table contents. -
HOW TO DOWNLOAD SAP OUTPUT TO EXCEL FILE
Hi SAP Gurus,
I would like to ask if you have any Function Module or codes on how to download SAP Output into Excel file. Thanks! Hope you could help me.You can transfer the contents of internal table to excel using this code..
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
end of itab.
select vbeln
posnr
from vbap
up to 20 rows
into table itab.
* EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
* handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_WORK TYPE OLE2_OBJECT,
H_SHEET TYPE OLE2_OBJECT,
H_CELL TYPE OLE2_OBJECT,
V_COL LIKE SY-TABIX. " column number of the cell
DATA:
V_STEP(30),
V_FILE LIKE RLGRAP-FILENAME.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Creating Excel...'
EXCEPTIONS
OTHERS = 1.
* start Excel
V_STEP = 'Starting Excel'.
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
* CALL METHOD OF H_EXCEL 'OPEN' EXPORTING #1 = 'C:DMC_REC.XLS'.
* PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Adding Data to Excel...'
EXCEPTIONS
OTHERS = 1.
* Get the list of workbooks
V_STEP = 'Preaparing Excel'.
CALL METHOD OF H_EXCEL 'WORKBOOKS' = H_WORK.
PERFORM ERR_HDL.
** Add new workbook (create a file)
CALL METHOD OF H_WORK 'ADD'.
PERFORM ERR_HDL.
* Get the created worksheet
************************Sheet Number
CALL METHOD OF H_EXCEL 'WORKSHEETS' = H_SHEET EXPORTING #1 = 3.
************************Sheet Number
PERFORM ERR_HDL.
* Activate (select) the first sheet
CALL METHOD OF H_SHEET 'ACTIVATE'.
PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Adding Data to Excel...'
EXCEPTIONS
OTHERS = 1.
* output column headings to active Excel sheet
V_STEP = 'Adding data to Excel'.
LOOP AT ITAB.
V_COL = SY-TABIX.
PERFORM FILL_CELL USING 1 V_COL ITAB-vbeln.
PERFORM FILL_CELL USING 2 V_COL ITAB-posnr.
ENDLOOP.
V_STEP = 'Releasing Excel'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
H_EXCEL-HANDLE = -1.
*& Form ERR_HDL
* text
* --> p1 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Error in processing Excel File:', V_STEP.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
*& Form FILL_CELL
* text
* -->P_1 text
* -->P_1 text
* -->P_1 text
FORM FILL_CELL USING ROW COL VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_CELL
EXPORTING #1 = ROW #2 = COL.
PERFORM ERR_HDL.
SET PROPERTY OF H_CELL 'Value' = VAL .
PERFORM ERR_HDL.
ENDFORM. " FILL_CELL -
Error while uploading an edited excel file into an internal table
Hi Experts,
I am getting error while uploading an excel file that has been edited.
I am using GUI_UPLOAD for uploading the file into internal table.
In my program I first have to download a file, if I use the same file without editing I am able to read the file.
When I try to edit it and then use it to upload it fails, but this is part of the my requirement.
PLease suggest.
Regards
KishoreTYPE-POOLS: truxs.
parameter : lv_full_path TYPE rlgrap-filename,
data : lt_conv_data TYPE truxs_t_text_data,
lt_roles_excel type table of ( your structure).
start-of-selection.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
i_line_header = 'X'
i_filename = lv_full_path
TABLES
i_tab_sap_data = lt_roles_excel
CHANGING
i_tab_converted_data = lt_conv_data
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
In the FM Line_header = 'X' means it will negelect the first line. So u can give the heading in the excel file.
Hope this might help u .
With Regards,
Sumodh.P -
Hi,
I want to upload data in an excel file.
the explanation of my problem is:
I have a jsp page which is a report page and has
data in tabular form. If the user clicks a button
then the present data appears in an excel sheet
which the user can then store on his system.
I tried doing this by making the contentType = "application/vnd.ms-excel"
the resulting excel sheet had all the data but for the cells
which had no data were represented with no border length.
Can any one please help me with regrd to this.Please refer to my suggestion in the post;
http://forum.java.sun.com/thread.jspa?threadID=664249
This is a cleaner way of creating excel documents or download or viewing. -
Downloading internal table in excel file on application server
Hi,
I am trying to download ITAB into excel file on my application server . I am using FM 'SAP_CONVERT_TO_XLS_FORMAT' for that .
When I run the report I can see file getting generated on APP server but no ITAB data is saved in that excel.
After debugging I found that error code 'SAVE_DOCUMENT_FAILED' is retuned in above FM.
Could any one please suggest how to go about this?
Regards,
GaneshHi ganesh,
Please have a look into the below link
[Link1|How to Upload Excel file to Application Server]
[Link2|Error in Downloading the Text file on Application Server]
Hope this will be Helpful
Thanks
Kalyan -
Upload data from excel file to "Fast Data Entry" in FB60
Hi,
I have a requirement from users, they want to load data of G/L accounts items in FB60 using "Fast Data Entry" from an excel file.
I did some research and found out that the framework to transfer clipboard data into an SAP table(http://www.synactive.com/examples/example0016.html) seems to be the suitable solution.
However, I still cannot make it work.
Do you have any suggestion for my case ? How can I load data from an excel file to the transaction FB60?
Thanks in advance,
HungDear Hung,
You can upload data through LSMW (Batch Input).
But you need to convert your excel sheet into CSV format or txt format.
Please take help of your ABAP team if required.
This will accommodate your requirement.
Regards
Saurabh -
Downloading from alv to excel file
hai
while downloading from alv grid to excel file
i am not getting values properly. i have taken 110 fields. i am not getting prper way. can u plz tel me way....Hi ....
I have the similar problem. My coumns are not in any sequence when I download it to excel sheet.
How do I fix it.
Neha -
How to download internal structure in Excel file ?
Hi,
In a ABAP 4.7 program, we need to download internal table/structures in a excel file. Automatically (as manually with breakpoint and Excel export button),
The SAP_CONVERT_TO_XLS_FORMAT doesn't work (empty file) certainly cause non STANDARD TABLE used.
There is various internal tables/structures, see one below
TYPES:
BEGIN OF gty_rup,
kunnr LIKE bsid-kunnr,
xref1 LIKE bsid-xref1,
xref3 LIKE bsid-xref3,
END OF gty_rup.
TYPES:
BEGIN OF gty_rup_tiers,
zztie LIKE bseg-zztie,
zzdat LIKE bseg-zzdat,
zzsea LIKE bseg-zzsea,
END OF gty_rup_tiers.
TYPES:
BEGIN OF gty_data_solde,
wrbtr LIKE bsid-wrbtr,
shkzg LIKE bsid-shkzg,
belnr LIKE bsid-belnr,
hkont LIKE bsid-hkont,
buzei LIKE bsid-buzei,
bldat LIKE bsid-bldat,
gjahr LIKE bsid-gjahr,
blart LIKE bsid-blart,
END OF gty_data_solde,
DATA:
BEGIN OF lt_prps OCCURS 0,
key_client TYPE gty_rup,
key_tiers TYPE gty_rup_tiers,
data TYPE gty_data_solde,
END OF lt_prps.
Does someone know function working with only the table/structure name as parameter ?
Thanks
Hervehere's what I did....I opened the xfile2.txt with Excel 2007 and stepped through the import wizard as a tab-delimited file. You're quite right it seems about the XLS function module.... I couldn't get a file downloaded that I could open with that thing. So I dropped it and just did the following:
TYPES: BEGIN OF gtypx.
INCLUDE TYPE gty_rup.
INCLUDE TYPE gty_rup_tiers.
INCLUDE TYPE gty_data_solde.
TYPES END OF gtypx.
DATA: lt_prps TYPE STANDARD TABLE OF gtypx WITH HEADER LINE.
START-OF-SELECTION.
lt_prps-kunnr = '1234'.
APPEND lt_prps.
LOOP AT lt_prps.
WRITE:/ lt_prps-kunnr.
ENDLOOP.
DATA: lv_filen type string value 'c:\xfile2.txt'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = lv_filen
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
* SHOW_TRANSFER_STATUS = ABAP_TRUE
* IMPORTING
* FILELENGTH =
tables
data_tab = lt_prps
* FIELDNAMES =
* 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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Maybe you are looking for
-
How to change the folder name in the web report.
hi experts, can anybody give me the solution, how to change the folder name in the web report. any help is appreciated. waiting for ur favourable response. thanks suri
-
Getting the message "your mail could not be moved to trash", and keeps reappearing as not read or deleted.
-
Problems with certain photos in iPhoto library
I have several photos in my iPhoto library that when you double-click them to get a bigger view (not fullscreen), there is a giant exclamation point instead of the actual photo. See example here: http://img.photobucket.com/albums/v488/gdavidson79/Pic
-
All previous search engines on "Manage Search Engines" are gone and cant access the "get more search engines"...all grayed out.
-
Infinity speeds dropped over past month
We recently had Infinity installed around 2 months ago and it was perfectly fine for the first month. I was consistently getting download speeds of 70Mbps and was extremely satisfied with that. However, the speed has dropped down to 50Mbps which is v