Explicity mapping between ActionScript and Java objects for the BlazeDS Messaging Service

The BlazeDS documentation shows how to explicitly map between ActionScript and Java objects. For example, this works fine for RPC services, e.g.
import flash.utils.IExternalizable;
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
[Bindable]
[RemoteClass(alias="javaclass.User")]
public class User implements IExternalizable {
        public var id : String;
        public var secret : String;
        public function User() {
        public function readExternal(input : IDataInput) : void {
                id = input.readObject() as String;
        public function writeExternal(output : IDataOutput) : void {
                output.writeObject(id);
and
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
public class User implements Externalizable {
    protected String id;
    protected String secret;
    public String getId() {
        return id;
    public void setId(String id) {
        this.id = id;
    public String getSecret() {
        return secret;
    public void setSecret(String secret) {
        this.secret = secret;
    public void readExternal(ObjectInput in) throws IOException,
                ClassNotFoundException {
        id = (String) in.readObject();
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeObject(id);
If I called an RPC service that returns a User, the secret is not sent over the wire.  Is it also possible to do this for the messaging service? That is, if I create a custom messaging adapter and use the function below, can I also prevent secret from being sent?
MessageBroker messageBroker = MessageBroker.getMessageBroker(null);
AsyncMessage message = new AsyncMessage();
message.setDestination("MyMessagingService");
message.setClientId(UUIDUtils.createUUID());
message.setMessageId(UUIDUtils.createUUID());
User user = new User();
user.setId("id");
user.setSecret("secret");
message.setBody(user);
messageBroker.routeMessageToService(message, null);

Hi Martin. The way that AMF serialization/deserialization works for BlazeDS is the same regardless of which service is being used, so yes that code will work for messaging as well. On the server, the serialization/deserialization of messages happens at the endpoint. For an incoming message for example, the endpoint deserializes the message and then hands it off to the MessageBroker which decides which service/destination to deliver the message to.
That was a good question. Thanks for asking it. Lots of people are used to doing custom serialization/deserialization with the RPC services (RemoteObject/RemotingService) but I'm not sure everyone realizes they can do this for messaging as well.
-Alex

Similar Messages

  • Mapping between ABAP and Java IPC structure

    Hi all:
            Somebody know how translate the following abap structure to java:
    KOMK-KDUMMY = 'X'
    KOMP-PSTYV = 'ZTAD'
    KOMK-ZZNTGEW
    Help me please!!!

    David,
    Open KOMK in se11 / data type and check the meaning.
    Its a header bridge structure between pricing and other application.
    You can find meaning of structure attributes there.
    Only the names are different but meaning of them remains the same in CRM.
    Nikhil Alulkar

  • Connectivity between ABAP and Java Stacks for BI

    Dear all,
    our BI developer have to use BW Analyser for showing and changing of BW reports in Java based NetWeaver Portal.
    Initially just ABAP stack (SID DCE) was installed. In Februar 2014 I installed also an Java Stack (SID JCE) and got dokumentation for
    connection to ABAP Stack from SAP Support, it is attached. Further help from SAP Support is not possible, they mean that this
    case belong to consultion issues.
    Follow activities were sucessfully done:
    1. RFC connection DMSAPERP4DEV_PORTAL_JCE was created in J2EE engine
    2. RFC connection DMSAPERP4DEV_PORTAL_JCE was created for Portal
    3. Portal Server Settings were maintained for portal
    4. Singe Sign-In in BI was maintained
    5. BI Certificate was imported from BI
    6. Portal Certificae was exported from Portal
    7. Portal Certificate was imported into BI.
    By processing of attached SAP guide it was a problem at step 7 "Create BI System in the Portal"with the
    creatig of BW system name. Under "System Administration -> System Configuration -> System Landscape"
    I found no systems which are maintained with the Portal Content Studio. I take a template "SAP_R3_Dedicated"
    but can not change the system name to "SAP_BW", it is still "Dedicated Application Server for R/3 System". All other
    properties was set fine.
    At step 8 of mentioned guide I face the next problem - there is no system names under "SAP Reference System"
    under "Administration -> System Configuration -> Configuration for User Management", because the system
    name on the step 7 could be not set correct, so I can not choose any.
    Please advice how to proceed here.
    Thank you and best regards
    Stan Oberberger
    Technical Consultant

    Hi,
    It clearly says the problem is with virtual memory. SO you need to change your virtual memory settings using configtool.
    See the relevant note.940893
    Make changes in the VM parameters for Bootstarp, Dispatched and the server nodes. Your -Xms should be less than equal to -Xmx.
    Restart the cluster then.
    It should work.
    Do reward good points.

  • What is(are) the difference(s) between iphoto and imovie apps for the imac as against ipad3?

    What is (are) the difference(s) between iphoto/imovie apps for the ipad as against imac?

    The Mac version would be more complex and be able to do more stuff, while the iPad version can do more simple things due to the lower processing power and the fact that it's an iPad.

  • How can I differentiate between iPad and iPhone iMessages for the same contact?

    I have my sister in law's email and phone number all in the same contact. She iMessages me from both her iPad and her phone. They come up as two different iMessage conversations, but they both are under her name. When I go to text her I don't know if I'm sending it to her iPhone or iPad. Anyone know if there's anyway to differentiate? Sometimes looking at what was previously said in the conversation helps but I can't always remember (nor do I know which device he was messaging me from in the previous convo). Thanks all

    Try scrolling to the top of the conversation and tapping Contact.  You will then see the originating address highlighted in blue on the contact.  If the iPad and iPhone are creating two different conversations, chances are if the email address is highlighted it's coming from the iPad; if the phone number is highlighted it's coming from the iPhone (although not necessarily).  To know for sure you would have to ask her to check Settings>Messages>Send & Receive and tell you which is checked under "Start new conversations from" on both devices to know for sure.

  • COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET: US$20 AWARD FOR SOLUTION!

    COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET PROBLEM (Easy Filter Java Applet) -
    US$20 TO ANYONE WHO CAN RESOLVE THE PROBLEM
    To forum visitors:
    I am prepared to pay a standard shareware fee of US$20 to a user who can resolve this technical problem.
    If your advice resolves the problem, I'll forward the payment to your postal address (include your
    address with your reply, and also your email address)
    I am attempting to enable a HTML button (using Javascript's onClick command) to directly input a number into one of the parameter text boxes in the Easy Filter Java applet (ie, enter a new color value number in the text field of the standard Colors Multiplicator Filter interface).
    The applet is Freeware and can be downloaded at: http://www.javazoom.net/applets/easyfilter10/EasyFilter10.html
    (It is a very effective bitmap display and editing utility)
    To achieve this, I am trying to access the part of the applet that defines and sets the textbox. The text box is defined in the .class file by accessing the parameter details in the genericfilter.txt file (accompanies the .class files). I need to access 'private String appletInitialize()' and then one of the 'textFieldParameters' which sets the textbox.
    I understand the basic syntax for referencing the applet:
    document.appletname.setString("An example"). However, accessing the text fields in this applet is more complex!!
    Please can you recommend the correct Javascript syntax to achieve communication with the applet.
    Thank you for your kind assistance.
    JM Graham
    [email protected]
    The Java source code for the applet: EasyFilter.class
    # Easy Filter - E.B/JavaZOOM 1999 #
    # Contact: [email protected] #
    # http://javazoom.hypermart.net #
    /* Originally compiled from EasyFilter.java */
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.applet.Applet;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.image.MemoryImageSource;
    import java.awt.image.PixelGrabber;
    import java.util.Vector;
    public synchronized class EasyFilter extends Applet implements KeyListener
    private String paramFileName;
    private Color bgColor;
    private Color fgColor;
    private Color parColor;
    private Color sepColor;
    private Color titleColor;
    private Color helpColor;
    private int WinWidth;
    private int WinHeight;
    private String title;
    private String logoFileName;
    private String originalImageFileName;
    private String filteredCaption;
    private String originalCaption;
    private Vector paramsName;
    private Vector paramsValue;
    private Vector paramsComment;
    private Panel panelParameters[];
    private Label labelParameters[];
    private TextField textFieldParameters[];
    private Label labelComments[];
    private int nbParameters;
    private ScrollPane scrollPaneParams;
    private Panel panelParams;
    private Image theLogo;
    private Image theOriginalImage;
    private Image theFilteredImage;
    private int theOriginalPixelArray[];
    private int logoWidth;
    private int logoHeight;
    private int imageWidth;
    private int imageHeight;
    private drawCanvas canvasTitle;
    private Panel panelTitle;
    private Label labelTitle;
    private Panel panelImages;
    private Panel panelOriginalImage;
    private drawCanvas canvasOriginalImage;
    private Label labelOriginalImage;
    private Panel panelFilteredImage;
    private drawCanvas canvasFilteredImage;
    private Label labelFilteredImage;
    private Panel panelHelp;
    private Label labelHelp;
    private int Yspc;
    private FilterImplementation theFilter;
    public void init()
    String string = null;
    string = appletInitialize();
    setBackground(bgColor);
    if (string != null)
    removeAll();
    setBackground(Color.white);
    setForeground(Color.black);
    Label label = new Label(new StringBuffer("Error: ").append(string).toString(), 1);
    Panel panel = new Panel();
    panel.add(label);
    add(panel);
    setLayout(new FlowLayout(1, 5, Yspc));
    public void keyPressed(KeyEvent keyEvent)
    panelHelp.removeAll();
    boolean flag = true;
    if (KeyEvent.getKeyText(keyEvent.getKeyCode()).equals("Enter"))
    for (int i = 0; i < nbParameters; )
    try
    paramsValue.setElementAt(new Double(textFieldParameters.getText()), i);
    i++;
    catch (NumberFormatException e)
    labelHelp.setText(labelParameters[i].getText() + ": Not a Number");
    flag = false;
    break;
    if (flag == 1)
    labelHelp.setText(" .... Running, please wait .... ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    theFilter.updateParameters(paramsValue);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    canvasFilteredImage.repaint();
    panelHelp.removeAll();
    labelHelp.setText("- Done -");
    else
    labelHelp.setText("- Press Enter to run the Filter -");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    public void keyReleased(KeyEvent keyEvent)
    public void keyTyped(KeyEvent keyEvent)
    private String appletInitialize()
    WinWidth = size().width;
    WinHeight = size().height;
    if (getParameter("bgcolor") == null)
    bgColor = new Color(0, 0, 40);
    else
    bgColor = new Color(Integer.parseInt(getParameter("bgcolor"), 16));
    if (getParameter("fgcolor") == null)
    fgColor = new Color(255, 255, 255);
    else
    fgColor = new Color(Integer.parseInt(getParameter("fgcolor"), 16));
    if (getParameter("sepcolor") == null)
    sepColor = new Color(158, 128, 128);
    else
    sepColor = new Color(Integer.parseInt(getParameter("sepcolor"), 16));
    if (getParameter("parcolor") == null)
    parColor = new Color(24, 24, 24);
    else
    parColor = new Color(Integer.parseInt(getParameter("parcolor"), 16));
    if (getParameter("titlecolor") == null)
    titleColor = new Color(255, 255, 0);
    else
    titleColor = new Color(Integer.parseInt(getParameter("titlecolor"), 16));
    if (getParameter("helpcolor") == null)
    helpColor = new Color(0, 255, 255);
    else
    helpColor = new Color(Integer.parseInt(getParameter("helpcolor"), 16));
    paramsName = new Vector();
    paramsValue = new Vector();
    paramsComment = new Vector();
    paramFileName = getParameter("paramfile");
    String string = readParams(paramFileName);
    if (string != null)
    return string;
    MediaTracker mediaTracker = new MediaTracker(this);
    theOriginalImage = getImage(getDocumentBase(), originalImageFileName);
    mediaTracker.addImage(theOriginalImage, 0);
    if (logoFileName != null)
    theLogo = getImage(getDocumentBase(), logoFileName);
    mediaTracker.addImage(theLogo, 1);
    try
    mediaTracker.waitForAll();
    catch (InterruptedException e1)
    return "Error while loading image";
    if (mediaTracker.isErrorAny())
    return "Error while loading image";
    if (logoFileName != null)
    logoWidth = theLogo.getWidth(this);
    logoHeight = theLogo.getHeight(this);
    imageWidth = theOriginalImage.getWidth(this);
    imageHeight = theOriginalImage.getHeight(this);
    theOriginalPixelArray = new int[imageWidth * imageHeight];
    PixelGrabber pixelGrabber = new PixelGrabber(theOriginalImage, 0, 0, imageWidth, imageHeight, theOriginalPixelArray, 0, imageWidth);
    try
    pixelGrabber.grabPixels();
    panelTitle = new Panel();
    canvasTitle = new drawCanvas();
    labelTitle = new Label();
    panelTitle.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelTitle);
    panelTitle.setBackground(bgColor);
    panelTitle.add(canvasTitle);
    canvasTitle.setImage(theLogo);
    canvasTitle.setBounds(0, 0, logoWidth, logoHeight);
    labelTitle.setText(title);
    catch (InterruptedException e2)
    return "Internal Error, Try RELOAD !";
    if (title != null)
    panelTitle.add(labelTitle);
    labelTitle.setForeground(titleColor);
    labelTitle.setFont(new Font("Dialog", 1, 14));
    panelImages = new Panel();
    panelOriginalImage = new Panel();
    canvasOriginalImage = new drawCanvas();
    labelOriginalImage = new Label();
    panelFilteredImage = new Panel();
    canvasFilteredImage = new drawCanvas();
    labelFilteredImage = new Label();
    panelImages.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelImages);
    panelImages.setBackground(bgColor);
    panelOriginalImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelOriginalImage);
    panelOriginalImage.setBackground(Color.black);
    panelOriginalImage.add("Center", canvasOriginalImage);
    canvasOriginalImage.setImage(theOriginalImage);
    canvasOriginalImage.setBounds(0, 0, imageWidth, imageHeight);
    labelOriginalImage.setText(originalCaption);
    labelOriginalImage.setAlignment(1);
    panelOriginalImage.add("South", labelOriginalImage);
    labelOriginalImage.setBackground(Color.lightGray);
    labelOriginalImage.setForeground(Color.black);
    labelOriginalImage.setFont(new Font("SansSerif", 0, 10));
    panelFilteredImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelFilteredImage);
    panelFilteredImage.setBackground(Color.black);
    panelFilteredImage.add("Center", canvasFilteredImage);
    theFilter = new FilterImplementation(paramsValue, theOriginalPixelArray, imageWidth, imageHeight);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    labelFilteredImage.setText(filteredCaption);
    labelFilteredImage.setAlignment(1);
    panelFilteredImage.add("South", labelFilteredImage);
    labelFilteredImage.setBackground(Color.lightGray);
    labelFilteredImage.setFont(new Font("SansSerif", 0, 10));
    scrollPaneParams = new ScrollPane(0);
    panelParams = new Panel();
    nbParameters = paramsName.size();
    int i = WinHeight - (33 + 7 * Yspc + logoHeight + imageHeight + 23);
    if (i < Yspc + 2 + 24)
    i = Yspc + 2 + 24;
    scrollPaneParams.setBounds(0, 0, WinWidth - 10, i);
    panelParams.setLayout(new GridLayout(nbParameters, 1, 5, Yspc / 2));
    scrollPaneParams.add(panelParams);
    panelParams.setBackground(sepColor);
    panelParameters = new Panel[nbParameters];
    labelParameters = new Label[nbParameters];
    textFieldParameters = new TextField[nbParameters];
    labelComments = new Label[nbParameters];
    for (int j = 0; j < nbParameters; j++)
    panelParameters[j] = new Panel();
    panelParameters[j].setLayout(new FlowLayout(0, 5, 1));
    panelParams.add(panelParameters[j]);
    panelParameters[j].setBackground(parColor);
    labelParameters[j] = new Label();
    labelParameters[j].setText((String)paramsName.elementAt(j));
    panelParameters[j].add(labelParameters[j]);
    labelParameters[j].setForeground(fgColor);
    labelParameters[j].setFont(new Font("Dialog", 1, 12));
    textFieldParameters[j] = new TextField(8);
    textFieldParameters[j].setText(paramsValue.elementAt(j).toString());
    panelParameters[j].add(textFieldParameters[j]);
    textFieldParameters[j].setBackground(fgColor);
    textFieldParameters[j].addKeyListener(this);
    labelComments[j] = new Label();
    labelComments[j].setText((String)paramsComment.elementAt(j));
    panelParameters[j].add(labelComments[j]);
    labelComments[j].setForeground(fgColor);
    add(scrollPaneParams);
    panelHelp = new Panel();
    labelHelp = new Label();
    panelHelp.setLayout(new FlowLayout(1, 5, 0));
    add(panelHelp);
    panelHelp.setBackground(bgColor);
    labelHelp.setText(" Change colour values and press enter ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    labelHelp.setForeground(helpColor);
    return null;
    private String readParams(String string1)
    Object object1;
    String string2;
    if (string1 == null)
    return "Filename of filter's parameters needed";
    try
    URL uRL = new URL(getDocumentBase(), string1);
    URLConnection uRLConnection = uRL.openConnection();
    uRLConnection.setDoInput(true);
    uRLConnection.setUseCaches(false);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
    string2 = null;
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    if (bufferedReader != null)
    Object object2;
    try
    for (object2 = bufferedReader.readLine(); object2 != null && string2 == null; object2 = bufferedReader.readLine())
    string2 = extractFormat(object2);
    catch ()
    string2 = object2.getMessage();
    finally
    bufferedReader.close();
    if (string2 != null)
    return string2;
    else
    return null;
    private String extractFormat(String string1)
    if (string1.length() == 0)
    return null;
    int i = 0;
    int j = string1.indexOf(" ", i);
    if (j == -1)
    return "Bad format error (space missing)";
    String string2 = string1.substring(i, j);
    if (string2.equals("TITLE"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    title = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    originalCaption = string1.substring(i, j);
    return null;
    if (string2.equals("FILTEREDCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    filteredCaption = string1.substring(i, j);
    return null;
    if (string2.equals("LOGO"))
    i = j + 1;
    j = string1.length();
    logoFileName = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALIMAGE"))
    i = j + 1;
    j = string1.length();
    originalImageFileName = string1.substring(i, j);
    return null;
    if (!string2.equals("PARAM"))
    return null;
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    paramsName.addElement(string1.substring(i, j));
    i = j + 2;
    j = string1.indexOf(32, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    try
    paramsValue.addElement(new Double(string1.substring(i, j)));
    j = string1.indexOf(34, i);
    catch (NumberFormatException e)
    return "Bad format in a PARAM line";
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    paramsComment.addElement(string1.substring(i, j));
    return null;
    public EasyFilter()
    logoHeight = 33;
    Yspc = 5;

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • Need Expert Advice regarding oracle and java objects

    In our project, we are submitting data for many screens at a time. Some screens will have a list of records to be submitted. There is also some hierarchy among the data up to 4 levels.
    In such a scenario, we need to know the best way to exchange data between Oracle and Java. Currently java holds the data as objects, where each object may contain an array of next level of objects in it.
    Is it best approach to pass the entire data with hierarchy to Oracle using nested table approach and internally oracle handling the data? Is there any other way to do this?
    Also in some scenarios we need to pass the entire information for all the screens in one shot with the hierarchy. So we need to know a solution for that also. Could you please help us in this regard?

    See Oracle JPublisher technique to map Oracle object types to Java ones:
    http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96658/toc.htm
    Rgds

  • Users mapping between EP and ABAP system

    Hello
    I'd like to ask for some guidance in my quest
    Current situation looks like this:
    I've configured UME in AS Java to work with LDAP as read only data source. Then I've configured SPNego to run SSO - It works, users from MS AD can log into portal.
    Now I have application in WD which authorizes via EP/AD - works fine.
    And next step is users mapping between AD and ABAP backend (serving some BAPI's for WD app)
    I've found a bunch of help pages starting from
    http://help.sap.com/saphelp_nwce711/helpdata/en/0b/d82c4142aef623e10000000a155106/frameset.htm
    But somehow it's quite complicated to achieve this mapping. I've tried to set RFC destinations logon type to user mapping but without succes.
    Can anyone point me to some more clear example or give path to configure this scenario? Is there a way of configuring this with NWA or some XML file editing is required?
    Any help will be appreciated.
    BTW: whole environment is in version 7.11
    Best regards
    Maciej

    There is no equivalent to SPNEGO on the ABAP side.
    If your goal is to propagate the user, then possible options are:
    -> Wait for SAML 2.0 or invest now in a SAML 1.0 provider.
    -> Use the same kerberos ticket for the EP as what your ABAP system will accept: route = SNC and 3rd party libraries.
    -> Issue SAP logon tickets for the ABAP system from the EP, and use these in your WDA.
    Another option is to expose the service with saved logon data in the ICF. If the service is just a wrapper for the BAPI, then you can also consider using trusted RFC between the service and the backend, but this might not be acceptable for your service.
    I have only done experimental stuff with this and some of the above is not released yet. Also consider the consequences, even if it "does work"...
    Cheers,
    Julius

  • Error during VM container communication between ABAP and JAVA

    Hello,
    While creation of SC, I am getting error "Error during VM container communication between ABAP and JAVA"
    Based on earlier responses in this forum, I checked following activity.
    1. T Code - BBP_CND_CHECK_CUST
    Result - IPC Pricing is Active and IPC is now running in VMC
    2. Run Report - RSVMCRT_HEALTH_CHECK
    Result - The Java component is deactivated
    3. As per OSS note 854170, Profile parameters were existed as below
    a) vmcj/enable - on
    b) vmcj/option/maxJavaHeap = 200M
    So, How to get Java component activated?
    Thanks,
    Rahul Mandale

    Thanks Markus,
    For SM53, I am getting resulets as " Java is not active on this application server - Message no. SVMCRT011"
    Can you suggest, what I need to do for it? I can't use SRM Shopping cart because of it. thanks in advance, Rahul
    and dev_w0 trace ....
    trc file: "dev_w0", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, MJ

    B Wed Aug 31 15:45:40 2011
    B  create_con (con_name=R/3)
    B  Loading DB library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' ...
    B  Library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' loaded
    B  Version of 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' is "700.08", patchlevel (0.46)
    B  New connection 0 created
    M sysno      04
    M sid        CUS
    M systemid   560 (PC with Windows NT)
    M relno      7000
    M patchlevel 0
    M patchno    52
    M intno      20050900
    M make:      multithreaded, Unicode, optimized
    M pid        456
    M
    M  kernel runs with dp version 210000(ext=109000) (@(#) DPLIB-INT-VERSION-210000-UC)
    M  length of sys_adm_ext is 572 bytes
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 456) [dpxxdisp.c   1293]
    I  MtxInit: 30000 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M  DpShMCreate: sizeof(wp_adm)          18304     (1408)
    M  DpShMCreate: sizeof(tm_adm)          3954072     (19672)
    M  DpShMCreate: sizeof(wp_ca_adm)          24000     (80)
    M  DpShMCreate: sizeof(appc_ca_adm)     8000     (80)
    M  DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
    M  DpShMCreate: sizeof(comm_adm)          528064     (1048)
    M  DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M  DpShMCreate: sizeof(file_adm)          0     (72)
    M  DpShMCreate: sizeof(vmc_adm)          0     (1452)
    M  DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    M  DpShMCreate: sizeof(gw_adm)     48
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 05C00040, size: 4613144)
    M  DpShMCreate: allocated sys_adm at 05C00040
    M  DpShMCreate: allocated wp_adm at 05C01E28
    M  DpShMCreate: allocated tm_adm_list at 05C065A8
    M  DpShMCreate: allocated tm_adm at 05C065D8
    M  DpShMCreate: allocated wp_ca_adm at 05FCBB70
    M  DpShMCreate: allocated appc_ca_adm at 05FD1930
    M  DpShMCreate: allocated comm_adm at 05FD3870
    M  DpShMCreate: system runs without file table
    M  DpShMCreate: allocated vmc_adm_list at 06054730
    M  DpShMCreate: allocated gw_adm at 06054770
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 060547A0
    M  DpShMCreate: allocated wall_adm at 060547A8
    X  EmInit: MmSetImplementation( 2 ).
    X  MM diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.

    M Wed Aug 31 15:45:41 2011
    M  ThInit: running on host crmsys

    M Wed Aug 31 15:45:42 2011
    M  calling db_connect ...
    C  Prepending D:\usr\sap\CUS\DVEBMGS04\exe to Path.

    C Wed Aug 31 15:45:47 2011
    C  Client NLS settings: AMERICAN_AMERICA.UTF8
    C  Logon as OPS$-user to get SAPSR3's password
    C  Connecting as /@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1   0619F158   061A46F4   061A3F7C
    C  Attaching to DB Server CRM (con_hdl=0,svchp=061A3EC8,svrhp=061B5794)
    C  Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)

    C Wed Aug 31 15:45:48 2011
    C  Now '/@CRM' is connected (con_hdl 0, nls_hdl 0).
    C  Got SAPSR3's password from OPS$-user
    C  Disconnecting from connection 0 ...
    C  Closing user session (con_hdl=0,svchp=061A3EC8,usrhp=061CA558)
    C  Now I'm disconnected from ORACLE
    C  Connecting as SAPSR3/<pwd>@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1   0619F158   061A46F4   061A3F7C
    C  Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)
    C  Now 'SAPSR3/<pwd>@CRM' is connected (con_hdl 0, nls_hdl 0).
    C  Database NLS settings: AMERICAN_AMERICA.UTF8
    C  Database instance CRM is running on CRMSYS with ORACLE version 10.2.0.1.0 since 20110831

    B Wed Aug 31 15:45:49 2011
    B  Connection 0 opened (DBSL handle 0)
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost         
    B  000 000 R/3              000000000 ACTIVE       NO  YES NO  000 255 255 20110831 154542 CRMSYS         
    M  db_connect o.k.
    M  ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif

    I Wed Aug 31 15:46:12 2011
    I  MtxInit: 0 0 0
    M  SHM_PRES_BUF               (addr: 0A7C0040, size: 4400000)
    M  SHM_ROLL_AREA          (addr: 788A0040, size: 61440000)
    M  SHM_PAGING_AREA          (addr: 0AC00040, size: 32768000)
    M  SHM_ROLL_ADM               (addr: 0CB50040, size: 615040)
    M  SHM_PAGING_ADM          (addr: 0CBF0040, size: 525344)
    M  ThCreateNoBuffer          allocated 544152 bytes for 1000 entries at 0CC80040
    M  ThCreateNoBuffer          index size: 3000 elems
    M  ThCreateVBAdm          allocated 12160 bytes (50 server) at 0CD10040
    X  EmInit: MmSetImplementation( 2 ).
    X  MM diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    X  ES initialized.
    B  db_con_shm_ini:  WP_ID = 0, WP_CNT = 13, CON_ID = -1
    B  dbtbxbuf: Buffer TABL  (addr: 10E700C8, size: 30000000, end: 12B0C448)
    B  dbtbxbuf: Buffer TABLP (addr: 12B100C8, size: 10240000, end: 134D40C8)
    B  dbexpbuf: Buffer EIBUF (addr: 0FBA00D0, size: 4194304, end: 0FFA00D0)
    B  dbexpbuf: Buffer ESM   (addr: 134E00D0, size: 4194304, end: 138E00D0)
    B  dbexpbuf: Buffer CUA   (addr: 138F00D0, size: 3072000, end: 13BDE0D0)
    B  dbexpbuf: Buffer OTR   (addr: 13BE00D0, size: 4194304, end: 13FE00D0)
    M  rdisp/reinitialize_code_page -> 0
    M  icm/accept_remote_trace_level -> 0
    M  rdisp/no_hooks_for_sqlbreak -> 0
    M  CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.

    S Wed Aug 31 15:46:15 2011
    S  *** init spool environment
    S  initialize debug system
    T  Stack direction is downwards.
    T  debug control: prepare exclude for printer trace
    T  new memory block 1946AA80

    S Wed Aug 31 15:46:16 2011
    S  spool kernel/ddic check: Ok
    S  using table TSP02FX for frontend printing
    S  1 spool work process(es) found
    S  frontend print via spool service enabled
    S  printer list size is 150
    S  printer type list size is 50
    S  queue size (profile)   = 300
    S  hostspool list size = 3000
    S  option list size is 30
    S      found processing queue enabled
    S  found spool memory service RSPO-RCLOCKS at 1D6D00A8
    S  doing lock recovery
    S  setting server cache root
    S  found spool memory service RSPO-SERVERCACHE at 1D6D0430
    S    using messages for server info
    S  size of spec char cache entry: 297028 bytes (timeout 100 sec)
    S  size of open spool request entry: 2132 bytes
    S  immediate print option for implicitely closed spool requests is disabled

    A Wed Aug 31 15:46:18 2011

    A  -PXA--
    A  PXA INITIALIZATION
    A  PXA: Fragment Size too small: 73 MB, reducing # of fragments
    A  System page size: 4kb, total admin_size: 5132kb, dir_size: 5076kb.
    A  Attached to PXA (address 688A0040, size 150000K)
    A  abap/pxa = shared protect gen_remote
    A  PXA INITIALIZATION FINISHED
    A  -PXA--


    A Wed Aug 31 15:46:20 2011
    A  ABAP ShmAdm attached (addr=57A40000 leng=20955136 end=58E3C000)
    A  >> Shm MMADM area (addr=57EB5E58 leng=126176 end=57ED4B38)
    A  >> Shm MMDAT area (addr=57ED5000 leng=16150528 end=58E3C000)
    A  RFC Destination> destination crmsys_CUS_04 host crmsys system CUS systnr 4 (crmsys_CUS_04)

    A Wed Aug 31 15:46:21 2011
    A  RFC Options> H=crmsys,S=04,d=2,
    A  RFC FRFC> fallback activ but this is not a central instance.
    A   
    A  RFC rfc/signon_error_log = -1
    A  RFC rfc/dump_connection_info = 0
    A  RFC rfc/dump_client_info = 0
    A  RFC rfc/cp_convert/ignore_error = 1
    A  RFC rfc/cp_convert/conversion_char = 23
    A  RFC rfc/wan_compress/threshold = 251
    A  RFC rfc/recorder_pcs not set, use defaule value: 2
    A  RFC rfc/delta_trc_level not set, use default value: 0
    A  RFC rfc/no_uuid_check not set, use default value: 0
    A  RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
    A  RFC Method> initialize RemObjDriver for ABAP Objects
    M  ThrCreateShObjects          allocated 13730 bytes at 0FFB0040

    N Wed Aug 31 15:46:22 2011
    N  SsfSapSecin: putenv(SECUDIR=D:\usr\sap\CUS\DVEBMGS04\sec): ok

    N  =================================================
    N  === SSF INITIALIZATION:
    N  ===...SSF Security Toolkit name SAPSECULIB .
    N  ===...SSF trace level is 0 .
    N  ===...SSF library is D:\usr\sap\CUS\DVEBMGS04\exe\sapsecu.dll .
    N  ===...SSF hash algorithm is SHA1 .
    N  ===...SSF symmetric encryption algorithm is DES-CBC .
    N  ===...sucessfully completed.
    N  =================================================

    N Wed Aug 31 15:46:23 2011
    N  MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N  MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    M  JrfcVmcRegisterNativesDriver o.k.
    W  =================================================
    W  === ipl_Init() called
    B    dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
    B     max_blocking_factor =  15,  max_in_blocking_factor      =   5,
    B     min_blocking_factor =  10,  min_in_blocking_factor      =   5,
    B     prefer_union_all    =   0,  prefer_join                 =   0,
    B     prefer_fix_blocking =   0,  prefer_in_itab_opt          =   1,
    B     convert AVG         =   0,  alias table FUPD            =   0,
    B     escape_as_literal   =   1,  opt GE LE to BETWEEN        =   0,
    B     select *            =0x0f,  character encoding          = STD / <none>:-,
    B     use_hints           = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
    B                           rule_fae->0, concat_fae->0, concat_fae_or->0

    W Wed Aug 31 15:46:24 2011
    W    ITS Plugin: Path dw_gui
    W    ITS Plugin: Description ITS Plugin - ITS rendering DLL
    W    ITS Plugin: sizeof(SAP_UC) 2
    W    ITS Plugin: Release: 700, [7000.0.52.20050900]
    W    ITS Plugin: Int.version, [32]
    W    ITS Plugin: Feature set: [10]
    W    ===... Calling itsp_Init in external dll ===>
    W  === ipl_Init() returns 0, ITSPE_OK: OK
    W  =================================================
    E  Enqueue Info: rdisp/wp_no_enq=1, rdisp/enqname=<empty>, assume crmsys_CUS_04
    E  Replication is disabled
    E  EnqCcInitialize: local lock table initialization o.k.
    E  EnqId_SuppressIpc: local EnqId initialization o.k.
    E  EnqCcInitialize: local enqueue client init o.k.

    B Wed Aug 31 15:46:48 2011
    B  table logging switched off for all clients

    M Wed Aug 31 15:47:55 2011
    M  SecAudit(RsauShmInit): WP attached to existing shared memory.
    M  SecAudit(RsauShmInit): addr of SCSA........... = 05BD0040
    M  SecAudit(RsauShmInit): addr of RSAUSHM........ = 05BD07A8
    M  SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 05BD07E0
    M  SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 05BD07EC

    A Wed Aug 31 15:48:44 2011
    A  RFC FRFC> fallback on the central gateway crmsys sapgw04 activ

    B Wed Aug 31 15:49:47 2011
    B  dbmyclu : info : my major identification is 3232288873, minor one 4.
    B  dbmyclu : info : Time Reference is 1.12.2001 00:00:00h GMT.
    B  dbmyclu : info : my initial uuid is D98FA690E8AA314D9B69930868792664.
    B  dbmyclu : info : current optimistic cluster level: 0
    B  dbmyclu : info : pessimistic reads set to 2.

  • Java Objects for Oracle datatypeJava Objects for Oracle user-defined datatype

    I'm trying to create a Java object that maps to VARRAY of numbers.
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    I'm trying to create a Java object that maps to VARRAY of numbers.
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    Does anyone have an example? Your expertise would be much appreciated.
    Thanks,
    Roxanne
    null

    Hi Roxanne,
    I have the same problem if you get an idea or answer..I have a problem in updating and inserting in Varray datatype from java object of Objects (arraylist)..
    please mail me
    [email protected]
    Bye
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    I'm trying to create a Java object that maps to VARRAY of numbers.
    I created a type "NUMARRAY" which is a varray of numbers.
    I also created a type "NUMCOLLECTION" which is an object and contains "NUMARRAY"
    The plan was to create the java object to map to numcollection. My question is can I map a java type directly to the NUMARRAY type, or must it map to an object? (here I'm referring to 'CREATE TYPE NUMARRAY AS VARRAY" or "CREATE TYPE NUMCOLLECTION AS OBJECT" in sql.
    Also, if I do need to write java objects for both types? And if I do, do both need to implement SQLData?
    Does anyone have an example? Your expertise would be much appreciated.
    Thanks,
    Roxanne
    null

  • Difference between ooabap and java

    eventhough both java and ooabap are oops languages there may be some difference between them as c++ and java in using the oops concepts or may be there is an advantage in using ooabap than java .
                                                            any one pls  reply to the above asked question.
    <REMOVED BY MODERATOR>
    Edited by: rahul nuthi on Feb 26, 2008 1:10 PM
    Edited by: Alvaro Tejada Galindo on Feb 26, 2008 11:19 AM

    hi
    OOPs ABAP uses Classes and Interfaces which uses Methods and events.
    If you have Java skills it is advantage for you.
    There are Local classes as well as Global Classes.
    Local classes we can work in SE38 straight away.
    But mostly it is better to use the Global classes.
    Global Classes or Interfaces are to be created in SE24.
    SAP already given some predefined classes and Interfaces.
    This OOPS concepts very useful for writing BADI's also.
    So first create a class in SE 24.
    Define attributes, Methods for that class.
    Define parameters for that Method.
    You can define event handlers also to handle the messages.
    After creation in each method write the code.
    Methods are similar to ABAP PERFORM -FORM statements.
    After the creation of CLass and methods come to SE38 and create the program.
    In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
    Example:
    REPORT sapmz_hf_alv_grid .
    Type pool for icons - used in the toolbar
    TYPE-POOLS: icon.
    TABLES: zsflight.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    G L O B A L I N T E R N A L T A B L E S
    *DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    To include a traffic light and/or color a line the structure of the
    table must include fields for the traffic light and/or the color
    TYPES: BEGIN OF st_sflight.
    INCLUDE STRUCTURE zsflight.
    Field for traffic light
    TYPES: traffic_light TYPE c.
    Field for line color
    types: line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    G L O B A L D A T A
    DATA: ok_code LIKE sy-ucomm,
    Work area for internal table
    g_wa_sflight TYPE st_sflight,
    ALV control: Layout structure
    gs_layout TYPE lvc_s_layo.
    Declare reference variables to the ALV grid and the container
    DATA:
    go_grid TYPE REF TO cl_gui_alv_grid,
    go_custom_container TYPE REF TO cl_gui_custom_container,
    o_event_receiver TYPE REF TO lcl_event_receiver.
    DATA:
    Work area for screen 200
    g_screen200 LIKE zsflight.
    Data for storing information about selected rows in the grid
    DATA:
    Internal table
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    C L A S S E S
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
    e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Event handler method for event toolbar.
    CONSTANTS:
    Constants for button type
    c_button_normal TYPE i VALUE 0,
    c_menu_and_default_button TYPE i VALUE 1,
    c_menu TYPE i VALUE 2,
    c_separator TYPE i VALUE 3,
    c_radio_button TYPE i VALUE 4,
    c_checkbox TYPE i VALUE 5,
    c_menu_entry TYPE i VALUE 6.
    DATA:
    ls_toolbar TYPE stb_button.
    Append seperator to the normal toolbar
    CLEAR ls_toolbar.
    MOVE c_separator TO ls_toolbar-butn_type..
    APPEND ls_toolbar TO e_object->mt_toolbar.
    Append a new button that to the toolbar. Use E_OBJECT of
    event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
    This class has one attribute MT_TOOLBAR which is of table type
    TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE' TO ls_toolbar-function.
    MOVE icon_change TO ls_toolbar-icon.
    MOVE 'Change flight' TO ls_toolbar-quickinfo.
    MOVE 'Change' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD.
    METHOD handle_user_command.
    Handle own functions defined in the toolbar
    CASE e_ucomm.
    WHEN 'CHANGE'.
    PERFORM change_flight.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    SET SCREEN '100'.
    *& Module USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    MODULE status_0100 OUTPUT.
    DATA:
    For parameter IS_VARIANT that is sued to set up options for storing
    the grid layout as a variant in method set_table_for_first_display
    l_layout TYPE disvariant,
    Utillity field
    l_lines TYPE i.
    After returning from screen 200 the line that was selected before
    going to screen 200, should be selected again. The table gi_index_rows
    was the output table from the GET_SELECTED_ROWS method in form
    CHANGE_FLIGHT
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines > 0.
    CALL METHOD go_grid->set_selected_rows
    EXPORTING
    it_index_rows = gi_index_rows.
    CALL METHOD cl_gui_cfw=>flush.
    REFRESH gi_index_rows.
    ENDIF.
    Read data and create objects
    IF go_custom_container IS INITIAL.
    Read data from datbase table
    PERFORM get_data.
    Create objects for container and ALV grid
    CREATE OBJECT go_custom_container
    EXPORTING container_name = 'ALV_CONTAINER'.
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_custom_container.
    Create object for event_receiver class
    and set handlers
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
    Layout (Variant) for ALV grid
    l_layout-report = sy-repid. "Layout fo report
    Setup the grid layout using a variable of structure lvc_s_layo
    Set grid title
    gs_layout-grid_title = 'Flights'.
    Selection mode - Single row without buttons
    (This is the default mode
    gs_layout-sel_mode = 'B'.
    Name of the exception field (Traffic light field) and the color
    field + set the exception and color field of the table
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
    gs_layout-info_fname = 'LINE_COLOR'.
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    Value of traffic light field
    g_wa_sflight-traffic_light = '1'.
    Value of color field:
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
    is_variant = l_layout
    i_save = 'A'
    is_layout = gs_layout
    CHANGING it_outtab = gi_sflight.
    End of grid setup
    Raise event toolbar to show the modified toolbar
    CALL METHOD go_grid->set_toolbar_interactive.
    Set focus to the grid. This is not necessary in this
    example as there is only one control on the screen
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0200 INPUT
    MODULE user_command_0200 INPUT.
    CASE ok_code.
    WHEN 'EXIT200'.
    LEAVE TO SCREEN 100.
    WHEN'SAVE'.
    PERFORM save_changes.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0200 INPUT
    *& Form get_data
    FORM get_data.
    Read data from table SFLIGHT
    SELECT *
    FROM zsflight
    INTO TABLE gi_sflight.
    ENDFORM. " load_data_into_grid
    *& Form change_flight
    Reads the contents of the selected row in the grid, ans transfers
    the data to screen 200, where it can be changed and saved.
    FORM change_flight.
    DATA:l_lines TYPE i.
    REFRESH gi_index_rows.
    CLEAR g_selected_row.
    Read index of selected rows
    CALL METHOD go_grid->get_selected_rows
    IMPORTING
    et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table gi_index_rows will be empty
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines = 0.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
    textline1 = 'You must choose a line'.
    EXIT.
    ENDIF.
    Read indexes of selected rows. In this example only one
    row can be selected as we are using gs_layout-sel_mode = 'B',
    so it is only ncessary to read the first entry in
    table gi_index_rows
    LOOP AT gi_index_rows INTO g_selected_row.
    IF sy-tabix = 1.
    READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
    ENDIF.
    ENDLOOP.
    Transfer data from the selected row to screenm 200 and show
    screen 200
    CLEAR g_screen200.
    MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
    LEAVE TO SCREEN '200'.
    ENDFORM. " change_flight
    *& Form save_changes
    Changes made in screen 200 are written to the datbase table
    zsflight, and to the grid table gi_sflight, and the grid is
    updated with method refresh_table_display to display the changes
    FORM save_changes.
    DATA: l_traffic_light TYPE c.
    Update traffic light field
    Update database table
    MODIFY zsflight FROM g_screen200.
    Update grid table , traffic light field and color field.
    Note that it is necessary to use structure g_wa_sflight
    for the update, as the screen structure does not have a
    traffic light field
    MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-traffic_light = '1'.
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    clear g_wa_sflight-line_color.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    clear g_wa_sflight-line_color.
    ENDIF.
    MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
    Refresh grid
    CALL METHOD go_grid->refresh_table_display.
    CALL METHOD cl_gui_cfw=>flush.
    LEAVE TO SCREEN '100'.
    ENDFORM. " save_changes
    chk this blog
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    /message/4447073#4447073 [original link is broken]
    Difference between ABAP an OOABAP
    http://en.wikipedia.org/wiki/Comparison_of_ABAP_and_Java
    hope it will help you
    regards
    sreelatha gullapalli

  • SSO between Portal and Java WD application

    Hi Experts,
    I am using CE 7.2 on localhost and I am very new to SAP.
    I need to know how can I get SSO between Portal and Java WD.  I have a WD application that displays the logged in user using "IUser currentUser = WDClientUser.getCurrentUser().getSAPUser()", as well I can use "IUser user = UMFactory.getAuthenticator().getLoggedInUser()".  Both work.
    Q1. What is the difference in the 2 above?
    Q2. My WD application is set to authenticate user.  The WD application is in URL iView.  I need SSO between Portal and WD application.   Is there a way to get this SSO without SAP Backend (ECC), for now I just need SSO between Portal and Java WD appl.
    Everything is in localhost.
    Please advice. Thanks.

    > need to know how can I get SSO between Portal and Java WD.
    Then I suggest you ask your question in the Web Dynpro Java forum instead of the Web Dynpro ABAP one.

  • Short dump Error during VM container communication between ABAP and JAVA.

    Hello All,
    Can anybody please help with resolving the following issue:
    Short dump is displayed, when I try to insert CRM product (type: material) in the document (opportunity). This CRM product was created in CRM directly.
    When I try to insert ECC migrated material, everything works fine.
    Here is the details of dump:
    Short text
        Error during VM container communication between ABAP and JAVA
    Information on where terminated
        Termination occurred in the ABAP program "SAPLPRC_INT" - in "GET_PRICING_PROCEDURE_INFO".
        The main program was "SAPMHTTP ". In the source code you have the termination point in line 100 of the (Include) program "LPRC_INTF35".
    Thank you!

    hi Willie,
         this is the dump, and i have used the t-code sm52 . the VMC is not active.
    |Short Text                                                                                        |
    |    Error during VM Container communication between ABAP and JAVA.                                |
    |What happened?                                                                                    |
    |    The current program had to be terminated because of an                                        |
    |    error when installing the R/3 System.                                                         |
    |    Error in the RFC layer.                                                                       |
    |What can you do?                                                                                  |
    |    Note which actions and entries caused the error to occur.                                     |
    |                                                                                                  |
    |    Consult your SAP administrator.                                                               |
    |                                                                                                  |
    |    Using transaction ST22 for ABAP dump analysis, you can view, manage,                          |
    |    and retain termination messages for longer periods.                                           |
    |Error analysis                                                                                    |
    |    An error has occurred in the RFC layer during communication between                           |
    |    JAVA and the ABAP stack. This prevents data from being passed correctly                       |
    |    between the two stacks.                                                                       |
    |                                                                                                  |
    |    Message    = TH_VMC_SERV_NOT_ACTIVE                                                           |
    |    Return code = -1007                                                                           |
    |    Pointer    = "000007DD348F6138"                                                               |
    |How to correct the error                                                                          |
    |    Check whether the VMC is active on your application server. To do this,                       |
    |    run transaction SM52. If the VMC is not active, contact your SAP                              |
    |    administrator.                                                                                |
    Regards
    Charles

  • Getting Started with Flex and Java RPC for Free?

    Good Morning,
    Please forgive me if this is the wrong place to post- I'm
    just having trouble wrapping my head around what is and what isn't
    available for free in the Adobe Flex world.
    I've been working on an application for the last few months
    using Open Laszlo (
    http://www.openlaszlo.org/),
    but I've been running into frustrations with their lack of
    up-to-date documentation, and I've found it difficult to bring new
    people into the project, since the set of users who know it is so
    small.
    While I do like that I can compile to DHTML, that's not
    enough to hold me there.
    I've been looking into Adobe Flex, and it seems like a good
    alternative- I'm comfortable paying $500 for the IDE-
    I use Eclipse currently, so having a plugin for it sounds
    ideal. That said, when I look into ways to talk to a Java backend,
    everything points to Flex Data services, which is now part of some
    larger package costing tens of thousands of dollars.
    I don't need advanced messages, or data synchronization, as
    nice as it would be.. All I really need is the ability to call a
    Java method, and get an object back, which I can then work with in
    Flex.
    I see the forum message that asks
    "How
    do I 'do' Flash for free?, but this only talks about RPC very
    broadly. Given that the message is from over a year ago, I thought
    it would be better form to start a new topic, than replying to it.
    Can someone explain to me what components I'd need, both on
    the client side and the server side?
    Is there a set of manuals that explain how to do Flex RPC
    from Java?
    Can Flex compile to any versions of flash earlier than 9?
    (Flash 6/7 is still in wide deployment)
    Do I want to start using Flex 2, or Flex 3? Are the
    components compatible? Will the F3 docs be ready?
    Finally, where can I purchase the Charting components? The
    ability to create charts such as
    this
    overcome a decent price barrier.
    Thank you for any insight you can offer, and direction you
    can provide.

    quote:
    Originally posted by:
    cunparis2day
    On our project they made a proxy in java where they passed in
    the name of the method as a string, and an array of objects for the
    parameters. The proxy then sent the request via RMI and returned
    the result. Kind of a hack but they say it worked (I wasn't here
    when they did it).
    What did the RMI talk to? Are there docs on this?
    quote:
    Another approach, generate the proxy from the java
    interfaces. Or better yet, generate it dynamically with CGLIB.
    quote:
    Finally, I'm investigating using Mule for the integration.
    Let me know what you think about those suggestions.
    We have our own messages, but how would MULE translate them
    to Flex?
    You know quite a bit more about this, can you take a step
    back, and explain?

  • Difference in idoc adapter header mapping between SP14 and SP19

    Hi All,
    i have a very strange problem.......i have 2 XI systems : XI-sandbox and XI-dev.....
    XI-sandbox is on XI3.0 SP19 whereas XI-dev is on XI3.0 SP14...........
    I have a file->XI->idoc scenario which is same on both XI-sandbox and XI-dev....
    in receiver idoc adapter, i am using header mapping for sender service and in the sender service i am using XPATH of a field of control rec of idoc.........
    this scenario works fine on XI-sandbox which is on SP19 and the idocs are sent to SAP R/3 sandbox...........but this scenario on XI-dev gives error in SXMB_MONI in XI-dev of Call adapter - "No party conversion found".........
    So my question is that is there any difference in idoc adapter header mapping between SP14 and SP19.........
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

    ><i>so i cant use apply control rec values from payload.........</i>
    rajeev,
    I know this has nothing to do with the original problem but please do bear.
    If I undertood you posts correct, the Sender Partner Name is set in the Idoc Control record in the field SNDPRN in the mapping using some mapping logic.
    Now, this is the partner name with which the idoc is to be posted to thge R3 system.
    if yes, then like I have pointed above, using "Take Sender From Payload" in the Receivcer Idoc Adapter is a better option as pointed in the SAP help as well.
    As you are already populating the idoc control ecord with SNDPRN just make the SNDPRT as LS and then select "Take Sender from Payload" in the receiver Idoc adapter and the Sender Partner Name will not be taken from SDNPRN just as you want.
    This is different from "Apply Control Records From Payload" .
    Regards
    Bhavesh
    PS : you can ignore this reply if the situatios is too late to make this change and thanks for the patience.

Maybe you are looking for

  • Satellite 850 - is it possible to i install Win 7 - If yes, how?

    I was in a rush to get a laptop for a job and got a Toshiba Satellite 850 which comes with windows 8 pre-installed. I absolutely detest it and assumed I can simply wipe the whole thing and put on a windows 7. After reading through lots of advice foru

  • How do you get your hard drive icon and external drives to show up on your desktop?

    I like to have access to my hard drives on my desktop.  How do I get it so I see them on my desktop.  I believe in older Mac Operating Systems they were there automatically?

  • SOAP -Client Certificate Authentication in Receiver SOAP Adapter

    Dear All, We are working on the below scenario SAP R/3 System  -> XI/PI -> Proxy -> Customer In this, SAP R/3 System sends a IDOC and XI should give that XML Payload of IDOC to Customer. Cusomer gave us the WSDL file and also a Certificate for authen

  • Kdemod 4 and hal permission

    Hi, this error in Dolphin (KDEmod 4.2) see from upgrade to KDE 4.2 and after click to mount disk(all disks). id = uid=1000(deti) gid=100(users) skupiny=50(games),82(hal),91(video),92(audio),93(optical),95(storage),97(camera),100(users) add user to gr

  • Which is better to upgrade...processor or flash storage?

    Buying a new 2013 MBA and have already upgraded to the 8GB but didn't know if I should upgrade to the 1.7GHz or the 512GB Flash Storage.... My uses are: -heavy email usage -Windows Parallel for Microsoft Office usage -LOTS of music -LOTS of Photos an