Recalculate sum of More than One Asset asset values

Hi Team,
Can you please guide whether there exists any T-code through which we can  Recalculate  sum of more than One Asset values  at single point of time.
ex: iif we go asset master (AS02), in the Edit tab,recalucates values, in the asset master we can do only one single asset,
but as we required do the recalculate asset values at a time more than one asset.
Please let us know is there any t.code ?
Thanks
Ram

Hi Ram,
What you the system does in AS02 Menu: 'Edit - Recalculte values' is exactly the same what AFAR does. The difference is, in AS02 you only recalculate the values for that very asset. But all values that need value recalculated and updated will get adjusted when executing this step. So, if you have made a posting to the asset that for any reason did not update the table yet, and therefore is not reflected in the Asset Explorer, you can first simulate a recalculation for this asset and see what would be the new update of values. Then when you go to AS02 Menu: 'Edit - Recalculte values' the system will actually adjust the values in real time. Same is when you make a change to e.g. depreciation key, it will require an adjustment of values and a recalculation will do that.
So, whether you use AS02 for the single asset or use AFAR - the system does exactly the same.
The difference is however, that in AFAR, you recalculate the values for ALL the assets in that company code. For example, it is recommended that before you do the depreciation run or periodic posting run at the end of each period, that you ran also the recalculation program RAAFAR00 for the company code, so that any value adjustment/changes in values will be captured before running depreciation or periodic postings.
I hope this clarifies. Please also check on the online documentation in help.sap.com for more information.
Else, if you need to adjust other values on the asset and it is not about recalculating values, then you can use a write-up/unplannded depreciation (check it out under Easy Access Menu: Manual Value Correction) or maybe you can use the transaction for miscellanious ABSO.
I hope this helps you further.
Kind regards,
Brigitte

