Excel 2007 csv file formatting issue
Our users create .csv files for upload to SAP. Their habit is to include a number of blank lines in excel to make it more readable.
In Excel 2003, blank lines were handled as, literally, blank lines, and opening in a text editor shows exactly that, a blank line (with a CR-LF character to terminate the row).
In Excel 2007 however, the blank line consists of a number of commas equal to the no. of columns, followed by the CR-LF termination. Hope that makes sense.
While the 2003-generated .CSVs are fine, the 2007 versions cause SAP to throw an exception ("Session never created from RFBIBL00") and the upload fails. The question therefore is, has anyone ever come across anything similar, or is anyone aware of any remediation that might be possible? Haven't been able to find any documentation on this Excel 2003-2007 change sonot able to address the issue through Excel config.
Thanks!
Duncan
Hello
Please refer to the consulting note 76016 which will provide information on the performance of the standard program
RFBIBL00.
Regards.
Similar Messages
-
BO 4.0 save as csv file format issue
Hi All,
We are using BO 4.0 Webi for reporting on SAP BW 7.3 system. Some of our reports have to be scheduled to bring the output in CSV file format. When I schedule the report in CSV format, the final output has data in two sets. The first set has the list of columns which I have selected in my report. Starting on the next row I get to see the second set of data with all the objects selected in the query panel including the detail objects.
We only need the data for the columns which is selected in the report, but it is bringing the dump from all the objects in the dataprovider.
Can anyone tell me how to get rid of the second set of data in the same csv file ?
Thanks,
PrasadHi,
CSV format is reserved for 'data only' dataprovider dumps. it exports the entire webi microcube (query results)
You don't get that option when going 'save as' - which preserves the report formatting - in which case you should consider .xls
regards,
H -
File upload - issue with European .csv file format
All,
when uploading the .csv file for "Due List for Planned Receipts" in the File Transfer Upload center I receive an error. It appears that it is due to the european .csv file format that is delimited by semicolon rather than comma. The only way I could solve this issue is to change Regional and Language options to English. However, I don't think this is a great solution as I can't ask all our suppliers to change their settings. Has anyone come across this issue and another way of solving it?
Thank you!
Have a good day,
JohannaIgor thank you for your suggestion.
I found this SAP note:
+If you download a file, and the formatting of the CSV file is faulty, it is possible that your column separator does not match the standard settings of the SAP system. In the standard SAP system, the separator is ,.
To ensure that the formatting is correct, set your global default for column separation in your system, so that it matches that of the SAP system you are using.+
To do that Microsoft suggests to change the "List separator" in the Regional and Language Options Customize view. Though like you suggest that does not seem to do the trick. Am I missing something?
However, if I change the whole setting from say German to English (UK) the .csv files are comma delimited and can be easily uploaded. Was hoping there would be another way of solving this without need for custom development. -
Hello Guys,
I have created a Device collection for UK region (2000+ machines)
Now i have been given a list of 1000 machines to which i need to deploy an application.
I have to create a device collection for this 1000+ machines. as an input i have a excel or CSV file with a list of machine names.
Please suggest me how can i create a device collection with CSV file as input. Is my CSV file should be in particular format.
Or is there any other way i can create a collection for this 1000 specific machines.
Please suggest.My previous post was for sccm 2012.
here its for 2007
In the Operating System Deployment section of SCCM right click on Computer Association and choose
Import Computer Information
when the wizard appears select Import Computers using a file
The file itself must contain the information we need in this (CSV) format
COMPUTERNAME,GUID,MACADDRESS
(sample below)
Quote
deployvista,3ED92460-0448-6C45-8FB8-A60002A5B52F,00:03:FF:71:7D:76
NEWCOMP1,55555555-5555-5555-5555-555555555555,05:06:07:08:09:0A
NEWPXE,23CA788C-AF62-6246-9923-816CFB6DD39F,00:03:FF:72:7D:76
w2k8deploy,BFAD6FF2-A04E-6E41-9060-C6FB9EDD4C54,00:03:FF:77:7D:76
if we look at the last line, I've marked the computer name in Red, the GUID in BLUE and the MAC address in GREEN, separate these values with commas as above.
w2k8deploy,BFAD6FF2-A04E-6E41-9060-C6FB9EDD4C54,00:03:FF:77:7D:76
the file can be a standard TEXT file that you create in notepad, and you can rename it to CSV for easier importing into our wizard...
so, click on Browse and browse to where you've got your CSV file
on the Choose Mapping screen, you can select columns and define what to do with that mapping, eg: you could tell it to ignore the GUID value (we won't however)
on the next screen you'll see a Data Preview, and this is useful as it will highlight any errors it finds with a red exclamation mark, in the example below a typo meant that it correctly flagged the MAC address as invalid
so edit your CSV file again and fix the error, click previous (back) and try again
Next choose the target collection where you want these computers to end up in
review the summary
in SCCM collections, we can now see the computers we've just imported from File,
Enjoy
Nikkoscy -
Ssrs 2008 export to excel and csv file
In a ssrs 2008 report, the user will export data to PDF, excel, and CSV files. When the report is exported to excel or csv file, the user wants me to hide some tablixes. Thus can you show me code on how to export the reports to csv or excel file without
and be able to hide a few tablixes?Hi jazz_dog,
According to your description, you want to set the visibility for some tablixes based on the exporting file type. Right?
In Reporting Services 2008, we don't have any parameter to get type of exporting file. So we can only create a parameter and select a type before exporting to a file. Then use conditional expression to control the visibility. It's definitely not a good workaround,
so your goal can't be achieved in Reporting Services 2008. However, for Reporting Service 2008R2 or later version, we have a build-in parameter called Render Format Name, this parameter will display the type of exporting file automatically. So we can make
the judgment in expression based on the value of this parameter.
Reference:
Built-in Globals and Users References (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
To download data into csv file format
Hi All
I have to download data into csv file format. I use the FM
GUI_DOWNLOAD and gave the filename text.csv. But data is stored in excel
file in place of csv file.
Can anyone tell me what should i do to load the data into csv file or any other function module should used?
Regardssee this sample code
REPORT YSG_MATSTK_REPT LINE-SIZE 220
LINE-COUNT 50(5).
*& DATA DECLARATION *
TABLES: MARA, "GENERAL MASTER DATA
MARC, "PLANT DATA FOR MATERIAL
MARD, "STORAGE LOCATION DATA FOR MATERIAL
MVKE, "SALES DATA FOR MATERIAL
MAKT, "MATERIAL DESCRIPTION
EKKO, "PURCHASING DOCUMENT HEADER
EKPO, "PURCHASING DOCUMENT ITEM
VBAK, "SALES DOCUMENT HEADER DATA
VBAP. "SALES DOCUMENT ITEM DATA
TYPE-POOLS : SLIS.
DATA: VT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
V_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
V_LAYOUT TYPE SLIS_LAYOUT_ALV,
BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
BEGIN OF I_MARA OCCURS 0,
MATNR LIKE MARA-MATNR, "MATERIAL NUMBER
MBRSH LIKE MARA-MBRSH, "INDUSTRY SECTOR
MEINS LIKE MARA-MEINS, "BASE UNIT OF MEASURE
MATKL LIKE MARA-MATKL, "MATERIAL GROUP
END OF I_MARA,
BEGIN OF I_MARC OCCURS 0,
MATNR LIKE MARC-MATNR, "MATERIAL NUMBER
WERKS LIKE MARC-WERKS, "PLANT
LVORM LIKE MARC-LVORM, "FLAG MATERIAL FOR DELETION AT PLANT
"LEVEL
DISPO LIKE MARC-DISPO, "MRP CONTROLLER
END OF I_MARC,
BEGIN OF I_MAKT OCCURS 0,
MATNR LIKE MAKT-MATNR, "MATERIAL NUMBER
MAKTX LIKE MAKT-MAKTX, "MATERIAL DESCRIPTION
SPRAS LIKE MAKT-SPRAS, "LANGUAGE KEY
END OF I_MAKT,
BEGIN OF I_MVKE OCCURS 0,
MATNR LIKE MVKE-MATNR, "MATERIAL NUMBER
VKORG LIKE MVKE-VKORG, "SALES ORGANIZATION
VTWEG LIKE MVKE-VTWEG, "DISTRIBUTION CHANNEL
END OF I_MVKE,
BEGIN OF I_MARD OCCURS 0,
MATNR LIKE MARD-MATNR, "MATERIAL NUMBER
LGORT LIKE MARD-LGORT, "STORAGE LOCATION
LABST LIKE MARD-LABST, "VALUATED STOCK WITH UNRESTRICTED USE
END OF I_MARD,
BEGIN OF I_EKPO OCCURS 0,
EBELN LIKE EKPO-EBELN, "PURCHASING DOCUMENT NUMBER
EBELP LIKE EKPO-EBELP, "ITEM NUMBER OF PURCHASING DOCUMENT
MATNR LIKE EKPO-MATNR, "MATERIAL NUMBER
END OF I_EKPO,
BEGIN OF I_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
END OF I_VBAP,
BEGIN OF I_OUT OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
LVORM LIKE MARC-LVORM,
DISPO LIKE MARC-DISPO,
MBRSH LIKE MARA-MBRSH,
MEINS LIKE MARA-MEINS,
MATKL LIKE MARA-MATKL,
VKORG LIKE MVKE-VKORG,
VTWEG LIKE MVKE-VTWEG,
SPRAS LIKE MAKT-SPRAS,
MAKTX LIKE MAKT-MAKTX,
LGORT LIKE MARD-LGORT,
LABST LIKE MARD-LABST,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
END OF I_OUT,
BEGIN OF I_HEADING OCCURS 0,
TEXT1(20),
TEXT2(20),
TEXT3(20),
TEXT4(20),
TEXT5(20),
TEXT6(20),
TEXT7(20),
TEXT8(20),
TEXT9(20),
TEXT10(20),
TEXT11(40),
TEXT12(20),
TEXT13(20),
TEXT14(20),
TEXT15(20),
TEXT16(20),
TEXT17(20),
END OF I_HEADING.
*& S E L E C T I O N - S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR. "OBLIGATORY.
PARAMETERS: P_WERKS LIKE MARC-WERKS. "OBLIGATORY.
SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
S_DISPO FOR MARC-DISPO,
S_EBELN FOR EKPO-EBELN .
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-101.
PARAMETERS : RB1 RADIOBUTTON GROUP G1,
RB2 RADIOBUTTON GROUP G1,
RB3 RADIOBUTTON GROUP G1.
SELECTION-SCREEN END OF BLOCK B2.
*& I N I T I A L I Z A T I O N *
*INITIALIZATION.
*& S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
SELECT MATNR WERKS LVORM DISPO FROM MARC
INTO CORRESPONDING FIELDS OF TABLE I_MARC
WHERE MATNR IN S_MATNR
AND DISPO IN S_DISPO
AND WERKS = P_WERKS.
IF I_MARC[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
EXIT.
ENDIF.
PERFORM PURCHASEDATA_VALIDATION.
PERFORM SALESDATA_VALIDATION.
SELECT MATNR LGORT LABST FROM MARD INTO TABLE I_MARD
FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR
AND WERKS EQ P_WERKS
AND LGORT IN S_LGORT.
IF I_MARD[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
EXIT.
ENDIF.
SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR.
IF I_MVKE[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
EXIT.
ENDIF.
LOOP AT I_MARC.
MOVE-CORRESPONDING I_MARC TO I_OUT.
CLEAR MARC.
SELECT SINGLE MATNR MBRSH MEINS MATKL FROM MARA
INTO CORRESPONDING FIELDS OF MARA
WHERE MATNR = I_OUT-MATNR.
IF SY-SUBRC = 0.
MOVE: MARA-MBRSH TO I_OUT-MBRSH,
MARA-MEINS TO I_OUT-MEINS,
MARA-MATKL TO I_OUT-MATKL.
ELSE.
CONTINUE.
ENDIF.
SELECT SINGLE MATNR MAKTX SPRAS FROM MAKT
INTO CORRESPONDING FIELDS OF MAKT
WHERE MATNR = I_OUT-MATNR.
IF SY-SUBRC = 0.
MOVE: MAKT-MAKTX TO I_OUT-MAKTX,
MAKT-SPRAS TO I_OUT-SPRAS.
ELSE.
CONTINUE.
ENDIF.
LOOP AT I_EKPO WHERE MATNR = I_MARC-MATNR.
MOVE: I_EKPO-EBELN TO I_OUT-EBELN,
I_EKPO-EBELP TO I_OUT-EBELP.
ENDLOOP.
LOOP AT I_VBAP WHERE MATNR = I_MARC-MATNR.
MOVE: I_VBAP-VBELN TO I_OUT-VBELN,
I_VBAP-POSNR TO I_OUT-POSNR.
ENDLOOP.
LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
MOVE: I_MARD-LABST TO I_OUT-LABST,
I_MARD-LGORT TO I_OUT-LGORT.
ENDLOOP.
LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
I_MVKE-VTWEG TO I_OUT-VTWEG.
ENDLOOP.
APPEND I_OUT.
CLEAR I_OUT.
ENDLOOP.
PERFORM OPTIONS.
FORM OPTIONS *
FORM OPTIONS.
IF RB2 = 'X'.
PERFORM FIELDCAT.
PERFORM OUTPUT.
ELSE.
IF RB1 = 'X'.
PERFORM HEADINGS.
PERFORM DLOAD.
ELSE.
IF RB3 = 'X'.
PERFORM HEADINGS.
PERFORM DLOAD.
PERFORM FIELDCAT.
PERFORM OUTPUT.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "OPTIONS
FORM HEADINGS *
FORM HEADINGS.
I_HEADING-TEXT1 = 'MATNR'.
I_HEADING-TEXT2 = 'WERKS'.
I_HEADING-TEXT3 = 'LVORM'.
I_HEADING-TEXT4 = 'DISPO'.
I_HEADING-TEXT5 = 'MBRSH'.
I_HEADING-TEXT6 = 'MEINS'.
I_HEADING-TEXT7 = 'MATKL'.
I_HEADING-TEXT8 = 'VKORG'.
I_HEADING-TEXT9 = 'VTWEG'.
I_HEADING-TEXT10 = 'SPRAS'.
I_HEADING-TEXT11 = 'MAKTX'.
I_HEADING-TEXT12 = 'LGORT'.
I_HEADING-TEXT13 = 'LABST'.
I_HEADING-TEXT14 = 'EBELN'.
I_HEADING-TEXT15 = 'EBELP'.
I_HEADING-TEXT16 = 'VBELN'.
I_HEADING-TEXT17 = 'POSNR'.
APPEND I_HEADING.
ENDFORM. "HEADINGS
FORM DLOAD *
FORM DLOAD.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\MATSTK.csv'
FILETYPE = 'DAT'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = I_HEADING
EXCEPTIONS
FILE_WRITE_ERROR = 1.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:\MATSTK.csv'
FILETYPE = 'DAT'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = I_OUT.
ENDFORM. "DLOAD
FORM FIELDCAT *
FORM FIELDCAT.
V_FIELDCAT-COL_POS = '1'.
V_FIELDCAT-FIELDNAME = 'MATNR'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-HOTSPOT = 'X'.
V_FIELDCAT-REF_FIELDNAME = 'MATNR'.
V_FIELDCAT-REF_TABNAME = 'MARC'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '2'.
V_FIELDCAT-FIELDNAME = 'WERKS'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'WERKS'.
V_FIELDCAT-REF_TABNAME = 'MARC'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '3'.
V_FIELDCAT-FIELDNAME = 'LVORM'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'LVORM'.
V_FIELDCAT-REF_TABNAME = 'MARC'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '4'.
V_FIELDCAT-FIELDNAME = 'DISPO'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'DISPO'.
V_FIELDCAT-REF_TABNAME = 'MARC'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '5'.
V_FIELDCAT-FIELDNAME = 'MBRSH'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'MBRSH'.
V_FIELDCAT-REF_TABNAME = 'MARA'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '6'.
V_FIELDCAT-FIELDNAME = 'MEINS'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'MEINS'.
V_FIELDCAT-REF_TABNAME = 'MARA'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '7'.
V_FIELDCAT-FIELDNAME = 'MATKL'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'MATKL'.
V_FIELDCAT-REF_TABNAME = 'MARA'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '8'.
V_FIELDCAT-FIELDNAME = 'VKORG'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'VKORG'.
V_FIELDCAT-REF_TABNAME = 'MVKE'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '9'.
V_FIELDCAT-FIELDNAME = 'VTWEG'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'VTWEG'.
V_FIELDCAT-REF_TABNAME = 'MVKE'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '10'.
V_FIELDCAT-FIELDNAME = 'SPRAS'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'SPRAS'.
V_FIELDCAT-REF_TABNAME = 'MAKT'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '11'.
V_FIELDCAT-FIELDNAME = 'MAKTX'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'MAKTX'.
V_FIELDCAT-REF_TABNAME = 'MAKT'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '12'.
V_FIELDCAT-FIELDNAME = 'LGORT'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'LGORT'.
V_FIELDCAT-REF_TABNAME = 'MARD'.
V_FIELDCAT-SELTEXT_L = 'STRG LOCT'.
V_FIELDCAT-OUTPUTLEN = 10.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '13'.
V_FIELDCAT-FIELDNAME = 'LABST'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-SELTEXT_M = 'STOCK'.
V_FIELDCAT-OUTPUTLEN = 15.
V_FIELDCAT-REF_FIELDNAME = 'LABST'.
V_FIELDCAT-REF_TABNAME = 'MARD'.
V_FIELDCAT-DO_SUM = 'X'.
V_LAYOUT-TOTALS_TEXT = 'TOTAL STOCK:'.
V_FIELDCAT-HOTSPOT = 'X'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '14'.
V_FIELDCAT-FIELDNAME = 'EBELN'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-HOTSPOT = 'X'.
V_FIELDCAT-REF_FIELDNAME = 'EBELN'.
V_FIELDCAT-REF_TABNAME = 'EKPO'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '15'.
V_FIELDCAT-FIELDNAME = 'EBELP'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'EBELP'.
V_FIELDCAT-REF_TABNAME = 'EKPO'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '16'.
V_FIELDCAT-FIELDNAME = 'VBELN'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-HOTSPOT = 'X'.
V_FIELDCAT-REF_FIELDNAME = 'VBELN'.
V_FIELDCAT-REF_TABNAME = 'VBAP'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
V_FIELDCAT-COL_POS = '17'.
V_FIELDCAT-FIELDNAME = 'POSNR'.
V_FIELDCAT-TABNAME = 'I_OUT'.
V_FIELDCAT-REF_FIELDNAME = 'POSNR'.
V_FIELDCAT-REF_TABNAME = 'VBAP'.
APPEND V_FIELDCAT TO VT_FIELDCAT1.
CLEAR V_FIELDCAT.
ENDFORM. "FIELDCAT
FORM OUTPUT *
FORM OUTPUT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_GRID_TITLE = 'CLICK ON MATERIAL/PURDOC/SALESDOC FOR DETAILS'
I_CALLBACK_USER_COMMAND = 'DISPLAYDETAILS'
IS_LAYOUT = V_LAYOUT
IT_FIELDCAT = VT_FIELDCAT1
TABLES
T_OUTTAB = I_OUT.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. "OUTPUT
FORM TOP-OF-PAGE *
FORM TOP-OF-PAGE.
DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
WA_HEADER TYPE SLIS_LISTHEADER.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = 'REPORT FOR : '.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'S'.
WA_HEADER-INFO = 'MATERIAL DETAILS'.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'S'.
WA_HEADER-INFO = 'PURCHASE ORDER DETAILS'.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
WA_HEADER-TYP = 'S'.
WA_HEADER-INFO = 'SALES ORDER DETAILS'.
APPEND WA_HEADER TO T_HEADER.
CLEAR WA_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'GEAR'
IT_LIST_COMMENTARY = T_HEADER.
ENDFORM. "TOP-OF-PAGE
*& FORM DISPLAYDETAILS *
FORM DISPLAYDETAILS USING UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
IF SELFIELD-FIELDNAME = 'EBELN'.
IF UCOMM = '&IC1'.
READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
PERFORM PORECDNG.
CLEAR BDCDATA[].
ENDIF.
ELSE.
IF SELFIELD-FIELDNAME = 'MATNR'.
IF UCOMM = '&IC1'.
READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
PERFORM MMRECDNG.
CLEAR BDCDATA[].
ENDIF.
ELSE.
IF SELFIELD-FIELDNAME = 'VBELN'.
IF UCOMM = '&IC1'.
READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
PERFORM SALESRECDNG.
CLEAR BDCDATA[].
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "DISPLAYDETAILS
FORM PORECDNG *
FORM PORECDNG.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0105'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RM06E-BSTNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RM06E-BSTNR'
I_OUT-EBELN.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RM06E-BSTPO(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=AH'.
PERFORM BDC_FIELD USING 'RM06E-EBELP'
I_OUT-EBELP.
PERFORM BDC_FIELD USING 'RM06E-TCSELFLAG(01)'
'X'.
PERFORM BDC_TRANSACTION USING 'ME23'.
ENDFORM. "PORECDNG
FORM MMRECDNG *
FORM MMRECDNG.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0060'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RMMG1-MATNR'
I_OUT-MATNR.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0070'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_FIELD USING 'MSICHTAUSW-KZSEL(01)'
'X'.
PERFORM BDC_TRANSACTION USING 'MM03'.
ENDFORM. "MMRECDNG
FORM SALESRECDNG *
FORM SALESRECDNG.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '0102'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'VBAK-VBELN'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'VBAK-VBELN'
I_OUT-VBELN.
PERFORM BDC_TRANSACTION USING 'VA03'.
ENDFORM. "SALESRECDNG
FORM BDC_TRANSACTION *
FORM BDC_TRANSACTION USING TCODE.
CALL TRANSACTION TCODE USING BDCDATA MODE 'E'.
ENDFORM. "BDC_TRANSACTION
FORM BDC_DYNPRO *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. "BDC_DYNPRO
INSERT FIELD *
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM. "BDC_FIELD
*& FORM PURCHASEDATA_VALIDATION *
FORM PURCHASEDATA_VALIDATION.
SELECT EBELN EBELP MATNR
FROM EKPO
INTO TABLE I_EKPO
FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR
AND EBELN IN S_EBELN
AND WERKS EQ P_WERKS.
IF I_EKPO[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM TABLE EKPO'.
EXIT.
ENDIF.
DATA: T_EKPO LIKE I_EKPO OCCURS 0 WITH HEADER LINE.
T_EKPO[] = I_EKPO[].
REFRESH I_EKPO.
FREE I_EKPO.
LOOP AT T_EKPO.
SELECT SINGLE EBELN FROM EKKO INTO EKPO-EBELN
WHERE EBELN = T_EKPO-EBELN.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING T_EKPO TO I_EKPO.
APPEND I_EKPO.
CLEAR I_EKPO.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
SORT I_EKPO.
ENDFORM. "PURCHASEDATA_VALIDATION
*& FORM SALESDATA_VALIDATION *
FORM SALESDATA_VALIDATION.
SELECT VBELN POSNR MATNR
FROM VBAP
INTO CORRESPONDING FIELDS OF TABLE
I_VBAP FOR ALL ENTRIES IN I_MARC
WHERE MATNR = I_MARC-MATNR.
IF I_VBAP[] IS INITIAL.
WRITE:/ 'NO MATCHING DATA AVAILABLE FROM TABLE VBAP'.
EXIT.
ENDIF.
DATA: T_VBAP LIKE I_VBAP OCCURS 0 WITH HEADER LINE.
T_VBAP[] = I_VBAP[].
REFRESH I_VBAP.
FREE I_VBAP.
LOOP AT T_VBAP.
SELECT SINGLE VBELN FROM VBAK INTO VBAK-VBELN
WHERE VBELN = T_VBAP-VBELN.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING T_VBAP TO I_VBAP.
APPEND I_VBAP.
CLEAR I_VBAP.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
SORT I_VBAP.
ENDFORM. "SALESDATA_VALIDATION
regards,
srinivas
<b>*reward for useful answers*</b> -
SQlldr Error while uploading "excel" or "csv" file.
Hello to community,
We are using Oracle AS(application Server) 10g as a "web Server" & "database Server"
The Database Server is having an NFS Partition,which has mounted onto "Web Server"
So, if any client tried to upload any excel OR csv file , the Web Server will redirect that file data onto "database" server" through NFS partition.
By clicking "upload" button from client end, they are getting a strange error. By checking "ias_console" log file, I have found below latest logs,which belongs to the error. Kindly let me know where is the problem coming from.
The Database Server Shared NFS partition name is "web_upload" & we have same "web_upload" partition on the "web server". The command of mounting NFS partition is given below.
On AIX web Server :- mount <ip address>:/file_data/web_upload/ /web_upload/
SYNTAX :- <ip add of db server>/mount point "web server mount point"
The error is as given below.
09/06/09 15:27:47 NumIdle: 2
09 Jun 2009 15:27:47,764 [DEBUG] - [ com.vat.website.service.DatabaseService ] [ private Connection getDBConnection() ] Exited
09 Jun 2009 15:27:47,764 [DEBUG] - [ com.vat.website.service.DatabaseService ] [ private Connection getDBConnection() ] Exited
09 Jun 2009 15:27:47,766 [DEBUG] - [ com.vat.website.service.DatabaseService ] [ private void initialize() ] After getDBConnection called,
connection object is: org.apache.commons.dbcp.PoolableConnection@1048a893
09 Jun 2009 15:27:47,767 [DEBUG] - [ com.vat.website.service.ExcelUploadService ] [ public boolean insertFileDetails(ExcelDataBean databean,String
strFname) ] strUniqueKey:select web_uploaded_file_history_seq.nextval from dual
09 Jun 2009 15:27:47,767 [DEBUG] - [ com.vat.website.service.DatabaseService ] [ public ResultSet executeQuery(String strQuery) ] Entered
09 Jun 2009 15:27:47,773 [DEBUG] - [ com.vat.website.service.DatabaseService ] [ public ResultSet executeQuery(String strQuery) ] Exited
09 Jun 2009 15:27:47,774 [DEBUG] - [ com.vat.website.service.ExcelUploadService ] [ public boolean insertFileDetails(ExcelDataBean databean,String
strFname) ] insertQuery:INSERT INTO WEB_UPLOADED_FILE_HISTORY(WUF_SERIAL_NUMBER,WUF_DEALER_ID,WUF_PERIOD_FROM,WUF_PERIOD_TO,WUF_FILE_PATH,WUF_FORM_NO,WUF_SERVER_IP,WUF_UPLOAD_YN,WUF_CREATED_DATE,WUF_CREATED_BY,WUF_ORIGINAL_REVISED,WUF_SHEETS_NUMBER,wuf_reco
d_key)VALUES('2658271','T00100001000306',to_date('01/01/2009','dd/mm/yyyy'),to_date('31/01/2009','dd/mm/yyyy'),'/web_upload/090609/VAT
Returns/000000/0000000000/Form201/0000000000_0T201BO0109_009062009152747.csv',replace(decode('T201B','T201M', 'T201','T201B'),'T','VAT-Form'),(select
RPAD(sys_context('USERENV','IP_ADDRESS'),15,' ') AS client_ipaddress from dual),'Y',SYSDATE,'WEB','O','0','3317063')
09 Jun 2009 15:27:47,791 [DEBUG] - [ com.vat.website.service.DatabaseService ] [ public void closeDBConnection() ] Entered
09 Jun 2009 15:27:47,791 [DEBUG] - finalDate:01-JAN-2009
09 Jun 2009 15:27:47,792 [DEBUG] - finalDate:31-JAN-2009
09 Jun 2009 15:27:47,806 [DEBUG] - [ com.vat.website.utils.PropertyCache ] [ static Object getValue(String propertyName, String propertyFileName)
] Entered
09 Jun 2009 15:27:47,806 [DEBUG] - [ com.vat.website.utils.PropertyCache ] [ static Object getValue(String propertyName, String propertyFileName)
] Entered
09 Jun 2009 15:27:47,806 [DEBUG] - [ com.vat.website.utils.PropertyCache ] [ static Object getValue(String propertyName, String propertyFileName)
] Entered
09 Jun 2009 15:27:47,806 [DEBUG] - [ com.vat.website.action.UploadAction ] [ public ActionForward submit(ActionMapping mapping, ActionForm
form,HttpServletRequest request, HttpServletResponse response) ] Executing: sqlldr parfile=parafile.par silent=feedback direct=Y at location:
/web_upload/090609/VAT Returns/000000/0000000000/Form201/SQLLdr
It seems that this problem is due to "Sqlldr" then how to troubleshoot this problem?
Waiting for your favorable response,
Advanced Thanks,
Nishith Vyas.Flat File was in error.
-
How To Split Large Excel or CSV Files into Smaller Files
Does anyone know how to split a large Excel or CSV file into multiple smaller files? Or, is there an app that will work with Mac to do that?
split [-a suffix_length] [-b byte_count[k|m]] [-l line_count] [-p pattern] [file [name]]
is a native Terminal command. Read up more on https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/split.1.html
I prefer to use gSplit which is gnu coreutils.
You can install gnu coreutils using homebrew. -
Parsing Excel's CSV file in PL/SQL
Someone may need this...
This procedure parses a line of Excel's CSV file into a PL/SQL table's elements.
FUNCTION func_split_csv (p_string IN VARCHAR2)
RETURN gt_tbltyp_strings
IS
* NAME: func_split_csv
* PURPOSE: Split the passed Excel's CSV strings into tokens.
* Returns PL/SQL table of strings.
* REVISIONS:
* Author Date Description
* S.Stadnik 12/12/07 Initial
* PARAMETERS
* INPUT : p_string - String to be tokenized
* OUTPUT : None.
* RETURNS: PL/SQL table of strings.
TYPE gt_tbltyp_strings IS TABLE OF VARCHAR2(32000) INDEX BY BINARY_INTEGER;
-- Local constants
c_str_proc_nme CONSTANT VARCHAR2(100) := gc_str_package_nme||'.func_split_csv';
-- Local Variables
v_int_location PLS_INTEGER;
v_tab_tokens gt_tbltyp_strings;
v_str_token VARCHAR2(32000);
v_str_char VARCHAR2(1);
v_int_table_pos PLS_INTEGER := 1;
v_int_idx PLS_INTEGER := 1;
b_bln_open_quote BOOLEAN := FALSE; -- Flag, indicating that double-quote is opened
BEGIN
v_int_location := 0;
-- Is the string is empty, return an empty table
IF p_string IS NULL THEN
RETURN v_tab_tokens;
END IF;
-- If the string does not contain delimiters, return the whole string
IF InStr(p_string, ',', 1) = 0 THEN
v_tab_tokens(v_int_table_pos) := p_string;
RETURN v_tab_tokens;
END IF;
-- Loop thru all the characters
WHILE v_int_idx <= Length (p_string) LOOP
v_str_char := SubStr(p_string, v_int_idx, 1);
CASE v_str_char
-- Double quote encoutered (special case)
WHEN '"' THEN
-- If no double-quote was opened, this is an opening quote
IF b_bln_open_quote = FALSE THEN
b_bln_open_quote := TRUE;
-- '""' translates to '"'
ELSIF SubStr(p_string, v_int_idx + 1, 1) = '"' THEN
v_str_token := v_str_token || '"';
v_int_idx := v_int_idx + 1;
-- If double-quote was opened, this is a closing quote
ELSIF b_bln_open_quote = TRUE THEN
b_bln_open_quote := FALSE;
END IF;
-- Coma encoutered (special case)
WHEN ',' THEN
-- If double-quote was opened, this is part of the string
IF b_bln_open_quote = TRUE THEN
v_str_token := v_str_token || ',';
-- If double-quote was not opened, this is a delimiter, save the string
ELSE
v_tab_tokens(v_int_table_pos) := v_str_token;
v_str_token := '';
v_int_table_pos := v_int_table_pos + 1;
END IF;
-- Any other character is passed into the string
ELSE
v_str_token := v_str_token || v_str_char;
END CASE;
v_int_idx := v_int_idx + 1;
END LOOP;
-- If final token lenght is non-zero after we processed all the characters,
-- OR if the last character of the source string is ','
-- Add the final token into the table
IF Length(v_str_token) != 0
OR SubStr(p_string, -1, 1) = ',' THEN
v_tab_tokens(v_int_table_pos) := v_str_token;
END IF;
RETURN v_tab_tokens;
EXCEPTION
WHEN OTHERS THEN
-- Put your favourite error handler in here
END func_split_csv;Yes, I agree.
That was written for a particular case:
- When the CSV file is an Excel's file,
- When it is impossible to put the file onto the DB server, so we couldn't use external tables, and the whole contents had to be passed as a CLOB parameter. -
How to Read excel or .csv files in java
I am writing a program which takes input as excel or .csv file.
How to read these files.
Any API's are existed or need to use the third party jar.
Please suggest me.
Thanks & RegardsDid you search in google? Did you search here? There are so many excel related questions here, including answers about third party libraries.
I have the impression that you didn't research at all.
_[How to ask questions|http://faq.javaranch.com/view?HowToAskQuestionsOnJavaRanch]_ It's the same here. -
How to import data from excel or csv files to Oracle table
hello everybody,
I am new here and new in Oracle. I would like to know the steps how to import data from excel or csv files to Oracle table.
Let say I already have table inside the Oracle. Then my user give me the sets of data inside the Excel Worksheet.
So, how can I import the excel data into Oracle table.
Thank you in advance.
cheers,
shimaEven easier. Download JDeveloper 11G from this site.
Set up the database connection, right click on the table, select Import->Excel and specify your file to load it. On the import pop-up, you must view and update each tab indicating Columns, Data Types, and DML.
Columns -- move the selected columns that you want to load to the box on the right
Data Types -- select column name from second column to which the data for each column of the import file should load
DML -- click this tab to generate the INSERT SQL
Once done click 'Insert' -
Extract data from Oracle Database and store it into a CSV file format
Hello.
I'm trying to export a table from an Oracle Database into CSV file format with any Oracle adaptor and store it into a HDFS system.
How could I do it?
Thanks in advance!Xavi wrote:
HI Charles. Could I use.. Oracle Data Integrator Application Adapter for Hadoop? For this purpose?
Thanks in advancePerhaps. I have to confess that I am not familiar enough with ODI to know if that is within its capabilities.
You might see if there is a forum for ODI and post your question to that.
Charles Lamb -
Load prompt values from Excel or CSV files?
Hello all,
We have report and users want to upload filters to prompts on the reports from excel or csv files. They cannot enter one by one because they some times have hundereds of values (customer numbers) to filter. Is there a way to do that? If it is then how is it possible?
Thanks a lot.Hello Zahid,
It is currently possible to create a relational multi-source universe with one data provider to an Excel document.
for this to work for Web Intelligence the 62 bit drivers must be installed on the Webi Server for Excel.
Here is a link to the kbase
https://service.sap.com/sap/support/notes/1828466
Also here is a link to the Information Design Tool Guide for how to create a multi-source universe:
http://service.sap.com/sap/support/notes/1898185
One of the new features in BI 4.0 is creating a list of values on a Table or custom SQL.
also, here is the link to the available tutorials:
Official Product Tutorials – SAP BusinessObjects Business Intelligence Platform 4.x
Scroll down to the information design tool.
Hope this helps!
Jacqueline -
Ssrs 2008 export to csv file display issue
In a new SSRS 2008 report, I would like to know if there is a way to automatically expand the width of some of the rows when the data is exported to a CSV file so the data is displayed correctly. Here are examples that I am referring to:
1. In one column where there is suppose to be a date that looks like 12/11/2014, the value of ########## is displayed. The value of 12/11/2014 is what is setup in the SSRS formatting option.
2. In a number field that is suppose to look like 6039267049 the value that is displayed is 6E+09.
Basically if I manually expand the width of the columns that I am referring to above, the data is displayed correctly. Thus can you tell me what I can do so that the data is disaplayed correctly in the CSV file and ther user does not need to manually expand
the column to see the data?Hi wendy,
After testing the issue in my local environment, I can reproduce it when use Excel to open the csv file. As per my understanding, there is no width when we export the report to csv, Excel is just using the default cell sizes when we open the csv. So when
a date value is wider than the default cell size, it would be displayed as ##########. When a number value is wider than the default cell size, it would use Scientific format.
As to the date value, we can use the expression =cstr(Fields!Date.Value) to replace the former one =Fields!Date.Value. In this way, the width of the value is narrower than the default cell size, so that the date value can be displayed correctly. For the
number value, it already narrow down the width with Scientific format. Or we can Select all the cells in the csv file, then click Format| AutoFit Column Width to change all the cells width to fit its corresponding values in Excel level.
Besides, we can try to export to excel instead of csv. Excel format can inherit the column width in the report. So in this way, we can directly change the width to fit the values in Reporting Services level.
Hope this helps.
Thanks,
Katherine Xiong
If you have any feedback on our support, please click
here.
Katherine Xiong
TechNet Community Support -
Hello All,
We are facing below issue during CSV file generation :
Generated file shows field value as 8.73E+11 in output and when we are clicking inside this column result shown is approximate of the correct value like 873684000000. We wish to view the correct value 872684000013.
Values passes from report program during this file generation are correct.
Please advice to resolve this issue.
Thanks in Advance.There is nothing wrong in your program, it is the property of excel that if the value in the cell is larger than
default size it shows in output of that format.
Maybe you are looking for
-
Pls fix this in my title And why dont you support mirroring in other devices than ipad 2 And in ios 5 it keeps crashing
-
HT1338 There was an error in the App Store. Please try again later. (13)
There was an error in the App Store. Please try again later. (13)
-
US iPhone in the UK - Post 09NOV
Will the iPhone purchased in the US work in the UK if the SIM card is changed to an O2 one? I looked over the Uk site and the O2 service provider but didn't see anything to answer this. Thanks.
-
Preview Mode shows different page than design mode
When I am editing my page in Design mode in Muse CC, the page is approximately 700px long. When I preview that same page within Muse, it adds about 300px to the bottom of the page. There are no text boxes or other content that is causing the shift? W
-
How do I delete a very Large "Other" File
I erroneously loaded a ton of music files to the "Other" file on my ipod classic 80g...What is the easiest way to delete this large file from the ipod?