Simple stuff for a newb

Well I'm totally new to swing. All i basically need to know is how to create a circle and a line in swing. Does anyone have any examples of this?

RTFM
Specifically look at the Graphics class.
The tutorial might help too: http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html
You'll get a much warmer response here if you at least make an effort to
do a search before you ask a really simple question !

Similar Messages

  • Can I have some simple answers for a newbi Mac user!!

    I've just added some photo's in Iphoto 08 of my holiday which was about 3GB from my pictures folder, Now by importing them into Iphoto is kind of taken up 3gb of my memory from my hard drive.
    So 6gb in total for my pictures which seems to be a waste of memory..
    I thought Iphoto may just take the info of each photo as a resource not actually copy the photos, Anyway what;s the best solution on storing image's and using as little memory as possible if there is a way at all.
    Or is doing what i'm doing the best way? I mean what would be the down side of once importing to Iphoto deleating my photos from my pictures folder?
    Sorry for my basic questions but i thought you guys would be the best peeps to ask
    all the best
    MBPG

    There are many, many ways to access your files in iPhoto:
    For 10.5 users: You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Apple-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. If you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto. With 10.5 you can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    Or, if you want to access the files with iPhoto not running, then create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    No, iMovie works differently. Best to ask on that forum.
    Regards
    TD

  • Very simple question for a newb

    I'm working with the 3d camera but somehow when I'm moving in my 3d space, the camera place moves. I'm not sure what im doing wrong to move the camera. Anyway, how can I move my camera and keyframes together from the "Top" view?
    I've done it before, just dont know how.

    You actually answered your own question. Switch to Top view and sure you have record animation turned off . If you can's see the camera and the objects in the view, make sure nothing is selected and press F to fit all scene items into the viewport. If you have the proper overlays turned on, when you select the camera you will see it, and it's motion path. You can now use the adjust tool to click and drag the camera. The keyframes will follow.

  • How to do the really simple stuff? changing tool, setting color etc

    Hi all,
    I've been trying to do a color picker. I have managed to get it running with a UI and all looks sweet, but I have no clue how to actually do anything! Photoshop launches it just fine.
    Simple stuff really:
    1. How do you set the tool to the eyedropper? (I already have code working that detects when the mouse moves outside the window)
    2. How do you set the color? Looking for a function like setColor() so that the current context get the color and user can preview the result (i.e. color overlay)
    To me it sounds like these two would be simple one liners, but I can't for the love of God figure out how to do it!
    Documentation for JS is pretty good though, but I haven't been able to run JS code from my color picker. Here's my attempt att running javascript code:
    bool runJavascript(const char* jscode)
      // Sanity check
      if (sSPBasic == nil)
        NSLog(@"sSPBasic is NULL");
        return false;
      ASErr err = 0;
      JSScriptingSuite2* sScriptingSuite = NULL;
      err = sSPBasic->AcquireSuite(kJSScriptingSuite, kJSScriptingSuiteVersion2, (const void**)&sScriptingSuite);
      if (sScriptingSuite == NULL)  //Also support Photoshop CS1-CS4 and Elements 6-10
        err = sSPBasic->AcquireSuite( kJSScriptingSuite, kJSScriptingSuiteVersion1, (const void**)&sScriptingSuite);
      if  (sScriptingSuite == NULL) return false;
      JSEngineRef engineRef = NULL;
      err = sScriptingSuite->CreateEngine(&engineRef);
      if (err == kSPNoError)
        //Convert ascii to unicode
        wchar_t  * wcode;
        size_t codelength = strlen(jscode)+1;
        wcode = (wchar_t *)malloc(codelength*sizeof(wchar_t));
        mbstowcs(wcode, jscode, codelength);
        const ASUnicode * result = NULL;
        err = sScriptingSuite->ExecuteScript(engineRef, (ASUnicode*)wcode, kJSExecutionModeNoDebug, &result);
        if (err != kSPNoError)
          NSLog(@"JavaScript error (%d). Script: %s", (int)*result, jscode);
        else
          NSLog(@"JavaScript OK!");
        free(wcode);
      else
        return false;
      if (engineRef)
        sScriptingSuite->DeleteEngine( engineRef);
      return true;
    Which doesn't really work. It seems like the culprit is the conversion from char* to ASUnicode. In the example they had
    const ASUnicode test[] = {'a', 'l', 'e', 'r', 't', '(', '\'', 'h', 'i', '\'', ')', ';', 0 } ;
    which works just fine. But apparently I don't convert my string to ASUnicode the correct way. Any ideas or comments are very appreciated!

    char src[1024] = "alert('hello dissolve')";
    ASZString newZString;
    ASUnicode script[1024];
    sASZString->MakeFromCString(src, strlen(src) + 1, &newZString);
    sASZString->AsUnicodeCString(newZString, script, strlen(src) + 1, false);
    const ASUnicode * result;
    sScripting->ExecuteScript(engineRef, script, kJSExecutionModeNoDebug, &result);
    sScripting->DeleteEngine(engineRef);
    sASZString->Release(newZString);

  • My iphone wont let me download apps and is telling me to put in credit card stuff for free apps help me

    my iphone wont let me download apps and is telling me to put in credit card stuff for free apps help me

    You can create a new Apple ID without using a credit card for download free apps by following this guide: http://support.apple.com/kb/ht2534.  Follow it exactly as writtien.  Note that you have to download and try to install a free app and then create the ID.

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • Simple FD for generating ALV report using purchase order or sales order

    Can anybody send me a simple FD for generating ALV as well as interactive report for purchase order and sales order

    On the both the Sales Pricing Condition type and the Purchase Pricing condition type there is a field called Ref.condit.type. 
    For example you have a sales pricing condition PR00 with value $10. In your pricing condition in MM for example PB00 you enter PR00 in the Ref.condit.type. The value for PB00 will now be $10.
    Apart from this i do not think there is any standard configuration available in SAP for this. Please refer to SAP Note-95024. You may also consider to write your own logic in the PO Exit to derive the sales order pricing in PO.

  • I need a simple Converter for a selectBooleanCheckbox.

    Hi,
    Can someone tell me how to build a simple converter to go from a selectBooleanCheckbox value to a String and back.
    I save a String ("Y" or "N") in my table but the checkbox returns a boolean. I need a Converter to do the conversion from TRUE to "Y" and FALSE to "N". Should be easy to do but as of now, mine won't even execute properly.
    I get a
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't instantiate class: 'ca.sshrc.web.common.converters.BooleanConverterYn'.
    I don't understand how getAsObject and getAsString work I guess.
    Thanks

    Hi,
    Has anyone been able to make the converter for "<h:selectBooleanCheckBox>" work??
    seems like the converter method itself is not getting invoked.
    this is what i am trying to do..
    Code in jsp is
    <h:selectBooleanCheckbox id="testCheckBox" value="#{myBean.testCheckBox}" >
         <f:converter converterId="booleanConverter" />     
    </h:selectBooleanCheckbox>entry in faces-config is
    <converter>          
           <converter-id>booleanConverter</converter-id>                  <converter-class>package.MyBooleanConverter</converter-class>
      </converter>class MyBooleanConverter looks like this at the moment
    public class MyBooleanConverter implements Converter {
         public Object getAsObject(FacesContext context, UIComponent component, String value) {
              myBooleanClass myBoolean = new myBooleanClass(value);
              return myBoolean;
         public String getAsString(FacesContext context, UIComponent component, Object value) {
              return value.toString();
    }     Have kept myBooleanClass as a simple wrapper for the Boolean class.
    Same is working for string and integer but not in this case..
    Am i going wrong somewhere... kindly help

  • JSF and commandlink, strange comportment (for a newbie)

    Hello everybody, and excuse me for my bad english...
    I am actually working (or learning) JSF. But i'm actually in front of a very strange thing:
    When I have got two commandlinks on a jsp page pointing to the same method bean, the second sems not to be active!
    Maybe my english is not clear, so the following code should be more clear:
    My home.jsp:
    <html>
         <head>
              <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
              <title>home</title>
         </head>
         <body>
              <f:view>
                   <f:subview id="header">
                        <jsp:include page="links.jsp"/>
                   </f:subview>
                   <f:subview id="login">
                        <h:outputText
                             value="A really simple test for login/logout
                                     and display products     for logged in poeple"
                             id="presentation"/>
                        <h:form id="loginForm" rendered="#{userBean.loggedIn=='false'}">
                             <h:outputText value="Username"/><br>
                             <h:inputText value="#{userBean.name}" id="username" required="true"/><br>
                             <h:outputText value="Password"/><br>
                             <h:inputSecret value="#{userBean.password}" id="userpassword" required="true"/><br>
                             <h:commandButton value="Login" action="#{userBean.loginAction}"  />
                             <br>
                        </h:form>
                   </f:subview>
                   <f:subview id="footer">
                        <h:form id="testlink" >
                             <h:outputText value="You can aloso see the user list here:"/>
                             <h:commandLink id="hometousers" action="#{userBean.getAllUserAction}" value="go" />
                           </h:form>
                   </f:subview>
              </f:view>
         </body>
    </html>my links.jsp:
    <f:subview id="header">
         <h:form id="linksform">
              <table>
                   <tr>
                        <td>
                             <h:outputLink id="headertohome"  value="home.jsf">
                                  <f:verbatim> home </f:verbatim>
                             </h:outputLink>
                             <h:commandLink id="headertoproducts"
                                               action="#{productListBean.productsAction}"
                                               rendered="#{userBean.loggedIn=='true'}">
                                  <h:outputText value=" products "/>
                             </h:commandLink>
                             <h:commandLink id="headertousers"
                                               action="#{userBean.getAllUserAction}"
                                               rendered="#{userBean.loggedIn=='true'}">
                                  <h:outputText value=" users "/>
                             </h:commandLink>
                        </td>
                   </tr>
              </table>
         </h:form>
    </f:subview>As you can see, home.jsp include links.jsp, and "idtousers" has the same action than "headertousers".
    When I logg in with the "loginForm", the links included are visible and works fine.
    But, always when I am logged in, the link at the bottom of home.jsp ("testlink") is unusable, it does absolutely nothing (just the # character appears in the url...).
    And when i'm not logged in, the include links does not appear (normal), and the link at the bottom functions well.
    I have tested several things like use several views, subviews, forms... but without results...
    I hope I am clear.
    Have you got any idea?
    Thanks by advance.

    Ok, this is the more simple example possible for this problem.
    I have only two jsp(jsf) files, the first file (just below) caontains two commandlinks used to go on the second (by using the navigation rules with a managed bean).
    The first commandlink works well, but the second doesn't do anything... (I just see the '#' character at the end of the url but nothing happens).
    I use the 1.1 jsf implementation.
    The first jsp file:
              <f:view>
                   <h:form>
                        <h:commandLink action="#{simpleBean.createMsgAction}" value="destination" />
                   </h:form>
                   <h:form>
                        <h:commandLink action="#{simpleBean.createMsgAction}" value="destination" />
                   </h:form>
              </f:view>The second jsp file:
              <f:view>
                   <h:dataTable value="#{simpleBean.msgs}" var="row">
                        <h:column>
                             <f:facet name="header" >
                                  <h:outputText value="string" />
                             </f:facet>
                             <h:outputText value="#{row.msg}"/>
                        </h:column>
                   </h:dataTable>
              </f:view>I was thinking it's maybe a bug of this JSF version, but i haven't had the time to test with the 1.2 .
    Thank you by advance for your help. (I always hope I am clear)

  • Two or more productid will be accquired by same customerid, by same shipvia, on the same day of the week of shipped date. i want the simple query for this.

    consider this situation,
     Two or more productid will be accquired by same customerid, by same shipvia, on the same  day of the week of shipped date. i want the simple query for this.
    my tables are  from northwind:
    [orders] = OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry.
    [orders details] = OrderID, ProductID, UnitPrice, Quantity, Discount.
    i tried some but it is not exact, it gives wrong result.
    select pd.CustomerID,pd.ProductID, pd.no_of_time_purchased, sd.ShipVia, sd.same_ship_count, shipped_day from
    select ProductID,o.CustomerID,COUNT(productid) as no_of_time_purchased
    from orders o join [Order Details] od on o.OrderID=od.OrderID group by ProductID,o.CustomerID
    having count(od.ProductID) >1) pd
    join
    (select OrderID,customerid, shipvia, count(shipvia)as same_ship_count, DATENAME(DW,ShippedDate)as shipped_day from orders
    group by customerid, ShipVia, ShippedDate having COUNT(ShipVia) > 1 ) sd
    on sd.CustomerID=pd.CustomerID

    Hi,
    I think I have a solution that will at least give you a clue how to go about it. I have simplified the tables you mentioned and created them as temporary tables on my side, with some fake data to test with. I have incldued the generation of these temporary
    tables for your review.
    In my example I have included:
    1. A customer which has purchased the same product on the same day, using the same ship 3 times,
    2. Another example the same as the first but the third purchase was on a different day
    3. Another example the same as the first but the third purchase was a different product
    4. Another example the same as the first but the third purchase was using a different "ShipVia".
    You should be able to see that by grouping on all of the columns that you wich to return, you should not need to perform any subselects.
    Please let me know if I have missed any requirements.
    Hope this helps:
    CREATE TABLE #ORDERS
     OrderID INT,
     CustomerID INT,
     OrderDate DATETIME,
     ShipVia VARCHAR(5)
    CREATE TABLE #ORDERS_DETAILS
     OrderID INT,
     ProductID INT,
    INSERT INTO #ORDERS
    VALUES
    (1, 1, GETDATE(), 'ABC'),
    (2, 1, GETDATE(), 'ABC'),
    (3, 1, GETDATE(), 'ABC'),
    (4, 2, GETDATE() - 4, 'DEF'),
    (5, 2, GETDATE() - 4, 'DEF'),
    (6, 2, GETDATE() - 5, 'DEF'),
    (7, 3, GETDATE() - 10, 'GHI'),
    (8, 3, GETDATE() - 10, 'GHI'),
    (9, 3, GETDATE() - 10, 'GHI'),
    (10, 4, GETDATE() - 10, 'JKL'),
    (11, 4, GETDATE() - 10, 'JKL'),
    (12, 4, GETDATE() - 10, 'MNO')
    INSERT INTO #ORDERS_DETAILS
    VALUES
    (1, 1),
    (2, 1),
    (3, 1),
    (4, 2),
    (5, 2),
    (6, 2),
    (7, 3),
    (8, 3),
    (9, 4),
    (10, 5),
    (11, 5),
    (12, 5)
    SELECT * FROM #ORDERS
    SELECT * FROM #ORDERS_DETAILS
    SELECT
     O.CustomerID,
     OD.ProductID,
     O.ShipVia,
     COUNT(O.ShipVia),
     DATENAME(DW, O.OrderDate) AS [Shipped Day]
    FROM #ORDERS O
    JOIN #ORDERS_DETAILS OD ON O.orderID = OD.OrderID
    GROUP BY OD.ProductID, O.CustomerID, O.ShipVia, DATENAME(DW, O.OrderDate) HAVING COUNT(OD.ProductID) > 1
    DROP TABLE #ORDERS
    DROP TABLE #ORDERS_DETAILS

  • Simple report for lock users not actives in last 30 days ?

    Hi, we need code in SE38 simple report for lock all users not actives in last 30 days.
    This sample is good but need check : user its inactive in last 30 days.
    http://www.sap-basis-abap.com/abap019.htm
    Thank you.

    You do not need a report to do this. The instance parameter
    login/password_max_idle_productive
    will do this for you.
    Cheers
    Graham Robbo

  • I need simple example for alv grid

    hi
    i need code for simple example for alv grid.
    thanks.

    hi bharat,
                  this is report with most of the functionality.
    report zus_alv_demo_grid .
    tables:     ekko.
    type-pools: slis.
    types: begin of t_ekko,
    ebeln type ekpo-ebeln,
    ebelp type ekpo-ebelp,
    statu type ekpo-statu,
    aedat type ekpo-aedat,
    matnr type ekpo-matnr,
    menge type ekpo-menge,
    meins type ekpo-meins,
    netpr type ekpo-netpr,
    peinh type ekpo-peinh,
    line_color(4) type c, "Used to store row color
    end of t_ekko.
    data: it_ekko type standard table of t_ekko initial size 0,
           wa_ekko type t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    Data declaration for EVENT and PRINT PARAMETER.
    data: gt_events type slis_t_event,
           gd_prntparams type slis_print_alv.
    data declaration for sorting.
    data : it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    data :  i_list_comments type slis_t_listheader.
    start-of-selection.
      perform data_retrieval.
    perform user_command.
      perform build_fieldcatalog.
      perform build_layout.
      perform build_events.
      perform build_print_params.
      perform build_sortcat.
      perform display_alv_report.
    end-of-selection.
    *TOP-OF-PAGE.
    PERFORM top-of-page.
    end-of-page.
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      fieldcatalog-do_sum = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " build_fieldcatalog
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for
    *when double
                                            "click(press f2)*
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " build_layout
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    form data_retrieval.
      data: ld_color(1) type c.
      select ebeln ebelp statu aedat matnr menge meins netpr
    peinh from ekpo  into table it_ekko.
    *Populate field with color attributes
      loop at it_ekko into wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        if ld_color = 8.
          ld_color = 1.
        endif.
        concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        modify it_ekko from wa_ekko.
      endloop.
    endform.                    " data_retrieval
    *&      Form  display_alv_report
          text
    -->  p1        text
    <--  p2        text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gd_repid
                is_layout                = gd_layout
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'SET_PF_STATUS'
                it_event                 = gt_events
                is_print                 = gd_prntparams
                it_fieldcat              = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                   = 'X'
           tables
                t_outtab                 = it_ekko
           exceptions
                program_error            = 1
                others                   = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.              " DISPLAY_ALV_REPORT
    *&      Form  user_command
          text
    -->  p1        text
    <--  p2        text
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
       sy-datum(4) into wa_header-info."todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
         into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
           it_list_commentary = t_header
           i_logo             = 'GANESH_LOGO'.
    endform.                    " top-of-page
          FORM user_command                                             *
    -->  R_UCOMM                                                       *
    -->  RS_SELFIELD                                                   *
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
        when 'ULHAS'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
      endcase.
    endform.
          FORM set_pf_status                                            *
    -->  RT_EXTAB                                                      *
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ZNEWSTATUS'.
    endform.
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = gt_events[]
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      read table gt_events with key name =  slis_ev_end_of_page
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_end_of_list
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  build_print_params
          text
    -->  p1        text
    <--  p2        text
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " build_print_params
          FORM END_OF_PAGE                                              *
    form end_of_page.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      write: sy-uline(50).
      skip.  write:/40 'Page:', sy-pagno .
    endform.
          FORM END_OF_LIST                                              *
    form end_of_list.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      skip.  write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  build_sortcat
          text
    -->  p1        text
    <--  p2        text
    form build_sortcat.
    wa_sort-spos      = 1.
    wa_sort-fieldname = 'EBELN'.
    append wa_sort to it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    append wa_sort to it_sortcat.
    endform.                    " build_sortcat
    Rewards if helpfull
    regards
    vijay dwivedi

  • How to use simple types for table column names ?

    Hi,
    can any one tell how to to use simple types for table column names?
    It is required in internationalizing of webdynpro applications.
    Regards,
    Rajesh

    Hi,
    1: define required column names in <SimpleType>
    2:use the following code to get those values
    3:bind 'text' property of Column headers to context attributes
    4:take a context attribute 'Value' as type of <SimpleType>
    5:set these values to context attributes
    IWDAttributeInfo objAttrInfo=wdContext.getNodeInfo().getAttribute(IPrivate<ViewName>View.IContextElement.VALUE);
    ISimpleTypeModifiable simple=objAttrInfo.getModifiableSimpleType();
    Map m=simple.getEnumerationTexts();
    Collection c=m.values();
    Iterator it=c.iterator();
    if(it.hasNext())
    wdContext.currentContextElement.set<att1>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att2>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att3>(it.next().toString);
    Regards
    LakshmiNarayana

  • Is there a simple tutorial for Garageband?

    Is there a simple tutorial for Garageband?

    Mac 101: GarageBand
    http://www.apple.com/ilife/video-showcase/
    Type "Garageband" into the search bar at the top of this page by "Support"

  • [svn:fx-trunk] 11642: Simple fix for non-integer translations by first multiplying to twips before casting to int .

    Revision: 11642
    Author:   [email protected]
    Date:     2009-11-10 19:40:31 -0800 (Tue, 10 Nov 2009)
    Log Message:
    Simple fix for non-integer translations by first multiplying to twips before casting to int.
    QE notes: Please test non-integer translations in FXG.
    Doc notes: N/A
    Bugs:
    SDK-24110 - Drawing of compiled FXG items is off by half a pixel
    Reviewer: Peter DeHaan
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24110
    Modified Paths:
        flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/types/FXGMatrix.java

    i dont know why you are so mean i just asked which
    wrongs i had wrong
    anyway im done with thoseSo, the questions have 4 alternative answers. We tell you which questions you got wrong. This eleminates one of
    the alternatives, leaving 3 choices. Usually in most mutlichoice questions 1 choice is obviously incorrect,
    leaving 2 choices. One of those you have probably already discarded when you initially made your incorrect chocie
    thus leaving 1 alternative. Congratulations you just 100% on your test. I don't think so. Go read your book or notes or
    whatever you have because all the answers will be in there. The teacher will not ask you a question on a subject
    you have no prior knowledge of.

Maybe you are looking for

  • Converting analog to digital video

    Does anybody know a cheap way to convert analog video (from a VHS) to digital video that can be burned on a DVD? A converter box is probably my best option as I have no digital camcorder, but I was looking for one under $150. So far the only ones I c

  • Submit Button Issues

    I have created a form in InfoPath and am using SharePoint as the method of users entering their inquiries. Whenever I click the "submit" button, nothing occurs. I have to click it again for the data connections to run. For some reason, the submit but

  • PDF is not opening after Adobe Reader's upgrade to version X

    Hello there! Please I'm having a trouble relating to Adobe Reader I hope you can help me Today I was asked to upgrade Adobe Reader to X version. Sure enough I did it The problem is that now when I try to open a pdf file I get the message: "Windows ca

  • Data modification code not working please suggest something good?

    Hi all, I have a sql file where for all "CONSTRAINT anyname NOT NULL," occurences i have to append "NOT NULL, -- " before "CONSTRAINT Adept_Usr_Login NOT NULL, " in order to modify that. I have written this code which is not giving required result. P

  • Question on recovery

    Hello all, I think the following recovery should be possible but I'm not sure. Appreciate if you could shed some light. Scenario 1) SCOTT user accidentally drops a table in SCOTT tablespace when the SCN was 100. 2) FLASHBACK is not enabled for the da