Similar Messages

  • Custom UIInput with more than one bean bound value

    Hi Experts,
    I'm creating a custom component which will act as a search bar (thus it will contain a text input area) and which contains a css dropdown menu from which the user will be able to select the type of search. In other words this component should have two value bindings, one for the search string and one for the selected search mode. I've managed to get the search working by extending UIInput and binding the search string to my component's value attribute, but I can't get the selected search mode to reflect in the bean. In my decode() method I retrieve the value from the post and it's correct and everything, but if I call the setter on my component that value is never propogated to the value binding and thus the bean.
    Please have a look at some of my code below:
    The component tag looks something like this:
    <my:component value="#{bean.searchString}" searchOptions="#{bean.searchOptions}" selectedOption="#{bean.selectedOption}" actionListener="#{bean.search} />
    {code}
    My decode method in the renderer is as follow:
    {code}
    public void decode(FacesContext context, UIComponent component) {     
      if (!component.isRendered()) {
        return;
      SearchBoxComponent searchBox = (SearchBoxComponent)component;
      String clientId = searchBox.getClientId(context);
      Map<String,String> requestParameterMap = context.getExternalContext().getRequestParameterMap();
      // Set the search string - this works fine
      String searchString = (String)requestParameterMap.get(clientId + ":searchString");
      searchBox.setValue(searchString);
      // Set the selected option which is stored in a hidden field - this works fine
      String selectedOption = (String)requestParameterMap.get(clientId + ":selected_option");
      searchBox.setSelectedOption(selectedOption); // This is called correctly, but it doesn't update the value binding's value?
      // Check whether the search button was pressed and queue action
    {code}
    The component's code is below:
    {code}
    public class SearchBoxComponent extends UIInput {
      // getValue and setValue is inherited
      public String getSelectedOption() {
        if (selectedOption == null) {  
          ValueExpression valueExpression = getValueExpression("selectedOption");
            if (valueExpression != null) {
              selectedOption = (String)valueExpression.getValue(getFacesContext().getELContext());
         return selectedOption;
      public void setSelectedOption(String selectedOption) {
        this.selectedOption = selectedOption;
        // Tried this - didn't help
        // ValueExpression valueExpression = getValueExpression("selectedOption");
        // valueExpression.setValue(getFacesContext().getELContext(), selectedOption);
    {code}
    And finally part of the tag class:
    {code}
    protected void setProperties(UIComponent component) { 
      super.setProperties(component); 
      SearchBoxComponent searchBox = (SearchBoxComponent)component;       
       if (selectedOption != null) { 
              searchBox.setValueExpression("selectedOption", selectedOption); 
    // Standard getter and setter
    {code}
    Thank you,
    Ristretto
    Ps. When and where should setSubmittedValue() be used, and what should I do like in this case if there are two "submitted values"?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Could you describe more in your selectable choices in your combo box?
    If you ask user about which are their favourite fruits,
    You can use checkbox for selecting.
    If you ask user about their gender,
    You can use radio button.
    You can even use more than one combo boxes for displaying result.
    Could you describe your requirement in detai? If we do not know your choice for selecting, you cannot suggest which
    component to use and how to implement.

  • Not able to Render more than two asset type in a drop zone on page

    Hi All,
    I have created two different assets by making two different flex family.
    I need to render these two assets in a single drop zone on a page.
    Can some one tell me how is it possible to make a drop zone on page which will be able to take two different type of assets because while creating Page attribute when i select page attribute of type asset there is no option through which i can select more than two asset types.
    Thanks & regards,
    Ankur Bhatia

    Hi Rodney,
    Thanks for ur Reply.
    While creating page attribute on admin site,when we select attribute type as "asset" a dropdown list comes just below through which we can select only a single asset.
    how to use a list option here or how can we create it so that it can be used with various asset types.
    Also in avisports site there is no drop zone which can contain more than one asset of different type.
    The Drop zone contains here all the assets of same type.
    Thanks and Regards
    Ankur Bhatia

  • Is there any way to allocate a particular asset to more than one cost centr

    Hi all,
    I would like to know the posting of an asset to more than one cost center,
    is there any particular setting to configure this,
    or,
    please suggest me how to go about,
    regards,
    naga suman

    Hi Naga,
    Not sure exactly what you are talking about but if you are talking about depreciation charges to more than one cost center then it is not possible.  Asset is only assigned to one cost center on a particular date.  However that cost center can be changed as it is time dependent field.  So one month you could post the depreciation to cost center A and next month to cost center B.
    One way to get postings to various cost centers would be to use distribution in CO to accomplish your goal.  You would then post the depreciation as per normal to one cost center in the depreciation run.  Then you would set up distribution rules for that cost center and relevant Depreciation Cost Elements to distribute it to other cost centers.  By doing this the asset would always show depreciation against 1 cost center but the distribution would allocate relevant cost between other cost centers.
    Hope this helps,
    Cheers,
    Gudmundur

  • Asset Master to be assigned to more than one WBS element

    Hi Guys
    I have a scenario in which a Asset should be assigned to more than one Project, i.e. WBS Element.
    Is it possible by any way to assign a asset to more than one WBS element.
    Warm Regards
    Bala

    Hi Vijay Kumar
    Your right, but my situation is different.
    Take an example, i have server in a software company, that will be used for more than one project. In this case the asset number is the same as the same asset is used for different project at a given point of time
    Warm Regards
    Bala

  • ALV, sums, more than one WAERS, WAERS is not shown

    Hello,
    I have a problem:
    I have a table which contains WRBTR AND WAERS.
    There are more than one possible waers.
    So  I have a table for example:
    100   EUR
    1000 EUR
    500  EUR
    700  USD
    800  EUR
    The sum line looks like:
    2600 EUR
    700
    The second WAERS is missing.
    Why does the report show the EUR and not the USD?
    I want both WAERS.
    Any idea?

    Hi,
    Check this code it works fine.
    DATA : BEGIN OF WA_JESUS,
             V_NO TYPE I,
             V_M1(3) TYPE c,
           END OF WA_JESUS.
    DATA :  IT_JESUS LIKE HASHED TABLE OF WA_JESUS WITH HEADER LINE WITH UNIQUE KEY V_m1.
    IT_JESUS-V_NO   = 700.
    IT_JESUS-V_M1 = 'USD' .
    COLLECT IT_JESUS.
    IT_JESUS-V_NO   = 800.
    IT_JESUS-V_M1 = 'EUR' .
    COLLECT IT_JESUS.
    IT_JESUS-V_NO   = 700.
    IT_JESUS-V_M1 = 'EUR' .
    COLLECT IT_JESUS.
    LOOP AT IT_JESUS.
    WRITE : / IT_JESUS-V_NO,
              IT_JESUS-V_M1.
    ENDLOOP.
    Thanks,
    Reward If Helpful.

  • Building a method with more than one result data

    Hi, everyone:
    I'm a little shy to ask this question, however, it's been hanging in my mind for so long, so I think I'd rather make a confession on it. You may laugh at me if you want, I'm ready for that, but I more look forward to that someone can really give me the light, or even the link, or some hint....
    For your ease of reading, I give the question first, and my whole story behind:
    When I need a method which can provide more than one result( in other words, multiple outputs), how can I do it in Java? As I know, either you pass and object, or the result of the function is an object will do , for the object contains the datas you want, but that means your needs for those data have to be defined in object format in advance, won't that be inconvinient? Or Java has a better solution for that?
    //And here's the whole story....
    I began my career as a programmer by starting with LabVIEW, it's a graphical programming language made by National Instrument, and it's powerful on DAQ, and industrial field. One of the most important issues on design is to devide your system into multiple functions( in its own term: subVI), I think it's just like applying structured analysis method.
    When we dealing with functions in LabVIEW, a programmer can define his own function with mulitiple inputs and outputs, for example, I can design a function called SumAndDevide, which accepts two input ( two variables to be summed and devided) and gives two results( result of summing and that of deviding).
    The methodology has its power, at least it provide the functional decomposition, and you can compose a suitable solution in certain circumstance even they are not the smallest unit function. And testing is easy. It affects me so large that I look the trail of it when I come to other programming languages. In COBOL( well, that is a VERY old COBOL version ), I was scared to find there is no protection to the inner data on the performed sections, while making a outside subroutine to be called is cubersome and really a hard work. When I came to Delphi, I knew that using the result of a function cannot satisfy me, for it give only one output, even you can define it as variant, but I think it's vague to realize. So I use the difference of called by value and called by reference to handle the problem, that is: a value parameter for the input, and a variable paramter for the output.
    Well, when I came to Java, I am stunned again, now there is no passing by reference mechanism in Java, otherwise you have to pass it as an object, but that means when you need multiple outputs, the output has to be defined in object form in advance. And that will be very inconvinient!! I tried to find some solutions, but I can't. So is there any way that in Java you can define a method with multiple output? or Java handles the problem in totally different way?
    Any comments will be appreciated!!
    Thanks!!
    aQunx from Taiwan

    You missed the most common OO solution - separation of concerns and implementation hiding.
    If you have a function which returns a string, that is one method of the object that provides the service.
    If you have a function which returns a real, that is a different method of the object.
    If both functions require common code, move that into a private method which is called by both. If the method is costly, cache the result.
    eg an aerodynamics properties class, which could be done as a multivalued return of (lift, drag), refactored to independent lift() and drag() methods, which delegate to an interpolate() method, which caches the interpolated value and uses mach, pressureHeight and _alpha to determine whether it should recalculate:  /**
       * Calculates the aerodynamic drag force at a given mach, alpha and pressure height.
      public double drag (final double aMach, final double aPressureHeight, final double aAlpha) {
        interpolate(aMach, aPressureHeight, aAlpha);
        return _drag;
       * Calculates the aerodynamic lift force at a given mach, alpha and pressure height.
      public double lift (final double aMach, final double aPressureHeight, final double aAlpha) {
        interpolate(aMach, aPressureHeight, aAlpha);
        return _lift;
      private void interpolate (final double aMach, final double aPressureHeight, final double aAlpha) {
        if (aMach != _mach) {
          setMach(aMach);
          _pressureHeight = Double.NaN;
        if (aPressureHeight != _pressureHeight) {
          setPressureHeight(aPressureHeight);
          _alpha = Double.NaN;
        if (aAlpha != _alpha) {
          setAlpha(aAlpha);
    ... actual interpolation happens in the private setXXX methods.

  • More than one Value for a Category

    Hello,
    it is possible to assign more than one value of a category to a document by assigning the category once more. Is it a bug or a feature?
    If it is not a bug, I wonder why it is not possible to search for a document with two values of one category set? And why isn't it possible to combine category values with "OR" in my search query?
    Best regards,
    Christian

    Only one video role, only one audio roll, per clip.  Only one as these are "Media Stems", and when you work with Stems, only one roll per asset video, one per asset audio.

  • More than one role for a clip.Is it possible?

    Is it possible assign more than one role for a clip?
    thx

    Only one video role, only one audio roll, per clip.  Only one as these are "Media Stems", and when you work with Stems, only one roll per asset video, one per asset audio.

  • How to add more than one clip to a drop zone?  New guy

    Hey all, I'm new to DVD studio and I'm trying to fiqure out how to add more than one clip to a Template drop zone. I'm using a 6 button template. I've named each button .. Football, Baseball, Hockey ...etc.
    How can put in MORE THAN ONE CLIP in the Football track/drop zone. So when someone clicks on Football they can see 3 examples.
    Do I need to create something to link to that Football button?
    Any replies appreciated

    You can edit the segments to be used in FCP or Motion so that the asset drop in has three examples
    Another way (if you want) is to make the entire menu outside of DVD SP so that the background layer is an m2v and the items are revealed/masked to some degree
    Take a look towards the bottom of this thread http://discussions.apple.com/thread.jspa?messageID=2951183&#2951183 where I discuss http://www.dvdstepbystep.com/Overmovies.zip
    Note that you can also use a basic overlay to do this. The overlay would be just solid black instead of the arrows/circles things I use in that example.
    For instance make the text one color and the box over the movie another (You can make it blue and the box red lets say) Draw a region over both for the button. Map blue for highlights/transparencies for normall/selected/activated and the same for the Box

  • Hotspot on more than one fields in ALV Report

    I want to add Hotspot on more than one field in ALV,
      one field is Vbeln , one is BSTNK, one is matnr and so on.
    i have used form user_command.and have written coding for Vbeln (on vbeln i am showing transaction VA02)
    i want to pass an eror mesaage when user clicks on bstnk or matnr.
    Thanks

    Hi Lovleen,
    *Global definitions  *
    Data Types
    type-pools: slis.
    types: begin of tp_data,
    ebeln like ekko-ebeln,
    *matnr like ekko-matnr,
    *meins like ekko-meins,
    lifnr like lfa1-lifnr,
    chk1,
           end of tp_data,
           tp_tbl_data type standard table of tp_data.
    Constants
    Data objects (variable declarations and definitions)
    Report data to be shown.
    data: it_data type standard table of tp_data.
    Heading of the report.
    data: t_heading type slis_t_listheader.
    ======================= Selection Screen ==========================
    selection-screen: begin of block b1 with frame title text-t01.
    DATA: w_aux_ebeln like ekko-ebeln.
    SELECT-OPTIONS s_ebeln for w_aux_ebeln
    DEFAULT 1000 .
    DATA: w_aux_lifnr like lfa1-lifnr.
    SELECT-OPTIONS s_lifnr for w_aux_lifnr
    DEFAULT 00000001000 .
    selection-screen: end of block b1.
    ======================== Event Blocks =============================
    at selection-screen.
    start-of-selection.
      perform get_data using it_data.
    end-of-selection.
      perform build_alv using it_data t_heading.
    ======================== Subroutines ==============================
    *&      Form  get_data
          Gets the information to be shown in the report.
    form get_data using t_data type tp_tbl_data.
    SELECT e~ebeln
    *e~matnr
    *e~meins
    l~lifnr
    INTO CORRESPONDING FIELDS OF TABLE t_data
    FROM ekko as e
    inner join lfa1 as l on elifnr = llifnr
    WHERE e~ebeln in s_ebeln
    AND l~lifnr in s_lifnr
    endform.                    " get_data
    *&      Form  build_alv
          Builds and display the ALV Grid.
    form build_alv using t_data type tp_tbl_data
                         t_heading  type slis_t_listheader.
    ALV required data objects.
    data: w_title   type lvc_title,
          w_repid   type syrepid,
          w_comm    type slis_formname,
          w_status  type slis_formname,
          x_layout  type slis_layout_alv,
          t_event    type slis_t_event,
          t_fieldcat type slis_t_fieldcat_alv,
          t_sort     type slis_t_sortinfo_alv.
    refresh t_fieldcat.
    refresh t_event.
    refresh t_sort.
    clear x_layout.
    clear w_title.
    Field Catalog
      perform set_fieldcat2 using:
    1 'CHK1' 'XFELD' space space space 'Select' 'Select this row' 'Sel'
    'Select this row' space space space 'X' 'X' space t_fieldcat,
    2 'EBELN' 'EBELN' 'EKKO' space space  space  space  space  space space
    space space space space space t_fieldcat ,
    3 'MATNR' 'MATNR' 'EKKO' space space  space  space  space  space space
    space space space space space t_fieldcat ,
    4 'MEINS' 'MEINS' 'EKKO' space space  space  space  space  space space
    space space space space space t_fieldcat ,
    5 'LIFNR' 'LIFNR' 'LFA1' space space  space  space  space  space space
    space space space space space t_fieldcat .
    Layout
    x_layout-zebra = 'X'.
    Top of page heading
      perform set_top_page_heading using t_heading t_event.
    Events
      perform set_events using t_event.
    GUI Status
      w_status = ''.
      w_repid = sy-repid.
    Title
    w_title = <<If you want to set a title for
                the ALV, please, uncomment and edit this line>>.
    User commands
      w_comm   = 'USER_COMMAND'.
    Order
    Example
    PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
    Displays the ALV grid
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = w_repid
          it_fieldcat              = t_fieldcat
          is_layout                = x_layout
          it_sort                  = t_sort
          i_callback_pf_status_set = w_status
          i_callback_user_command  = w_comm
          i_save                   = 'X'
          it_events                = t_event
          i_grid_title             = w_title
        tables
          t_outtab                 = t_data
        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.                    " build_alv.
    *&      Form  set_top_page_heading
          Creates the report headings.
    form set_top_page_heading using t_heading type slis_t_listheader
                                    t_events  type slis_t_event.
    data: x_heading type slis_listheader,
          x_event   type line of slis_t_event.
    Report title
      clear t_heading[].
      clear x_heading.
      x_heading-typ = 'H'.
      x_heading-info = ''(001).
      append x_heading to t_heading.
    Program name
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Program: '.
      x_heading-info = sy-repid.
      append x_heading to t_heading.
    User who is running the report
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'User: '.
      x_heading-info = sy-uname.
      append x_heading to t_heading.
    Date of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Date: '.
      write sy-datum to x_heading-info.
      append x_heading to t_heading.
    Time of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Time: '.
      write sy-uzeit to x_heading-info.
      append x_heading to t_heading.
    Top of page event
      x_event-name = slis_ev_top_of_page.
      x_event-form = 'TOP_OF_PAGE'.
      append x_event to t_events.
    endform.
    *&      Form  set_events
          Sets the events for ALV.
          The TOP_OF_PAGE event is alredy being registered in
          the set_top_page_heading subroutine.
    form set_events using t_events type slis_t_event.
    data: x_event   type line of slis_t_event.
    Example
    clear x_event.
    x_event-name = .
    x_event-form = .
    append x_event to t_event.
    endform.
    *&      Form  set_order
          Adds an entry to the order table.
    FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
                         t_sort TYPE slis_t_sortinfo_alv.
      DATA: x_sort TYPE slis_sortinfo_alv.
      CLEAR x_sort.
      x_sort-fieldname = p_fieldname.
      x_sort-tabname   = p_tabname.
      x_sort-up = p_up.
      x_sort-down = p_down.
      x_sort-subtot = p_subtot.
      APPEND x_sort TO t_sort.
    ENDFORM.                    "set_order
    *&      Form  set_fieldcat2
          Adds an entry to the field catalog.
       p_colpos: Column position.
       p_fieldname: Field of internal table which is being described by
    *            this record of the field catalog.
       p_ref_fieldname: (Optional) Table field / data element which
    *                describes the properties of the field.
    *                If this field is not given, it is copied from
    *                the fieldname.
       p_ref_tabname: (Optional) Table which holds the field referenced
    *              by <<p_ref_fieldname>>.
                      If this is not given, the parameter
                      <<p_ref_fieldname>> references a data element.
       p_outputlen: (Optional) Column width.
       p_noout: (Optional) If set to 'X', states that the field is not
    *           showed initially. If so, the field has to be
                included in the report at runtime using the display
                options.
       p_seltext_m: (Optional) Medium label to be used as column header.
       p_seltext_l: (Optional) Long label to be used as column header.
       p_seltext_s: (Optional) Small label to be used as column header.
       p_reptext_ddic: (Optional) Extra small (heading) label to be
    *                used as column header.
       p_ddictxt: (Optional) Set to 'L', 'M', 'S' or 'R' to select
                  whether to use SELTEXT_L, SELTEXT_M, SELTEXT_S,
                  or REPTEXT_DDIC as text for column header.
       p_hotspot: (Optional) If set to 'X', this field will be used
    *             as a hotspot area for cursor, alolowing the user
    *          to click on the field.
       p_showasicon: (Optional) If set to 'X', this field will be shown
                     as an icon and the contents of the field will set
    *             which icon to show.
       p_checkbox: (Optional) If set to 'X', this field will be shown
                   as a checkbox.
       p_edit: (Optional) If set to 'X', this field will be editable.
       p_dosum: (Optional) If set to 'X', this field will be summed
                (aggregation function) according to the grouping set
                by the order functions.
       t_fieldcat: Table which contains the whole fieldcat.
    FORM set_fieldcat2 USING
          p_colpos p_fieldname p_ref_fieldname p_ref_tabname
          p_outputlen p_noout
          p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
          p_hotspot p_showasicon p_checkbox p_edit
          p_dosum
          t_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
    General settings
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-col_pos = p_colpos.
      wa_fieldcat-no_out = p_noout.
      wa_fieldcat-hotspot = p_hotspot.
      wa_fieldcat-checkbox = p_checkbox.
      wa_fieldcat-icon = p_showasicon.
      wa_fieldcat-do_sum = p_dosum.
    Set reference fieldname, tablenam and rollname.
    If p_ref_tabname is not given, the ref_fieldname given
       is a data element.
    If p_ref_tabname is given, the ref_fieldname given is a
       field of a table.
    In case ref_fieldname is not given,
       it is copied from the fieldname.
      IF p_ref_tabname IS INITIAL.
        wa_fieldcat-rollname =   p_ref_fieldname.
      ELSE.
        wa_fieldcat-ref_tabname = p_ref_tabname.
        IF p_ref_fieldname EQ space.
          wa_fieldcat-ref_fieldname =   wa_fieldcat-fieldname.
        ELSE.
          wa_fieldcat-ref_fieldname =   p_ref_fieldname.
        ENDIF.
      ENDIF.
    Set output length.
      IF NOT p_outputlen IS INITIAL.
        wa_fieldcat-outputlen = p_outputlen.
      ENDIF.
    Set text headers.
      IF NOT p_seltext_m IS INITIAL.
        wa_fieldcat-seltext_m = p_seltext_m.
      ENDIF.
      IF NOT p_seltext_l IS INITIAL.
        wa_fieldcat-seltext_l = p_seltext_l.
      ENDIF.
      IF NOT p_seltext_s IS INITIAL.
        wa_fieldcat-seltext_s = p_seltext_s.
      ENDIF.
      IF NOT p_reptext_ddic IS INITIAL.
        wa_fieldcat-reptext_ddic = p_reptext_ddic.
      ENDIF.
      IF NOT p_ddictxt IS INITIAL.
        wa_fieldcat-ddictxt = p_ddictxt.
      ENDIF.
    Set as editable or not.
      IF NOT p_edit IS INITIAL.
        wa_fieldcat-input     = 'X'.
        wa_fieldcat-edit     = 'X'.
      ENDIF.
      APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    ======================== Subroutines called by ALV ================
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
        i_logo             = <<If you want to set a logo, please,
                             uncomment and edit this line>>
          it_list_commentary = t_heading.
    endform.                    " alv_top_of_page
    *&      Form  user_command
          Called on user_command ALV event.
          Executes custom commands.
    form user_command using r_ucomm     like sy-ucomm
                            rs_selfield type slis_selfield.
    Example Code
    Executes a command considering the sy-ucomm.
    CASE r_ucomm.
       WHEN '&IC1'.
         Set your "double click action" response here.
         Example code: Create and display a status message.
         DATA: w_msg TYPE string,
               w_row(4) TYPE n.
         w_row = rs_selfield-tabindex.
         CONCATENATE 'You have clicked row' w_row
                     'field' rs_selfield-fieldname
                     'with value' rs_selfield-value
                     INTO w_msg SEPARATED BY space.
         MESSAGE w_msg TYPE 'S'.
    ENDCASE.
    End of example code.
    endform.                    "user_command
    Reward Points if useful.
    Regards,
    Manoj Kumar

  • How to get more than one lack record in 1 or 2 seconds

    pls help its urgent ,
    i need to retrieve more record from different table it have more than one lack record ,and its more than 20 seconds ,how to minimise the time to one seconds
    My sql:
    SELECT
    tl.ProjectID,
    pr.jobname,
    name as Department_name,
    ChargeNum,
    (ac.ActivityCode ||':'||ac.SubCode) as ActivityCodeName,
    SUM(HoursWorked), (Case When isBilled=1 or billedRate<>0 then BilledRate else ppr.Rate End) as RATE
    FROM
    TimeLogEntries tl INNER JOIN activitycodes ac on ac.ACTIVITYCODEID=tl.ACTIVITYCODEID INNER JOIN projectrates ppr on tl.ACTIVITYCODEID = ppr.ACTIVITYCODEID and tl.projectid=ppr.projectid ,
    projects pr INNER JOIN departments d on d.DEPARTMENTID =pr.REVENUECENTERID
    WHERE
    to_char(Date_,'yyyy-mm-dd') BETWEEN '2006-01-01' and '2008-12-30'
    AND
    tl.ProjectID = pr.ProjectID
    Group By
    tl.ProjectID,
    tl.ActivityCodeID,
    BilledRate,
    ChargeNum,
    pr.jobname,
    name,
    (ac.ActivityCode ||':'||ac.SubCode),
    (Case When isBilled=1 or billedRate<>0 then BilledRate else ppr.Rate End)
    ORDER BY
    tl.ChargeNum;

    hi,
    even i am searching for some thing similar.
    i want to have 3 calendars in one page.
    getting same message calendar already exists on page 2. You can only add one calander per page. Select a different page.
    pls help.

  • Get the data with more than one of the desired value

    Hi,
    I need to pull the records with more than one value of 'Other' on the delivery days fields.
    The delivery fields are mon,tue,wed,thu,fri and sat that tells the where the item will be delivered. The value can be Home, Work, or Other.
    Here is the Sample data:
    cust_id: 123
    item: newspaper
    mon: Home
    tue:Work
    wed: Other
    thu: Home
    fri: Other
    sat: Other
    And here is my query so far.
    select
    cust_id,
    item,
    mon,
    tue,
    wed,
    thu,
    fri,
    sat,
    sum(case when (del_mon = 'O' or del_tue ='O' or del_wed ='O' or del_thu ='O' or del_fri ='O' or del_sat='O') then 1
    else 0 end) as day_ctr
    from customer
    Could you please help me with the right formula I need to get this?
    Thank you in advance..

    First
    DESC customer
    Second
    Can you explain what you are trying with
    sum(case when (del_mon = 'O' or del_tue ='O' or del_wed ='O' or del_thu ='O' or del_fri ='O' or del_sat='O') then 1 else 0 end) as day_ctr
    Third
    Usually it's helpful a example of the result you want...
    Perhaps you want this
    select DECODE(mon,1,(select distinct mon from customer), 'OTHER') mon,
            DECODE(tue,1,(select distinct tue from customer), 'OTHER') tue,
            DECODE(wed,1,(select distinct wed from customer), 'OTHER') wed,
            DECODE(thu,1,(select distinct thu from customer), 'OTHER') thu,
            DECODE(fri,1,(select distinct fri from customer), 'OTHER') fri,
            DECODE(sat,1,(select distinct sat from customer), 'OTHER') sat from
    select
    COUNT(DISTINCT mon) mon,
    COUNT(DISTINCT tue) tue,
    COUNT(DISTINCT wed) wed,
    COUNT(DISTINCT thu) thu,
    COUNT(DISTINCT fri) fri,
    COUNT(DISTINCT sat ) sat
    from customer
    )

  • Can a Method listen to more than one event in ABAP OO ?

    Hi,
    is it possible to prepare/register a handler method for e.g two events of two different classes ?
    Or can a method generally listen to only one event ?
    It seems that the syntax allows only one event ?
    methods event_handler for event my_event of my_class.
    Thanks for help in advance
    Olaf

    An event can refer to more than one object but you have to instantiate the objects
    for example   I have 2 grids and want to handle events depending on which grid
    the user is selecting / requesting actions on. (I've just posted the relevant bits coded here as data extraction etc you can code normally).
    FORM instantiate_grid
    * Create Grid container
    * Instantiate Grid class
    * Instantiate Event Handler class
    * Display the Grid
       USING  grid_container  TYPE REF TO cl_gui_custom_container
              class_object  TYPE REF TO cl_gui_alv_grid
              container_name TYPE scrfname.
    * create the container
      CREATE OBJECT grid_container
      EXPORTING container_name = container_name.
    * Create the ALV grid object using
    * container just created
      CREATE OBJECT  class_object
      EXPORTING
         i_parent = grid_container.
    *  Exclude the SUM function from the GRID toolbar
      ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
      APPEND ls_exclude TO lt_exclude.
    * Instantiate our handler class
    * lcl_event_handler
      CALL METHOD class_object->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter.
      CREATE OBJECT g_handler.
      SET HANDLER g_handler->handle_double_click FOR class_object.
      SET HANDLER g_handler->handle_hotspot_click FOR class_object.
      SET HANDLER g_handler->handle_toolbar FOR class_object.
      SET HANDLER g_handler->handle_user_command FOR class_object.
      SET HANDLER g_handler->handle_data_changed FOR class_object.
      SET HANDLER g_handler->handle_data_changed_finished FOR class_object.
    ENDFORM.                    "instantiate_grid
    MODULE status_0100 OUTPUT.
      IF grid_container IS INITIAL.
        PERFORM instantiate_grid
           USING grid_container
                 grid1
                 'CCONTAINER1'.
    * Grid title Primary Grid
        struct_grid_lset-grid_title = 'Delimit Old org Units - Selection'.
        struct_grid_lset-edit =  'X'.
        struct_grid_lset-sel_mode = 'D'.
        PERFORM display_grid
         USING
            grid1
             <dyn_table>
             it_fldcat.
      ENDIF.
      SET PF-STATUS '001'.
      SET TITLEBAR '000' WITH 'Delimit Old Org Units'.
    ENDMODULE.                    "status_0100 OUTPUT
    * PAI module
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANC'.
          LEAVE PROGRAM.
        WHEN 'RETURN'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                    "user_command_0100 INPUT
    MODULE status_0200 OUTPUT.
      IF grid_container1 IS INITIAL.
        PERFORM instantiate_grid
           USING grid_container1
                 grid2
                 'CCONTAINER2'.
    * Grid title  secondary grid
        struct_grid_lset-grid_title = 'Delimited Objects'.
        struct_grid_lset-edit =  ' '.
        PERFORM display_grid
         USING
            grid2
             <dyn_table1>
             it_fldcat1.
      SET PF-STATUS '001'.
      SET TITLEBAR '000' WITH 'Org Units Delimited'.
    endif.
    ENDMODULE.                    "status_0200 OUTPUT
    In your local event handling class use the variable SENDER to  determine which grid / object triggered the event
    for example
    CLASS lcl_event_handler DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
                          IMPORTING e_row_id e_column_id es_row_no,
    **Double Click Handler
        handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
                                        IMPORTING e_row e_column es_row_no
                                        sender,
    ** Toolbar handler.
    handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive
                sender,
    * button press
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm
                 sender,
    * data changed
    handle_data_changed
        FOR EVENT data_changed OF cl_gui_alv_grid
          IMPORTING er_data_changed,
    *data changed finished
    handle_data_changed_finished
         FOR EVENT data_changed OF cl_gui_alv_grid,
    download_to_excel.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    * Implementation methods for lcl_event_handler
    CLASS lcl_event_handler IMPLEMENTATION.
    *Handle Hotspot Click
    * When a "hotspotted"cell is double clicked
    * Hotspot indicatore needs to be set in
    * the field catalog.
    * Not required for this application.
      METHOD handle_hotspot_click .
        PERFORM mouse_click
          USING e_row_id
                e_column_id.
        CALL METHOD grid1->get_current_cell
          IMPORTING
            e_row     = ls_row
            e_value   = ls_value
            e_col     = ls_col
            es_row_id = ls_row_id
            es_col_id = ls_col_id
            es_row_no = es_row_no.
        CALL METHOD grid1->refresh_table_display.
        CALL METHOD grid1->set_current_cell_via_id
          EXPORTING
            is_column_id = e_column_id
            is_row_no    = es_row_no.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  handle_double_click.
        CASE sender.
          WHEN grid1.
    * returns cell double clicked  FROM GRID 1
    * Ignore any event from GRID 2
            PERFORM double_click
               USING e_row
               e_column.
        ENDCASE.
      ENDMETHOD.                    "handle_double_click
    * Add our buttons to standard toolbar
      METHOD handle_toolbar.
        CASE sender.
    * Only add functionality to PRIMARY GRID (GRID 1)
          WHEN grid1.
    * append a separator to normal toolbar
            CLEAR ls_toolbar.
            MOVE 3 TO ls_toolbar-butn_type.
            APPEND ls_toolbar TO e_object->mt_toolbar.
    * Delimit Org
            CLEAR ls_toolbar.
            MOVE 'PROC' TO ls_toolbar-function.
            MOVE icon_railway TO ls_toolbar-icon.
            MOVE 'DELIMIT' TO ls_toolbar-quickinfo.
            MOVE 'DELIMIT ORG UNIT' TO ls_toolbar-text.
            MOVE ' ' TO ls_toolbar-disabled.
            APPEND ls_toolbar TO e_object->mt_toolbar.
    * Select All Rows
            MOVE 'SELE' TO ls_toolbar-function.
            MOVE icon_select_all TO ls_toolbar-icon.
            MOVE 'ALL CELLS' TO ls_toolbar-quickinfo.
            MOVE 'ALL CELLS' TO ls_toolbar-text.
            MOVE ' ' TO ls_toolbar-disabled.
            APPEND ls_toolbar TO e_object->mt_toolbar.
    * Deselect all Rows.
            MOVE 'DSEL' TO ls_toolbar-function.
            MOVE icon_deselect_all TO ls_toolbar-icon.
            MOVE 'DESELECT ALL' TO ls_toolbar-quickinfo.
            MOVE 'DESELECT ALL' TO ls_toolbar-text.
            MOVE ' ' TO ls_toolbar-disabled.
            APPEND ls_toolbar TO e_object->mt_toolbar.
            ENDCASE.
         move  0 to ls_toolbar-butn_type.
         move 'EXCEL' to ls_toolbar-function.
         move  space to ls_toolbar-disabled.
         move  icon_xxl to ls_toolbar-icon.
         move 'Excel' to ls_toolbar-quickinfo.
         move  'EXCEL' to ls_toolbar-text.
         append ls_toolbar to e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar
      METHOD handle_user_command.
    * Entered when a user presses a Grid toolbar
    * standard toolbar functions processed
    * normally
       g_sender = sender.
        CASE e_ucomm.
          WHEN 'PROC'.    "Process selected data
            PERFORM get_selected_rows.
          WHEN 'SELE'.
            PERFORM select_all_rows.
          WHEN 'DSEL'.
            PERFORM deselect_all_rows.
          WHEN 'EXCEL'.
              call method me->download_to_excel.
            WHEN OTHERS.
        ENDCASE.
      ENDMETHOD.                    "handle_user_command
      METHOD handle_data_changed.
    * only entered on data change  Not req for ths app.
        PERFORM data_changed USING er_data_changed.
      ENDMETHOD.                    "data_changed
      METHOD handle_data_changed_finished.
    * only entered on data change finished  Not req for ths app.
        PERFORM data_changed_finished.
      ENDMETHOD.                    "data_changed_finished
    * Interactive download to excel
      method download_to_excel.
      field-symbols:
       <qs0>   type standard table,
       <qs1>   type standard table.
      data: G_OUTTAB1 type ref to data,
            g_fldcat1 type ref to data,
            LS_LAYOUT type KKBLO_LAYOUT,
            LT_FIELDCAT type KKBLO_T_FIELDCAT,
            LT_FIELDCAT_WA type KKBLO_FIELDCAT,
            L_TABNAME type SLIS_TABNAME.
    case g_sender.
      when grid1.
         get reference of <dyn_table> into g_outtab1.
         get reference of it_fldcat into g_fldcat1.
       when grid2.
       get reference of <dyn_table1> into g_outtab1.
         get reference of it_fldcat1 into g_fldcat1.
    endcase.
       assign g_outtab1->* to <qs0>.
        assign g_fldcat1->* to <qs1>.
           call function  'LVC_TRANSFER_TO_KKBLO'
          exporting
            it_fieldcat_lvc   = <qs1>
    *     is_layout_lvc     = m_cl_variant->ms_layout
             is_tech_complete  = ' '
          importing
            es_layout_kkblo   = ls_layout
            et_fieldcat_kkblo = lt_fieldcat.
        loop at lt_fieldcat into lt_fieldcat_wa.
          clear lt_fieldcat_wa-tech_complete.
          if lt_fieldcat_wa-tabname is initial.
            lt_fieldcat_wa-tabname = '1'.
            modify lt_fieldcat from lt_fieldcat_wa.
          endif.
          l_tabname = lt_fieldcat_wa-tabname.
        endloop.
        call function 'ALV_XXL_CALL'
             exporting
                  i_tabname           = l_tabname
                  is_layout           = ls_layout
                  it_fieldcat         = lt_fieldcat
                  i_title             = sy-title
             tables
                  it_outtab           = <qs0>
             exceptions
                  fatal_error         = 1
                  no_display_possible = 2
                  others              = 3.
        if  sy-subrc <> 0.
          message id sy-msgid type 'S' number sy-msgno
                 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
    endmethod.
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    The sender instance is a variable such as  g_sender type ref to cl_gui_alv_grid.       "Sender instance.
    The above example is for OO ALV grids but should work for other interactive cases where a User presses a key or does a mouse action.
    Cheers
    jimbo

  • Having with more than one clause

    Hi
    Is posssible to have a query with more than one clause in having condition
    Example In my query I have Count , Sum and AVG , I need to use 3 conditions in having, Is It possible ?
    Thank you in advance

    Hi,
    yes, in Having you can also use AND and OR.
    with x as (select 1 nr from dual)
    select nr
    from x
    group by nr
    having count(*) = 1
    and sum(nr) = 1Herald ten Dam
    http://htendam.wordpress.com

Maybe you are looking for

  • I am locked out of my account and can't use my Best Buy points

    Hi, I am an Elite Plus customer and really upset with Best Buy as they decided to lock me out of my account due to an audit and I can't use in inspite of having $2000 in my account that I bank. I called Best Buy 3 days ago after receiving an email th

  • Project wise profitability analysis

    Hi I have to create MIS for project wise profitability analysis .  In sales order we used additional tab as project and we assigned projects to each and every sales order Now they want one Report "Project wise profitability analysis" . So i have do t

  • Varying columns in XML data source

    Hi, I have a XML as below, with the varying column names. Is it possible to have it as datasource ? <rules> <rule>      <ruleName>abc</ruleName>      <desc>abca abca abc</desc>      <rate>           <ruleName>abc</ruleName>           <rateName>Regula

  • Safari keeps crashing - crash log attached

    I know this gets posted all the time, but Safari keeps crashing on me, and needless to say, I need it not to do so. I have already tried permissions repair, resetting Safari, and the problem goes away, but then comes back. Here is the crash log: Code

  • Material on SMARTFORMS

    Hi, I am new to smartforms. please anyone send me the east to understand material on samrtforms. thanks in advance. Regards Anil