JSP keyword type and class
<jsp:useBean id="customer" type="Auction.customer" scope="session"/>sometimes instead of type , keyword class is written..... any difference ?
hi,....thats a popular tutorial site. i know about that. ......i have no confusion about the class...........but whole confusion lies on type . is that difference written over there !! where ?
type=the type of the variable you are using to refer to the used bean.Its not clear yet.
see , we use id to refer the bean .(like in the above code) You can give anything ( of course string ) as an id.....and a bean of course has got several attributes ( or properties ) . i dont understand what exactly u mean . can u be explicit a little with an small example ?
Similar Messages
-
From which table I can find the "Class type" and "Class" of the material?
From which table I can find the "Class type" and "Class" of the material?
Thanks in advance for the answers....Hi,
try following table
KSSK Material number to class
KLAS Class description
KSML Characteristic name
CABN/CABNT Characteristic name description
CAWN/CAWNT Characteristic name
[http://www.sap-img.com/materials/classification-view-of-material-master.htm]
[http://wiki.sdn.sap.com/wiki/display/ERPLO/FrequentlyUsedTables]
Regards
kailas Ugale -
Create material serial number and update class type and class
Hi ,
do we have any function to create material serial number and update class type, class and Characteristic Description?
for transcation IQ04 0-Create material Serial number and IQ02 for change mat. serial number
cheers,
RAAGhi
u can go to iqo2 and click class overview and assign the class type ,class and description.but u need to maintain class for this first.
it would be helpful for u to read iut 221 for work management
for creation of class,service object etc.and understand the concept .
all the best
kr
raj
RAJ on Oct 14, 2008 3:20 PM -
Runtime types and class hierarchies etc...
Hi,
I hope this is not an obvious question but I was just wondering how the new Generics feature(?) would behave in terms of class hierarchies.
For example, could I do something like this:
Set<Throwable> myThrowableSet = new HashSet<Exception>();
If so, could I then do this:
myThrowableSet.add(new Error());
or would I only be able to add something which is an exception?
Thanks,
Mark
p.s I realise you would never actually want to do the above but I am just interested in the behaviour.Reading that spec8.pdf I mentioned earlier (do you know the one I mean) it talks about "Raw Types". It mentions that you can do stuff like:
HashSet myHashSet = new HashSet<Exception>();but that when mutatable method calls are performed on myHashSet, "unchecked" warnings are given (I guess at compile time). I guess this is still the case?
For me, it is very important to know the behaviour of Generics because at the moment I generate Typesafe collection classes and I am trying to make them as forward compatible as possible. Looks like I need to remove this static method:
SetTypesafeClassName SetTypesafeClassName.convertType(TypesafeSet s);but I can leave this instance method in:
Set getRawType();Here, TypesafeClassName is replaced by "Throwable", "Exception" or whatever...
Thanks,
Mark -
When is a types keyword used n when is the data keyword used?
hi,
LIKE means the datatype of the variable is similar to the referenced variable.
TYPE means it is a predefined data type.
Eg:
DATA int TYPE i.
Here int is of integer data type.
DATA var LIKE int.
var IS a variable having same data type of int. which in turn is integer.
You can find these helpful when you reference database table variables... You need not know what is the datatype defined.
Also it adds to FLEXIBILITY.
Whenever you make changes to your database tables and fields,
that change is REFLECTED back to your program that is,
You need not change all your program code when you change your table fields...
For TYPE
http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
For LIKE
http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm -
Error Message like Illegal Start of Type,and Class interface and enum expec
import java.applet.*;
import java.awt.*;
//Inheriting the Applet class with firstApplet class
public class firstApplet extends Applet{
private Button reset,submit;
private TextArea addr;
private TextField name,addr,sex,mar;
Panel p=new Panel();
Choice m_choice = new Choice();
Label namel=new Label("Name");
Label addrl=new Label("Address");
Label sexl=new Label("Sex");
Label marl=new Label("Maital");
//In it function
public void init()
setLayout(new FlowLayout());
add(m_choice);
m_choice.addItem("Select Mode");
m_choice.addItem("Create");
m_choice.addItem("Edit");
m_choice.addItem("Delete");
m_choice.addItem("Search");
add(namel);
name=new TextField(20);
add(name);
add(addrl);
addr=new TextArea(5,20);
add(addr);
add(sexl);
sex=new TextField(10);
add(sex);
add(marl);
mar=new TextField(20);
add(mar);
submit =new Button("Submit");
add(submit);
reset =new Button("Reset");
add(reset);
t=new TextField(30);
add(t);
public boolean action(Event e,Object o){
if (e.target instanceof Button){
String s= (String)o;
if(s.equals ("Submit"))
t.setText("Error Occured While Saving to the database");
else if (s.equals("Reset")){
name.setText("");
addr.setText("");
sex.setText("");
mar.setText("");
t.setText("");}
return true;
else
return false;
}I this program while compiling i am getting the above specified.This is the Code i used.At that Bolded else and return false lines are showing as error lines.Why this error is coming?Pls send help me with some hint,Because i am new to Java.Be consistent about your placement of {} and use of indentation. Sun's code
conventions provide an example: http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html -
TAXCLASSIFICATIONS - tax type and class
Hi,
I cannot transfer tax data during creating new material. I know that either tax type or tax classification is responsible for error. I know that some dependences exist but cannot find what exactly. What should I pass to TAX_TYPE_1 and TAXCLASS_1?
Any help will be appreciated and properly rewarded.
Br,
Rafalsolved
-
How to findout Class type and Class name for a Material
Hi all,
How can we findout the Class name and Classtype assigned to a material. ( Varaint Classification for a material)
MM03-> enterial Materil->Classification Tab
Regards,
Rajeshcheck the tables AUSP
check the below link
Material Chassifications
regards
srikanth
Message was edited by: Srikanth Kidambi -
Help: Problem with data types and classes
Hi there,
I'm currently struggling with getting a class to read in data from a file and from that select the correct constructor to use... Basically I read a line in from a file as follows:
<String Make>:<String model>:<String registrationNumber>:<String engineSize>
e.g.
Ford:Focus:HG42EG:1800
There is an Interface called Car, of which 'Ford' is an implementation along with 'Vauxhall', 'Chrysler', etc...
From this I wish to construct a new instance of a Ford called Focus with input parameters (RegNumber registration,int engineSize) i.e.
Car Focus = new Ford(HG4 2EG,1800);So far I can convert the engineSize String into an integer and can construct the RegNumber (a class of mine) but can only get it to construct a Ford by using a switch, i.e:
switch (modelKey){
case 'f': new Ford(); break;
case 'v': new Vauxhall(); break;
case 't': new Toyota(); break;
etc...
Now I do get this to work correctly but I'm concerned that it is not OOP therefore is the way I can get code to convert the String 'Ford' into Car 'Ford'.???
Many thanks in advance for any advice you can throw my way,
LeeboWhat is this anyway???
If Car is an interface you can't create instances of it....No, if Car is an interface, his code should be (depending on what the RegNum constructor looks like:
Car Focus = new Ford(new RegNum("HG42EG"),1800);It's the same as:
List someList = new ArrayList();However, he won't be able to use a word read from the file as a variable name "Focus". He'll need a Map:
Map myCarMap = new HashMap();
myCarMap.put("Focus", new Ford(new RegNum("HG42EG"), 1800));(Could be defined as "Map<String, Car>" if he wants to use generics.) -
Characteristics for class type 001 and class 59111 - Message Re-phrased
Hi All,
Let me put in better words.
The requirement is to get the list of Characteristics that are associated with a particular Class type and Class that would be entered by the user in selection screen. I have used KLAH and KSML to establish the link and got the relevant characteristics list configured. It worked for me for most of the Class type and Class combination.
The issue is on particular class type 001 and class 59111, if I put a lookup in KSML, I don't get any records. But if we look in the configuration CL02 for the same Class type 001 and class 59111, I see a list of characteristics configured there.
Does anyone know how to fetch the characteristics on this particular case?
Thanks
Rajesh.
Edited by: Rajesh Kumar K on Jan 12, 2012 12:12 PMHi Sylendra,
Thanks for looking into it and replying with your thoughts.
What you have mentioned about the approach on getting the characteristcs from KLAH and KSML is exactly how I have written in my program. Ofcourse your second statement of going into AUSP to get the values for characteristics for an Object (eg: material number XXXX) is also correct.
But my issue is still on getting the relevant characteristics for the class tyoe 001 and class 59111. I need to display to user the relevant characteristics that are configured for Class type 001 and class 59111. But when I go into KSML passing the internal class number and class type, I don't get any records. If you see, I am not searching characteristic values for an object, I am searching for characteristics itself.
The question would be, why records are not maintained in KSML for class 59111 (though they show in CL03) . or there are any other tables to read characteristics...
Thanks
Rajesh. -
How to find objects and classes
hi
any notes or path on objects and classes on crm?Hi Kumara
I beleive your talking about the Classification system.
To get to this go here: SPRO->IMG->Cross-Application Components - -> Classification System - -> Classes - -> Maintain Object Keys
This will give a list of Tables which are currently set with Object Keys, you may need to add a new table and configure.
Next
To get to this go here: SPRO->IMG->Cross-Application Components - -> Classification System - -> Classes - -> Maintain Object Types and Class Types
Here you assign a Class Type to Link your Table from the previous step, this class new Class Type will be used with a New Class to created in the following steps.
Goto Transaction CT04 - Create Characteristics
Here you create effectively attributes of a Class (Fields)
Goto Transaction CL01 - Create New Class
or CL02 - Maintain Class
Create a new class linked to your Class Type from previous steps
On the Char.. Tab you can add the new Characteristics created in the previous step to your new Class.
Based on the Object Key from the first step, these new attributes shoulds all now link together. If the key is of type 'RAW' (Binary) it may not be possible to link correctly, therefore some ABAP maybe required to create the link, depending on your application.
Hope this helps.
<b>Reward with points if useful.</b>
Regards
Arden -
Hi,
Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
I have created a dynamic web project and added javax RS jars:
When im trying to run this, i'm getting the below mentioned error:
FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType. Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
Please help as im stuck with this from long.
Thanks in advance.
Below is the code for my service class:
package com.rest.assignment;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/restService")
public class RestService extends Application {
@GET
@Path("/getEmpDetails")
@Produces(MediaType.APPLICATION_JSON)
public Response getStringResponse()
EmpBean empBean = new EmpBean();
String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
Properties properties = new Properties();
try {
properties.load(new FileInputStream(filePath));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
Enumeration e = properties.propertyNames();
String result="";
String[] empDetailsArr;
while (e.hasMoreElements()) {
String key = (String) e.nextElement();
String empDetails = properties.getProperty(key);
empDetailsArr=empDetails.split(",");
empBean.setFirstName(empDetailsArr[0]);
empBean.setLastName(empDetailsArr[1]);
empBean.setEmpId(empDetailsArr[2]);
empBean.setDesignation(empDetailsArr[3]);
empBean.setSkillSet(empDetailsArr[4]);
result = empDetailsArr[1];
//return empBean;
return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(RestService.class);
classes.add(EmpBean.class);
return classes;
and my empBean goes like this:
package com.rest.assignment;
public class EmpBean {
private String firstName;
private String lastName;
private String empId;
private String designation;
private String skillSet;
public String getFirstName() {
return firstName;
public void setFirstName(String firstName) {
this.firstName = firstName;
public String getLastName() {
return lastName;
public void setLastName(String lastName) {
this.lastName = lastName;
public String getEmpId() {
return empId;
public void setEmpId(String empId) {
this.empId = empId;
public String getDesignation() {
return designation;
public void setDesignation(String designation) {
this.designation = designation;
public String getSkillSet() {
return skillSet;
public void setSkillSet(String skillSet) {
this.skillSet = skillSet;
Web.xml goes like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>restWS</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>REST</servlet-name>
<servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.rest.assignment.RestService</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>REST</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.Hi,
Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
I have created a dynamic web project and added javax RS jars:
When im trying to run this, i'm getting the below mentioned error:
FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType. Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
Please help as im stuck with this from long.
Thanks in advance.
Below is the code for my service class:
package com.rest.assignment;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/restService")
public class RestService extends Application {
@GET
@Path("/getEmpDetails")
@Produces(MediaType.APPLICATION_JSON)
public Response getStringResponse()
EmpBean empBean = new EmpBean();
String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
Properties properties = new Properties();
try {
properties.load(new FileInputStream(filePath));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
Enumeration e = properties.propertyNames();
String result="";
String[] empDetailsArr;
while (e.hasMoreElements()) {
String key = (String) e.nextElement();
String empDetails = properties.getProperty(key);
empDetailsArr=empDetails.split(",");
empBean.setFirstName(empDetailsArr[0]);
empBean.setLastName(empDetailsArr[1]);
empBean.setEmpId(empDetailsArr[2]);
empBean.setDesignation(empDetailsArr[3]);
empBean.setSkillSet(empDetailsArr[4]);
result = empDetailsArr[1];
//return empBean;
return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(RestService.class);
classes.add(EmpBean.class);
return classes;
and my empBean goes like this:
package com.rest.assignment;
public class EmpBean {
private String firstName;
private String lastName;
private String empId;
private String designation;
private String skillSet;
public String getFirstName() {
return firstName;
public void setFirstName(String firstName) {
this.firstName = firstName;
public String getLastName() {
return lastName;
public void setLastName(String lastName) {
this.lastName = lastName;
public String getEmpId() {
return empId;
public void setEmpId(String empId) {
this.empId = empId;
public String getDesignation() {
return designation;
public void setDesignation(String designation) {
this.designation = designation;
public String getSkillSet() {
return skillSet;
public void setSkillSet(String skillSet) {
this.skillSet = skillSet;
Web.xml goes like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>restWS</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>REST</servlet-name>
<servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.rest.assignment.RestService</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>REST</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response. -
What is the field and Table for "Batch Class" and "Class Type" in QM.
Hi All,
What is the field and Table for "Batch Class" and "Class Type" in QM.
Thanks,Hi,
For batch class the class type value is '023' . This you can find from KLAH table and the fileld for class type is KLART..
And also all the data related to batch class are found in tables INOB, KLAH,KKSK and for the characeteristics of batch materials you can refer AUSP table.
In INOB table, for batch class, you need to give 023 in KLART field and value MCH1 in OBTAB filed.
Please check this and let me know if this you need any more details? -
How to get ATINN value based on material number and Class Type ?
I have below SELECT stmt code which gives the correct value of atwrt based on materil no and ATINN.
However in quality system, it is failing because in quality system "atinn" value is not 0000000381. It is different.
So how can I get ATINN(Internal characteristic) value based on material number and Class Type?
-Obtain the batch characterstic value for the Material******************
SELECT atwrt
UP TO 1 ROWS
INTO v_charvalue
FROM ausp
WHERE objek = mcha-matnr
AND atinn = '0000000381' " 'US80_FRENCH_ON_LABEL'
AND klart = '001'.
THANKS N ADVANCE.Hi SAm,
use the Below function module to get the Atinn for Atwrt for thr Class and MAterial combination..
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
classtype = '023' "Class type
object = w_object "Material number with Leading zeros
no_value_descript = 'X' "Default X
objecttable = 'MCH1' "Table name Mara or MCH1 or MARC
TABLES
t_class = t_class "It return the Batch class available for the above combination
t_objectdata = t_char "Return Batch characteristics(ATWRT) and their value ATINN in this table
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4.
Regards,
Prabhudas -
Material type and Valuation class SPRO
Hi All,
How to see the the config spro for materila type and valution clss and GL accounts path in SAP
Please let us know SPRO path for the same.
Thanks
ChinnaMATERIAL TYPE : SPRO-Logistics General-Material Master-Basic Settings-Material Types : OMS2
VALUATION CLASS: SPRO-Materials Management-Valuation and Account Assignment-Account Determination-Account Determination Without Wizard- Define Valuation Classes : OMSK
VALUATION CLASS GL ACCOUNT : SPRO-Materials Management-Valuation and Account Assignment-Account Determination-Account Determination Without Wizard-Configure Automatic Postings : OBYC
Maybe you are looking for
-
I have two devices (Iphone and Ipad) on the same Apple ID. When I go to Icloud and click at the "find Iphone" I see only one of my devices. How can I do to see both of them?
-
[solved] Conky docking problem.
Sorry for my poor English. I hope you can understand what I say. I want to make my conky stay at bottom like a panel. So I try this in my .conkyrc: own_window yes own_window_transparent no own_window_type dock alignment bottom_middle But the problem
-
Has anyone had issues with the new Mac Pro computers and the Adobe Application Manager?
We just purchased a new Mac Pro and transferred everything from the old computer to the new one. Now we are getting Adobe Application Manager errors and it wants us to download Application Manager. That leads us to the Adobe Installer that encounte
-
ok, i'm gettng a new 120 GB HD for my ibook G4, and i want to dual boot 10.3.9 and Yellow Dog Linux, well, on the yellow dog site, it says u have to reformat the HD (no prob since its blank anyway) and they reinstall MAC OS, well, i made a clone of m
-
Keep getting a weird error message in AE CS4
I keep getting this error message concerning a few of the files in my Project bin: I get this message multiple times when I open this particular project and repeatedly click "OK" until the project finishes opening up. The result is missing files. W