Format check for each column in csv file
i want to find out how to check each column value is correct or not while uploading flat file(csv).
after uploading to internal table,
it should display error record and line no of the record.
ex matnr(18) type c,
werks(4) type c.
if we input matnr value more than 18 characters in csv file,
the entire record of internal table should be displayed in log file.
it should validate before sap database validations.
Hi,
Since the file format is csv, while uplaoding the data to the program using the function module, the importing FILE FORMAT is 'ASC' and not 'DAT'.
For this the Internal table should contain only one filed of type C length (255 or 1024, upto you).
Then after this using SPLIT command you will push into another Internal table.
This is where you have to perform the validations.
In my opinion instead of checking the number of characters, chcek whether the material or plant exists in SAP or not?
This is because you have already fixed the filed length of material to 18 charecters, obvious when you try to move a variable with more than 18 charecters to this filed, it will automatically truncate and take only 18 charecters..
Hope I haev answered you. If still have any questions. shoot.
BR
Sree
Similar Messages
-
Different format template for each amount column?
Greetings.
Is it possible to assign diffrent format template for each amount column in Excel workbooks?
I'll explain a bit more specific.
Suppose there's a BW report to Excel as below.
column1 column2 column3
row1 111,111 222,222 333,333
row2 111,111 222,222 333,333
row3 111,111 222,222 333,333
All columns are amounts, so the assigned format templates are all 'SAPBEXstdData'. Here, the needs is that each column have the format of their own, such as 'Centered, large font size, bold, red color, etc'.
I found out in SAP help portal that I can create workbook templates which include custom format templates, such as OurColumn1Template. I also found I can use the workbook templates when opening BW queries. But it doesn't seem possible to automatically specify format template OurColumn1Template is for column1 when creating a new Excel report from BW query or refreshing a query from a Excel report.
How I can control which format template is assigned for which column? No way?
By the way, we are on BW3.5.
Thank you,
T.YamagiwaOh my, I found out! It's easy, in a sense.
We use MS Office 2003, so in the first place we need to change security setting about macro, by the SAP note below.
Note 574596 - BEXAnalyzer SAPBEXOnRefresh is missing on Office XP
https://websmp110.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=574596&_NLANG=E
Now that we've got SAPBEXOnRefresh module in a newly created Excel workbook, the rest we need to do is copy the SAPBEXOnRefresh module to the existing workbook, then code the module, like below. (this is only doing left-justification)
Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
Columns("I:I").Select
With Selection
.HorizontalAlignment = xlLeft
End With
End Sub
I should have search the forum more carefully...hope somebody will find this post kind of useful in the future.
Regards,
T.Yamagiwa -
Modify the Data Load wizard to remove the check for unique columns
Hi,
I'm trying to make a Data Loading Wizard into my application, which basically works nice except for one thing:
I want to remove the check for unique columns, and insert ALL data which the users wants to upload.
(Like the Data load utility under development).
The reason is, that the data I want to upload is an export from my bank statements (in XLS / CSV format)
And these exports don't have any primary key.
Using the Apex wizard created Data Upload pages, I will loose data in case I had two identical payments in a day.
Is there a way to do this, while keeping the pages created by the wizard to make Data Loading pages?
apex 4.2.1I would suggest to load the data into a view and process the records into the real table(s) with instead-of-triggers. When you add a "1=2" where clause to the view, there never is any data and everything will be loaded.
Otherwise you have to have a "real" PK value, like a timestamp or a statement_nr+line_nr. -
Is it possible to run a script each time a .CSV file is updated?
I am having trouble with a script I am trying to write, which is made up of two parts:
A .CSV file generated by PHP/MySQL whenever an RSS feed is updated. The contents of the .CSV are overwritten each time the PHP runs.
A DataMerge script, written in JavaScript.
What I would like to do is run the DataMerge script each time the .CSV file is updated. Is this possible, perhaps using an Event Listener within the PHP to trigger the DataMerge script? Or am I approaching this in the wrong way? I'm grateful for any thoughts you might have. Thanks, F.H.I would use Rorohiko's APID ToolKit: http://www.rorohiko.com/wordpress/indesign-downloads/active-page-item-developer/
It has fileChanged event that is sent after the observed external file has changed.
sorry guys for "labouring the point", but I'm working on very advanced project - and I need to know what my tool can or can't do
and in this case - using APID will break point 2.3 of EULA, right ? interaction with external datasource - without user action ?
robin
www.adobescripts.co.uk -
SQL* Loader Loading specific column from CSV file to the table
Dear All,
Iam Loading specific column from .CSV file to the oracle table.
Could pls help how i can load only that cols into the table
Eg: CSV file having id, Frst_name,Last_name, Address,Phone,Insurance etc
out of this I want to load only Frst_name,Last_name columns to oracle table say fname and lname.
Thanks in Adv.
JunuLily,
I made some changes to your table def but you will get the idea
-- Table EMPLOYEE
CREATE TABLE EMPLOYEE
EMPID NUMBER NOT NULL,
EMPNICKNAME VARCHAR2(10 BYTE) NULL,
FNAME VARCHAR2(20 BYTE) NOT NULL,
MI VARCHAR2(20 BYTE) NULL,
LNAME VARCHAR2(20 BYTE) NOT NULL,
FULLNAME VARCHAR2(20 BYTE) NOT NULL,
HIREDATE DATE DEFAULT SYSDATE NOT NULL
-- data file employee.dat
1,amy,b,amy b
2,cindy,d,cindy d
3,eric,f,eric f
4,gary,h,gary
-- Control file : Employee.ctl ( you can use truncate, replace or append , see sqlldr for more options)
load data
Truncate into table employee
fields terminated by ","
optionally enclosed by '"'
TRAILING NULLCOLS
empId INTEGER EXTERNAL,
FName char(20),
LName char(20),
FullName char(30)
now to load use following or you can speicify infile in control fle
sqlldr username/passowrd control=employee.ctl data=employee.dat log=employee.log
{code}
Hope this help.
Regards -
How to merge two columns in csv file using vbscript?
How i can merge two column in csv file using vbscript or powershell?
1 , 2 , 3 , 4 , 5
1 , 23 , 4 , 5
thanksHere are two examples
http://msdn.microsoft.com/en-us/library/ms191250.aspx
calulated
http://msdn.microsoft.com/en-us/library/ms191250.aspx
Gary Newman MCSE, MCT, CCNA, MCSD, MCPD, MCDBA, MCAD, MCSA, MCTS Developer and Administrator On SharePoint 2013 SharePoint Practice Manager for AmeriTeach Denver, CO. -
Multi-column Index vs One index for each column
Hello everyone,
i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
The table has 34 columns, no primary key, no unique keys.
The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
can any one help me on what kind of indexes do i have to create?
1. one index for each column used in "where clause"
2. one index for 8 columns and some other indexes for other used columns
3. one index for all columns
or something else etc...
br flagi have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
The table has 34 columns, no primary key, no unique keys.
The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
can any one help me on what kind of indexes do i have to create?
1. one index for each column used in "where clause"
2. one index for 8 columns and some other indexes for other used columns
3. one index for all columns
or something else etc...What's the version of your data base? what kind of database you have, DWH or OTLP? The answer might depend on the type of database as far as bitmap indexes might suit or might not depending if you are runing DWH or OLTP kind of database
Let me suppose that you are runing OLTP database and you have a where clause with 8 columns.
1) are all those where clause equalities (where col1 = and col2 =) or there are inequalities?
2) could you evaluate the most repetitive columns?
3) could you know the column that could have the best clustering factor (the column which most follow a certain order in the table)
Based on that I would suggest to create one b-tree index having 8 columns (even though that it seems for me to high) this index should follow the following points:
1) put the most repetitive column at the leading edge (and compress the index if necessary)
2) put the columns that are used in equalitity predicate first
3) put the column having the best clustering factor first
The most precise index you have the best access you could gain.
Of course that you have to know that an index access is not always good and a FULL table scan is not always bad.
Best regards
Mohamed Houri
www.hourim.wordpress.com -
Get frequent data for each column of a table
What is the best way to get the most frequent data in each column of a table.
we have around 25 tables and each table has around 20 columns , so rather than writing group by for each column of table , is there any easy way to find this?
example we have table
Column A Column B Column C
Apple Monday Red
orange Tuesday Green
Apple Monday Red
Lemon Wednesday Green
Apple Thursday Red
in this table, column A's frequnt data is Apple , column B's frequent data is Monday , Column C's frequnt data is Red
Apple 3 Monday 2 Red 3
Orange 2 Tuesday 1 Green 2
Lemon 1 Wednesday 1
Thursday 1
Group by kind of query will give this result, but with 20 tables each having 20 - 30 columns if we need similar kind of result .. is there any way to get this data.Hi,
GROUP BY (using aggregate functions) is the best way to do what you described.
PIVOT and UNPIVOT are probably what you'd want in this case. The phrase "GROUP BY" may not actually appear in your code, but you'll essentially be doing a GROUP BY.
Analytic functions (rather than aggregate functions) can do the job, too, but they'll be less efficient. Analytic functions get you results about the groups, without losing each row's identify, but in this case, losing each row's identity is eactly what you want to do. You only want 'Apple' to appear 1 time, not 3 times.
The fact that you need to do the same query on 20 different tables suggests that there's something wrong with your table design. Wouldn't it be better to have 1 big table, with a new column that has 20 unique values instead?
I hope this answers your question.
If not, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Simplify the problem as much as possible. For example, instead of posting a problem with 20 tables, each having 25 columns, post a similar problem involving, say, 2 tables, each with 3 columns.
Always say which version of Oracle you're using (for example, 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Configure:3955: checking for C compiler default output file name
Hi,
I am trying to configure oracle bsd on AIX and got the below error,
# sh /ldap/db-4.6.21.NC/dist/configure
checking build system type... powerpc-ibm-aix5.3.0.0
checking host system type... powerpc-ibm-aix5.3.0.0
checking if building in the top-level or dist directories... no
checking if --disable-cryptography option specified... no
checking if --disable-hash option specified... no
checking if --disable-mutexsupport option specified... no
checking if --disable-queue option specified... no
checking if --disable-replication option specified... no
checking if --disable-statistics option specified... no
checking if --disable-verify option specified... no
checking if --enable-compat185 option specified... no
checking if --enable-cxx option specified... no
checking if --enable-debug option specified... no
checking if --enable-debug_rop option specified... no
checking if --enable-debug_wop option specified... no
checking if --enable-diagnostic option specified... no
checking if --enable-dump185 option specified... no
checking if --enable-java option specified... no
checking if --enable-mingw option specified... no
checking if --enable-fine_grained_lock_manager option specified... no
checking if --enable-o_direct option specified... no
checking if --enable-posixmutexes option specified... no
checking if --enable-pthread_api option specified... no
checking if --enable-rpc option specified... no
checking if --enable-smallbuild option specified... no
checking if --enable-tcl option specified... no
checking if --enable-test option specified... no
checking if --enable-uimutexes option specified... no
checking if --enable-umrw option specified... no
checking if --with-mutex=MUTEX option specified... no
checking if --with-tcl=DIR option specified... no
checking if --with-uniquename=NAME option specified... no
checking for chmod... chmod
checking for cp... cp
checking for ln... ln
checking for mkdir... mkdir
checking for rm... rm
checking for sh... /usr/bin/sh
checking for a BSD-compatible install... /ldap/db-4.6.21.NC/dist/install-sh -c
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
and in config.log,
configure:3955: checking for C compiler default output file name
configure:3982: xlc_r -O2 -D_THREAD_SAFE -Wl,-brtl conftest.c >&5
/ldap/db-4.6.21.NC/dist/configure[3983]: xlc_r: not found
configure:3985: $? = 127
configure:4023: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Berkeley DB"
| #define PACKAGE_TARNAME "db-4.6.21"
| #define PACKAGE_VERSION "4.6.21"
| #define PACKAGE_STRING "Berkeley DB 4.6.21"
| #define PACKAGE_BUGREPORT "Oracle Technology Network Berkeley DB forum"
| #define HAVE_UPGRADE_SUPPORT 1
| /* end confdefs.h. */
|
Is this beacase valid c compiler not existing?
# which cc
which: 0652-141 There is no cc in /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java14/jre/bin /usr/java14/bin.
# ksh: which:: not found.
# which c
which: 0652-141 There is no c in /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java14/jre/bin /usr/java14/bin.
Thanks,
Message was edited by:
GK JoeJoe,
I presume you are trying to build Oracle BDB and not bsd as you have mentioned.
Yes, the error message you are getting is for not having the CC compiler in your system or the path isn't set. Check in the /usr/vac/bin directory if you have one in your system. You might find both xlc and cc compiler there. Set this directory to your path so that 'configure' can see it.
Regards,
-Debsubhra -
Header for each column of data
I am struggling to get header for each column in attached code. I would like to see this data in excel with header at the top. Also I wonder how to know which column belongs to which plot and which axis.
Solved!
Go to Solution.
Attachments:
saving for excel.vi 130 KBI would keep this in the original thread.
-
Checking for the existence of a file.
I have a GUI to enter test info. A file is created based on the entered test number. I want to check for the existence of a file, and then notify the operator while not allowing the program to save it.
This vi checks the presence of the input file.
If file is not found, it will be created.
regards
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
File_check_existance_openorcreate_2003.vi 72 KB -
Matrix with different dimensions for each column
Hi,
I would like to have a matrix with different dimensions (rows) for each
column, for example, I want the first column has 3 rows, the second one
5 rows, the third one 10 rows, and so on.....
With a simple array it is not possible, and then I make an array (for
my columns) of clusters and each cluster has another array (rows for
that column). Is it the best way to do it? Is it correct?
Thanks,
ToNi.Yes, everything we told you in this old thread is still true!
LabVIEW Champion . Do more with less code and in less time . -
JQuery format mask for date columns in tabular form
Hi,
How can I apply jQuery format mask for date columns in a tabular form?
Thanks.
AndyOK, I realized I didn't choose the default type as "Pl/SQL Expression", now it's working correctly.
Thank you very much! -
Want some discription for each column
Hi expert, I have one req.
I created my rpd with around 100 tables and 800 column. Now my user having discription of each column in on excel sheet. Now we want to show discription of each column (once we put our mouse on it in answer). So how can we do it. We dont want to write discription of each column manually. So is there any way to impliment this.
ThanksHi Gys,
Thanks for replying.
Kishore thanjks for suggestion .
User need to go our indivisual column in some place , Search that column out of 800 column and then see the discription.
So we are thinking for that type of implimentation.
Kart Thanks for link. But again we have to do it for each column manually i.e for 800 columns. But we dont want that.
Thannks -
How to dump block and identify the bytes stored for each column
SQL> select header_file, header_block
2 from dba_segments
3 where segment_name = 'APARTMENTS';
HEADER_FIL HEADER_BLO
4 1692
1 row selected.
SQL> alter system dump datafile 4 block 1693;
Statement processed.
How can I see the dump block and identify the bytes stored for each column?
tab 0, row 0, @0x73b
tl: 125 fb: H-FL lb: 0x1 cc: 4
col 0: [25]
52 65 64 77 6f 6f 64 20 53 68 6f 72 65 73 20 41 70 61 72 74 6d 65 6e 74 73
col 1: [20] 00 54 00 01 02 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8d
col 2: [53]
00 54 00 01 02 0c 00 00 00 01 00 00 00 01 00 00 00 00 1b 8e 00 21 09 00 00
00 00 00 00 11 00 00 00 00 00 01 45 6d 65 72 67 65 6e 63 79 20 44 65 74 61
69 6c 73
col 3: [20] 00 54 00 01 01 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8fSQL> select header_file, header_block
2 from dba_segments
3 where segment_name = 'APARTMENTS';
HEADER_FIL HEADER_BLO
4 1692
1 row selected.
SQL> alter system dump datafile 4 block 1693;
Statement processed.
How can I see the dump block and identify the bytes stored for each column?
tab 0, row 0, @0x73b
tl: 125 fb: H-FL lb: 0x1 cc: 4
col 0: [25]
52 65 64 77 6f 6f 64 20 53 68 6f 72 65 73 20 41 70 61 72 74 6d 65 6e 74 73
col 1: [20] 00 54 00 01 02 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8d
col 2: [53]
00 54 00 01 02 0c 00 00 00 01 00 00 00 01 00 00 00 00 1b 8e 00 21 09 00 00
00 00 00 00 11 00 00 00 00 00 01 45 6d 65 72 67 65 6e 63 79 20 44 65 74 61
69 6c 73
col 3: [20] 00 54 00 01 01 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8f
Maybe you are looking for
-
I get 2 error messages (-50 and -52) when I try to back up data
Hi, Can anyone please help me. When I try and back up my iphone to my imac in itunes OR icloud, I am always asked for authorisation to keep apps from either computer to iphone or visa versa. When I put my password in (which I have changed a few times
-
Extension.xml and catching compile event in sql developer
Hi, recently I've been trying to make a few plug-in/extensions for sql developer. One allows you to search through entire schema to find and procedures or functions that utilize any given procedure or function, this one works fine. The second one and
-
URL must be loaded twice to run quiz
I have a quiz I created in Captivate 3. It works fine, except that when published and you type the link, it seems to load 100% but doesn't - only the bottom frame appears of the control player. If you then go to the same URL another time, the entire
-
I am working on a new BI 7.0 implementation (BI 7.0 SP 15, BI CONT Add on 3) and I am trying to install and setup the 0PUR_C01 InfoCube and associated data flow from BI content. When I brought over 0PUR_C01 InfoCube from BI Content and installed 0PU
-
in the past week i have had a minor problem.when i have several web sites open in separate windows (like AOL and my space) and i have them minimized if i want to click on the Firefox icon it to open another site it brings up all the other minimized w