Serialize - How ?

Hello,
As we all aware that to serialize a object, we need to implement java.io.Serializable interface.
My question is how to serialize a String object in my current program (declared as variable) as String itself is a OBJECT in java.

The String class implements the Serializable interface.

Similar Messages

  • Printing after serialization: How can I print the new SFCs?

    When I hook my printing acticity to site level hook POST_SERIALIZE I will get the .pas file for Loftware but that file does not contain the new SFCs but the parent SFC that is already invalid. Is there something I need to do to get the new SFCs to .pas file (or ADS printing)? Those SFCs are the interesting ones not the parent...
    We are working with 6.0.3.0

    Hi Petri,
    This seems to be the original design of printing at POST_SERIALIZE hook point. And the solution you found is the one that is used by other customers.
    Regards,
    Sergiy

  • Overriding pof serialization in subclasses?

    When subclassing a class that support POF-serialization how would I know what property index I can pass in for the additional elements that are added by the subclass assuming that I do not have the source code of the superclass (or the information exists in the javadoc of the superclass)?
    Is it for instance possible to read the last property index used from the stream (PofWriter) somehow?
    I tried to find anything in the PofContext and PofWriter interface but did not see anything that looked relevant...
    Examples of situations were this would apply is for instance when creating a custom filter using a Coherence built in filter as base-class.
    Or am I missing something obvious about how to handle subclassing and POF-serialization that makes this a non-issue?
    Best Regards
    Magnus

    MagnusE wrote:
    Thanks for the VERY quick answer Robert - I hardly posted before you answered :-)
    I think it sounds a bit fragile to rely on documntation for this (on the other hand most cases of extending classes you don't have the source to are more or less fragile!).
    Since it does not sound to complicated to provide a method that return the highest property index used so far from the stream (or is there some inherent problem with that solution?) I would prefer that solution over simply documenting it.
    Hi Magnus,
    On the contrary.
    IMHO, documentation of the first property index a subclass may use is the only correct way to do this.
    This is because it is perfectly valid to encode null values by not writing anything to the PofWriter. Therefore it is possible that the property index that was last written is not the one the greatest one which can ever be used, in which case you can't just continue from the value following the one that was last written, as that depends on the superclass state and therefore it is not constant, even though the mapping of property indexes to attributes must not depend on state. At least the intent of the specification and the direction of ongoing development is that the mapping is constant and dependencies will most probably be introduced on this in upcoming versions (sorry, can't tell anything more specific about this, yet).
    As for also providing the method which returns this CONSTANT value, that can also be requested, but the last written property index is not a good candidate for your purposes.
    For Evolvable implementors, this is even trickier, as all properties from later versions most follow all properties from earlier versions, otherwise they wouldn't end up in the remainder and therefore Evolvable can't function as it should. This also means that all properties of all subclasses from later implementation versions must have larger property indexes than all properties from preceeding implementation versions.
    Therefore for Evolvable implementors, the first property index a subclass may use for each implementation version must be documented separately.
    Actually, this also poses a theoretical problem, as this also means that the superclass must contain information derived from all subclasses, which is impossible to do correctly when the subclass is from another vendor and not from the superclass vendor. The superclass vendor may allocate a large gap for subclass properties, but when another attribute is added to a later version of the superclass, it is theoretically possible that the gap is not enough.
    Best regards,
    Robert

  • Why does serializable interface has no methods inside it

    Aloha
    Can anyone please help me with this....Serializable interface has no methods inside it.So how is it useful to the user.Also if I am writing a class which implements Serializable how does JVM know what to do.?

    JoachimSauer wrote:
    dannyyates wrote:
    [The JVM] doesn't know about serialisation [...]Sorry for the nitpick, but that's not completely true. The JVM needs to know about serialisation at least at little bitNo.
    since Serialization creates new objects without the code from the constructrs ever being run. ObjectInputStream loads the classes just like any other code would, although it's obviously reading the serialized stream to get that information... and then calls newInstance() on ObjectStreamClass.
    And ObjectStreamClass uses reflection to get a constructor (via java.lang.Class getDeclaredConstructor ) and then uses said java.lang.reflect.Constructor to create a new instance via newInstance()
    There is no JVM magic. It is all Java code. (With the exception of what java.lang.reflect.Constructor does because at the point it dives into sun packages but you could do the same by calling java.lang.reflect.Constructor)

  • Simple Serializable demo with problems

    Hello!
    I am having a very simple demo where I tried to see how the Serializable interface works. However, I am receiving message NotSerializableException. What's wrong?
    Thanks in advance!
    Kind regards,
    Igor
    Here's the demo:
    import java.io.*;
    public class SerializationDemo {
      private class Data implements Serializable {
        String someString = "This is a string";
        double someDouble = 1;
      public SerializationDemo() {
        try {
          FileOutputStream fos = new FileOutputStream("dataObjectSerialized");
          ObjectOutputStream oos = new ObjectOutputStream(fos);
          oos.writeObject(new Data());
          fos.close();
        catch (Exception e) {
          System.out.println(e.toString());
      static public void main(String args[]) {
        SerializationDemo demo = new SerializationDemo(); 
    };

    Consider the following code. What do you expect Child.foo() to print? Why? Supposing you made it serializable, how would you expect it to behave when deserialized?
    public class Illustration {
       public Illustration(int x) {
          this.x = x;
          this.c = new Child();
       public void foo() {
          c.foo();
       private Child c;
       private int x;
       private class Child {
          public Child() {
          public void foo() {
             System.out.println(x);
       public static void main(String[] argv) {
          Illustration i = new Illustration(42);
          i.foo();
    }In case that's not clear, here's a quick illustration:
    public class Illustration {
       public class Child { ... }
    +--------------+
    | Illustration |
    |              |
    |  +-----+     |
    |  |Child|     |
    |  +-----+     |
    |              |
    +--------------+
    public class Illustration {
       public static class Child { ... }
    +--------------+
    | Illustration |    +-----+
    |              |--->|Child|
    |              |    +-----+
    |              |
    |              |
    |              |
    +--------------+Because Child is not declared static, it has full access to all of the fields of Illustration. Therefore if you serialize it in order to work after deserialization as it did before, it must have copies of all of the owning class's fields.
    When you declare it static you break this relationship and it becomes independent.
    So taking your following question:
    Why is this so? Does this mean that the following two statements would produce completely identical results, providing that SerializationDemo class was made Serializable:
    oos.writeObject(new Data());
    oos.writeObject(this);No, not quite - the first form creates a new Data object, serializes that, then (of necessity) serializes the owning class as well.
    The second form just serializes the current class - since it doesn't have an associated Data object, nothing else gets serialized.
    To achieve the effect you want, either make your Data class static, or declare it in its own file (which is roughly the same thing).
    Dave.

  • XI Sequencing: File Receiver adapter

    Hi All,
    I am in a IDOC to file scenario.
    Requirement is to process the IDOCS in the same sequence as they were created in SAP.
    E.g: if IDOC 1001 (created at 12:00:01 hours) and 1005 (created at 12:00:06) were created in SAP, then they should create the files in XI in the sequence File 1001 and then create file 1005.
    Currently both IDOCS came to XI almost at same time and somehow XI processed 1005 before 1001.
    Is there a way on the File adapter on receiver side how to achieve file sequencing for above issue.
    Regards
    Shirin

    Hi Shrin,
    As per my knowledge, IDOC sequence must be strictly maintained at sender side.
    Irrespective of the configuration you set in XI like maintain order runtime or serialization, how does it guarantee you that IDOC is been sent in sequence.
    Also note that IDOCS are processed via TRFC and not QRFC.  Moreover, can i know the reason or background of this requirement.
    I have never come across such a requirement except for in BPM where we collect all IDOCS and bundle it.
    OR you are just trying some prototype

  • Objects returned via JNDI Lookup

    All,
    I have had this nagging question in my head about JNDI lookups for some time
    now, but haven't had the time to do the proper research. The question is
    simple.
    The setup is simple as well. Suppose that we have a typical WLS setup, with
    WLS running in a JVM on a server host somewhere, with objects bound to its
    JNDI tree (we'll leave clustering out of the picture for simplicity's sake),
    and we also have a WLS client Java application. The client connects to WLS
    and performs various JNDI lookups on the server. Some of these objects
    implement java.io.Serializable, some do not.
    The question is, if the client uses JNDI to lookup an object that exsts in a
    separate JVM, and that object does not implement Serializable, how does this
    object come to be instantiated on the client?
    This leads to a second question: What exactly is getting returned from a
    JNDI lookup? A reference to an object or a copy of it? I can see that
    lookups within a single JVM would return a reference, but the cross-JVM
    lookup is less clear to me.
    Any and all help appreciated,
    -jc

    This leads to a second question: What exactly is getting returned from a
    JNDI lookup?From how I understand it, only Serializable objects are returned such as RMI
    stubs, which serve as proxies to EJB or other RMI servers registered in JNDI.
    - Thomas
    (ex-BONY too)
    Jonathan Castellani wrote:
    All,
    I have had this nagging question in my head about JNDI lookups for some time
    now, but haven't had the time to do the proper research. The question is
    simple.
    The setup is simple as well. Suppose that we have a typical WLS setup, with
    WLS running in a JVM on a server host somewhere, with objects bound to its
    JNDI tree (we'll leave clustering out of the picture for simplicity's sake),
    and we also have a WLS client Java application. The client connects to WLS
    and performs various JNDI lookups on the server. Some of these objects
    implement java.io.Serializable, some do not.
    The question is, if the client uses JNDI to lookup an object that exsts in a
    separate JVM, and that object does not implement Serializable, how does this
    object come to be instantiated on the client?
    This leads to a second question: What exactly is getting returned from a
    JNDI lookup? A reference to an object or a copy of it? I can see that
    lookups within a single JVM would return a reference, but the cross-JVM
    lookup is less clear to me.
    Any and all help appreciated,
    -jc

  • Nested namespace definition is removed on insert into DB

    I have an XML document that is like this (drastically simplified):
    <stuff:Foo xmlns:stuff="http://blah.com/stuff/">
    <stuff:AnElement>Some data</stuff:AnElement>
    <stuff:OtherThings>
    <stuff:SpecialElement xmlns:stuff="http://blah.com/stuff/">
    <stuff:Foo>a string</stuff:Foo>
    <stuff:Bar>a different string.</struff:Bar>
    </stuff:SpecialElement>
    </stuff:OtherThings>
    </stuff:Foo>
    When this document is inserted into the database, the xmlns:stuff namespace definition is removed from the SpecialElement node. I am guessing that it is removed because it was deemed redundant since it is re-defining the "stuff" prefix to the same value it already had.
    The problem is that the namespace string is important for another part of the application. Is there a way to prevent Berkley DB XML from removing it?

    Hello,
    The getDocument() API returns the XmlDocument object unparsed from the container so you get exactly what you inserted. When you query you are no longer getting the document itself (unless your query asks for it) but instead result nodes from within that document. The default serialization of those nodes behaves as I mentioned earlier -- it strips out unnecessary namespace decls. This is a function of the default serialization which has no special configuration to keep the namespaces.
    In your application you can use XmlValue.asEventReader() to get an XmlEventReader interface to your results to serialize how you'd like. That's why that interface exists.
    Regards,
    George

  • Creating  web service

    hi all,
    i am using jdev10.13 to create a web service,
    1st i create a java class
    public class webService{
    public webService(){}
    public int getId(){
    return 10;
    public Subscriber getSubscriber(){
    return new Subscriber();
    where Subscriber object is
    public class Subscriber{
    private String name;
    private int msisdn;
    public String getName(){
    return name;
    public int getMsisdn(){
    return msisdn;
    when i start creating the web service, i could not publish the getSubscriber method because it was disabled and the reaon thet there is no serializable
    how can i publish a method that return an object

    The rules for serialization are described in the JAX-RPC specification, in section 5.4.2 - Java Serialization Semantics.
    Each non-public, non-transient field must exactly represent a JavaBeans property, and
    vice versa.
    See also the following description in section 5.4:
    Java class for a JAX-RPC value type may be designed as a JavaBeans class. In this
    case, the bean properties (as defined by the JavaBeans introspection) are required to
    follow the JavaBeans design pattern of setter and getter methods.
    In your case, you need to add 2 setter methods: setName and setMsisdn.
    Eric

  • Access the object array from client.

    I'm trying to access the object array from client.
    it's throwing the following error,
    RemoteException Ocuredjava.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.MarshalException: CORBA BAD_PARAM 0x4f4d0006 Maybe; nested exception is:
         java.io.NotSerializableException: oracle.jdbc.driver.OracleResultSetImpl is not serializable
    how to resolve it?
    thanx in advance,
    Ilam.

    Don't send a ResultSet back as the result of an RMI call. Extract the data from the ResultSet on the server and send that back instead.

  • American Java Idol

    I'm basically looking for opinions on this code, suggestions, ideas, or down right bashing. Be my Simon Cowell. It needs a method to parse from a string, but I can deal with that later. I made a Version class that is simple to use by any application (or so I think). I know I could use enums and varargs if I kept this approach...what do you think?
    public class Version implements Comparable<Version>, java.io.Serializable {
      private static final long serialVersionUID = -3820214876542357769L;
      public static final int MAJOR_VERSION = 0;
      public static final int MINOR_VERSION = 1;
      public static final int RELEASE_VERSION = 2;
      public static final int QUANTIFIER_TYPE = 3;
      public static final int QUANTIFIER_VERSION = 4;
      public static final int BUILD = 5;
      public static final int QUANTIFIER_TYPE_ALPHA = 0;
      public static final int QUANTIFIER_TYPE_BETA = 1;
      public static final int QUANTIFIER_TYPE_GAMMA = 2;
      public static final int QUANTIFIER_TYPE_RELEASE_CANDIDATE = 3;
      public static final String[] QUANTIFIER_TYPE_STRINGS = {"a", "b", "g", "rc"};
      private int[] version = new int[]{Integer.MIN_VALUE,Integer.MIN_VALUE,Integer.MIN_VALUE,
                                                 Integer.MIN_VALUE,Integer.MIN_VALUE,Integer.MIN_VALUE};
      transient private StringBuffer versionString = new StringBuffer();
      public Version() {}
      public Version(int major, int minor) {
        version[MAJOR_VERSION] = major;
        version[MINOR_VERSION] = minor;
      public Version(int major, int minor, int release) {
        version[MAJOR_VERSION] = major;
        version[MINOR_VERSION] = minor;
        version[RELEASE_VERSION] = release;
      public Version(int major, int minor, int release, int quantifierType, int quanitifier) {
        version[MAJOR_VERSION] = major;
        version[MINOR_VERSION] = minor;
        version[RELEASE_VERSION] = release;
        version[QUANTIFIER_TYPE] = quantifierType;
        version[QUANTIFIER_VERSION] = quanitifier;
      public Version(int major, int minor, int release, int quantifierType, int quanitifier, int build) {
        version[MAJOR_VERSION] = major;
        version[MINOR_VERSION] = minor;
        version[RELEASE_VERSION] = release;
        version[QUANTIFIER_TYPE] = quantifierType;
        version[QUANTIFIER_VERSION] = quanitifier;
        version[BUILD] = build;
      public Version(int major, int minor, int release, int build) {
        version[MAJOR_VERSION] = major;
        version[MINOR_VERSION] = minor;
        version[RELEASE_VERSION] = release;
        version[BUILD] = build;
      public void setVersion(int scheme, int value) {
        versionString.setLength(0); //reset string
        version[scheme] = value;
      public int compareTo(Version v) {
          int temp;
          for (int i = 0; i < version.length; i++) {
            temp = version[i] - v.version;
    if (temp != 0)return temp;
    return 0;
    public String toString() {
    if (versionString.length() != 0)return versionString.toString();
    boolean started = false;
    if (version[MAJOR_VERSION] != Integer.MIN_VALUE) {
    started = true;
    versionString.append(version[MAJOR_VERSION]);
    if (version[MINOR_VERSION] != Integer.MIN_VALUE) {
    if (started) versionString.append('.');
    started = true;
    versionString.append(version[MINOR_VERSION]);
    if (version[RELEASE_VERSION] != Integer.MIN_VALUE) {
    if (started) versionString.append('.');
    started = true;
    versionString.append(version[RELEASE_VERSION]);
    if (version[QUANTIFIER_TYPE] != Integer.MIN_VALUE && version[QUANTIFIER_VERSION] != Integer.MIN_VALUE) {
    versionString.append(QUANTIFIER_TYPE_STRINGS[version[QUANTIFIER_TYPE]]);
    versionString.append(version[QUANTIFIER_VERSION]);
    if (version[BUILD] != Integer.MIN_VALUE) {
    versionString.append(" Build ");
    versionString.append(version[BUILD]);
    return versionString.toString();
    public static void main(String[] args) {
    System.out.println(new Version(1,2,3));
    System.out.println(new Version(1,2,3,QUANTIFIER_TYPE_BETA,1));
    System.out.println(new Version(1,2,3,QUANTIFIER_TYPE_RELEASE_CANDIDATE,2));
    System.out.println(new Version(1,2,3,353));

    The class and methods need comments.
    Agreed
    For initialization you can use a single constructor
    to do the work rather than repeating it in every
    ctor. The other ctors just call that one (passing in
    undef values for fields not defined.)
    Nice idea, but from a users standpoint, would you
    want to use a constructor that just has 2 fields when
    you just have major and minor version, or make
    everyone pass in all fields?
    I didn't say use one. I said one has all of the code and the others call it.
    >
    You might consider accessors for each of the sub
    parts - like a getMajor(), etc. Otherwise someone
    will probably end up parsing the string value.
    Good idea. I might feel obligated to make setter
    methods as well. Part of me wants to make this
    atomic and eliminate the set method.
    That of course depends on usage. But I wouldn't expect that a valid use case would exist for updating them individually.
    You might also consider padding in the toString()
    method so instead of "1.2.3" it becomes
    "001.002.003".
    I thought about that, I wasn't really sure how I
    could incorperate that. One of the ideas was to make
    it store a small amount of data and not have a lot of
    overhead when using Serialization. Actually I was
    thinking of having the Version class, and also having
    a VersionFormatter for going to and from Strings.
    Maybe this would be the appropriate place for
    it.
    In terms of serialization how would you expect to have - 3 or 3 million?
    Note as well that you can add additional control to serialization, which would preclude the string from being serialized.
    >
    >>
    Normally you would probably want a build number, not
    just major, minor, release. At least if this relates
    to software that would be the case.
    Build number is in there, after the
    quantifier.
    In the same way I am not sure that I getQUANTIFIER.
    Again in terms of software a release candidatewould
    often just be an earlier build than the final
    release. That depends on what the usage of thisis.
    The idea of quantifier is for pre-releases, like
    RC, Alpha, Beta, and Gamma. I did some research at
    one point, and these were the most common 'non
    numeric' parts of versions (Gamma is pretty rare, but
    I found it somewhere). I wasn't sure how to
    incorperate this into a system of numbers, so this is
    the approach I used with a number to represent the
    quantifier. Maybe using Enums will make this easier
    to look at and understand.
    I'm not even sure that my terminology is right for
    some of this, like Quantifier and scheme.
    Anyway, thanks for the suggestions, always open to
    more.
    Yes but those are labels - like that you put on a web page. But again that depends on the usage.

  • How to Serialize a JPanel which is inside a JApplet

    Hi..
    I have a JApplet where i have a JPanel which contains some JLabels and JTextFields,now i have to Serialize that full Panel so that i can retrived it later on with the labels and textfields placed in the same order,for that i tried serializing the full panel on to a file but it is giving me NotSerializeException,i dont know how to tackel it..
    public SaveTemplate(JPanel com) {
    try {
    ObjectOutputStream os=new ObjectOutputStream(new FileOutputStream("Temp1.temp"));
    os.writeObject(com);
    catch(Exception e) {
    e.printStackTrace();
    This is the code..plz help me with that..

    Actually its forming a Template which client will generate and that has to saved on the serverside..So what i thought that once when the client has designed a template,i can save the full template which is a panel into a file and later on when he want to open the template i just have to read the file and create an object of JPanel and add to the frame,so i dont need to apply much effort for that...But now serialization in Applet is giving problem.

  • How to make serializable object in webdynpro?

    Hi
    I have written the following code... when i am executing i am getting the following error..........
    <b>javax.xml.rpc.soap.SOAPFaultException: Deserialisation failed</b>
    I think is it becoz of data... how to make it serializable
         Request_Z_BAPI_CUSTOMER_CHANGE_WS_customerChangeFromData customer = new Request_Z_BAPI_CUSTOMER_CHANGE_WS_customerChangeFromData();
         ComplexType_CustomerChangeFromData complexType = new ComplexType_CustomerChangeFromData();
         ComplexType_Bapikna101 bapi = new ComplexType_Bapikna101();
         Bapikna101 bapi1 = new Bapikna101();
         bapi1.setCity("RIYAD");
         bapi1.setCountraiso("SA");
         bapi1.setCountrniso("SA");
         bapi1.setCountry("SA");
         bapi1.setCountryiso("SA");
         bapi1.setFaxNumber("12345678");
         bapi1.setFirstName("First Name");
         bapi1.setInternet("[email protected]");
         bapi1.setDateBirth("12.12.2006");
         bapi1.setLanguIso("EN");
         bapi1.setName("Name");
         bapi1.setName3("Name 3");
         bapi1.setName4("Name 4");
         bapi1.setRegion("GB");
         bapi1.setFormOfAd("Address");
         bapi1.setStreet("Street");
         bapi1.setPostlCode("12345");
         bapi1.setLangu("X");
         bapi1.setTelephone("12345678");
         bapi1.setTelephone2("12345678");
         bapi1.setCurrency("INR");
         bapi1.setCurrencyIso("INR");
         bapi1.setOnlyChangeComaddress("X");
         complexType.setCustomerNo("0000040009");
         complexType.setPiDistrChan("01");
         complexType.setPiDivision("01");
         complexType.setPiSalesorg("QNIN");
         customer._setUser("abap");
        customer._setPassword("quinnox");
         CustomerChangeFromData data = new CustomerChangeFromData();
         data.setPiAddress(bapi1);
         //bapi.setOriginalBean(bapi1);
         complexType.setOriginalBean(data);
         wdComponentAPI.getMessageManager().reportSuccess(" "+complexType.getOriginalBean().getCustomerNo());
         wdComponentAPI.getMessageManager().reportSuccess(" "+complexType.getPiAddress());
         wdContext.nodeRequest_Z_Bapi_Customer_Change().bind(customer);
         complexType.setPiAddress(bapi);
         wdComponentAPI.getMessageManager().reportSuccess(" "+data.getPiAddress().getCity());
         customer.setParameters(complexType);
    help me
    Best Regards
    Ravi Shankar B

    Hi ashuthosh,
      What is the structure of your import and Export parameters of your RFC.
    There are 2 ways to acheive it.
    In the RFC either
    1. Use a Table parameter
    2. Use a Export Structure
    If you use a Table parameter in your RFC then in your webdynpro when you import your adaptive RFC model you would get the Table as a class.
    Assume your RFC/BAPI is called "Bapi_RFC_Insert"
    write the code
    Bapi_RFC_Insert in = new Bapi_RFC_Insert();
    wdContext.nodeBAPI_RFC_Insert_InputElement().bind(in);
    <TableName> <someName> = new <TableName>
    <someName>.setTabValue1();
    <someName>.setTabValue2();
    in.add<>(<someName>);
    This should pass values as a batch.
    You can also do this using Export parameters. But a table is much better.
    Let me know if you require more information.
    regards
    ravi

  • How to create a SOAP body based on a Serializable Object?

    Hello,
    I have a serializable object such as this one
            HeaderSection header = new HeaderSection();
            RequestName requestName = new RequestName();
            requestName.setActivityName("this is an activity");
            NNSVMessage nnsvMessage = new NNSVMessage();
            nnsvMessage.setHeaderSection(header);
            nnsvMessage.setRequestSection(request);
            nnsvMessage.setResponseSection(response);I create a SOAP message using SAAJ API
            SOAPMessage message = messageFactory.createMessage();
            SOAPPart soapPart = message.getSOAPPart();
            SOAPEnvelope envelope = soapPart.getEnvelope();
            SOAPBody body = envelope.getBody();
    ...How can I stuff this object into the SOAP body?
    Thanks,
    Mustafa

    Hi Saleem,
    Herewith an example:
            Dim oDoc As SAPbobsCOM.Documents
            oDoc = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
            oDoc.CardCode = "530010"
            oDoc.DocDate = Date.Now
            oDoc.DocDueDate = Date.Now
            oDoc.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service
            oDoc.Lines.ItemDescription = "Line 1"
            oDoc.Lines.Price = 100
            oDoc.Lines.VatGroup = "O1"
            oDoc.Lines.AccountCode = "0000090000"
            oDoc.Lines.Add()
            oDoc.Lines.ItemDescription = "Line 2"
            oDoc.Lines.Price = 200
            oDoc.Lines.VatGroup = "O1"
            oDoc.Lines.AccountCode = "0000090201"
            If oDoc.Add <> 0 Then
                MessageBox.Show(oCompany.GetLastErrorDescription)
            Else
                MessageBox.Show("Added")
            End If
    Hope it helps,
    Adele

  • How to serialize the IDoc of DEBMAS by time sequence?

    Hi experts,
    We want to transfer customer master data from one client to the other.
    We have carried out the serialization distribution for message type DEBMAS
    and actived the change point.
    Scenario:
    time 1 : We created one "NEW" customer 100436.
    time 2 : We assigned the Head Office of "existed" customer100435 as 100436
    The time of the distribution job was arrived,
    the job started to run and failed to change "existed" customer 100435
    even though "NEW" customer 100436 has created sucessfully.
    We think the IDoc should be processed by time sequence,
    but it seems not.
    Did you think it is processed by customer key ascendence ?
    How do we define the process sequence of the IDoc?
    Any advice will be appreciated.
    Regards,

    But what if i want to check the format of date that my
    database supports ?
    Actually situation is :
    I am making a form designer by which user will inset
    date to a particular column. okay.
    now the format of date must match with the underlying
    format of database. Then only query will be
    successfull. Is it not so.?No.
    Basically you will be doing the following:
    Browser -> java.util.Date
    java.util.Date -> JDBC -> database
    JDBC does the 'conversion' work for you, you just need to put it in the java.util.Date.
    suppose database table-> column's format is
    YYYY/DD/MM Databases don't store dates like that. They usually (probably always) store it as a signed integer value which is relative to a specific date/time.
    When you use a database tool to look at the value the database tool converts it from the number to a format that looks familar to you.
    and user enters date in the format
    DD/MM/YYYY, then i will have show an error message to
    the user that the format of date that he has entered
    is wrong. No need for that.
    The user does need to put the date in in a form that you understand. So you can convert it to a java.util.Date.
    java.text.SimpleDateFormat can help with that.

Maybe you are looking for

  • BSP SURVEY integrated in EP7 update problem

    Hi all, I need your kind help. I have created a survey via survey suite tool and generated an URL using BSP send and get option. I then created an iView which points on this URL survey. When I access to the survey on the portal, I can access to the s

  • GIF and sticky page size

    I have scanned (from HP N6310) a paper to a .TIF image. Original is A4 and resolution, as set in scanning software 300dpi. Photoshop (CS5) reports (for the .TIF fiile) pixel dimension as 2574*3540 pixels, page size as 21.8 * 29.9 cm and resolution as

  • Actual Price of Invoice

    Hi all, I have a requirement were i need the actual price. This actual price is the final price paid to the supplier as per the invoice. Actual Price will be calculated per material and line item. The calculation will be based on the line item amount

  • Mac Pro 2006 - Adding Wireless card

    Hi everyone I have a 2006 Mac Pro running Mac OSX 10.6 Snow Leopard. Back when I ordered the system, I chose Bluetooth but not WiFi Now I'm trying to add wireless to my Mac Pro, what are my options? Where can I find a wireless for my Mac Pro? Thank y

  • Form builder saves no settings

    Hello, I just installed Form-Builder 6i. Whenever I start it I get the welcomescreen. Even if I say don't show next time it will show again. Also the recently used files don't show up in the file-menue as in 6.0. Is this normal behaviour? Thanks Marc