Regarding percentage methods

hi all
my client is indian based i need clarificafication regarding calculation of
percentages on different assets like buildings, plants,machinaries,and furniture,computers.
   my question is :is there any pre defined percentages for these assets to calculate depreciation,on what basis we calculate that means tax,p&l,balnsheet
pls clarify my query
regards
chandra.

Hello
Multi-Level Method
Use
Base methods for certain depreciation calculation methods (Stated percentage and Total percentage in concessionary period) use either a total percentage rate or a periodic percentage rate to calculate depreciation. You can divide these calculation keys into as many levels as you like. A level, in this sense, represents the period of validity of a certain percentage rate. This percentage rate is then replaced by the next percentage rate when its period of validity has expired.
Features
Period of Validity for the Individual Levels
You determine the validity period for the individual levels of a key by specifying the length of time in years and months. You can choose whether the defined validity period begins with
The capitalization date
The start date for ordinary or tax depreciation
The original acquisition date of the asset under construction
The changeover year
The defined time periods of a key always have a common start date. This means that the period from the start of one key to its end will overlap with the next period, which has the same start date but a longer validity period. Therefore, you have to enter the validity periods for the levels in cumulative form.
There is a special indicator you can use when you work with non-calendar fiscal years. The indicator allows you to specify that the definition of the levels applies to the fiscal year and not to the calendar year. However, be aware of the considerations involved when using shortened fiscal years (see Shortened Fiscal Years ).
Depreciation Percentage Rates
How you enter the depreciation percentage rate is dependent on the depreciation calculation method being used:
When using the Total percentage in concessionary period depreciation calculation method, you also have to enter the depreciation percentage rate in cumulative form (see example).
When using the Stated percentage depreciation calculation method, you do not enter the percentage rate in cumulative form.
The following example shows the definition of five levels, each one of which should last for a year. The Total percentage in concessionary period depreciation calculation method is being used. The depreciation percentage rates in the individual years are 60, 10, 10, 10, and 10%.
Validity period
Percentage
1 year
60
2 years
70
3 years
80
4 years
90
5 years
100
In addition, you can limit the levels according to specific acquisition years. This enables you, for example, to observe certain legal requirements that place time restrictions.
Suresh

