Spaces within access db field name
I am trying to use data which was extracted to a excel file
then imported into a access database.
During the import access database used the first roll to be
the field name and some names has space within.
When I try to access those field inside CF and i will get a
error message since the CF won's understand any field names with
space inside the name.
Is there a work around? Since change the field name each time
will take lots of time beacuse the db will be exported every day.
Thanks
Is there a work around? Since change the field name each time
will take
lots of time because the db will be exported every day.
Thanks
Yup, two of 'em even.
The first is in the SQL language, you can alias the columns
with the AS
command. This one is probably preferred by most developers.
SELECT ['Column With Spaces'] AS NoSpaces
FROM aTable
Secondly you can use the array notation ability of ColdFusion
to
reference variables with bad names. For queries that would be
queryName[columnName][row].
<cfoutput query="aBadQuery">
#aBadQuery["Column With Spaces"][currentRow]#
</cfoutput>
Similar Messages
-
Accessing ArrayCollection Field Names
Hello, this may sound like a n00b questoin but, I have an array collection which looks like the below:
public var topFive:ArrayCollection = new ArrayCollection([
{Month:"GAME_Redemptions"},
{Month:"TALLINK_Redemptions"},
{Month:"YvesRocher_Redemptions"},
{Month:"ETAM_Redemptions"}
With a loop for example, if I want to access the Value, I would type, topFive[i].month. However, if I want to access the Field name what would be the code. Im assuming it would be something like topFive[i] - but this does not return the desired output.
Does anyone know how to do this? I wanted to avoid having to put the array into a datagrid and then extracting the values from there.
Please help!
CraigThanks for your response, much appreciated. It works perfectly. Do you know how to delete a whole column out of an array coll
ection?
e.g.
private var topFive:ArrayCollection = new ArrayCollection([
{Month:"GAME_Redemptions", value:10},
{Month:"TALLINK_Redemptions", value:10},
{Month:"YvesRocher_Redemptions",value:10},
{Month:"ETAM_Redemptions",value:10}
To
{Month:"GAME_Redemptions"},
{Month:"TALLINK_Redemptions"},
{Month:"YvesRocher_Redemptions"},
{Month:"ETAM_Redemptions"} -
Accessing dynamic field names?
I want to be able to create text fields with unique names and
set values in them within a For-loop without having to reference
the field names in the code.
Consider the following code snippet:
this.createTextField("field" + i, this.getNextHighestDepth(),
x1, y1, 250, 20);
It places a text field into a movie clip with name that is a
composite of a literal value and a variable value resulting in
names like field1, field2, etc. My question: Is there anyway to use
a composite field name to access the field properties? For example:
Can I set the text for the field using the same composite name
without having to express it as a literal field name? If I can't
then what is the point of having the composite name capability?You can drop the last question because the answer to the
prior one(s) is "yes".
this["field"+i].text = "whatever";
the bracket notation causes a string to be evaluated as an
object/instance. -
Search for a space within a text field
Hi All
I am trying to search for a sapce within a text field but sofar not being very successful. I have used:
FIND search_str
IN text_str
MATCH COUNT lv_mcnt
MATCH OFFSET lv_moff.
where search_str = TYPE c VALUE ' '.
I am looking a way of searching a character within the string using ABAP (like INSTRING in other languages). If you have similiar codes - Could you please post me a copy - ThanksHI
Check this..
DATA string7(30) TYPE c VALUE 'This is a little sentence.'.
WRITE: / 'Searched', 'SY-SUBRC', 'SY-FDPOS'.
ULINE /1(26).
SEARCH string7 FOR 'X'.
WRITE: / 'X', sy-subrc UNDER 'SY-SUBRC',
sy-fdpos UNDER 'SY-FDPOS'.
SEARCH string7 FOR 'itt '.
WRITE: / 'itt ', sy-subrc UNDER 'SY-SUBRC',
sy-fdpos UNDER 'SY-FDPOS'.
SEARCH string7 FOR '.e .'.
WRITE: / '.e .', sy-subrc UNDER 'SY-SUBRC',
sy-fdpos UNDER 'SY-FDPOS'.
SEARCH string7 FOR '*e'.
WRITE: / '*e ', sy-subrc UNDER 'SY-SUBRC',
sy-fdpos UNDER 'SY-FDPOS'.
SEARCH string7 FOR 's*'.
WRITE: / 's* ', sy-subrc UNDER 'SY-SUBRC',
sy-fdpos UNDER 'SY-FDPOS'.
Thanks ,
Praveen -
Removing spaces from field names?
Hi. I'm using Acrobat 9.3.3.
I use the Form Wizard to create... forms. And a lot of these forms I need to have it do some math calculations -- sums, products, etc. But when I use the Wizard, it auto-creates field names with spaces in them. And (I don't know if this is normal), when I create formulas, notations, scripts, if it's trying to pull from a field with a space in the name it doesn't work.
I have to go in and manually take out the spaces from all the field names... and there can be a lot of fields!
Is there some process I'm not seeing, or some way to configure the Wizard, to remove/prevent spaces in the field names?
Thanks for any info!
LiamI don't believe it is possible.
-
Field names with spaces in target file using fcc
Hello Friends,
My target structure fields:
MT_Target
ItemNo, ItemName, ItemQuantity, AmountValue, TotalAmount
My requirement here is - In the target file - these fields should be generated with space. Shown as below:
Item No, Item Name, Item Quantity, Amount Value, Total Amount
How can i achieve this.
Thanx
S.if i understood u correctly u want to have a header line in ut target file same as that ur field names but with a space in between??
if yes the use :
NameA.addHeaderLine=3
NameA.headerLine =Item No, Item Name, Item Quantity, Amount Value, Total Amount
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm -
How to dynamicly create a field name AND access it
All,
I am trying to build a code block that will access what amounts to a table structure inside a table. I have 38 occurances if a set of 3 fields. (Source system had an internal array/occurs clause that was converted for our ODS into individual fields) I am returning a single row as a row type and have addressability to all fields. What I am trying to avoid is coding my logic block 38 times, 1 for each occurance.
FOR X IN 1 .. 38 LOOP
V_CAT_CD_X := 'CAT_'||X||'_CD';
End Loop;
The following is the display of the correctly built field:
--> Loop Cat CD: CAT_1_CD Rec count:1 Loop counter:1
--> Loop Cat CD: CAT_2_CD Rec count:1 Loop counter:2
--> Loop Cat CD: CAT_3_CD Rec count:1 Loop counter:3
--> Loop Cat CD: CAT_4_CD Rec count:1 Loop counter:4
My problem is that my row cursor PP1 is addressable hardcoding PP1.CAT_1_CD or PP1.CAT_2_CD ect, however I am having problems using my created string to access the field.
What do I need to do to gain accessability via this method?
I do have the ability to select the column names from the system tables but even then, I am lacking addressability to my ROW type using the selected field name.
Thanks
GregNot sure if this is what you are looking for:
SQL> ed
Wrote file afiedt.buf
1 declare
2 my_cur SYS_REFCURSOR;
3 v_rec mytest%rowtype;
4 cursor c1 is select column_name from all_tab_cols where table_name = 'MYTEST';
5 v_sql_stmt VARCHAR2(1000) := NULL;
6 BEGIN
7 v_sql_stmt := 'SELECT ';
8 FOR I IN c1 LOOP
9 v_sql_stmt := v_sql_stmt||I.column_name||',';
10 end loop;
11 v_sql_stmt := RTRIM(v_sql_stmt,',');
12 v_sql_stmt := v_sql_stmt||' FROM mytest';
13 open my_cur for v_sql_stmt;
14 LOOP
15 FETCH my_cur INTO v_rec;
16 EXIT WHEN my_cur%NOTFOUND;
17 dbms_output.put_line(v_rec.a);
18 END LOOP;
19 close my_cur;
20* end;
SQL> /
1
2
PL/SQL procedure successfully completed.
SQL> Edited by: AP on Nov 17, 2010 5:29 AM -
Diferent key field names within a recordset
Hi
Can we have different key field names for records within a recordset.
When i give different key field names for Header and detail records in a recordset i get the error below: -
message not processed: com.sap.aii.messaging.adapter.trans.TransformException: Transformer Conversion3.0.5227 Error initializing Class: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found (4408) Parameter 'xml.keyFieldName' is missing (4403) ; nested exception caused by: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found (4408) Parameter 'xml.keyFieldName' is missing (4403)
ThanksHello Pratihchi,
One keyfield name is allowed, eventhough we have different records per recordset. Because we can differentiate the rows based on the keyfieldvalue and those value we need to mention in the fieldname. Check below link which contains the example on this.
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5393- [original link is broken] [original link is broken]> [original link is broken] File Adapter->Sender File Adapter for Content Conversion
Regards.
Prasanna. -
Method t create dynamic structure if the field name contains space
HI all,
I am creating a dynamic internal table. Everything id fine but when creating dynamic structure if field name contains space its giving me dump.Can you please suggest me any other methos which takes space in the field name.
Iam using the following method:
gr_struct_typ ?= cl_abap_structdescr=>create( p_components = gt_component ).
In the gt_component i have one of the field with space like ( RU STAND) and its giving error.
Any help will be appreciated.
thanks
Suku.Hello Sukumar
If the space in the fieldname is a mistake then you could simply use:
CONDENSE ld_fieldname NO-GAPS.
However, I guess your fieldname should contain this space:
>...suggest me any other methos which takes space in the field name.
>
Well, have you ever seen a field or column name in SAP standard containing a space in its name???
Regards
Uwe -
Display Technical Field Names within a Transaction Screen
Hi All,
Someone once showed me how to do this and for the life of me I cannot figure out how to do it in ECC 6.0.
I would like to display the technical field names of all fields in a transaction. It is important to note that I am not looking for the <b>F1...Technical Details</b> solution. I am well aware that the technical field name can be retrieved by this method. I am really looking to see all the technical names of the fields in a particular transaction without a lot of clicking and searching.
When I saw this before you could quickly change from technical field names to short field names and vise versa.
I know this could also be accomplished in SE11 or SE16 - but that is not exactly what I am looking for.
Can anyone help??Hi Christopher,
you know that Rollin Stones thing?
You can't always get what you want.
There is no such functionality for standard transactions.
Regards,
Clemens -
Changing the field name at runtime in rpt file
Hi everybody
I'm using C# and Crystal Report XI (Deverlop license) to develop windows application in VS.net 2003.
Please help me to change the field name of the bounded column of Crystal report file at the runtime.
(In some case client's database had changed the structure as fieldname, fieldtype. Then they request a utility to change the field names in the .rpt file programmatically )
Thanks
GiangSon
My email address: [email protected]user11200661 wrote:
That's fine but still i want to prefix the schema name within the .sql file. My .sql should contain the name of that parameter only as i want to get that parameter replaced by the schema name at runtime. Some other users are using the same .sql file and they have access to that specific schema only. i want to make the .sql file more general so that it can be used by everyone without altering it every time.Sorry, your requirement no longer makes sense.
If people have to access a specific schema because they need the script for general use, then you will have to hard code the schema name into it.
If the script is to prompt for the schema name and connect to that schema and then use that schema name inside the called sql script, then people would not be able to use it generically, as it would be reliant upon the schema name being passed in.
It sounds as if you're trying to write one generic thing that needs to do two different tasks.
Just have two scripts and make life simple. -
Prepared statement problem using a field name that contains a "?"
I am attempting to execute the following query via use of a PreparedStatement:
select [Spread_By_Cost_Center?], Debit_Category, Credit_Category, Start_Date, End_Date, Allocation_Type From ALLOCATION_FORMULA Where FormulaID = ?
The query fails with the following message:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT
field incorrect
However, I can run this query directly in MS-ACCESS, using a value for the substitution parameter (i.e., FormulaID = 1)
If I remove the "Spread_By_Cost_Center? field from the query within the PreparedStatement, the PreparedStatement query executes successfully.
So, it would appear that the "?" in the field name is possibly being treated as a substitution parameter. Is this a bug within PreparedStatement? I do not want to use a Statement object, as the PreparedStatement provides a much more elegant solution (when it works).
Any suggestions?That may be so, but as I see it there are two alternatives:
1. Wait for the "bug" to be fixed.
2. Change the database to use less problematic column names.
I know which alternative I would choose. -
How to access dynamic fields in a field symbol
hi
how do i access the dynamic fields created in side a field-symbol....
wht i mean is i have a table, whose workarea i assign to field symbol. but this table is runtime, altough i have debugged and found the values in this table, I want to accees the field symbol in a generic way.
say the table has 3 fields now fld1 fld2 and fld3 so i want to access the field symbol <fs> as <fs>-(name) where name can be anything fld1 or fld2 whichever i assign....
thanks. Let me know if you have any further questions.Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to a field symbol before you can address it in a program.
Field symbols are similar to de-referenced pointers in the C programming language (that is, pointers to which the content operator * is applied). In ABAP, data references represent a real equivalent to pointers in the sense of variables that contain a memory address and can be used without the contents operator.
All operations programmed with field symbols are applied to the field assigned to it. A MOVE statement between two field symbols, for example, assigns the contents of the field assigned to another source field symbol to the field assigned to the target field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before the MOVEstatement.
You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks during the field assignment whether the assigned field matches the type of field symbol.
Field symbols provide greater flexibility when you address data objects:
· You can assign one field symbol to another, which allows you to address subfields.
· Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
· You can also force a field symbol to take different technical properties than those of the field assigned to it (casting).
The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. The MOVE statement (with your own auxiliary variables, if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
To declare a field symbol, use the statement
FIELD-SYMBOLS .
For field symbols, the angle brackets are part of the syntax. They identify field symbols in the program code.
If you do not specify any additions, the field symbol.
in a static ASSIGN and:
ASSIGN (dobj) TO from the second loop pass onwards. -
Field Names Not Found in Item Table Properties
Please note that the following field names cannot be found in the Table Object properties but can be found in the database table for the Item table.
ItemType within Item Heading
ReorderQty within Inventory Data -
this is called Required Stock Level on Inventory scrn.
MinOrdrQty - Minimum Ordered Qty on Planning scrn.
Please advise. Thanks!Satish,
The ItemType property is available for the Items Object. As far as the ReOrderQty ... this does not seem to be available as a property. If you must use these properties in your add-on, you could go to the Db directly as they are in the appropriate tables HOWEVER, this is not a recommended approach as data corruption could occur as well as SAP will not certify a solution that used direct table access to the Db. You could put in a request via SAP Support for these properties to be added in coming versions of the DI API.
HTH,
Eddy -
Table name& field name for production order & operation confirmation
Hi All,
I would like to know the table name and field name for the production order "confirmation" (CNF) and the operation confirmation (CNF).
Thanks and Regards,
PSSHi there,
CORU(R/3 Application development: PP Confirmations )
AFFW Goods movements with errors from confirmatio
AFRC Table of planned changes to conf.: Automatic
AFRD Default values for collective confirmation
AFRH Header information for confirmation pool
AFRP1 Table of planned changes to conf.: Automatic
AFRP2 Table of planned changes for confirmation: B
AFRP3 Table of planned changes for confirmation: C
AFRP4 Table of planned changes to confirmatn: Data
AFRU Order completion confirmations
AFWI Subsequently posted goods movements for conf
TAFWD CORU: Messages that are not interpreted as e
TCORD Table for field-dependent check routines
TCORU Parameters for order confirmations
TCORV Table with Routines for structureing variabl
TCORW Confirmation: Window Control
TPARU Control parallelized confirmation processes
TPRRU Control table for process chain for confirma
TPRRUT Text table for process control of confirmati
TRUGS User status caused by deviation
CO(R/3 Application development: PP Production orders )
AFBP CIM order: Batch print requests
AFFL Work order sequence
AFKO Order header data PP orders
AFPO Order item
AFVC Operation within an order
AFVU DB structure of the user fields of the opera
AFVV DB structure of the quantities/dates/values
FAPW Index of production-/issuing plant for produ
FTIND Missing parts index
ORDCOM Communication control Operation download
T024F Production scheduler
T399X Parameters dependent on order type
T441C Profile - availability check
T441CT Texts for Profile "Display Availability Chec
T490 Transactions PP - orders - order category
T496B CIM order: Assigning document types to refer
T496D CIM: Destination/lists/spool parameters per
T496F CIM order: Form description of the list
T496K CIM order: Entity table of possible table id
T496N CIM order: List descriptions
T496P Print PP documents: Determination of output
T496R Print PP shop papers: Report control
T496T Print PP shop papers: Transaction control
T496V PP Print: Default Value for Printing Online
T496Z CIM order: Table-controlled table access
TC32 Assigning subscreen to processing location
TC34 Allocating operation to object type for the
TC62 Sequence of detail screens when processing h
TCO01 Sequence/operations control in logicstics or
TCO03 CIM order: Texts for TCO01, Description of o
TCO04 Table for controlling the screen sequence gr
TCO05 CUA status depending on panel, trans. type,
TCO06 Exclusive functions for PP orders
TCO09 CIM order: Text IDs of objects in orders
TCO10 Valuation variant for order costing
TCO11 Control table for production orders - availa
TCO12 Control table production orders - stock dete
TCO36 PP orders: Control table for calling up pop-
TCO41 CIM order: Default values for generating ope
TCO43 PP-SFC order profile
TCO43T Description of production scheduler profile
TCO60 Sequence keys for input facility and verific
TCO61 Sequence key for PP orders
TCO62 Defining screen sequences for input facility
TCO63 Sequence of detail screens when maintaining
TCODB Database fields development class CO per ord
TCOF Profile for missing parts info system
TCOFF Profile for Missing Parts Info System: Displ
TCOFFT Texts for Missing Parts Info System: Display
TCOFG Profile for missing parts info system: crite
TCOFGT Texts for Missing Parts Info System: Criteri
TCOFK Texts for functions in milestones/trigger po
TCOFS Profile for Missing Parts Info System: Sort
TCOFST Texts for Missing Parts Info System: Sort Cr
TCOFT Texts for Missing Parts Info System
TCOKO Constants for PP orders
TCOKT Account assignment categories for order
TCOP Field selection profile
TCOPS Field selection profile
TCOPT Description of Profile for Field Selection
TDUMMY Dummy structure of a table for READ with VER
TRUG Reason for variances in completion confirmat
TRUGT Text describing the reason for a variance in
TXPR1 XPRA control - missing parts info system
Regards
Hemant G
Maybe you are looking for
-
How do I copy recordsets from one database table to another?
I am using the Database Connectivity Toolset, and would like to copy either one recordset or multiple recordsets from one Access table to a table in a different database. I would like to do it directly with the data in variant form, but I can't get i
-
Error with receiver java proxy
for a XI type communication channel for receiver Java proxy I see following error in SXMB_MONI. <i>Unable to read user password from communication channel of type Error when accessing the secure store (access ID = 3650CAFA1FBAA04E8F260C6C4C1923FA) Er
-
How to run a Tcode : rrc2 , if i dont have authorization for it.
hi , I want to run TCODE : RRC2 , but i dont have authorization for it......is there any other way to go into that TCODE ? Pls reply...Agni
-
PCUI: IE 7 settings for France, Hungaria,....
Hello all, I have a question concerning the IE7 settings for PCUI: From the SAP support we received the recommended settings in english. We have several users in different countries and their Internet Explorers are in in french or hungaria or whateve
-
OAException - Custom message in multiple lines
Hi All, Is is possible to display an error message to the user in multiple lines using OAException? For Ex: The Error message should be displayed as below 1. Effective from date should be less than Effective to date 2. Difference between Effct Frm Dt