Query regarding Application Classes - 3

While going through Application Package EX, I noticed that most of the classes are extending other classes, while some are actually implemeting some classes..
class ExpenseReport extends EX:Business:Transaction
end-class;
class ExpenseReportLine implements EX:Business:TransactionLine
end-class;
Initially when I came accross this, I percieved TransactionLine to be an Interface. But upon opening its code, it came out to be a Class.
Can anybody tell me what is the differencr between extending a class and implementing a class ??

From ExpenseReportLine, you would think that ExpenseReportLine implements the interface EX:Business:TransactionLine. That is the intent of the implements keyword. If a programmer uses implements then you expect the following name to represent an interface. PeopleCode, however, treats implements and extends the same. In PeopleCode, an interface is actually a shorthand method for declaring a class where all methods are abstract. Put another way, a class that declares all methods as abstract is an interface. Perhaps the base class started as an interface and then the programmer converted it to a class?
When writing your own code, use implements for interfaces and extends for inheritance. Likewise, use the interface keyword to create interfaces. Don't create classes where all methods are abstract.
Coding is communication. Word choice is crucial to effective communication. I apologize for the incorrect use of words in these classes. In this case, the computer treats the code the same. Programmers communicate with two audiences: the computer and other programmers. In this case, it appears that the programmer effectively communicated with the computer, but poorly chose words for communicating with other programmers.

