JTree data object type casting
I need to invoke a method on my data object after the user selects the corresponding node on the tree. I'm not able to type cast the DefaultMutableTreeNode to my class called Account. I've even tried extending DefaultMutableTreeNode in my class Account but of no avail.
any help in this matter will be highly appreciated
thanx
seeta
Are you talking about the user object that is passed in the constructor of DefaultMutableTreeNode?
If so, you don't cast the node itself, you get the user object and cast that (i.e. getUserObject()).
Similar Messages
-
Extending the JTree data object
Hi guys, How do i extend a MutableTreeNode so that I can store more data in the node.
there is currently only one data object which is displayed as a title
title
title
I want to store a uniqueID too without displaying it
title, uniqueID
title, uniqueID
I want to delete data from a database and uniqueID is the key.
Perhaps my approach is wrong?
I'm not a very experienced programmer.I've got a new problem.
When I use this method getLastPathComponent() to return the data from the node I click on, it returns an Object.
How do I access the getter method i've created called getID()...
Do I need to parse the Object to type CustomNode..
I've included the CustomNode class and the event handler for the JTree
public class CustomNode {
private String title;
private int id;
public CustomNode (String title, int id) {
this.title = title;
this.id = id;
// + getter and setters
public int getID() {
return id;
// This is the important method
public String toString() {
return title;
// add our selection listener and have it report to our messageLabel.
tree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent tse) {
TreePath tp = tse.getNewLeadSelectionPath();
System.out.println( tp.getLastPathComponent() );
Object temp = tp.getLastPathComponent();
CustomNode temp2 = (CustomNode) temp;
System.out.println( temp2.getID() );
messageLabel.setText("Selected: "+tp.getLastPathComponent() );
}); -
Use an imported RFC's type as type in the custom data object
Hello,
I've imported an RFC function in my process. There were created automatically some RFC types describing RFC's input\output parameters. Now I want to create my custom data object type and want to use previously created type in my data object, but I can use only standard types like string or anyType. There aren't any of generated types in the list.
Is it possible to use generated types as types in a custom data object?Hi,
Where did you import the RFC? In WebDynpro application? If so, you need to expose the types through the Interface Controller then only the types will be visible in BPM process.
Thanks
Abhilash -
Splitting and type casting huge string into arrays
Hello,
I'm developing an application which is supposed to read measurement files. Files contain I16 and SGL data which is type casted into string. I16 data is data from analog input and SGL is from CAN-bus data in channel form. CAN and analog data is recorded using same scan rate.
For example, if we have 6 analog channels and 2 CAN channels string will be (A represents analog and C represents CAN):
A1 A2 A3 A4 A5 A6 C1 C2 A1 A2 A3 A4 A5 A6 C1 C2 A1 A2 .... and so on
Anyway, I have problems reading this data fast enough into arrays. Most obvious solution to me was to use shift registers and split string in for loop. I created a for loop with two inner for loops. Number of scans to read from string is wired to N terminal of the outermost loop. Shift register is initialized with string read from file.
First of the inner loops reads analog input data. Number of analog channels is wired to its N terminal. It's using split string to read 2 bytes at a time and then type casts data to I16. Rest of the string is wired to shift register. When every I16 channel from scan is read, rest of the string is passed to shift register of the second for loop.
Second loop is for reading CAN channels. It's similar to first loop except data is read 4 bytes at a time and type casted to SGL. When every CAN channel from scan is read, rest of the string is passed to shift register of the outermost loop. Outputs of type cast functions are tunneled out of loops to produce 2D arrays.
This way reading about 500 KB of data can take for example tens of seconds depending on PC and number of channels. That's way too long as we want to read several megabytes at a time.
I created also an example with one inner loop and all data is type casted to I16. That is extremely fast when compared to two inner loops!
Then I also made a test with two inner loops where I replaced shift register and split string with string subset. That's also faster than two inner loops + shift register, but still not fast enough. Any improvement ideas are highly appreciated. Shift register example attached (LV 7.1)
Thanks in advance,
Jakke Palonen
Attachments:
String to I16 and SGL arrays.vi 39 KBOK, there is clearly room for improvement. I did some timing and my two above suggestions are already about 100x faster than yours. A few teeaks led to a version that is now over 500x faster than the original code.
A few timings on my rather slow computer (1GHz PIII Laptop) are shown on the front panel. For example with 10000 scans (~160kB data as 6+2) my new fastest version (Reshape II) takes 14 ms versus the original 7200ms! It can do 100000 scans (1.6MB data) in under 200 ms and 1000000 scans (15MB data) in under 2 seconds.
I am sure the code could be further improved. I recommend the Reshape II algoritm. It is fastest and can deal with variable channel counts. Modify as needed.
Attached is a LabVIEW 7.1 version of the benchmarking code, containing all algorithms. I have verified that all algorithms produce the same result (with the limitation that the cluster version only works for 6*I16+2*SGL data, of course). Remember that the reshape function is extremely efficient, because it does not move the data in memory. I have some ideas for further improvements, but this should get you going.
Message Edited by altenbach on 08-05-2005 03:06 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
StringI16SGLCastingTimer.png 48 KB
StringtoI16andSGLArraysMODTimer.vi 120 KB -
How to identify the object type in xpress
In ui global.startdate is evalued with Date object type when use display class as DatePicker. After save, the global.startdate is String type. The other place in the code has use this global.startdate to convert to special date string. The problem is how to detect what data type the global.startdate is at one particular moment?
In my case I do the following.
1. Use the following rule to display the date in the desired format.
<invoke name='dateToString' class='com.waveset.util.Util'>
<ref>inputdate</ref>
<s>MM-dd-yyyy</s>
</invoke>
At any point in time if one wants to know, one explicity needs to convert the java.util.Date obtained from datepicker using dateToString method in the Util class.
2. When one wants to insert the date into the database then the following can be done.
// First Convert the dates into appropriate formats
SimpleDateFormat formater = new SimpleDateFormat("mm-dd-yyyy");
java.sql.Date _startDate = null;
if(startdate != null) {
java.util.Date parsedDate = formater.parse(startdate, new ParsePosition(0));
_startDate = new java.sql.Date(parsedDate.getTime());
System.out.println("_startDate::::"+_startDate);
} -
OIM 11g: Event Handler "Data Object"
Is there any way in the OIM 11g Users event handler model (pre-insert) to get a "data object" type structure of the column names and values which will be inserted into the database (i.e USR_FIRST_NAME = "John"). This would be similar to what the legacy 9.1x event handler model provided via the getDataObject() method.
I know how to get the data from the orchestration parameters, but for our requirements we need the data to be keyed by database column name ("USR_FIRST_NAME") and not field name as in the orchestration params ("First Name").
OIM must do this conversion at some point (field name -> database column name). Can we somehow leverage this same function?
Thanks.You can accomplish through if statements in your event handler to check for the attributes that determine the logic. For example, if your user's last name changes, you can check the orchestration.getParameters() to see if it contains a key for "UserManagerConstants.AttributeName.LAST_NAME.getId()" and if it does, then perform your logic to update the user.
You could also come up with a lookup that can be referenced for these and have your own custom java code that outputs information based on the values in the lookup. Just think creatively and anything is possible.
Or you can get a connection to the database, and have a constants file that translates the metadata names back to database fields and continue to use your existing code.
Lots of options.
-Kevin -
Hi All,
following piece of code was working fine in 4.6 C but in ECC 6.0 I get the following error:
" "END_OF_RECORD" must be a character-type data object (data type C, N,D, T or STRING) . "
I tried type-casting with field symbols but still not able to remove the error. Cannot convert end_of_record directly to type C as it may hamper the functionality. Plz advice how to remove the error without converting type x to type C
In the following code :
DATA: DELIMITER TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
end_of_record TYPE x.
SPLIT data_file_i AT delimiter INTO it_ekko-rtype
it_ekko-ebeln
it_ekko-bsart
it_ekko-lifnr
it_ekko-bedat
it_ekko-ekorg
it_ekko-ekgrp
it_ekko-bukrs
it_ekko-zterm
it_ekko-zbd1t
it_ekko-zbd1p
it_ekko-zbd2t
it_ekko-zbd2p
it_ekko-zbd3t
it_ekko-inco1
it_ekko-inco2
it_ekko-waers
it_ekko-wkurs
it_ekko-kufix
it_ekko-verkf
it_ekko-telf1
it_ekko-ihrez
it_ekko-unsez
it_ekko-angnr
it_ekko-ihran
it_ekko-submi
it_ekko-loekz
end_of_record.
where all these fields except " end_of_record " are of character type and "data_file_i " is a character type structure as defined below:
DATA :
BEGIN OF data_file_i OCCURS 0,
record(1000),
END OF data_file_i,Type X is not allowed in Unicode. When a field is declared as Type X with Value u201809u2019 or any other value, it can be resolved by using classes.
Before Unicode
CONSTANTS: c_hex TYPE x VALUE '09'.
Resolution:
Itu2019s work for any value of x.
First a temporary field of Type c should declare. Following class will convert Type x variable into type c.
Example:
CONSTANTS: c_hex TYPE x VALUE '09'.
DATA: LV_TEMP TYPE STRING.
DATA: LV_TMP TYPE C.
TRY.
CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP
EXPORTING
UCCP = c_hex
RECEIVING
CHAR = LV_TMP .
CATCH CX_SY_CONVERSION_CODEPAGE.
CATCH CX_PARAMETER_INVALID_TYPE.
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
ENDTRY.
CONCATENATE I_OUTPUT-BKTXT I_OUTPUT-BVORG
I_OUTPUT-BUDAT I_OUTPUT-MESSAGE INTO
SEPARATED BY LV_TMP.
I_BUFFER = LV_TEMP.
CLEAR LV_TEMP.
CLEAR LV_TMP.
OR
Note: It works only for type x value 09.
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS: c_hex TYPE c VALUE
abap_char_utilities=>HORIZONTAL_TAB. -
Difference b/w DATA TYPE and DATA OBJECT & differences b/w TYPE and LIKE
hai
can any one say the differences between Data type and Data Object.
And also differences between TYPE and LIKE
thanks
Ganihi,
_Data Types and Data Objects_
Programs work with local program data that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and as a further attribute by a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
In the ABAP type concept, fields are called data objects. Each data object is thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
Data Types
As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program using the TYPESstatement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
All programming languages distinguish between various types of data with various uses, such as .. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
Data types can be divided into elementary, reference, and complex types.
a. Elementary Types
These are data types of fixed or variable length that are not made up of other types.
The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
Predefined and User-Defined Elementary Data Types
You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
b. Reference Types
Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
c. Complex Data Types
Complex data types are made up of other data types. A distinction is made here between structured types and table types.
Data Objects
Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
Declaring Data Objects
Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
ABAP contains the following kinds of data objects:
a. Literals
Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
b. Named Data Objects
Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
c. Anonymous Data Objects
Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
d. System-Defined Data Objects
System-defined data objects do not have to be declared explicitly - they are always available at runtime.
e. Interface Work Areas
Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
What is the difference between Type and Like?
Answer1:
TYPE, you assign datatype directly to the data object while declaring.
LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
Answer2:
Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
Answer3:
type refers the existing data type
like refers the existing data object
reward if useful
thanks and regards
suma sailaja pvn -
Error message is 'TYPE' is not a component of data object 'PAYLOAD'.
Hello,
I have sceanrio where file->Synchronus bapi ->File.
For this I have defined a bpm.
Text file inut will be read and converted using sender FCC.
Bpm will call a synchronus bapi from r/3 and collect response. I need to create a success or error response file from the status of bapi response. I have used switch step to do that.
But here when I give condtion as this XPath SOResonse./p1:Z_BAPI_SALESORDER_CREATEFROM3.Response/RETURN1/TYPE = S, SXI_CACHE gives status of bpm as 99 and error message is 'TYPE' is not a component of data object 'PAYLOAD'.
At the same time if i just put a condition of simple type container variable (SuccessCounter = 0), it gives status 0 in SXI_CACHE.
Pl can anyone suggest on this as its urgent.
thanks in advance,
SharadaThanks for quick response.
Yes BAPI response has TYPE field.
Pl cehck this response xml
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Z_BAPI_SALESORDER_CREATEFROM3.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <RETURN1>
<TYPE>E</TYPE>
<ID>V4</ID>
<NUMBER>115</NUMBER>
<MESSAGE>Purchase order number in document number: 304928 already exists</MESSAGE>
<LOG_NO />
<LOG_MSG_NO>000000</LOG_MSG_NO>
<MESSAGE_V1>304928</MESSAGE_V1>
<MESSAGE_V2 />
<MESSAGE_V3 />
<MESSAGE_V4 />
<PARAMETER>SALES_HEADER_IN</PARAMETER>
<ROW>0</ROW>
<FIELD />
<SYSTEM>DEV200</SYSTEM>
</RETURN1>
<SALESDOCUMENT />
- <EXTENSIONIN>
- <item>
<STRUCTURE>BAPE_VBAK</STRUCTURE>
<VALUEPART1>X</VALUEPART1>
<VALUEPART2 />
<VALUEPART3 />
<VALUEPART4 />
</item>
</EXTENSIONIN>
<ORDER_CCARD />
<ORDER_CFGS_BLOB />
<ORDER_CFGS_INST />
<ORDER_CFGS_PART_OF />
<ORDER_CFGS_REF />
<ORDER_CFGS_REFINST />
<ORDER_CFGS_VALUE />
<ORDER_CFGS_VK />
<ORDER_CONDITIONS_IN />
<ORDER_CONDITIONS_INX />
<ORDER_ITEMS_IN />
<ORDER_ITEMS_INX />
- <ORDER_KEYS>
- <item>
<REFOBJTYP />
<REFOBJECT>HEADER</REFOBJECT>
<REFOBJKEY />
<REFLOGSYS />
<DOC_NUMBER />
<ITM_NUMBER>000000</ITM_NUMBER>
<SCHED_LIN>0000</SCHED_LIN>
<COND_NO />
<CONDITEMNO>000000</CONDITEMNO>
<COND_ST_NO>000</COND_ST_NO>
<COND_COUNT>00</COND_COUNT>
<COND_TYPE />
<STATUS />
<TINDEX>000000</TINDEX>
<ADDRESS />
<ABRLI>0000</ABRLI>
<ABART />
</item>
- <item>
<REFOBJTYP />
<REFOBJECT>ADDRESS</REFOBJECT>
<REFOBJKEY />
<REFLOGSYS />
<DOC_NUMBER />
<ITM_NUMBER>000000</ITM_NUMBER>
<SCHED_LIN>0000</SCHED_LIN>
<COND_NO />
<CONDITEMNO>000000</CONDITEMNO>
<COND_ST_NO>000</COND_ST_NO>
<COND_COUNT>00</COND_COUNT>
<COND_TYPE />
<STATUS />
<TINDEX>000001</TINDEX>
<ADDRESS />
<ABRLI>0000</ABRLI>
<ABART />
</item>
- <item>
<REFOBJTYP />
<REFOBJECT>ADDRESS</REFOBJECT>
<REFOBJKEY />
<REFLOGSYS />
<DOC_NUMBER />
<ITM_NUMBER>000000</ITM_NUMBER>
<SCHED_LIN>0000</SCHED_LIN>
<COND_NO />
<CONDITEMNO>000000</CONDITEMNO>
<COND_ST_NO>000</COND_ST_NO>
<COND_COUNT>00</COND_COUNT>
<COND_TYPE />
<STATUS />
<TINDEX>000002</TINDEX>
<ADDRESS />
<ABRLI>0000</ABRLI>
<ABART />
</item>
- <item>
<REFOBJTYP />
<REFOBJECT>ADDRESS</REFOBJECT>
<REFOBJKEY />
<REFLOGSYS />
<DOC_NUMBER />
<ITM_NUMBER>000000</ITM_NUMBER>
<SCHED_LIN>0000</SCHED_LIN>
<COND_NO />
<CONDITEMNO>000000</CONDITEMNO>
<COND_ST_NO>000</COND_ST_NO>
<COND_COUNT>00</COND_COUNT>
<COND_TYPE />
<STATUS />
<TINDEX>000003</TINDEX>
<ADDRESS />
<ABRLI>0000</ABRLI>
<ABART />
</item>
- <item>
<REFOBJTYP />
<REFOBJECT>ADDRESS</REFOBJECT>
<REFOBJKEY />
<REFLOGSYS />
<DOC_NUMBER />
<ITM_NUMBER>000000</ITM_NUMBER>
<SCHED_LIN>0000</SCHED_LIN>
<COND_NO />
<CONDITEMNO>000000</CONDITEMNO>
<COND_ST_NO>000</COND_ST_NO>
<COND_COUNT>00</COND_COUNT>
<COND_TYPE />
<STATUS />
<TINDEX>000004</TINDEX>
<ADDRESS />
<ABRLI>0000</ABRLI>
<ABART />
</item>
</ORDER_KEYS>
- <ORDER_PARTNERS>
- <item>
<PARTN_ROLE>RE</PARTN_ROLE>
<PARTN_NUMB>LS-RETAIL</PARTN_NUMB>
<ITM_NUMBER>000000</ITM_NUMBER>
<TITLE />
<NAME />
<NAME_2 />
<NAME_3 />
<NAME_4 />
<STREET />
<COUNTRY />
<COUNTR_ISO />
<POSTL_CODE />
<POBX_PCD />
<POBX_CTY />
<CITY />
<DISTRICT />
<REGION />
<PO_BOX />
<TELEPHONE />
<TELEPHONE2 />
<TELEBOX />
<FAX_NUMBER />
<TELETEX_NO />
<TELEX_NO />
<LANGU />
<LANGU_ISO />
<UNLOAD_PT />
<TRANSPZONE />
<TAXJURCODE />
<ADDRESS />
<PRIV_ADDR />
<ADDR_TYPE />
<ADDR_ORIG />
<ADDR_LINK>0001</ADDR_LINK>
<REFOBJTYPE />
<REFOBJKEY />
<REFLOGSYS />
</item>
- <item>
<PARTN_ROLE>WE</PARTN_ROLE>
<PARTN_NUMB>LS-RETAIL</PARTN_NUMB>
<ITM_NUMBER>000000</ITM_NUMBER>
<TITLE />
<NAME />
<NAME_2 />
<NAME_3 />
<NAME_4 />
<STREET />
<COUNTRY />
<COUNTR_ISO />
<POSTL_CODE />
<POBX_PCD />
<POBX_CTY />
<CITY />
<DISTRICT />
<REGION />
<PO_BOX />
<TELEPHONE />
<TELEPHONE2 />
<TELEBOX />
<FAX_NUMBER />
<TELETEX_NO />
<TELEX_NO />
<LANGU />
<LANGU_ISO />
<UNLOAD_PT />
<TRANSPZONE />
<TAXJURCODE />
<ADDRESS />
<PRIV_ADDR />
<ADDR_TYPE />
<ADDR_ORIG />
<ADDR_LINK>0002</ADDR_LINK>
<REFOBJTYPE />
<REFOBJKEY />
<REFLOGSYS />
</item>
- <item>
<PARTN_ROLE>Z1</PARTN_ROLE>
<PARTN_NUMB>LS-RETAIL</PARTN_NUMB>
<ITM_NUMBER>000000</ITM_NUMBER>
<TITLE />
<NAME />
<NAME_2 />
<NAME_3 />
<NAME_4 />
<STREET />
<COUNTRY />
<COUNTR_ISO />
<POSTL_CODE />
<POBX_PCD />
<POBX_CTY />
<CITY />
<DISTRICT />
<REGION />
<PO_BOX />
<TELEPHONE />
<TELEPHONE2 />
<TELEBOX />
<FAX_NUMBER />
<TELETEX_NO />
<TELEX_NO />
<LANGU />
<LANGU_ISO />
<UNLOAD_PT />
<TRANSPZONE />
<TAXJURCODE />
<ADDRESS />
<PRIV_ADDR />
<ADDR_TYPE />
<ADDR_ORIG />
<ADDR_LINK>0003</ADDR_LINK>
<REFOBJTYPE />
<REFOBJKEY />
<REFLOGSYS />
</item>
- <item>
<PARTN_ROLE>AG</PARTN_ROLE>
<PARTN_NUMB>LS-RETAIL</PARTN_NUMB>
<ITM_NUMBER>000000</ITM_NUMBER>
<TITLE />
<NAME />
<NAME_2 />
<NAME_3 />
<NAME_4 />
<STREET />
<COUNTRY />
<COUNTR_ISO />
<POSTL_CODE />
<POBX_PCD />
<POBX_CTY />
<CITY />
<DISTRICT />
<REGION />
<PO_BOX />
<TELEPHONE />
<TELEPHONE2 />
<TELEBOX />
<FAX_NUMBER />
<TELETEX_NO />
<TELEX_NO />
<LANGU />
<LANGU_ISO />
<UNLOAD_PT />
<TRANSPZONE />
<TAXJURCODE />
<ADDRESS />
<PRIV_ADDR />
<ADDR_TYPE />
<ADDR_ORIG />
<ADDR_LINK />
<REFOBJTYPE />
<REFOBJKEY />
<REFLOGSYS />
</item>
</ORDER_PARTNERS>
<ORDER_SCHEDULES_IN />
<ORDER_SCHEDULES_INX />
- <ORDER_TEXT>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000020</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000030</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000040</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000050</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000020</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000030</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000040</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
- <item>
<DOC_NUMBER />
<ITM_NUMBER>000050</ITM_NUMBER>
<TEXT_ID>Z001</TEXT_ID>
<LANGU>E</LANGU>
<LANGU_ISO />
<FORMAT_COL />
<TEXT_LINE />
<FUNCTION />
</item>
</ORDER_TEXT>
- <PARTNERADDRESSES>
- <item>
<ADDR_NO>0001</ADDR_NO>
<FORMOFADDR />
<NAME />
<NAME_2 />
<NAME_3 />
<NAME_4 />
<C_O_NAME />
<CITY />
<DISTRICT />
<CITY_NO />
<POSTL_COD1 />
<POSTL_COD2 />
<POSTL_COD3 />
<PO_BOX />
<PO_BOX_CIT />
<DELIV_DIS />
<STREET />
<STREET_NO />
<STR_ABBR />
<HOUSE_NO />
<STR_SUPPL1 />
<STR_SUPPL2 />
<LOCATION />
<BUILDING />
<FLOOR />
<ROOM_NO />
<COUNTRY />
<LANGU />
<REGION />
<SORT1 />
<SORT2 />
<TIME_ZONE />
<TAXJURCODE />
<ADR_NOTES />
<COMM_TYPE />
<TEL1_NUMBR />
<TEL1_EXT />
<FAX_NUMBER />
<FAX_EXTENS />
<STREET_LNG />
<DISTRCT_NO />
<CHCKSTATUS />
<PBOXCIT_NO />
<TRANSPZONE />
<HOUSE_NO2 />
<E_MAIL />
<STR_SUPPL3 />
<TITLE />
<COUNTRYISO />
<LANGU_ISO />
<BUILD_LONG />
<REGIOGROUP />
<HOME_CITY />
<HOMECITYNO />
<PCODE1_EXT />
<PCODE2_EXT />
<PCODE3_EXT />
<PO_W_O_NO />
<PO_BOX_REG />
<POBOX_CTRY />
<PO_CTRYISO />
<HOMEPAGE />
<DONT_USE_S />
<DONT_USE_P />
<HOUSE_NO3 />
<LANGU_CR />
<LANGUCRISO />
</item>
- <item>
<ADDR_NO>0002</ADDR_NO>
<FORMOFADDR />
<NAME>SUPERIOR SELECTED STONE</NAME>
<NAME_2 />
<NAME_3>33-53 10TH STREET</NAME_3>
<NAME_4 />
<C_O_NAME />
<CITY />
<DISTRICT />
<CITY_NO />
<POSTL_COD1 />
<POSTL_COD2 />
<POSTL_COD3 />
<PO_BOX />
<PO_BOX_CIT />
<DELIV_DIS />
<STREET />
<STREET_NO />
<STR_ABBR />
<HOUSE_NO />
<STR_SUPPL1 />
<STR_SUPPL2 />
<LOCATION />
<BUILDING />
<FLOOR />
<ROOM_NO />
<COUNTRY />
<LANGU />
<REGION />
<SORT1 />
<SORT2 />
<TIME_ZONE />
<TAXJURCODE />
<ADR_NOTES />
<COMM_TYPE />
<TEL1_NUMBR />
<TEL1_EXT />
<FAX_NUMBER />
<FAX_EXTENS />
<STREET_LNG />
<DISTRCT_NO />
<CHCKSTATUS />
<PBOXCIT_NO />
<TRANSPZONE />
<HOUSE_NO2 />
<E_MAIL />
<STR_SUPPL3 />
<TITLE />
<COUNTRYISO />
<LANGU_ISO />
<BUILD_LONG />
<REGIOGROUP />
<HOME_CITY />
<HOMECITYNO />
<PCODE1_EXT />
<PCODE2_EXT />
<PCODE3_EXT />
<PO_W_O_NO />
<PO_BOX_REG />
<POBOX_CTRY />
<PO_CTRYISO />
<HOMEPAGE />
<DONT_USE_S />
<DONT_USE_P />
<HOUSE_NO3 />
<LANGU_CR />
<LANGUCRISO />
</item>
- <item>
<ADDR_NO>0003</ADDR_NO>
<FORMOFADDR />
<NAME>Langenscheidt Publishers Inc.</NAME>
<NAME_2 />
<NAME_3 />
<NAME_4 />
<C_O_NAME />
<CITY />
<DISTRICT />
<CITY_NO />
<POSTL_COD1 />
<POSTL_COD2 />
<POSTL_COD3 />
<PO_BOX />
<PO_BOX_CIT />
<DELIV_DIS />
<STREET />
<STREET_NO />
<STR_ABBR />
<HOUSE_NO />
<STR_SUPPL1 />
<STR_SUPPL2 />
<LOCATION />
<BUILDING />
<FLOOR />
<ROOM_NO />
<COUNTRY />
<LANGU />
<REGION />
<SORT1 />
<SORT2 />
<TIME_ZONE />
<TAXJURCODE />
<ADR_NOTES />
<COMM_TYPE />
<TEL1_NUMBR />
<TEL1_EXT />
<FAX_NUMBER />
<FAX_EXTENS />
<STREET_LNG />
<DISTRCT_NO />
<CHCKSTATUS />
<PBOXCIT_NO />
<TRANSPZONE />
<HOUSE_NO2 />
<E_MAIL />
<STR_SUPPL3 />
<TITLE />
<COUNTRYISO />
<LANGU_ISO />
<BUILD_LONG />
<REGIOGROUP />
<HOME_CITY />
<HOMECITYNO />
<PCODE1_EXT />
<PCODE2_EXT />
<PCODE3_EXT />
<PO_W_O_NO />
<PO_BOX_REG />
<POBOX_CTRY />
<PO_CTRYISO />
<HOMEPAGE />
<DONT_USE_S />
<DONT_USE_P />
<HOUSE_NO3 />
<LANGU_CR />
<LANGUCRISO />
</item>
</PARTNERADDRESSES>
- <RETURN>
- <item>
<TYPE>E</TYPE>
<ID>V4</ID>
<NUMBER>115</NUMBER>
<MESSAGE>Purchase order number in document number: 304928 already exists</MESSAGE>
<LOG_NO />
<LOG_MSG_NO>000000</LOG_MSG_NO>
<MESSAGE_V1>304928</MESSAGE_V1>
<MESSAGE_V2 />
<MESSAGE_V3 />
<MESSAGE_V4 />
<PARAMETER>SALES_HEADER_IN</PARAMETER>
<ROW>0</ROW>
<FIELD />
<SYSTEM>DEV200</SYSTEM>
</item>
- <item>
<TYPE>E</TYPE>
<ID>V4</ID>
<NUMBER>219</NUMBER>
<MESSAGE>Sales document was not changed</MESSAGE>
<LOG_NO />
<LOG_MSG_NO>000000</LOG_MSG_NO>
<MESSAGE_V1 />
<MESSAGE_V2 />
<MESSAGE_V3 />
<MESSAGE_V4 />
<PARAMETER />
<ROW>0</ROW>
<FIELD />
<SYSTEM>DEV200</SYSTEM>
</item>
</RETURN>
</rfc:Z_BAPI_SALESORDER_CREATEFROM3.Response> -
Help needed in data type casting
I have a java program which will receive data and its type in the String format. During program execution, the data in the String data has to be converted into the respective data type and assigned to a variable of that data type so that it could be used in the program. Programmer may not know the type of data that the value has to be converted into.
I really got struck up with this. This is a RMI application and one process node is sending the data to another node in the String format and the type of data it should get converted into so that it can be converted into the respective type and used for computation.
Can you understand what I am asking for ....if you can pls help and it is highly appreciatedI dont know whether i ahve expressed it correctly
look at this code
dataPacket sendtoNode = send.senDatatoNode(inputReq);
String recnodnum = sendtoNode.nodeNum;
String recvarnum = sendtoNode.varNum;
String recvartype = sendtoNode.dataType;
String recvalvalue = sendtoNode.dataVal;
int num; int type;
double result;
// here in this case the result variable type is double
if (recvartype.equals("int")){
type = 1;
result = Integer.parseInt(recvalvalue); will pose problem
else
if (recvartype.equals("double")){
type = 2;
result = Double.parseDouble(recvalvalue);
else
if(recvartype.equals("float")){
type =3;
result = Float.parseFloat(recvalvalue); will pose problem
else
if(recvartype.equals("Boolean")){
if ((recvalvalue.equals("true")) || (recvalvalue.equals("TRUE")))
type = 4;
result = Boolean.parseBoolean(recvalvalue); will pose problem
else
if(recvartype.equals("char")){
type = 5;
result = (char)recvalvalue; will pose problem
else
if(recvartype.equals("String")){
type = 6;
result = recvalvalue; will pose problem
else
if(recvartype.equals("byte")){
type = 7;
result = Byte.parseByte(recvalvalue); will pose problem
else
if(recvartype.equals("long")){
type = 8;
result = Long.parseLong(recvalvalue); will pose problem
else
if(recvartype.equals("short")){
type = 9;
result = Short.parseShort(recvalvalue); will pose problem
//forvarval varvalue = new forvarval();
//varvalue.forvarval(recvartype, recvalvalue);
// this has to be done after sorting the problem of type casting string result = recvalvalue;
//result = value; //<this will surely give me a problem as i m assigning string to double>??
send.host(result);
System.out.println("result received and the result is " +recvalvalue );
now i need to assign the converted string in to a variable and use in the compuation ..thts where the challenge n not in teh conversion process... -
Problem with decimal data visualization in a circular graphic object type
When we are design a report using Crystal Reports 2008 we found the following problem. When we insert an object of type circle graphic selecting the option in the graphics wizard for view in the legend data both in value and percentage (u2018bothu2019 design) we cant show them in a two decimals format at the same time.
Using the option u2018number formatu2019 and indicating two decimals only affects the value but not the percentage.
Show both the value and the percentage with two decimals at same time itu2019s a necessary requirement for our report design.
Is there any way to show both the value and the percentage in a circle graphic object with two decimals at the same time?
Thanks.hello Jose,
i am not sure what you mean by "circular graphic object type".
there's nothing in the standard cr 2008 build that has this that i've ever found that creates a circle other than inserting a box and changing the rounding on the corners. if you're using a 3rd party product or add-on you'll need to contact whoever built it.
cheers,
jamie -
Conversion of a data object of type "C" to type "l" is not supported
Experts:
i have below code in my FM; defined as remote-enabled module.
when i execute i get the error analysis as:
You attempted to move one data object to another.
This is not possible here because the conversion of a data object
of type "C" to type "l" is not supported.
This at the line move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
what are the steps to debug this? Thanks!
DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
FIELD-SYMBOLS : <wwa_mdm_name_value_pair> LIKE LINE OF tt_mdm_name_value_pair_table.
FIELD-SYMBOLS <FS1> TYPE ANY.
FIELD-SYMBOLS <FS2> TYPE any.
data:st_mdm_name_value_pair type mdm_name_value_pair.
assign st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
assign st_mdm_name_value_pair-code to <FS1>.
assign st_mdm_name_value_pair-value to <FS2>.
clear wa_ZSTRESULT.
loop at T_UPDATE into wa_ZSTRESULT.
assign wa_ZSTRESULT-field to <FS1>.
<wwa_mdm_name_value_pair>-CODE = <FS1>.
assign wa_ZSTRESULT-VALUE to <FS2>.
move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
endloop.resolved using GET REFERENCE.. code looks as below: Thanks!
DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
FIELD-SYMBOLS : <wwa_mdm_name_value_pair> TYPE LINE OF mdm_name_value_pair_table.
FIELD-SYMBOLS <FS1> TYPE ANY.
FIELD-SYMBOLS <FS2> TYPE DATA.
TYPES t_dref TYPE REF TO DATA.
DATA dref TYPE REF TO DATA.
DATA: TT_UPDATE TYPE ZTYRESULT.
FIELD-SYMBOLS : <WA_UPDATE> LIKE LINE OF TT_UPDATE.
data: st_mdm_name_value_pair type mdm_name_value_pair.
assign st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
assign st_mdm_name_value_pair-code to <FS1>.
assign st_mdm_name_value_pair-value to <FS2>.
clear wa_ZSTRESULT.
TT_UPDATE = T_UPDATE.
loop at TT_UPDATE assigning <WA_UPDATE>.
assign <WA_UPDATE>-FIELD to <FS1>.
<wwa_mdm_name_value_pair>-CODE = <FS1>.
assign <WA_UPDATE>-VALUE to <FS2>.
GET REFERENCE OF <WA_UPDATE>-VALUE INTO dref.
* MOVE dref TO <wwa_mdm_name_value_pair>-VALUE.
<wwa_mdm_name_value_pair>-VALUE = dref.
append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
endloop. -
BPM Process Data Object of type Business Objects
I am using JDeveloper11.1.1.5 and using BPM Project. I have created a business object of type Quote and I want create a Process data object of type Quote. But I don't find 'Browse more types' button on Create data object wizard. I am stuck at this place. Is there any work around or do I need to revert to older version of Jdeveloper.
Regards
Sunil MandrawadkarHave you tried with following forum.I think you can find answer quickly from that.
Business Process Management Suite -
Dynamically built query on execution How to save the data in Object Type
Hi,
In pl/sql I am building and executing a query dynamically. How can I stored the output of the query in object type. I have defined the following object type and need to store the
output of the query in it. Here is the Object Type I have
CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPE AS OBJECT(
pkid NUMBER,
pkname VARCHAR2(100);
pkcity VARCHAR2(100);
pkcounty VARCHAR2(100)
CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPETAB AS TABLE OF FIRST_RECORDTYPE;Here is the query generated at runtime and is inside a LOOP
--I initialize my Object Type*
data := new FIRST_RECORDTYPETAB();
FOR some_cursor IN c_get_ids (username)
LOOP
x_context_count := x_context_count + 1;
-- here I build the query dynamically and the same query generated is
sql_query := 'SELECT pkid as pid ,pkname as pname,pkcity as pcity, pkcounty as pcounty FROM cities WHERE passed = <this value changes on every iteration of the cursor>'
-- and now I need to execute the above query but need to store the output
EXECUTE IMMEDIATE sql_query
INTO *<I need to save the out put in the Type I defined>*
END LOOP;
How can I save the output of the dynamically built query in the Object Type. As I am looping so the type can have several records.
Any help is appreciated.
Thankshai ,
solution for Dynamically built query on execution How to save the data in Object Type.
Step 1:(Object creation)
SQL> ED
Wrote file afiedt.buf
1 Create Or Replace Type contract_details As Object(
2 contract_number Varchar2(15),
3 contrcat_branch Varchar2(15)
4* );
SQL> /
Type created.
Step 2:(table creation with object)
SQL> Create Table contract_dtls(Id Number,contract contract_details)
2 /
Table created.
Step 3:(execution Of procedure to insert the dynamic ouput into object types):
Declare
LV_V_SQL_QUERY Varchar2(4000);
LV_N_CURSOR Integer;
LV_N_EXECUTE_CURSOR Integer;
LV_V_CONTRACT_BR Varchar2(15) := 'TNW'; -- change the branch name by making this as input parameter for a procedure or function
OV_V_CONTRACT_NUMBER Varchar2(15);
LV_V_CONTRACT_BRANCH Varchar2(15);
Begin
LV_V_SQL_QUERY := 'SELECT CONTRACT_NUMBER,CONTRACT_BRANCH FROM CC_CONTRACT_MASTER WHERE CONTRACT_BRANCH = '''||LV_V_CONTRACT_BR||'''';
LV_N_CURSOR := Dbms_Sql.open_Cursor;
Dbms_Sql.parse(LV_N_CURSOR,LV_V_SQL_QUERY,2);
Dbms_Sql.define_Column(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER,15);
Dbms_Sql.define_Column(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH,15);
LV_N_EXECUTE_CURSOR := Dbms_Sql.Execute(LV_N_CURSOR);
Loop
Exit When Dbms_Sql.fetch_Rows (LV_N_CURSOR)= 0;
Dbms_Sql.column_Value(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER);
Dbms_Sql.column_Value(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH);
Dbms_Output.put_Line('CONTRACT_BRANCH--'||LV_V_CONTRACT_BRANCH);
Dbms_Output.put_Line('CONTRACT_NUMBER--'||OV_V_CONTRACT_NUMBER);
INSERT INTO contract_dtls VALUES(1,CONTRACT_DETAILS(OV_V_CONTRACT_NUMBER,LV_V_CONTRACT_BRANCH));
End Loop;
Dbms_Sql.close_Cursor (LV_N_CURSOR);
COMMIT;
Exception
When Others Then
Dbms_Output.put_Line('SQLERRM--'||Sqlerrm);
Dbms_Output.put_Line('SQLERRM--'||Sqlcode);
End;
step 4:check the values are inseted in the object included table
SELECT * FROM contract_dtls;
Regards
C.karukkuvel -
Saving Data Objects in INDX-Type Database
Hi,
I am using the EXPORT statement to store data in a table into INDx table.
EXPORT gt_update TO DATABASE indx(tt) ID index.
And then I am using IMPORT statement to get that data.
IMPORT gt_update to tb_update FROM DATABASE indx(tt) ID 'TTUPDATE'.
The 'TT' is put into INDX- RELID and 'TTUPDATE' into INDX-SRTFD.
The Export statement was working fine and a record got created in INDX table, but the IMPORT is not working. Can anyone please let me know what could be the problem ?
'gt_update' and 'tb_update' are of the same type in the IMPORT statement.
Also please let me know what exactly is the significance of the field INDX-SRTF2.
Thanks a lot in Advance.My reason for using data clusters is that there is huge amount to data to be retrieved from database, so we have decided to get that data and put it in data clusters for faster access of data in the program.
INDX tables are ideal to store complex strcutures, inlcuding deep data objects. Don't really know if the access is faster, but definitely it takes less space (as data are compressed).
But I have a doubt, Ideally we should be having another program with the SELECT statement on the table required which needs to be scheduled periodically as a background job to Update the data cluster right ? Otherwise how would the data cluster hold the latest data ?
It really depends on where you initial data comes from. I mean how data you want to put/update in data cluster are produced. If this is the report, which generates some result and based on that you want to update data cluster, then what you say is true. You would need to run it either manually (periodically) or simply schedule the job, which does the task.
But as for the update of data cluster itself, I don't think we should use OPEN SQL statements to achieve that.
What I think you have to do is, each time do a select to know which cluster to extract, then import the result. Next you need to change gt_update locally and place it back (with export) on right data cluster place. Data with same name under same RELID and cluster key will be completely replaced with new (changed) table.
This is the only way I think of in terms of data cluster update, but maybe there is some other.
Regards
Marcin
Maybe you are looking for
-
Class, interface, or enum expected?
Ok I keep getting that error. Here is my java file that it is in. package server.main.project12.skills; import java.io.*; import server.main.project12.*; public class fireMaking { public int xpgained = 1;//Change this and the fire xp will be times by
-
Hi, We are using LSMW for Routing data upload. The "Group" field in the CA01 screen is giving a problem. The Group number, (which is generated internally) which was used for uploading the previous record is remaining in the field while uploading the
-
VK11 Condition types for taxes
Hey, I'm attaching the print screen of Vk11 for taxes. I don't understand what is the use of taxcode(highlighted) on the image. I have seen F1, but it doesn't make any sense to me.... I'm putting the tax rate % in the amount field... What is the use
-
Amortization of Goodwill after method change
Hi all, Need some help. It is not really clear to me how does BCS take into account (equity-method)goodwill, and further more - amortization of goodwill, in/after Method Change activity. Business scenario Step 1. Company "A" (equity - 1000 monetary u
-
Xperia Z1 speaker/mic issue when speaker phone switched on during call
when i switch on the speaker during a call the voice is garbled and the call receiver also complains of voice being not clear. Is this issue something other z1 users . pls advcie