Need samples how to use classes in WebDynpro

Hi,
I Need To simple Samples how to use classes in WebDynpro.
Regards

Continued....
and in the model
right click->create model
select the radio button import java bean .
next ADD jars option will be seen
Browse the jar on the dekstop.
now add this model to the used models by right clicking on it.
Now if you go to Data Modeler.
You will find the used model.
From there map to the component controller->view Controller.
And continue with ur coding.
Hope this helps you.
Thanks & Regards,
Lokesh.

Similar Messages

  • How to use messages in WebDynpro-ABAP

    Hi,
        How to use messages in WebDynpro-ABAP.
    Does it has any class to manage messages like IWDMessageManager or we can just use standard SAP Message types.. like E,W,X,I,S..
    I hope it have a message container to display messages.
    Thank U for Ur time.
    Cheers,
    Sam

    Hi Sam,
    U can hard code the message or u can use the Assistance class's text elements to store the messages.
    1) Code to display hard coded message:
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = "Enter the correct Connection ID"
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    2) Code to display message from text element of assistance class:
    lv_text = wd_assist->if_wd_component_assistance~get_text( key = '002' ).
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = lv_text
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    Where Message "Enter the Correct Connection ID" is stored in Text Element with key '002'
    Hope this helps,

  • Sample coe to use class CL_GUI_ALV_GRID

    Hi All,
    I am having 2 internal tables.
    I need to display the data in these 2 internal tables using ALV.
    I am using the function module REUSE_ALV_LIST_DISPLAY 2 times for 2 internal tables to display data.
    But two outputs are not coming on same screen.
    Can any one give me a sample program to use class CL_GUI_ALV_GRID to display 2 List.
    Screen for two custom controls I will create.
    I just need to display data.
    Pls Guide

    zsat_alvoops_final.
    TABLES: vbap, vbak.
    TYPES : BEGIN OF str1,
            mvbeln TYPE vbeln,
            mposnr TYPE posnr,
            mmatnr TYPE matnr,
            mkwmeng TYPE kwmeng,
            mmeins TYPE meins,
            mpstyv TYPE pstyv,
            END OF str1.
    DATA: grid TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          it_fcat TYPE lvc_t_fcat,
          zsat_alvfcat2 TYPE STANDARD TABLE OF str1.
    DATA : oit TYPE TABLE OF str1,
           v_vkorg TYPE vbak-vkorg,
           v_vtweg TYPE vbak-vtweg,
           v_vkbur TYPE vbak-vkbur,
           v_vkgrp TYPE vbak-vkgrp,
           v_erdat TYPE vbak-erdat,
           v_bsark TYPE vbak-bsark,
           v_spart TYPE vbap-spart,
           wa TYPE str1.
    SELECT-OPTIONS : s_vkorg FOR v_vkorg,
                     s_vtweg FOR v_vtweg,
                     s_vkbur FOR v_vkbur,
                     s_vkgrp FOR v_vkgrp,
                     s_erdat FOR v_erdat,
                     s_bsark FOR v_bsark,
                     s_spart FOR v_spart.
    SELECT vbak~vbeln vbap~posnr vbap~matnr vbap~kwmeng vbap~meins vbap~pstyv
      INTO TABLE oit
      FROM vbak INNER JOIN vbap ON vbak~vbeln = vbap~vbeln
      WHERE ( vbak~vkorg IN s_vkorg ) AND ( vbak~vtweg IN s_vtweg ) AND ( vbak~vkbur IN s_vkbur )
      AND ( vbak~vkgrp IN s_vkgrp ) AND ( vbak~erdat IN s_erdat ) AND ( vbak~bsark IN s_bsark ) AND ( vbap~spart IN s_spart ).
    CALL SCREEN 9000.
    MODULE status_9000 OUTPUT.
      SET PF-STATUS 'ZSTATUS'.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
          EXPORTING
            container_name = 'CCONTAINER'.
        CREATE OBJECT grid
          EXPORTING
            i_parent = g_custom_container.
      ENDIF.
      CALL METHOD grid->set_table_for_first_display
        EXPORTING
          i_structure_name = 'ZSAT_ALVFCAT2'   * this is the custom structure which has been made in SE11 remember to declare it in this program in DATA.
        CHANGING
          it_outtab        = oit.     
    ENDMODULE.

  • Need help how to use itunes card to download music

    Need help how to use itunes card to download music

    If you want to add the iTunes card to your account, then in the iTunes app on the iPad you should be able to scroll to the bottom of the Music tab and there should be a Redeem button - there is more info here : http://support.apple.com/kb/HT1574

  • Do I need sample clearance to use instruments in my songs

    Do I need sample clearance to use software instruments in my songs

    If you need to use DAQmx, then of course you need to use an NI card.  But you are thinking of this in the wrong order.  Do you need to use an NI card to communicate with teh FF device?  You can, but there are probably other cards out there as well.  If you use an NI card, it probably won't use DAQmx but other things such as VISA since it is probably more like a serial protocol than a DAQ device.  If you use another brand, then you use the that company's drivers with it.
    I just realized you posted in the wrong forum.  This forum is for requesting files to be converted between different version of LabVIEW.
    You should be posting elsewhere.  Possibly  Instrument Control (GPIB, Serial, VISA, IVI)

  • How to use Class "CL_GUI_CHART_ENGINE" in a abap program ?

    Hi Guys,
    I want to display data in my internal table in the form of a Graph using class "cl_gui_chart_engine".
    I had a look at sample program given by SAP - GRAPHICS_GUI_CE_DEMO but need some help to understand how can we use our own data to be displayed in the graph ? Basically what I am looking for is that where we need to do the changes in creation of XML file so that we can pass our own data ?
    ( perform create_data_demo using l_ixml_data_doc)
    Could you please help me with some sample code or pseudocode ?
    Thanks
    Ashwa

    Thanks Kai,
    I had already done the same thing and got the required output.
    Populate X-Axis ( Categories )
      LOOP AT ITAB.
    Populate Categories
        l_element = p_ixml_doc->create_simple_element(
                  name = 'C' parent = l_categories ).
        l_element->if_ixml_node~set_value( itab-value).
      ENDLOOP.
    Populate Y-Axis ( Values )
      LOOP AT VALUE_TAB.
       l_element = p_ixml_doc->create_simple_element(
                 name = 'S' parent = l_series ).
        l_element->if_ixml_node~set_value( value_tab-value).
      ENDLOOP.
    I am now trying to find the ways to change the default layout of the graph. I guess it should be done in "perform create_custom_demo using l_ixml_custom_doc." . I want that my graph should be displayed as lines instead of bar's.
    Once I achieve this I will share my findings along with sample code with the community.
    I wish I could get some documentation on class "cl_gui_chart_engine" and interfaces like "if_ixml_document".
    Thanks
    Ashwani

  • How to use class.getResource() to create an ImageIcon

    Hi,
    I am well acquainted with creating and using ImageIcon icons using the ImageIcon constructor
    and putting the image file in a folder called Images which is at the same level as the
    bin and src folders.
    I discovered a demo program, LayeredPaneDemo, that uses class.getResource() to create
    an icon and found that in my eclipse version, the icon's image file was not found when
    I used the original getResource() call but the icon was created when I used the ImageIcon
    constructor.
    I posted on JavaRanch and eventually realized that the image file needed to be with the
    .class files, so I moved the Images folder under bin and getResource() works fine and I'm
    happy.
    However, I have three questions for you.
    One poster on JavaRanch told me that it's better to use getResource() rather than the
    ImageIcon constructor for distributing an app (I'm not distributing anything but want
    to do it all correctly).
    Do you agree with that or can I safe keep using the ImageIcon constructor?
    Another poster told me he doesn't think it's safe to leave the image file in bin because
    it might be lost during the build in eclipse and that there is a way to have eclipse copy
    the files to bin during the build which should mean that I can leave the images folder at
    the level of bin and src.
    Do you agree with that?
    If yes, how do I get eclipse to copy the file during the build?
    P.S.
    Before I posted on JavaRanch, I put the Images folder at every level of the project's
    directory as shown in eclipse (which is why I missed the bin folder until JavaRanch
    whacked me upside the head) and getResource() still didn't work.

    The contents of the Java Source folder are compiled if they're source files, copied otherwise (assuming no filter's been put in place to prevent copying), so your images belong under a source folder.

  • How to use classes CL_DOCX_*

    We have a need to use word 2007 OOXML classes  all of which start with CL_DOCX*.
    Basically what we are trying to do is take a DOCX files (File 1 & File 2) saved by MS WORD 2007 application and replace the header of File 1 with the header from File 2.
    The basic functionality described above is working fine. However the same is not working when the header from File 2 has an IMAGE embedded in it.
    We found several  word 2007 OOXML classes  in the system (all of which start with CL_DOCX*), but couldn't find usage for these classes anywhere in the system or SDN or OSS Notes etc.,
    Just wondering whether anyone used these classes in their development environment and whether they can share this information here?
    Any help in this regard is highly appreciated.
    thanks,
    -Sreenath

    Which NetWeaver release are you using? The whole OOXML seems to be evolving within EhPs.
    You'll find examples how to use the framework in the Unit Tests of class CL_DOCX_FORM - so have a look at those classes. For me those test code runs fine.
    Best Regards,
    Tobias

  • How to use classes of packages in flex mx:Script/ or mxml/

    Hi.I am just learning Flex using Flex Builder 3 facing one problem,
    Suppose I declare one package with name alert.as
    package
    import mx.controls.Alert;
    public class alert
    public function alertBtn()
    Alert("Hello btn 1");
    Now in want to use the function in mxml that I declared in a package.
    <mx:Button label="btn1" click="alertBtn();"  />
    I have few questions
    1)How to Import the class alert.as in <mx:Script> and where should i store the file alert.as in the directory folder of flex?
    2)How to call the function alertBtn() when btn1 is clicked.
    Thanks so much!
    Regards
    Ankur

    Hi Greg.I think I was not able to clear my problem properly.Let me try this time again.
    What I wanted to do was that in the below written code I have the full access of the id=panel1 in the  script tag .This works properly.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import flash.display.Sprite;
    import mx.core.UIComponent;
    private function addChildToPanel():void {
    var circle:Sprite = new Sprite();
    circle.graphics.beginFill(0xFFCC00);
    circle.graphics.drawCircle(0, 0, 20);
    var c:UIComponent = new UIComponent();
    c.addChild(circle);
    panel1.addChild(c);
    ]]></mx:Script>
    <mx:Panel id="panel1" height="100" width="100"/>
    <mx:Button id="myButton" label="Click Me" click="addChildToPanel();"/>
    </mx:Application>
    This above functionality when I tried to do using class Outside the code ,its not working !
    Here is with the package:-
    But suppose I make One package 
    package
    import flash.display.Sprite;
    import mx.core.UIComponent;
    class getPanel extends Sprite
    public function addChildToPanel():void {
    var circle:Sprite = new Sprite();
    circle.graphics.beginFill(0xFFCC00);
    circle.graphics.drawCircle(0, 0, 20);
    var c:UIComponent = new UIComponent();
    c.addChild(circle);
    panel1.addChild(c);
              }//class
                        }//package
    Now in MXML
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import getPanel;
    ]]></mx:Script>
    <mx:Panel id="panel1" height="100" width="100"/>
    <mx:Button id="myButton" label="Click Me" click="getPanel.addChildToPanel();"/>
    </mx:Application>
    So My problem is that this code doesnt do anything.
    Neither the addChild function is working in it ,Nor the Panel1 is accessible here.
    Can u pls help me here.
    Thanks
    Ankur

  • Need sample code for Using BADI ME_PROCESS_REQ_CUST

    Dear all,
    Initially my requirement is to Validate the Document Type of Purchase Request ion as per material.
    I have created a implementation for BADI : ME_PROCESS_REQ_CUST .
    im new to OOPS-ABAP, so pls send *sample code for how to use these methods PROCESS_ITEM,
    like declarations, assignment of data into internal table  for further validation*.
    Regards,
    NIranjan.G

    Hi,
    get the item data ....
         *DATA : lt_item TYPE MEREQ_ITEM,
                       ls_item liek line of it_item*
             CALL METHOD im_item->GET_DATA
               RECEIVING
                 RE_DATA = lt_item .
    you will get the data in lt_item.. table
    Thanks,
    Shailaja Ainala.

  • How to use classes in Actions tab

    Hello guys!
    I'm just a beginner so i'm sorry for my stupid question.I'm developing a game in which movie clips in our case people have their own schedule.I have multiple screens and so i want to be able to set their locations and make them invisible on other screens(rooms)they're not currently at.The trouble is i can't use variables from Actions in my class,neither can i use classes in my Actions.Can anyone tell me how to export classes into Actions code?
    Here is my code:
    var currentlocation;
    var currentscreen;
    if (person.currentlocation!==currentscreen){
    person.visible=false;
    btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
              currentscreen = "classroom";
              classroom.visible = true;
              playroom.visible = false;
    btn_2.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
    function fl_MouseClickHandler_2(event:MouseEvent):void
              currentroom = "playroom";
              classroom.visible = false;
              playroom.visible = true;

    Your problem/question is not clear to me.  If you are getting errors you should include the error messages in your posting.
    Could the problem arise from using a variable that is not defined?
    currentroom = "playroom";
    I do not see currentroom defined as a variable anywhere.  There is a currentscene variable though.

  • How to use class in JSP file?

    Hello All,
    I am new to Jsp.
    In Jsp file,I used class of myself.
    Why,the Constractor seems not working?
    Thanks in advance.

    Hi,
    You can import the class in a jsp file.
    Use <% page import = "">
    and call that class.
    If u want to import a funtion in your class, then u can insert that into scriplets like <%! ..%>
    Hope u got that!
    Artz

  • How to use BAPI in webdynpro for java application

    Hi all,
    Please help in getting started with calling a BAPI in a webdynpro for java application. I have got only the content needed to call a BAPI in a webdynpro for abap application but not in java. Kindly provide me some documents if possible.
    Thanks in advance

    Hi ,
    U have Created One Bapi u want to work with web Dyn pro for java Application Right .
    U need the Following
    1) NWDS (Netweaver Devloper Studio )
    2) jdk1.4 or Above installed in your system .
    After Installation of NWDS .
    1) Just Take J2EE Enginee Details
      a) Go to Window -> preferences  -> J2ee Enginee - > give ur port number , Host name Details . and click finsh .
    Go To Web Dyn Pro Perspective Click onj2EE engine .
    Click On Refresh U will see Green Colour button .
    Now ur Ready to import Ur BAPI .
    1) Go to File -> New -> Project - > Web Dyn pro Project -.
    Give Name , pkg Name Click On Finish .
    2) Expand ur project hirarchy -> go TO Application -> Right Click -> Create Application - > Give Application name and Pkg name -> Click on Finish .
    3) Now ur View And Controller Are Created by Default .
    4) Go to Model-> Right Click on it-> Create Model -> Give Model Name & Pkg name Should diff from Application pkg the Click On Next
    a) Here u have to Two JCo Destination Name Like Model Data And Meta data & R/3 System Details like System Number , Host name  Etc -> then Click on next .
    b) Here u will text filed where u want to search for ur Required BAPI . Type ur BAPI Name Click on Search . Ur bapi will be displyed In Down . click on Next .
    c) Now Ur model is Importedint into NWDS .Map ur model data To Controller and Controller Element to View Elements .
    After ur Model .
    Go to -> Project Name -> Right Click -> go to -> Deploy New Archive .
    after wards u have to go Apllication -> Right click -> deploy and Run .
    ur output will be displyed thru Browser .
    Thats it
    Regards ,
    venkat

  • How to use class.forName

    I am trying to use Class.forName() from a string which is passed to me as argument.
    Class batchClass = Class.forName(args[1]);
    A jar file contains the class file for the string received above and I have this jar file in the manifest of my executable jar.
    I get a class not found exception when I run my executable jar
    Can some body give pointers..what could possibly be the issue.
    The jar file is in my classpath
    run script
    #!/bin/csh
    java -jar -DDBPROVIDER=NO -DDBUS_ROOT=$DBUS_ROOT -DVTNAME=$VTNAME ./jar/IntraDayDepotPositionBatch.jar MagellanStart IntraDayDepotPositionBatch INPUTFILE LOGFILE
    Exception
    Magellan program starting - program class IntraDayDepotPositionBatch
    Cannot find program class - IntraDayDepotPositionBatch
    IntraDayDepotPositionBatch
    java.lang.ClassNotFoundException: IntraDayDepotPositionBatch
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at com.db.mmrepo.app.IntraDayDepotPositionBatch.MagellanStart.main(Unknown Source)
    Thanks for your time and feedback on this

    actually i tried both...with package name and without package name..
    nothing worked...
    my manifest file also contains the path to the package..so does the classpath

  • How to use classes from an existing outside library ?

    Dear People,
    I added a library to use classes already built.
    In JBuilder7 I went to Tools | ConfigureLibraries
    and added the objectdraw library. At the left when I look in the
    directory structure under User Home is "objectdraw" so I did
    add the library correctly but when I put in the coding a try
    to run it, the error messages say:
    "MakeBox.java": Error #: 200 : <identifier> expected at line 8,
    which is the line : public void MakeBox()
    The entire code is :
    package stan_e_makebox;
    import objectdraw.*;
    import java.awt.*;
    public class MakeBox extends WindowController
    void public MakeBox()
    public void onMousePress(Location point)
    new FilledRect(40,80,30,20,canvas);
    public static void main(String[] args)
    new MakeBox();
    Thank you in advance
    Stan

    oo sorry,
    this is the constructor i assume, so should be
    public MakeBox()

Maybe you are looking for

  • Can't remove file

    Trying to kill a file in my trash which refuses to be removed.     File name is   A9AE␀␀␀␀.␀␀␀     How can I get rid of this?  

  • Can't Install or uninstall jdk1.4

    i am stuck in a situation where i can neither fully uninstall some of the existing files of jdk1.4 nor install jdk1.4 all over again. It all started when i accidently deleted the folder in which i had installed j2sdk version 1.4 (latest) . Obviously

  • Continual plotting of data from text file

    I would like help with automated plotting of multiple sets of data on one axis. The file attached shows a sample of the data where the first number (eg 405) is the reference and the next two are the date and time. The data after that all needs to be

  • Webstart error: missing version response from server

    We deploy our application by Java Webstart. This works most of the time, but at the last update one client got an error when trying to update. The jnlp-file looks like this: <?xml version="1.0" encoding="utf-8"?> <!-- JNLP File --> <jnlp spec="1.0+"

  • ITunes match do I need wifi to listen

    I just got iTunes Match and wondered the following.  Do I have to have a interenet connection to listen to my songs, if I have itunes match.  I am wondering what happens if I start iTunes match on my iPad and then go away from my wifi network, I did