Similar Messages

  • Query regarding Application Classes.

    While going through the Application classes, I've come accross a code where a Property is defined without a name as follows.
    class BusinessUnitOptions
    property boolean get;
    end-class;
    Can anybody tell me how it works and what is the concept behind it?
    Thanks & Regards,
    Saurabh

    Actually Saurabh, PeopleCode is usually quite strict about the use of keywords. For example, error is a keyword. As such, error cannot be a method of a class. On the other hand, just for a test, I created a class with the methods get(), class(), private(), boolean(), Record(), and CreateRecord() and was able to call those methods from a test program. I tried creating methods named if and error, but those keywords won't compile. Just for fun, I tried creating functions named boolean, class, and private. The functions compile, but I can only call boolean. Even though the class and private functions compile, the code that calls them wont.
    Even though it works, I strongly discourage the practice of using reserved words for method and function names. I'm sure you already know this, but I just want to make it clear to all who read this thread.

  • Query regarding Application Classes - 2

    While going through Classes of Application Package *"EX"*, I have seen that some of the class definitions have a semi-colon after the class-name like:
    class ExpenseHeader;
    end-class;
    While most of the classes are defined without the semi-colon.
    class Transaction
    end-class;
    {color:#000000}+Does this semi-colon make any difference?+{color}

    The PeopleCode AppClass API documentation is silent on this. See [http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tpcr/htm/tpcr07.htm#d0e16363|http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tpcr/htm/tpcr07.htm#d0e16363]. When creating your own classes, don't include the semi-colon after the class name (or implements/extends). When reading someone else's classes, ignore it. In this case, I would say the semi-colon makes no difference. I'm not the definitive reference on this, but that is how I would treat it.

  • Query regarding Application form

    Hello,
             If it is possible to change form class of application form??
             Please suggest me.
    Thanks,
    Tiya

    Hello Sanjeev,
         I want to change form class of application form and when after selecting radio button of form class
         i click on change mode error message popup
         Change mode permitted for original language DE only
         by following this i try to change language to DE Edit->Set Language,even though language can,t
         change to DE and i m unable to open form class in change mode.I follow TCODE:EFRM.

  • A query regarding a class function

    What is/are the difference(s) between static and non--static function of a class?
    I mean, a 'static' keyword anyways states that all instances of the class would share the same function. So does that mean a 'non-static' function of a class, 'provides' a copy of the function to each class instance?
    Plz help me in clearing my doubts.
    Thanks.

    Non-static methods aren't given copies of the method. They need a reference to an instance but the instance doesn't get its own copy of the method. So you don't have to worry about wasting memory by using non-static methods, if that's what you're thinking.

  • A Query regarding 'Events' published and 'Event' subscribed

    I have a query regarding 'Events' and 'EventHandling' in Java Swing.
    Swing in an EVENT based application whereby 'events' are generated
    by interacting with the components.
    Eg: Clicking on a Button generates an 'ActionEvent' and every event
    generated has an associated 'EventListener'.
    Now,my question is:
    a)When an event is generated,(let's say by clicking a button),
    an 'event' is published,right?
    That means that there is an 'Event Publisher'.
    In the above case,the Button is the 'Publisher' of the event,right?
    b) Who are the subscribers for the events generated?
    Where do we specify the 'subscibers' to the events generated?(and once
    the subscribers get the Event,the subscriber will call the methods
    of the event object)
    We just say
       addButton.addActionListener(new ButtonHandler);
       private class ButtonHandler implements ActionListener {
            public void actionPerformed(ActionEvent e){
      In the above code :
    a) Who is the Event Publisher?
    b) Who is the Event Subscriber?
    No offence meant for the question.

    The 'event publisher' for the mouse click is the ToolKit implementation (translates the OS mouse event to a Java mouse event).
    The 'event subscriber' for the mouse click on a button is typically a ButtonUI (you can add a mouse listener directly though).
    The 'event publisher' for the action event is the ButtonModel (notified by the ButtonUI when the button is unpressed, etc).
    The 'event subscriber' for the action event are the action listeners.

  • Query regarding updation thru a Procedure

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru my Java application.
    The submit procedure saves the XML data in the database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by adding new elements to the same row.This row now contains additional XML elements.
    I would like to display the new row with the new elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru
    my Java application.
    The submit procedure saves the XML data in the
    database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by
    adding new elements to the same row.This row now
    contains additional XML elements.
    I would like to display the new row with the new
    elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with
    the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,If you delete (it seems to me yours this process is regular and frequent) and re insert the new updated one record then High water mark will cause to scan yours table which may cause to degrade the performance.AFAIK you should go with update.But hold down dont implement it as i suggested lets see what are others solution here which may be more precious then mine.
    Khurram

  • How to use application class reference in the controller methods of BSP

    Hi,
    I have created a bsp application and also created an application class and assigned it to the application class. In the application class, I have created attribute TEXT type string(public and instance parameter).
    In the controller let's say main.do, I am trying to give a value to to the text by adding the following code.
    application->text = 'test'.
    I am getting syntax error saying field 'text' is unknown. It is not contained in one of the specified tables nor defined by DATA statement. 
    Please can someone let me know how to use the application class in the coding with an example. I couldn't find how exactly this has to be reference. Please help.
    Best regards
    Siva

    Hi,
    if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
    *Data declaration
      DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
             obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
             application TYPE REF TO z_cl_application.
    *Get the controller
      CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
        EXPORTING
          controller_id       = 'SUB'   "Controller ID
        RECEIVING
          controller_instance = obj_cntrl  .
      obj_sub_cntrl ?= obj_cntrl  .
      application ?= obj_sub_cntrl ->application.
    or simply use below code in your controller method.
      application ?= me->application.
    Thnaks,
    Chandra

  • A query regarding synchronised functions, using shared object

    Hi all.
    I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
    Ok, I will clear myself with the following example :
    class First
    int a;
    static int b;
    public void func_one()
    synchronized((Integer) a)
    { // function logic
    } // End of func_one
    public void func_two()
    synchronized((Integer) b)
    { / function logic
    } // End of func_two
    public static void func_three()
    synchronized((Integer) a)
    { // function logic
    } // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
    // just written here for completeness.
    public static void func_four()
    synchronized((Integer) b)
    { / function logic
    } // End of func_four
    First obj1 = new First();
    First obj2 = new First();
    Note that the four functions are different on the following criteria :
    a) Whether the function is static or non-static.
    b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
    Now, first my-thoughts; kindly correct me if I am wrong :
    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
    Kindly correct me I am wrong anywhere in the above.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
    Kindly correct me I am wrong anywhere in the above.
    c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
    d) In case 4, we have a static function, synchronized on a static object.
    Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
    First, Kindly correct me I am wrong anywhere in the above.
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
    Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
    Or am I being dumb ?
    Looking forward to replies..
    Ashutosh

    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
    d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
    Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
    and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
    which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
    Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
    However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
    You need:
    Object a = new Object();
    static Object b = new Object();

  • How can I put my main Application class in a package?

    Hello,
    I would like to put my main Application class for my air app inside a package. If I create a regular FLX application, this works fine. In that case I just move the application file created into a packade and change the run/debug settings. This does not work for an Air app however, when I try I first get the error:
    Adobe AIR application is missing the corresponding MyApp-app.xml
    So I move the MyApp-app.xml into the same package, then I get:
    Unknown error generating output application.xml files. Check the Eclipse error log for more details.
    Is it possible to have the man Application class reside inside a package for air applications?
    Regards,
    Mikael

    Hi Mikael,
    I ran into the same result as you so I asked around and it sounds like this might not be supported.  However, I'd recommend reposting this question over on the Flash Builder forums to see if anyone has found a workaround.
    Please let me know if you're able to resolve this.
    Thanks,
    Chris

  • Creating subcontroller in application class function

    i am using a certain subcontroller quite frequenly in my BSP-app. I wrote this function to craete the subcontroller:
    method create_sc.
      data lorv_subcontroller type ref to zcl_bla.
      lorv_subcontroller ?= create_controller( controller_name = 'bla.do'                     controller_id   = iv_controller_id ).
      lorv_subcontroller->init( ... ).
    endmethod.
    at the moment, this function is in another (super-)controller-class. since i need the subcontroller on multiple pages, i wanted to move the function to my application class or to a static class. however, this doesn't work, probably because i can only call create_controller() from within a controller-class.
    what can I do? isn't it possible to make this function available to other controller-classes?
    could i maybe pass a reference to a subcontroller-variable (here lorv_subcontroller ) to the method?

    Is there a concept of multiple inheritance (I don't think so!!!) ?
    Let me just paraphrase, what you have said :
    ycl_maincontroller inherits cl_bsp_controller2
    and all other controllers inherit ycl_maincontroller.
    But if you make ycl_maincontroller abstract, you can't implement the method create_sc, right!!!
    But your idea is a very novel one. THanks for sharing it with us.
    Regards,
    Subramanian V.

  • Query regarding G/LAccounts in psoting

    Hi Experts,
    I have one query regarding PCP0.
    After executing PCP0,If We double click on the posting document we can see the number of G/L accounts in that posting Document.If we double click on each G/L Account it shows all the revision information indetail for all payments cumulated into that particular G/L Account.
    Some of the G/L's are appearing as single line in the posting document and if we double click for the revision information it is showing all the Wagetypes with personnel numbers and the total of each wagetype.
    Some of the G/L's we can see Multiple times for each individual.
    Can any one please explain where does we set up the the revision information for the G/L Accounts .
    Appreciate If anyone can help to know this information.
    Thanks & Regards,
    Sandhya.

    Hi Gopal,
    Counting class are assigned to the Periodic work Schedule 1 to 9 are just arbitart sequence numbers and have no meaning in general they are used for linking Pweriodic Work schedules with differences.
    You can use the class for absence and attendance counting to specify different methods of counting according to the period work schedule.
    They have no other meaning apart from that.
    Thanks and Regards
    Swati

  • 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>

  • Query regarding Useful Life

    Hi SAP guru
    I have one query regarding useful life of asset,
    If i purchased a asset in rs 200000 , wdv rate is 20% and put the useful life 4 year, in last year i want to depreciate the asset upto 1 Rs.
    Capitalisation date is 01.04.2008.
    Ex -     Acquisition value   Ordinary depreciation  net book value
    2008 200,000.00               40,000.00-             160,000.00
    2009  200,000.00                32,000.00-           128,000.00
    2010  200,000.00                25,600.00-           102,400.00
    2011   200,000.00               20,480.00-           81,920.00
    2012  200,000.00                                          81,920.00
    Client requirement is in year 2011 asset should depreciate upto Rs 1.
    Appreciate your reply.
    Regards
    Anjan

    If you want to your asset depreciation based on useful life that is 4 years, please select check box Rem.life in multi level method of that dep. key.and enter the useful life as 4 years in the assets master.
    when come to restricting value to 1Re. specify the memo value for that asset class.
    AA>Valuation>Amt.specification>Specify memo value.

  • Query regarding using JNI in linux

    Hi
    I have a query regarding JNI.We have a situation in which
    we have some c programmes and we want to call that c programme method in my java code. The problem is that in JNI the native code signature should match the signature of the method of the header file generated by javah. We donot want to change the signature of the native code since it is hard to debug.So please suggest me a way out that i can call the native method without changing the signature of the native code.Please if u could give me some few simple example
    Thanking u

    So please suggest me a way out that i can call the native method without changing the signature of the native code.You write a wrapper. Your java JNI class has methods. Those methods are written in C by you. Those methods are new code. Those methods call your existing C methods.
    Please if u could give me some few simple example.http://java.sun.com/docs/books/tutorial/native1.1/index.html

Maybe you are looking for