Similar Messages

  • I 'd like to know regarding a method to separate a standby node from CE

    Hi community
    I have a question regarding a method to separate a standby node from CE.
    I would like  to know if it is possible to run the vary off command on standby node while active instance is working.
    For example,
    -shutdown standby instance on standby server.
    -run vary off and exportvg command on standby node while active instance is working.
    Version Info
    -OS : AIX 6.1
    -DBMS : Sybase CE 15.5 with 2Node
    -Shared Volumn : DS8700 ( 4TB )
    In this case, I would like to know if there is any side effect on Active instance.
    Our CE version is ASE15.5 ESD5.3 on AIX.
    Thanks in advance
    Regards
    Taiwoo Kim

    To make sure I understand, you have a two node ASE cluster....one of which is active, the second is idle.   You want to detach (for some reason) the disks from the second node of the cluster.
    From the cluster viewpoint, provided you shutdown the ASE instance on that node and don't run any cluster utilities on that node (e.g. sybcluster, quorumutil, etc.) - then whether the disks are attached or not is likely not going to be an issue.   It would be no difference to the surviving node than if you shutdown the other node completely (host included).
    What concerns me is that you obviously are planning something that affects that volume group - e.g. moving it to a new machine???    Swapping HW???  Updating OS volume management firmware???   If swapping HW, remember, the quorum has the list of participants in the cluster - so unless the new hardware hostname/ipaddr matches the old, you will need to modify the quorum entries (TechSupport can help with this) - although the better approach would be to build a new node of the cluster on the new HW (temporarily a 3 node cluster) and then remove the old node from the cluster.    If updating OS firmware, just be careful that the patch doesn't cause problems with IO fencing by changing the SCSI PGR versions or something.

  • Regarding get_parameter_field method in webdynpro abap

    Hello Gurus,
    We have a requirement in to prepare selection screen.we are implimenting selection screen with two select options and one parameter using add_selection_field and add_parameter_field methods respectively.now i need these values at runtime.so,ihave used two methods for this are get_range_table_of_sel_field and get_parameter_field .but the method get_parameter_field is not working properly.how can i get parameter value at runtime.this is the correct metod or not to get the parameter value at runtime.
    Could anyone  suggest me solutions?
    could anyone  send me sample code or reference links if possible.
    Thanks in Advance for your replies.
    Regards,
    babu

    Hi Rajasekhar,
    Please go through below wiki. It uses another way to get data from all selection-screen items.
    [Complex Select Option USage|http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages]
    I hope it helps.
    Regards,
    Sumit

  • Need some explanations regarding static Method

    Hello,
    I have a code where a class has a static method access by other classes. This not working as I thought and I would like to understand why.
    Here below is the code.
    Here is a class having the static method "test"
    package test;
    public class StaticTest {
        public StaticTest() {
        public static void test (int i){
        while (i < 1000){
            System.out.println("i = " + i );
            i++;
    }Here is the code of another class (Thread) using this static method. This Thread can be initialized with an integrer value that will be passed to the static Method.
    package test;
    public class ThreadTester extends Thread {
        int x;
        public ThreadTester(int i) {
            x=i;
        public void run(){
            StaticTest.test(x);
    }Here is the code starting 2 Thread running in parallel and both are then calling the static method.
    //start 2 thread accessing the static method.
          ThreadTester test1 = new ThreadTester(0);
          ThreadTester test2 = new ThreadTester(200);
          test1.start();
          test2.start();
    ...As the second thread is started with a bigger value I thought that we would only have seen few printouts from the first thread starting by 0 and then printouts starting by 200.
    Here is what I thought regarding the result:
    i = 0
    i = 1
    i = 2
    i = 3
    i = 200 --> startup of the second thread, x in static method is overriden (at least this is what I thought!)
    i = 201
    i = 202
    i = 203
    i = 204
    i = 205
    i = 206
    i = 207
    i = 208
    i = 209
    But the real result is:
    i = 0
    i = 1
    i = 2
    i = 3
    i = 4
    i = 5
    i = 200
    i = 6
    i = 201
    i = 202
    i = 203
    i = 204
    i = 205
    i = 206
    i = 7
    i = 207
    i = 208
    i = 209
    i = 8
    It seems that there is 2 instances running in parallel. I thought that it would'nt be the case with the word "Static".
    Also I don't understand the result because if I use JBuilder in Optimizer mode I can see that there is only one instance of StaticTest object.
    Can anyone here explain me how is that possible?
    Thanks in advance for your help.
    Regards,
    Alain.

    >
    thread test1 creates its own stack and starts incrementing �i� starting at values 0. However, in the middle of incrementing, it gets kicked out by the OS (or JVM) into a �blocked� state to allow other threads to run. BUT before leaving the running state, test1 saves the stack state including the value of �i�.
    >
    Ok, now I understand, but then I have another question.
    What is the difference between the code shown in my first post and the following where we create 2 instances of StaticTest class (which is not static in this case for sure).
    How to decide (while coding) if it is better to use difference instances of class or not?
    package test;
    public class StaticTest {
        public StaticTest() {
        public void test (int i){ //Not static anymore
        while (i < 1000){
            System.out.println("i = " + i );
            i++;
    }We create new instance in the Thread.
    package test;
    public class ThreadTester extends Thread {
        int x;
        public ThreadTester(int i) {
            x=i;
        public void run(){
    StaticTest newInstance = new StaticTest(); //Create a new instance
            newInstance .test(x);
    }Alain

  • Regarding 'get_attribute_props_for_node'* method from if_wd_context_node

    hello gurus,
                    i have requirement in a view it has two radio buttons named as release and un release.if i select release button the view data in display mode only , it meaans in view one header information and one item table is there.in the second case when i select un release button the view data again in change mode.how can i achive this requirement.right now i can get the release status at runtime through radio button group by key ui element onselect action.now i need to impliment depends upon release information view data into change mode or display mode. for this can we use 'get_attribute_props_for_node' method from if_wd_context_node . if yes how can we pass parameters to this method and how can i achive my requirement through this.
    i am very new for webdynpro abap .could any one suggests me on this and could any one can send sample code regarding this if possible.
    thanks in advance for your reply
    regards,
    babu

    Hi Rajasekhar,
    For ALV you have to write some code like this.. follow this
    lr_column = lr_column_settings->get_column( 'FIELD' ). // Field is one field you wnat to display in edit mode..
          CREATE OBJECT lr_input_field
            EXPORTING
              value_fieldname = 'FIELD'.
          lr_input_field->set_read_only( abap_true ).
          lr_column->set_cell_editor( lr_input_field ).
    OR folow below
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1?quicklink=index&overridelayout=true
    http://forums.sdn.sap.com/click.jspa?searchID=72897441&messageID=6805421
    foolow LEkhas answer in this
    Edit few fields in an ALV table
    also this..
    ALV: columns in read-only mode look like editable columns in edit mode
    O/P ALV in edit mode
    Cheers,
    Kris.

  • Regarding setValueAt method in JTable

    sir,
    i have a problem regarding JTable.
    now if u enter the data in cell
    then setvalueAt() method is called once
    now if u enter the data in a cell which is already
    having a dat in that cell, then the setvalueAt method
    is called twice.........
    why it so and how can i prevent it as i needed it in
    getting dataVector and when i print the values of dataVactor
    it gives recent values not the previuos set values
    i m just beginner in this concern
    i hope u be able to understand and solve
    thanks in advance

    Hi,
    I have looked at your code. You are still trying to control too much yourself. Let the table do it instead. The table is designed to handle all of its events and works best when you let it. I made a few code suggestions here. I didn't compile it, so please don't expect it to just work. It is merely a suggestion of an approach that may make your work easier.
      Vector tableData = new Vector();
      ArrayList newValues;
      ViewModel ()
        // in the constructor create an ArrayList for each row that will be displayed
        // and put them in the tableData Vector
        int count = newViewFrame.sortCombo.getItemCount(); // Count is the number of rows?
        for(int i=0;i<count;i++)
          newValues = new ArrayList();
          for (int j = 0; j < numColumns; j++)
            newValues.add();
          tableData.add (newValues);
      // These methods are used by the table and should be supplied
      public int getRowCount ()
      { return tableData.size(); }
      public int getColumnCount ()
      { return 5; }   // the number of columns in your table - this number is used a lot
                      // do not make it complicated to compute
      public void setValueAt(Object value,int row, int col)
        //super.setValueAt(value,row,col); - No point, this is an empty method
        // if the index is out of bounds or nothing was changed return
        if (row < 0 || row >= getRowCount())
          return;
        if (o == null)
        { return; }
        // get the data array for the row which was changed 
        newValues = (ArrayList)tableData.elementAt (row);
        // it doesn't look like your are doing anything for columns 1 -4 ?
        if (column == 0)
          return;
        if (column == 1) 
          return
        else if (column == 2)  
          return;
        else if (column == 3)   
          return;
        else if (column == 4) 
          // not first - do this after you have changed the array
          // fireTableChanged(new TableModelEvent(this,0,4,4));
          Integer colValues[] = TableComboBoxEditor.getColumnValues(((ViewModel)newViewFrame.viewTable.getModel()).getDataVector(),col);
          int retrunValue = alreadyExists(colValues , value);
          System.out.println("the value of row is "+retrunValue);
          if( retrunValue != Integer.MIN_VALUE && retrunValue != row)
            System.out.println("heyheyeheyeheye");
            Set setOfRows = TableComboBoxEditor.hash.keySet();
            Iterator iterator = setOfRows.iterator();
            setValueAtCalled=true;
            int count = newViewFrame.sortCombo.getItemCount();
            // newValues = new ArrayList(); use the one from the dataVector
            for(int i=0;i<count;i++)
              newValues.add(newViewFrame.sortCombo.getItemAt(i));
            // while(iterator.hasNext()){
            // setValueAt(new Integer(0),((Integer)iterator.next()).intValue(),col);
            validatingRemainingColumns(iterator,value,row);
            setValueAtCalled = false;
          // now refresh the table
          fireTableChanged(new TableModelEvent(this,0,4,4));
      // this method creates Integers to set the values in the table
      // If you want Strings instead change it
      public Object getValueAt (int row, int column)
        if (row < 0 || row >= getRowCount())
          return " ";
        newValues = (ArrayList) tableData.elementAt (row);
        if (column == 0)         // set number
          return new Integer (newValues.get(0));
        else if (column == 1)   
          return new Integer (newValues.get(1));
        else if (column == 2)  
          return new Integer (newValues.get(2));
        else if (column == 3)  
          return new Integer (newValues.get(3)));
        else if (column == 4)  
          return new Integer (newValues.get(4)));
        else if (column == 5)  
          return new Integer (newValues.get(5)));
      {\code]

  • Regarding Node methods........?

    Hi all,
    In my scenario ,i have a column of chekboxes in my ALV.aftr that user can select any no checkboxes.
    whwn user check on checkbox,the record must selected and finally i have to pass all those selected records into on table.
    how can do it?
    method ON_DATA_CHECK .
    data:
        Node_Ep_Sch_Info                    type ref to If_Wd_Context_Node,
        Elem_Ep_Sch_Info                    type ref to If_Wd_Context_Element,
        lt_Ep_Sch_Info                    type If_Ep_Sch_Details=>Elements_Ep_Sch_Info ,
        ls_Ep_Sch_Info                    type If_Ep_Sch_Details=>Element_Ep_Sch_Info ,
         lv_checked                       type If_Ep_Sch_Details=>Element_Ep_Sch_Info-CHK_BOX.
         Node_Ep_Sch_Info = wd_Context->get_Child_Node( Name = IF_EP_SCH_DETAILS=>wdctx_Ep_Sch_Info ).
      Node_ep_sch_info->get_static_attributes_table( importing TABLE = lt_ep_sch_info ).
    LOOP AT LT_EP_SCH_INFO INTO LS_EP_SCH_INFO.
    IF LV_CHECKED EQ 'X'.
    Node_ep_sch_info->SET_SELECTED( ).
    ENDIF.
    ENDLOOP.
        Node_ep_sch_info->GET_SELECTED_ELEMENTS( ).
    endmethod.
    i used above scenario.here what is the return type of GET_SELECTED_ELEMENTS( ).how can i pass these selected elements into one table?
    Regards,
    Ravi.

    Hi ravi
    Create a internal table it_newdata having same structure as your context node, to do so:
    Data: it_newdata   type  IF_viewname=>elements_nodename.
    Say if I have a view called DISPALY having a context node 'DATA'  then to declare a internal table having the same line type as of attributes of data write:
    Data: it_newdata  type if_display=>elements_data,
           ls_newdata   like line of  it_newdata.      " work area
    Now as I mention in my previous reply in the loop statement, fill the internal table it_newdata .
    loop at it_selected_row into ls_selected_row.
    *get all the attributes of every element
    CALL METHOD ls_selected_row->get_static_attributes
    IMPORTING
    static_attributes = stru_Ep_Sch_Info.
    ls_newdata-attrib1 = stru_Ep_Sch_Info-attrib1.
    ls_newdata-attrib2 = stru_Ep_Sch_Info-attrib2.
    ls_newdata-attrib3 = stru_Ep_Sch_Info-attrib3.
    append ls_newdata to it_newdata .
    clear: ls_newdata.
    endloop.
    Read your node say : DATA using code wizard which you want to fill. It will give you stryu_data, elem_data and node_data. use node_data
    Now bind the data to the context node
      Node->Bind_Table(
        New_Items =  it_newdata
        Set_Initial_Elements = Abap_True ).

  • HElp needed regarding oci methods..

    hi,
    Dont we have oci functions which perform same task like these methods in mysql : mysql_insert_id(),mysql_info(),mysql_select_db(), mysql_real_escape_string().Actually we are working on some conversion form mysql to oracle..so we need these methods...If anyone already worked in such conversion will definitely be of great help.
    Thanks.
    srinath.

    Hi,
    since MySQL is a completly different system, the functions to connect and access are also completely different.
    Oracle doesn't use fields, which are incrementet by "auto_increment". In a Oracle DB, you will instead use a Sequence and a Trigger for this:
    Let's say you have a table "katalog" with a primary key "KAID" it will look like this:
    -- Creating the Sequence:
    CREATE SEQUENCE SEQ_KATALOG_KAID INCREMENT BY 1 START WITH 1 MAXVALUE 999999999999 MINVALUE 1 ;
    -- Creating the Trigger, to use the Sequence:
    CREATE OR REPLACE TRIGGER "KT"."TR_KATALOG_KAID" before insert on "KATALOG"
    for each row begin
    if inserting then
    if :NEW."KAID" is null then
    select SEQ_KATALOG_KAID.nextval into :NEW."KAID" from dual;
    end if;
    end if;
    end;
    ALTER TRIGGER "KT"."TR_KATALOG_KAID" ENABLE;
    If you need to replace mysql_insert_id, you can use:
    SELECT SEQ_KATALOG_KAID.currval AS KAID from dual;
    Instead of using mysql_select_db(), you can select the database to use during connecting with OCI_connect(), or OCI_logon();
    To have another database connected, during the script-runtime, you can either use oci_new_connect(), or use "CONNECT username/password@host/service" as an SQL statement.
    Instead of using mysql_real_escape_string(), I think you have to test every single input, before using it as a value within your SQL statements.
    Greetings from Hamburg
    Thorsten

  • Question regarding a method of stocking data

    I know this thread already is in the "New to Java Technology" Forum, although I said the topic was closed there so I could open it back here.. I realized it would be more fitting here and it would probably get more replies...
    I am working with a friend on a Client for Ultima Online and we have to stock data concerning the various objects and characters in the same sector as the Client. We have 3 ideas of what the best method could be, but we have no clue which method would be the most performant (concerning both speed and memory), or if there is a better method to do so.
    Here's a description of the methods we thought about:
    Method #1
    Create many class files for each type of object, having the various related variables in their respective classes...
    Exemple: A principal class called DataObject which holds the data common to all objects/characters. Classes which extends DataObject such as DataMobile (for the Characters) and DataItem (for the Items) in which the data specific to characters and items is stocked. And also various classes for the various types of objects such as Containers which will extend DataItem...
    Method #2
    Create a single class file which would hold an Array containing the various variables and of which the size would be the maximum amount of parameters possible. The array would work in relation with a byte which would hold the type of data stocked into the Array, this way we could know the structure of data and retrieve this data where it is in the Array...
    M�thod #3 <= This one was the first idea and we know it is the worse one.. Telling you about it though
    Create a single class file which would hold all the possible variables. These variables would only be used when necessary.
    M�thod #4
    Create a single class file which would extend java.util.Hashtable. The parameters would be stocked this way: The Key mapped to the value would be the type of parameter (represented by a Byte (not byte)) (type of parameter such as Serial, Name, Strenght, Dexterity, etc...). And the value would be stocked as a String, Integer, Short or Byte according to the case (once again, it isn't primitives, it is the classes from java.lang.*).
    Thanks in advance for the suggestions :)

    This is not an advanced language topic. This is a beginner question, I would be very surprised if you got an answer in this forum.

  • Query regarding onNavigate method in a tableview control

    hi all,
    i am using a tableview control in jspdynpage to display the sales order details using the standard BAPI that is BAPI_SALESORDER_GETLIST.
    following is the flow:-
    i enter the customer number and the sales organization in the first i-view.
    it interacts with the backend and brings the data into a tableview control in the second i-view.
    the problem i am facing is:-
    when i click on the navigation button of the tableview control instead of showing the next row of records, it takes me back to the previous i-view.
    please help as i am unable to find the error myself.
    i can post the code if you want.....
    regards,
    raghav

    i am posting the code...
    main class
    package com.sap.training;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sap.portal.services.api.connectorgateway.IConnectorGatewayService;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.event.TableNavigationEvent;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class getsalesorder extends PageProcessorComponent {
         //private getdatabean first_bean;
         public DynPage getPage() {
              return new getsalesorderDynPage();
         public static class getsalesorderDynPage extends JSPDynPage {
              public getdatabean data;
              private getdatabean data1;
              public IRecordSet exportTable = null;
              private final static int INITIAL_STATE = 1;
              private final static int NEXT_STATE = 2;
              private int state = INITIAL_STATE;
              //private getdatabean myBean = null;
              IPortalComponentRequest request = null;
              IPortalComponentResponse response = null;
              IPortalComponentContext ctxt = null;
              private int visibleRow;
              public void doInitialization() {
              public void doProcessAfterInput() throws PageException {
              public void doProcessBeforeOutput() throws PageException {
                   switch (state) {
                        case INITIAL_STATE :
                             this.setJspName("getdata.jsp");
                             break;
                        case NEXT_STATE :
                             this.setJspName("showresult.jsp");
                             break;
              public void onShowClick(Event event) {
                   IPortalComponentResponse response =
                        (IPortalComponentResponse) this.getResponse();
                   InputField CUSTOMER_NUMBER =
                        (InputField) getComponentByName("myInputField1");
                   String customerNumber =
                        CUSTOMER_NUMBER.getValueAsDataType().toString();
                   InputField SALES_ORGANISATION =
                        (InputField) getComponentByName("myInputField2");
                   String salesOrganisation =
                        SALES_ORGANISATION.getValueAsDataType().toString();
                   request = (IPortalComponentRequest) getRequest();
                   response = (IPortalComponentResponse) getResponse();
                   IConnectorGatewayService cgService =
                        (IConnectorGatewayService) PortalRuntime
                             .getRuntimeResources()
                             .getService(
                             IConnectorService.KEY);
                   ConnectionProperties prop =
                        new ConnectionProperties(
                             request.getLocale(),
                             request.getUser());
                   IConnection client = null;
                   try {
                        client = cgService.getConnection("R3System", prop);
                   } catch (Exception e) {
                        response.write(e.toString());
                   try {
                        IInteraction ix = client.createInteractionEx();
                        IInteractionSpec interactionSpec = ix.getInteractionSpec();
                        interactionSpec.setPropertyValue(
                             "Name",
                             "BAPI_SALESORDER_GETLIST");
                        RecordFactory rf = ix.getRecordFactory();
                        MappedRecord input = rf.createMappedRecord("input");
                        input.put("CUSTOMER_NUMBER", customerNumber);
                        input.put("SALES_ORGANIZATION", salesOrganisation);
                        MappedRecord output =
                             (MappedRecord) ix.execute(interactionSpec, input);
                        Object rs = null;
                        Object result = output.get("SALES_ORDERS");
                        if (result == null) {
                             rs = new String(" ");
                        } else if (result instanceof IRecordSet) {
                             exportTable = (IRecordSet) result;
                             exportTable.beforeFirst();
                        //                    while (exportTable.next())
                        //                                   response.write("<script language='JavaScript'>");
                        //                                   response.write( "alert('" + exportTable.getString("MATERIAL")+"');" );
                        //                                   response.write("</script>");     
                        //                    exportTable.beforeFirst();
                   } catch (Exception e) {
                        response.write(e.toString());
                   } finally {
                        if (client != null) {
                             try {
                                  client.close();
                                  client = null;
                             } catch (Exception e) {
                   ctxt =
                        ((IPortalComponentRequest) getRequest()).getComponentContext();
                   Object O = ctxt.getValue("data");
                   if (O == null || !(O instanceof getdatabean)) {
                        data = new getdatabean(request, response);
                        data.createData(exportTable);
                   } else {
                        data = (getdatabean) O;
                        data.createData(exportTable);
                   ctxt.putValue("data", data);
                   state = NEXT_STATE;
              public void onBackClick(Event event) {
                   response = (IPortalComponentResponse) getResponse();
                   state = INITIAL_STATE;
              public void onNavigate(Event event) throws PageException {
                   if (event instanceof TableNavigationEvent) {
                        TableNavigationEvent tne = (TableNavigationEvent) event;
                        if (tne != null) {
                             this.visibleRow = tne.getFirstVisibleRowAfter();
                             if (data != null) {
                                  data.setVisibleRow(
                                       new Integer(this.visibleRow).toString());
    bean class
    package com.sap.training;
    import java.io.Serializable;
    import java.util.Vector;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class getdatabean implements Serializable {
         private String visibleRow="1";
         public IRecordSet exportTable = null;
         public DefaultTableViewModel model;
         public IPortalComponentRequest request;
         public IPortalComponentResponse response;
         public getdatabean(){
              model = new DefaultTableViewModel();
         public getdatabean(IPortalComponentRequest request,IPortalComponentResponse response)
              this.request = request;
              this.response = response;
         public DefaultTableViewModel getModel() {
              return this.model;
         public void setModel(DefaultTableViewModel model) {
              this.model = model;
         public void createData(IRecordSet exportTable) {
              this.exportTable = exportTable;
         public DefaultTableViewModel getModel1() {
              Vector data = createData1();
              Vector colName = new Vector();
              colName.addElement("Material");
              colName.addElement("Document Date");
              model = new DefaultTableViewModel(data, colName);
              return model;
         private Vector createData1() {
              Vector retVec = new Vector();
              try {
                   while (exportTable.next()) {
                        //response.write("data is in export");
                        Vector dataVec = new Vector();
                        dataVec.addElement(exportTable.getString("MATERIAL"));
                        dataVec.addElement(exportTable.getString("DOC_DATE"));
                        retVec.addElement(dataVec);
              } catch (Exception e) {
                   response.write("EXCEPTION...........");
                   response.write(e.toString());
              return retVec;
         public void setVisibleRow(String string) {
              visibleRow = string;          
         public String getVisibleRow(){
              return visibleRow;
    1st jsp
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean
         id="data1"
         scope="application"
         class="com.sap.training.getdatabean"
         />
    <hbj:content
         id="myContext">
         <hbj:page
              title="PageTitle">
              <hbj:form
                   id="myFormId">
                   <hbj:textView
                        id="CUSTOMER_NUMBER"
                        text="CUSTOMER_NUMBER"
                        design="EMPHASIZED"/>
                   <hbj:inputField
                        id="myInputField1"
                        type="String"
                        value=""
                        maxlength="30">
                   </hbj:inputField>
                   <br>
                   <br>
                   <hbj:textView
                        id="SALES_ORGANIZATION"
                        text="SALES_ORGANIZATION"
                        design="EMPHASIZED"/>
                   <hbj:inputField
                        id="myInputField2"
                        type="String"
                        value=""
                        maxlength="30">
                   </hbj:inputField>
                   <br>
                   <br>
                   <hbj:button
                        id="show"
                        text="show"
                        width="100px"
                        tooltip="click here to show result"
                        onClick="onShowClick"
                        disabled="false"
                        design="STANDARD">
                   </hbj:button>
              </hbj:form>
         </hbj:page>
    </hbj:content>
    2nd jsp
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean
         id="data"
         scope="application"
         class="com.sap.training.getdatabean"
         />
    <hbj:content
         id="myContext">
         <hbj:page
              title="PageTitle">
              <hbj:form
                   id="myFormId">
                   <hbj:tableView
                        id="tv"
                        design="ALTERNATING"
                        headerVisible="true"
                        footerVisible="true"
                        fillUpEmptyRows="false"
                        navigationMode="BYLINE"
                        headerText="sales order details"
                        onNavigate="onNavigate"
                        visibleFirstRow="<%= data.getVisibleRow() %>"
                        visibleRowCount="5"
                        rowCount="20"
                        width="300 px">
                        <%
                        tv.setModel(data.getModel1());
                        %>
                   </hbj:tableView>
                   <hbj:button
                        id="back"
                        text="back"
                        width="100px"
                        tooltip="click here to go back"
                        onClick="onBackClick"
                        disabled="false"
                        design="STANDARD">
                   </hbj:button>
              </hbj:form>
         </hbj:page>
    </hbj:content>
    deployment descriptor
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
        <property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/>
      </application-config>
      <components>
        <component name="getsalesorder">
          <component-config>
            <property name="ClassName" value="com.sap.training.getsalesorder"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>

  • Doubt Regarding Collection Methods

    Hello,
    I am working on Oracle version 10g Release 2
    I wanted to know that how can we find a particular name (person) exists in a Collection..
    Below is my Code
    DECLARE
    TYPE nested_tab IS TABLE OF VARCHAR2(100);
    l_tab nested_tab := nested_tab();
    BEGIN
    SELECT e.ent_id BULK COLLECT INTO l_tab
    FROM entity_master e
    WHERE e.ent_id IN ('N002208', 'Z002011', 'V002313', 'X002011'..... & so on);
    IF l_tab.EXISTS('N002208') THEN
    dbms_output.put_line('element exists');
    ELSE
    dbms_output.put_line('NO element ');
    END IF;
    END;
    ORA-06502 - Numeruc or Value Error
    what can be the work around for this...?

    Aijaz Mallick wrote:
    Ok.
    But It would be really helpfull if you Elaborate this Example a Bit...
    I mean the I/O part because Quering table also Require I/OANY data that you need to access (in any computer system and language) requires I/O. That data needs to be read from disk (PIO or physical I/O) or buffer cache (LIO or logical I/O) and processed.
    So the important part is optimising I/O. If you only need 1MB of data from a 100GB data structure, you do not want to I/O that entire data structure to find that 1MB of data that is relevant to your code.
    The answer to this is three fold.
    Firstly, you design that data structure optimally. In databases, that means a proper and sound relational database model.
    Secondly, you implement that data structure optimally. In databases, that means using the most appropriate physical data model for storing that relational data model. Using the features like indexing, partitioning, index organised tables, and so on.
    Lastly, in some cases your requirements will require scanning a large volume of that data structure. Which means that there is no option but to use a lot of I/O. In such a case, parallelising that I/O is important. I/O has inherent latency. Which means idle time for your code, waiting for data to arrive from the I/O system. Parallel processing enables one to address this and increase performance and scalability.
    So what do you need to do with your "large" table?
    - make sure it is correctly modelled at a logical data model level
    - make sure it is optimally implemented physically in Oracle, making best use of the features that the Oracle RDBMS provide
    - when your code has to deal with large volumes of data, design and code for parallel processing
    & how about Java Part. ..?Java is worse than PL/SQL in this regard as the data path for data to travel from the database layer into Java is longer and slower than the same path to PL/SQL.
    Storing/caching that data in the application layer is an attempt to address the cost of this data path. But this is problematic. If another application makes a change to data in the database, the cached data in the application tier is stale - and incorrect. Without the application layer knowing about it.
    Storing/caching that data in the application layer means a bigger and more expensive h/w footprint for the application layer. It means that scaling also requires a cluster cache in the application layer to address scalability when more application servers are added. This is complex. And now reintroduce a data path that runs over the network and across h/w boundaries. Which is identical to the data path that existed between the database layer and application layer in the first place.
    It also makes the border between the database layer and application layer quite complex as caching data in the application layer means that basic database features are now also required in the application layer. It is an architectural mess. Contains complex moving parts. Contains a lot more moving parts.
    None of this is good for robustness or performance or scalability. Definitely not for infrastructure costs, development costs,and support and maintenance costs, either.
    In other words, and bluntly put. It is the idiotic thing to do. Unfortunately it is also the typical thing done by many J2EE architects and developers as they have a dangerous and huge lack of knowledge when it comes to how to use databases.

  • Regarding payment methods on App Store

    I have a Punjab National Bank(India) ATM&Shopping Card( Master Card).Whenever I try to purchase an app on my ipad 3, it shows "Your payment method is declined,Choose any other Payment method."
    Can't I make a purchase using this card?

    http://store.apple.com/us/help/payments
    You need a credit card or debit card. A gift type card won't work.
     Cheers, Tom

  • Regarding Percentage Functions in formula

    hai
    can anyone explain about the "Percentage Share of the Result(%CT)" and "Percentage Share of the Overall result(%GT)with example please....
    I got this example from the sap help for %CT . But here im unable to get how the '%CT Sales' are came??
    Year     Region     Sales        %CT ‘Sales’
    1999     North       30          50
         South       30          50
    Result for 1999       60          33.3333
    2000     North       60          50
         South       60          50
    Result for 2000       120          66.6667
    Overall Result       180          100
    I got this example from the sap help for %GT . But here im unable to get how the '%GT Sales' are came??
    Year     Region     Sales     %GT ‘Sales’
    1999     North     30     16.6667
         South     30     16.6667
    Result for 1999     60     33.3333
    2000     North     60     33.3333
         South     60     33.3333
    Result for 2000     120     66.6667
    Overall Result     180     100
    So please tell me , how the '%CT Sales' and '%GT Sales' values are come ??????? urgentlyy.
    bye
    abdul

    hi Abdul,
    as the name %ct - percentage share of the <b>result</b> and %gt - percentage of <b>overall result</b>
    from your sample
    %ct sales for year 1999 region north = 50%, came from 'sales' / 'result' for year 1999 = 30 / 60 = 0.5 = 50%
    %gt sales for year 1999 region north = 16.6667, came from 'sales' / 'overall result'  (both year 1999 and 2000) = 30 / 180 = 16.6667
    result -> sub total
    overall result -> grand total
    hope this helps.

  • Regarding Idoc method in LSMW

    Hai All,
                I have gone through the procedure which is mentioned in the **************** for Idoc Method in LSMW.I have configured the steps for Inbound Idoc Processing.
    Port(File) : LSMW (I mentioned physical directory: C:\ and file name:filelsmw)
    Port(TRFC) : LSMWT (rfc destination of type TCP/IP and in that I mentioned program name:rfcexec.exe)
    Partner Profile: LSMW(of type US and mentioned Inbound Parameters here)
    I have gone through all the steps of LSMW.But every time I am getting the status as 51(Application Document Not Posted).
    Can anyone please help me in solving this.
    Message was edited by:
            Namburi Kalpana

    HI
    see this link
    http://www.****************/Tutorials/LSMW/IDocMethod/

  • Regarding a method used

    Hi,
    I was going through a tutorial. There they have used row.approve() for a row of a View object. I want to know what is the use of approve() method
    Is it a predefined or user defined method
    Thanks

    It's not a predefined method.

Maybe you are looking for