Cummulative write up field

I am creating a query and i need cummulative write up field i.e to show the cummulative write up .As like we have accumulated ord dep or cumm unplanned dep ..i need cummulative write up field in logical data base table ADA.
Please suggest which table or field.

Hi,
sorry, but that requirement makes no sense to me. Write-up is aggregated with its depreciation type with the next fiscal year carry forward. So it flows into the accumulated depreciation field at fiscal year start as of the next year.
If you want to know the cumulative write-up in a current year, then you can find the fields in structre ANLCV in the logical database. If you need to know the accumulated write-up over the complete asset useful life, then you must read all transactions of the asset, also the ones in the former years, which have been posted with a write-up transaction type, and aggregate this on your own.
But be aware that there may be not all transactions existing any more, for instance when line items are archived already, when a legacy transfer has been done, when the asset has been transferred and the write-up has been posted on the transferring asset which may be inactive ... and so on ...
Markus

Similar Messages

  • Best Practice to Atomic Read and Write a Field In Database

    I am from Java Desktop Application background. May I know what is the best practice in J2EE, to atomic read and write a field in database. Currently, here is what I did
    // In Servlet.
    synchronized(private_static_final_object)
        int counter = read_counter_from_database();
        counter++;
        write_counter_back_to_database(counter);
    }However, I suspect the above method will work all the time.
    As my observation is that, if I have several web request at the same time, I am executing code within single instance of servlet, using different thread. The above method shall work, as different thread web request, are all referring to same "private_static_final_object"
    However, my guess is "single instance of servlet" is not guarantee. As after some time span, the previous instance of servlet may destroy, with another new instance of servlet being created.
    I also came across [http://code.google.com/appengine/docs/java/datastore/transactions.html|http://code.google.com/appengine/docs/java/datastore/transactions.html] in JDO. I am not sure whether they are going to solve the problem.
    // In Servlet.
    Transaction tx = pm.currentTransaction();
    tx.begin();
        int counter = read_counter_from_database();  // Line 1
        counter++;                                                  // Line 2
        write_counter_back_to_database(counter);    // Line 3
    tx.commit();Is the code guarantee only when Thread A finish execute Line 1 till Line 3 atomically, only Thread B can continue to execute Line 1 till Line 3 atomically?
    As I do not wish the following situation happen.
    (1) Thread A read counter from Database as 0
    (2) Thread A increment counter to 1
    (3) Thread B read counter from Database as 0
    (4) Thread A write counter as 1 to database
    (5) Thread B increment counter to 1
    (6) Thread B write counter as 1 to database
    What I wish is
    (1) Thread A read counter from Database as 0
    (2) Thread A increment counter to 1
    (4) Thread A write counter as 1 to database
    (3) Thread B read counter from Database as 1
    (5) Thread B increment counter to 2
    (6) Thread B write counter as 2 to database
    Thanks you.
    Edited by: yccheok on Oct 27, 2009 8:39 PM

    This is my understanding of the issue (you should research it further on you own to get a better understanding):
    I suggest you use local variables (ie, defined within a function), and keep away from static variables. Those local variables are thread safe. If you call functions within functions, its still thread safe. If you read or write to one record in a database using sql, its thread safe (you dont need a transaction). If you read/write to multiple tables and/or records, you probably need a transaction. Servlets are thread safe. You usually dont need the 'synchronized' word anywhere unless you have a function updating/reading a static variable and therefore want to ensure only one user is accessing the static varible at a time. Also do so if you are writing to some resource (such as a file, a variable in applicaton scope, session scope, or resource that everyone uses such as email server). You dont want more than one person at a time to write to it). Note the database is one of of those resources that is handled by transactions rather than the the synchronized keyword (the synchronized keyword is applied to your application only (not other applications that someone is running), whereas the transaction ensures all applications are locked out while you update those records in the database).
    By the way, if you have a static variable, you should have one and only one function (synchronized) that updates it that everyone uses. If you have more than one synchronized function, that updates it, its probably not thread safe.
    An example of a static variable you would use is a Datasource object (to obtain your database connections). You only need one connection pool in your application and you access it via the datasource variable.
    If you're unsure your code is thread safe, you can create two seperate threads that call the same block of functions repeatedly to ensure it works as expected.

  • Wird 2010 - Mailings / Write & Insert Fields / Rules / ASK....

    I am creating form letters, and the mailings tab, write & insert fields / Rules / Ask... input the rule in the letter, and when creating the letter it asks the questions, I prefill the answer in the box, and when it completes, the answers are not being
    input into the letter.  I have tried Alt + F9 and no resolve.  It is prefilling my other mail merge options.  Please help, I have about 70 letters to create with this Ask box needed on alot of them.

    An ASK field only populates a bookmark; you must then insert a cross-reference to that bookmark for the response to appear. An alternative is to use a FILLIN field.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Write Back field size

    Hi,
    I created a table with a write back field. I have set up everything according to the guide, tested it and it all works. Data is written back to the database.
    When I select from the write back field the Column Properties -> Column Format -> Value interaction -> Field Size you can set the field length. My question is....is it also possible to set the height of the field?
    One of our customers wants to use this as a field to enter remarks and follow up actions. So I actually want a square field, so the text entered in it is more readable on the screen.
    Any suggestions?
    Thanks and Regards,
    Jeroen

    Hi Venkat,
    Thanks for your reply. It's been a while ago since i posted this question, but this write back feature is now actual for a customer. In the beginning it didn't seem that necessary, but now it is.
    I have tried to modify my writeback template, but i cannot manage to make it work. Or do I have to make another custom xml message? Do you maybe have a suggestion on which way to handle this?
    Thanks in advance!!
    Regards,
    Jeroen

  • Write All Fields to Output

    Hi There,
    I am a new SAP developer and have a quick question that I can't find the answer to in my book.
    Is there a way to write all fields to the output without having to list every field name. Basically I am looking for a wild card or a key word or something.
    Thanks for your help.
    Colm

    Not really,  in most cases you need to list them manually,  but you can use the pattern button, then click radiobutton for WRITE statement, here you can specify a structure name(must be in dictionary, and then select the components of it, then copy it back, it will list the fields for you, but again it must exist in the dictionary.
    Regards,
    Rich Heilman

  • Dynamically table read / write with field symbols

    Hi,
    I like to read dynamically from a table via field symbols. The reading part is working.
    But now I like to do some changes on the entry and then write it to another table with a similar structure.
    I use SAP 4.6c
    There I have two problems:
    1. At the statement I get a dump:
    <l_sysid> = sy-sysid.
    --> Field symbol has not yet been assigned.
    I think that the problem is somewhere around
    assign <table_to> to <wa_to>.
    2. the data change inside the loop. There I like to add the sysid to the target-wa and then copy the source-wa it to the new target-wa to append it to the target table.
    But this does not work. What kind of code do I need? The "move-correspondig" is not correct.
    --> see code around
    loop at <table_from> assigning <wa_from>.
    Below you can find my code. The problem is within the last loop-statement.
    FUNCTION Z_MIG_COPY_TABLE.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(I_TABNAME_FROM) TYPE  TABNAME
    *"     REFERENCE(I_TABNAME_TO) TYPE  TABNAME
    *"     REFERENCE(I_KOMP_TRANS) LIKE  ZS_KOMP_TRANS STRUCTURE
    *"        ZS_KOMP_TRANS OPTIONAL
    *"  TABLES
    *"      I_SELCON STRUCTURE  ZS_SELCON
    *"  EXCEPTIONS
    *"      NOT_FOUND
    *"      OTHERS
    * zeilenweiser Aufbau Tabelle I_SELCON z.B.:
    * bukrs = 3011
    * AND
    * bstyp = 'F'
    * I_KOMP_TRANS
    * dient zur Uebersetzung von alt/neu, z.B. bei LIFNR
    * der angegebene Funktionsbaustein wird genutzt,
    * um den neuen Wert der übergebenen Komponente zu ermitteln
    * Angabe z.B.:
    * LIFNR
      DATA: dref       TYPE REF TO data,
            dref_to    TYPE REF TO data,
            i_alv_cat  TYPE TABLE OF lvc_s_fcat,
            ls_alv_cat LIKE LINE OF i_alv_cat,
            i_alv_cat_to  TYPE TABLE OF lvc_s_fcat,
            ls_alv_cat_to LIKE LINE OF i_alv_cat.
      DATA: BEGIN OF itab OCCURS 0.
    *        INCLUDE STRUCTURE dntab.
              INCLUDE structure DFIES.
      DATA: END OF itab.
      DATA: BEGIN OF itab_to OCCURS 0.
    *        INCLUDE STRUCTURE dntab.
              INCLUDE structure DFIES.
      DATA: END OF itab_to.
      FIELD-SYMBOLS: <table_from>   TYPE ANY TABLE.
      FIELD-SYMBOLS: <table_to>     TYPE Standard TABLE.
      FIELD-SYMBOLS: <wa_from>      TYPE ANY.
      FIELD-SYMBOLS: <wa_to>        TYPE ANY.
      FIELD-SYMBOLS: <l_komp>       TYPE ANY.
      FIELD-SYMBOLS: <l_sysid>      TYPE ANY.
      Data: l_alt type ELIFN.
      Data: l_neu type ELIFN.
      CALL FUNCTION 'DDIF_NAMETAB_GET'
           EXPORTING
                TABNAME   = i_tabname_from
           TABLES
                DFIES_TAB = itab
           EXCEPTIONS
                NOT_FOUND = 1
                OTHERS    = 2.
      IF SY-SUBRC = 1.
        raise not_found.
      elseif sy-subrc = 2.
        raise others.
      ENDIF.
      LOOP AT itab .
        ls_alv_cat-fieldname = itab-fieldname.
        ls_alv_cat-ref_table = i_tabname_from.
        ls_alv_cat-ref_field = itab-fieldname.
        APPEND ls_alv_cat TO i_alv_cat.
      ENDLOOP.
    * build internal table
      CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog = i_alv_cat
          IMPORTING
            ep_table = dref.
      ASSIGN dref->* TO <table_from>.
      CALL FUNCTION 'DDIF_NAMETAB_GET'
           EXPORTING
                TABNAME   = i_tabname_to
           TABLES
                DFIES_TAB = itab_to
           EXCEPTIONS
                NOT_FOUND = 1
                OTHERS    = 2.
      IF SY-SUBRC = 1.
        raise not_found.
      elseif sy-subrc = 2.
        raise others.
      ENDIF.
      LOOP AT itab_to.
        ls_alv_cat_to-fieldname = itab_to-fieldname.
        ls_alv_cat_to-ref_table = i_tabname_to.
        ls_alv_cat_to-ref_field = itab_to-fieldname.
        APPEND ls_alv_cat_to TO i_alv_cat_to.
      ENDLOOP.
    *  break-point.
    * build internal table
      CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog = i_alv_cat_to
          IMPORTING
            ep_table = dref_to.
      ASSIGN dref_to->* TO <table_to>.
    *Select Ursprungstabelle mit Selektionsbedingungen
      SELECT * FROM (i_tabname_from) up to 5 rows
        INTO CORRESPONDING FIELDS OF TABLE <table_from>
        where (i_selcon).
    *  break-point.
    *Aufbau interne Tabelle mit eventuell geänderten Feldern
      assign <table_to> to <wa_to>.
      if not I_KOMP_TRANS is initial.
        loop at <table_from> assigning <wa_from>.
          assign component I_KOMP_TRANS-KOMP
            of structure <wa_from> to <l_komp>.
          CALL FUNCTION I_KOMP_TRANS-FUBA
               EXPORTING
                    I_KOMP = I_KOMP_TRANS-KOMP
                    I_ALT  = <l_komp>
               IMPORTING
                    E_NEU  = <l_komp>.
          break-point.
          assign component 'SYSID' of structure <wa_to> to <l_sysid>.
          <l_sysid> = sy-sysid.
    *      move-corresponding <wa_from> to <wa_to>.
          append <wa_to> to <table_to>.
        endloop.
    *    break-point.
    *Speichern der ausgelesenen Daten in Zieltabelle
        MODIFY (i_tabname_to) FROM TABLE <table_to>.
        if sy-subrc <> 0.
          MESSAGE E001(ZMESSAGES) WITH i_tabname_to.
    *   Fehler beim Modify von Tabelle '&'.
        endif.
      else.
    *Speichern der ausgelesenen Daten in Zieltabelle
        MODIFY (i_tabname_to) FROM TABLE <table_from>.
        if sy-subrc <> 0.
          MESSAGE E001(ZMESSAGES) WITH i_tabname_to.
    *   Fehler beim Modify von Tabelle '&'.
        endif.
      endif.
      commit work.
      if sy-subrc <> 0.
        MESSAGE E002(ZMESSAGES) WITH i_tabname_to.
    *   Fehler beim Commit von Tabelle '&'.
      endif.
    *  break-point.
    ENDFUNCTION.
    Thanks a lot for any hints.
    Regards
    Tom

    Hi,
    Answers below.
    1) For this...you assigning an internal table to a work area...
    assign <table_to> to <wa_to>.
    This should solve the problem..
    * Create the target work area..
    DATA: new_line  TYPE REF TO data.
    CREATE DATA new_line LIKE LINE OF <table_to>.
    ASSIGN new_line->* TO <wa_to>.
    Now the target work area is created..
    2) For the second one...
    ************New code
       FIELD-SYMBOLS: <FS>,<FS1>.
    ************New code End.
       loop at <table_from> assigning <wa_from>.
          assign component I_KOMP_TRANS-KOMP
            of structure <wa_from> to <l_komp>.
          CALL FUNCTION I_KOMP_TRANS-FUBA
               EXPORTING
                    I_KOMP = I_KOMP_TRANS-KOMP
                    I_ALT  = <l_komp>
               IMPORTING
                    E_NEU  = <l_komp>.
          break-point.
          assign component 'SYSID' of structure <wa_to> to <l_sysid>.
          <l_sysid> = sy-sysid.
    ************New code
          LOOP AT itab .
             ASSIGN COMPONENT itab-fieldname of structure <WA_FROM> TO <FS>.
             CHECK SY-SUBRC = 0.
             ASSIGN COMPONENT itab-fieldname of structure <WA_TO> TO <FS1>.
             CHECK SY-SUBRC = 0.
    * Move from source to target.
             <FS1> = <FS>.
          ENDLOOP.
    ************New code End
          append <wa_to> to <table_to>.
        endloop.
    Thanks
    Naren

  • Options for read/write form field data with VBA/Reader

    I have a project which requires reading and writing field data to a PDF form using VBA in PowerPoint. The code I have works properly with the full version of Acrobat, but the client this project is for will be using Reader. I'm looking for suggestions to what options I have to be able to access the form field data (I don't need any other features other than access to the field data). Ideally, I would love a solution which doesn't require the client to install anything extra for this to work, but I'm assuming that this isn't possible without an extra install.
    Is there a library that exists in Reader (or could be licensed to be installed on the client's machine) that would allow the data to be read without needing the full version of Acrobat?
    Does a plug-in exist for Reader, or could be written, that would allow this? Writing a plug-in would certainly be beyond my current capabilities, but I am interested in knowing every and any choices that are available.
    Are there any other options to do what I need to do?
    I had originally thought about exporting the form data and parsing it in the VBA program, but this would take a bit more work to write the parsing routine instead of accessing the fields directly. Plus, it appears to me that Exporting is not enabled in Reader.
    Thanks for any insight you may be able to provide.

    Thanks for the response; this was my original suggestion, but I don't think this is feasable for our client. I suggested to our account people that this might be the only way to do this (and the easiest, although possibly the costliest since it would have to be purchased for their entire sales force) and they initially said that this would not be an option, so I wanted to be able to cover all the bases, and explore any other ways that they could do what they want. Is this the absolute only option to do this?
    Someone also suggested to me that licensing the Acrobat PDF Library SDK might be a way to do this, or that it could possibly be done with a plug-in for Reader (although from what I have found, Reader plug-ins would have to be approved by Adobe). These options, if possible, are beyond my current knowledge but I do want to be able to give them a complete list of possibilities.
    Thanks again.

  • Write STRING fields in SMARTFORM

    Hi folks.
    I'm trying to write a STRING field in a SMARTFORM but only the first 255 characters are writen in output.
    It's a resctriction? Is there any workaround?
    Helpfull ideas will be rewarded.
    Best regards.
    Thanks in advance.
    Valter Oliveira.

    No string fields.
    Made a workaround, like several 255 variables in a text element.
    Thanks.

  • In SAP Scripts How to write the fields 90  Degrees to regular format

    Hi ,
    I am working with SAP Scripts . Sometimes you may want to print text vertically.
    I have got a requiremnt in which there we have to write some data which is to be written 90 degres to regular output.
    please let me know if there is any printer setting for that .
    Regards.
    Rohit.

    Dear friend,
    For printing the text verticaly you need to made a
    print controle at printer level.
    select a command and in that you have to go in tab general
    attribute.
    and in front of :Include Printer Control: give the z print controle.
    in my company basis people had made one print controle
    ZR090.
    YOU have to use this command two times between
    the text .
    first command will move the printer at 90 degree and then
    write the text and second will move back to horizental.
    I dont know how this ZR090 can be made.
    rest wht i have written is very true and currently working.
    hope this will solve your problem.
    rewards are expected.
    Thanks and Regards
    vivek kumar srivastava

  • How write a field to screen(report list) but don't display it ?

    Hi, All
        How write a value to screen(report list) but don't display it ?  Because i will use this value as the user click the current line ,but i don't want to expose this value to the user.

    Hi,
    U can Use the option NO-DISPLAY with PARAMETERS.
    Can write in the Selection screen statement with the syntax as
    Paramaters: <fieldname> type <data type>
                 value <value> no-display.
    -Rakesh

  • Calculate CUmmulative Using Formula Field

    hi all community,
    i want to calculate Cumulative of a field by using formula In Query Designer. Plz help me to calculate cumulative not by setting its property but using formula field in query designer.
    Thanks in advance
    Edited by: Abdul_Hafeez_25 on May 9, 2010 10:09 AM

    Hi,
    norammly field means as per your requirement it is key figure only for that the better option is cumulative property can b used
    but u said u want use in forumla
    but the values are based on which characterstic those are coming
    u can restrict those values with characterstics in RKF  and all the RKF can be used in formula. but i am not getting actuall what is the requirement, can you expalin  some detailed level.
    if i know i can give some input.
    Thanks & Regards,
    sathish

  • Write fields from two tables in one line??

    Hi friends,
    I want to write some fields from bkpf and bseg in one line...
    My report should like something like this:
    ****some text*****
    *for first document*******  bkpf-bldat  kunnr  bseg-belnr    bseg-gsber   bseg-wrbtr     
    *for second document***  bkpf-bldat  kunnr  bseg-belnr    bseg-gsber   bseg-wrbtr     
    *for third document******  bkpf-bldat  kunnr  bseg-belnr    bseg-gsber   bseg-wrbtr  
    etc.
    What should I change in order to get this form in report output?? Can I put these fields in some table so that it looks like excel table??Could you please check out the code below?
      loop at it_bkpf into wa_bkpf.
      loop at it_bseg into wa_bseg.
      write: wa_bseg-gsber, wa_bseg-belnr, wa_bseg-wrbtr.
      endloop.
      write: wa_bkpf-bldat.
      read table it_bsid with key bukrs = wa_bkpf-bukrs
      belnr = wa_bkpf-belnr
      gjahr = wa_bkpf-gjahr
      cpudt = wa_bkpf-cpudt.
      if sy-subrc = 0.
      write: it_bsid-kunnr.
      endif.
      endloop.
    Thanks,
    Nihad

    hi nihad,
    define positions on where to write data like this.
    LOOP AT it_bkpf INTO wa_bkpf.
      LOOP AT it_bseg INTO wa_bseg WHERE belnr EQ wa_bkpf-belnr.
        WRITE: /5 wa_bkpf-bldat.
        READ TABLE it_bsid
        WITH KEY bukrs = wa_bkpf-bukrs
                         belnr = wa_bkpf-belnr
                         gjahr = wa_bkpf-gjahr
                         cpudt = wa_bkpf-cpudt.
        IF sy-subrc EQ 0.
           WRITE: 20 it_bsid-kunnr.
        ENDIF.
        WRITE: 35 it_bseg-belnr,
                    50 it_bseg-gsber,
                    60 it_bseg-wrbtr.
      ENDLOOP.
    ENDLOOP.
    regards,
    Peter

  • Weird? Externalizing writes out transient fields automatically...

    Essentially, I made up some class implementing Externalizable - with empty write/readExternal methods. Some how, the transient field have been writtena dnread back. From the stuff I''ve read about this, nothing mentions externalizable overriding the "don't write transient fields behaviour". The weird thing is: externalizable is supposed be when you need to say explicitly how to write your object (field by field for e.g.). When I ran this, I got all the fields written and read...
    import java.io.*;
    public class SerializationExample {
         public static void main(String[] args) {
              try {
                   ToBeWritten tbw = new ToBeWritten();
                   FileOutputStream f_out = new FileOutputStream("test");
                   ObjectOutputStream out = new ObjectOutputStream(f_out);
                   out.writeObject(tbw);
                   out.close();
                   FileInputStream f_in = new FileInputStream("test");
                   ObjectInputStream in = new ObjectInputStream(f_in);
                   ToBeWritten tbr = (ToBeWritten) in.readObject();
                   in.close();
                   System.out.println(tbr.privateField);
                   System.out.println(tbr.staticField);
                   System.out.println(tbr.transientField);
              } catch (Exception e) {
                   System.out.println(e);
         static class ToBeWritten implements Externalizable {
              private String staticField = "staticField";
              transient String transientField = "transientField";
              private String privateField = "privateField";
              public void writeExternal(ObjectOutput out) throws IOException {
              public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
              public ToBeWritten() {
    }

    ejp, you description is more accurate.
    Technically, the serialization code creates an new constructor for the class which calls the first non serializable super class's no-arg constructor method, provided that constructor is public, protected or (package-private and in the same package as the class)
    If the first non-serializable no-args contructor is not accessible, an InvalidClassException is thrown.
    As ejp points out, it is more complex than most author would suggest.
    @see code for java.io.ObjectStreamClass.getSerializableConstructor(Class)

  • Needs sample ABAP code for field routine

    Dear Expert,
    There is a field "Pay Scale Group" in my DSO which stores the data in the format
    AA1/B1/CCC2/DD2/EEE1, A1/BB2/CC2/DDD3/EE2 etc. These data has to be transferred to
    InfoCube where "pay Scale Group" in the InfoCube will store the data like EEE1,EE2 etc.
    I need to write a field routine on the transformation between DSO and Cube.
    Can any one please help me with the sample ABAP code for this scenario.
    Some more examples for better understanding of the requirement:-
    Data in DSO(Source)            Data in Cube(Target)
    ===================            ===================
    AA1/B1/CCC2/DD2/EEE1            EEE1
    AAA1/BB2/CC1/DDD3/EE2           EE2
    A2/BBB2/CC2/DDD3/EEE5           EEE5
    AA2/BB1/C1/DDD3/EE3             EE3
    A3/B1/CC2/DDD1/EE4              EE4
    Many thanks in advance.
    Regards,
    Prakash
    Please do not dump your code requirements in SDN
    Edited by: Pravender on May 18, 2011 11:37 AM

    Hi,
    You can use the following code :
    Suppose the technical name of the field coming from DSO is ZPAY_SGRP.
    And also for example let me take one record, that is ZPAY_SGRP = AA1/B1/CCC2/DD2/EEE1 .
    My assumption is that there will always be 4 '/'.
    In the field routine write the below code
    data: V1(5) type c,
              V2(5) type c,
             V3(5) type c,
              V4(5) type c,
             V5(5) type c.
    data : VAR1 TYPE /BIC/OIZPAY_SGRP.
    split VAR 1  at '/' into V1 V2 V3 V4 V5.
    result = V5.
    V5 will be having the characters after the last '/' .That is V5 = EEE1.
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh
    Edited by: Ashutosh Singh on May 17, 2011 3:53 PM
    Edited by: Ashutosh Singh on May 17, 2011 4:17 PM

  • How to get updated fields in a classical report

    Hi,
    After displaying the report using Write, multiple fields are editable. I used INPUT ON for this.  My problem is, how does the program recognize the new entered values in all the editable fields? I can not use AT LINE-SELECTION because only the current line that the cursor has focus on is being retrieved.
    I've also researched about DYNPRO_FIELD_GET but i requires a DYNPRO. When I checked the report, it doesn't have a screen number?
    Kindly Help.

    Hi,
    You can do that in AT USER-COMMAND
    Check this program...
    *" Field string declarations...........................................
    * Field string declaration to hold computation values with operator   *
    data:
      begin of fs_comp,
        operand1(10) type  c,                                   " Operand1
        operator(2)  type  c,              " Operator
        operand2(10) type  c,                                   " Operand2
        result(30)   type  c,              " Result
      end of fs_comp.
    * Internal table to hold computation values including operator        *
    data:
      t_comp  like
    standard table
          of fs_comp.
    *" Data declarations...................................................
    * Work variables                                                      *
    data:
      w_operand1(10) type  c,                                   " Operand1
      w_operator(2)  type  c,              " Operator
      w_operand2(10) type  c,                                   " Operand2
      w_result(30)   type  n,              " Result
      w_flag         type  i.              " Temporary Flag
    *                 END-OF-SELECTION EVENT                              *
    end-of-selection.
      sy-title = ' '.
      perform operations.
    *                 AT-LINE-SELECTION EVENT                             *
    at line-selection.
      if sy-lsind ne 1.
        message e000(yh1152).
      else.
        w_flag = 0.
        perform display_input.
      endif.                               " IF SY-LSIND NE 1
    *                 AT PF<nn>                                           *
    at pf05.
      set user-command 'CALC'.
    *                 AT USER-COMMAND EVENT                               *
    at user-command.
      if sy-lsind eq 1.
        message e008(yh1152).
      else.
        if w_flag eq 0.
          perform calculations.
        else.
          message e007(yh1152).
        endif.                             " IF W_FLAG EQ 0
      endif.                               " IF SY-LSIND EQ 1
    *&      Form  operations
    *This subroutine displays the operations to be performed on basic list
    *   No interface parameters
    form operations .
      write:
        /10 'Select a line'(008).
      skip 2.
      format hotspot on.
      write:
        /10 'ADDITION : +'(002),
        /10 'SUBTRACTION : -'(003),
        /10 'MULTIPLICATION : *'(004),
        /10 'DIVISION : /'(005),
        /10 'POWER  : ** '(006).
    endform.                               " operations
    *&      Form  calculations
    * This subroutine performs the calculation part of detail list
    *   No interface parameters
    form calculations .
      data:
        lw_line  type    i value 4,        " No of Lines
        lw_str   type    string.           " Exception text
      data:
       lw_ref type ref to cx_root.         " Reference Variable
      refresh t_comp.
      do 3 times.
        clear:
          w_operand1,
          w_operator,
          w_operand2.
        read line lw_line field value
         w_operand1 into w_operand1
         w_operator into w_operator
         w_operand2 into w_operand2.
        fs_comp-operand1  =   w_operand1.
        fs_comp-operator  =   w_operator.
        fs_comp-operand2  =   w_operand2.
        try.
            case w_operator.
              when '+'.
                fs_comp-result  = fs_comp-operand1 + fs_comp-operand2.
              when '-'.
                fs_comp-result  = fs_comp-operand1 - fs_comp-operand2.
              when '*'.
                fs_comp-result  = fs_comp-operand1 * fs_comp-operand2.
              when '/'.
                fs_comp-result  = fs_comp-operand1 / fs_comp-operand2.
              when '**'.
                w_result  = fs_comp-operand1 ** fs_comp-operand2.
                fs_comp-result = w_result.
                clear w_result.
            endcase.                       " CASE W_OPERATOR
          catch cx_root into lw_ref.
            fs_comp-result = 'Cannot Compute'(007).
            lw_str = lw_ref->get_text( ).
            message lw_str type 'I'.
        endtry.
        append fs_comp to t_comp.
        clear fs_comp.
        add 2 to lw_line.
      enddo.                               " DO 3 TIMES
      add 1 to w_flag.
      perform result.
    endform.                               " calculations
    *&      Form  DISPLAY_INPUT
    * This subroutine displays the input on basic list for operations
    *   No interface parameters
    form display_input .
      sy-lsind = 1.
      clear:
        w_operand1,
        w_operand2.
      case sy-lilli.
        when '4'.
          w_operator = '+'.
        when '5'.
          w_operator = '-'.
        when '6'.
          w_operator = '*'.
        when '7'.
          w_operator = '/'.
        when '8'.
          w_operator = '**'.
        when others.
          stop.
      endcase.                             " CASE SY-LILLI
      write:
        /10 'Enter values and press F5 to calculate'(009).
      skip 2.
      do 3 times.
        write:
          10 w_operand1  no-zero input on color 1,
          25 w_operator  intensified on color 2,
          30 w_operand2 no-zero   input on,
          45 ' = ' ,
          w_result  no-zero  input off.
        skip.
      enddo.                               " D0 3 TIMES.
    endform.                               " DISPLAY_INPUT
    *&      Form  RESULT
    * This subroutine displays the caculated result for selected operator
    *   No interface parameters
    form result .
      sy-lsind = 1.
      write: /08 'The result of operation processed is'(001).
      skip 2.
      do 3 times.
        read table t_comp into fs_comp index sy-index.
        write:
          10 fs_comp-operand1 no-zero input off color 1,
             fs_comp-operator no-zero intensified on color 7.
        if fs_comp-operand2 eq '' or fs_comp-operand2 eq '0'.
          write: fs_comp-operand2 no-zero input off color 6.
        else.
          write: fs_comp-operand2 no-zero input off color 1.
        endif.                             " IF FS_COMP-OPERAND2 NE 0
        write:' = ' color 3.
        write:
          fs_comp-result no-zero intensified on input off color 5.
        skip.
      enddo.                               " DO 3 TIMES
    endform.                               " RESULT
    *                        End Of Program                               *
    Execute the above program and run in debugging mode after selecting a line in the basic list.
    Hope this would help you.
    Regards
    Narin Nandivada

Maybe you are looking for