How to get the Grand Total in Module pool Screen

Hi Frds.
     How to get the Grand Total in Module pool Screen
Example i have 10 different materials
for each matarial has different moving . But in my case matarials is doesnt matter here
10 material Moving Average price to do Frand total and display in one column...
Please Help me out Frds.
Regards,
Kabil

Hi
You need to calculate the total in a module of PAI (or PBO) event:
PROCESS PAI.
   LOOP.....
   ENDLOOP.
  MODULE CALCULATE_TOTAL.
  MODULE CALCULATE_TOTAL.
    GRAND_TOTAL = 0.
     LOOP AT ITAB,
        GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
    ENDLOOP.
ENDMODULE.
In this way the grand total will be calculated as soon as the user presses enter or another command.
You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop,

Similar Messages

  • HOW TO GET THE GRAND TOTALS IN  ALV USING GRID FM

    Hi,
    I would like to know that am getting the sub totals using the ALV_GRID FM,
    But I need Grand totals how i can get and what is the paramater to keep = x to get this Grand totals\.

    Hi,
    If you have the DO_SUM = 'X' in the field catalog internal table for the corresponding column..Then you will get the grand total..
    Thanks,
    Naren

  • How to get the grand total ?

    Hi all,
    I got 1 main query say Q1 link to another 3query, Q2, Q3 & Q4. In Q2, Q3 & Q4, I got the difference qty display based on individual repeating frame. Now if I need to sum the grand total of Q2, Q3 & Q4 ? how should I do ?
    I try to put the sumary up in Q1, but the system has given REP-1517 error.
    Any idea please help me. Thanks.
    Rgds
    Lim

    Add summary columns in your data model. Where to put them exactly depends on your report. E.g. if you want a grand total at the end of the report, you create the column outside the query. The Object Navigator shows a Summary Columns node beneath the Queries node for these columns.

  • How to handle The Back button on Module Pool screen

    Hi Gurus,
                  I have created a module pool screen. In that screen I have used some input/output fields(text box) which i have marked mandatory by making the input field as "required" under program tab.
    now when running the screen if no data is entered into these mandatory input field then BACK button does not work. First I have to enter some data into the input filed only then the BACK button works. How should i code so that the back button works even without entering the data into these mandatory fields.

    hi,
    use AT EXIT-COMMAND with the module.
    eg. module user_command at exit command.
    then there will be no problem.

  • How to enable the 'FIND' Button in Module Pool Screen. Logic please

    Hi All,
       I am writing one Module Pool Program. I have one requirement like I have to put FIND, FIND+ buttons on different screens.
       I am able to do the code for normal FIND. According to my requirement I have to display one Popup when the user click on FIND button. Once he entered some value it should find all the records and all the fields and display the list of hits in another popup. This whole process should as same as in SE11 Transaction functionality.
       Example: SE11 ->Table Entries -> and click the FIND Button. I need the same functionality in my Program.
       Please let me know ASAP. If you provide some code sample it will be Great.
    Thanks & Regards
    Kiran

    Hi
    If you have just implemented the code for FIND I believe u need to add some little modifications for FIND+.
    U need only to manage the position of the last found value, so u need to go on from that position for FIND+.
    The position should have the two coordinates X (the position in the record) and Y (the number of the record):
    - FOUND should start for postion = 0, 0
    - FOUND+ should start for position = X, Y
    Max

  • How to get the perious values in Module pool by pressing the space or back

    Hi All,
    I want to see the already entered values in the screen when ever pressing the backspace or space bar buttons..
    For example in TCODE SE38 in program when i press the backspace or space bar , it is showing the perious opend programs, the same senario i want to implement . Could you please provide me with some example for this..
    Thanks in advance
    Regards,
    Bharani

    HI Rob,
    Thanks for the reply...
    history is turned on but for one field is coming and not for the other field in the same screen....
    Regards,
    Bharani

  • How to get the group totals in report

    HI,
    Iam generating a report to display Storage Location, and Unit of Measures and Material group and also group totals.
    how to display the group totals on the report.
    thank q
    rushi.

    Hi,
    This following report clearly explains how to display the subtotal and grand total of
    the particular field in alv.
    REPORT  YMS_ALVSUBTOTAL.
    *REPORT z_alv_sub_totals .
    TYPE-POOLS: slis.
    DATA: BEGIN OF it_output OCCURS 0,
              var1(8) TYPE n,
              var2(10),
              var3 TYPE I,
          END OF it_output.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
           t_fieldcat TYPE slis_fieldcat_alv,
          it_sort TYPE slis_t_sortinfo_alv,
          t_sort TYPE slis_sortinfo_alv,
          v_repid LIKE sy-repid.
    INITIALIZATION.
      v_repid = sy-repid.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM sort_fields.
      PERFORM fill_fieldcat.
      PERFORM list_display.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM get_data.
      it_output-var1 = 1000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
    it_output-key = 'X'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'siddhu'.
      it_output-var3 = '20000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'chinni'.
      it_output-var3 = '100000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 2000.
      it_output-var2 = 'chicchu'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 2000.
      it_output-var2 = 'candy'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 1000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
      it_output-var1 = 4000.
      it_output-var2 = 'anupama'.
      it_output-var3 = '10000'.
      APPEND it_output.
      CLEAR it_output.
    ENDFORM.                    " GET_DATA
    *&      Form  fill_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM fill_fieldcat.
      PERFORM fill_fields USING: 'IT_OUTPUT' 'VAR1' 'Variable 1' ' ',
                                 'IT_OUTPUT' 'VAR2' 'Variable 2' ' ',
                                 'IT_OUTPUT' 'VAR3' 'Variable 3' 'X'.
    ENDFORM.                    " fill_fieldcat
    *&      Form  fill_fields
          text
         -->P_0146   text
         -->P_0147   text
         -->P_0148   text
         -->P_0149   text
    FORM fill_fields USING    value(tabname) TYPE slis_tabname
                              value(fieldname) TYPE slis_fieldname
                              value(seltext_m) LIKE dd03p-scrtext_m
                              value(do_sum) TYPE c.
      t_fieldcat-tabname = tabname.
      t_fieldcat-fieldname = fieldname.
      t_fieldcat-seltext_m  = seltext_m.
      IF do_sum = 'X'.
        t_fieldcat-datatype = 'CURR'.
      ENDIF.
      t_fieldcat-do_sum = do_sum.
      APPEND t_fieldcat TO it_fieldcat.
      CLEAR t_fieldcat.
    ENDFORM.                    " fill_fields
    *&      Form  list_display
          text
    -->  p1        text
    <--  p2        text
    FORM list_display.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program             = v_repid
         it_fieldcat                    = it_fieldcat
         it_sort                        = it_sort[]
       TABLES
          t_outtab                       = it_output
       EXCEPTIONS
         program_error                  = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " list_display
    *&      Form  sort_fields
          text
    -->  p1        text
    <--  p2        text
    FORM sort_fields.
      t_sort-fieldname = 'VAR1'.
      t_sort-tabname = 'IT_OUTPUT'.
      t_sort-spos = 1.
      t_sort-up = 'X'.
      t_sort-subtot = 'X'.
      APPEND t_sort TO it_sort.
      CLEAR t_sort.
      t_sort-fieldname = 'VAR3'.
      t_sort-tabname = 'IT_OUTPUT'.
      t_sort-spos = 2.
      t_sort-up = 'X'.
      APPEND t_sort TO it_sort.
      CLEAR t_sort.
    ENDFORM.                    " sort_fields
    Thanks,
    Sankar M

  • How to get the sum total of just one row in the dashboard

    How do I get the sum total of one row in the compound layer results. This is 11g
    Does anyone know?
    may be sales, I need the total at the bottom of the row..
    thx
    Chuck

    I fnd the answer,
    in the table view, click edit then nxt to the columns and measures there is total sum icon. Click that, and choose after

  • How to get the measure total at row level for another measure calculation in DAX?

    Hi There,
    Using DAX, I am trying to get an expression for a calculated measure as follow:
    So basically, I would like to get the AMeasure total highlighted in yellow in the A2Measure calculation:
    Smeasure -(Ameasure total * WMeasure) where Ameasure total is the one highlighted. 
    I think my question would be how to get the total of a measure in order to used in the calculation of another measure.
    Thanks and best regards,
    Joss

    Hi Joss83,
    If you're trying to get the result for [AMeasure] at the total level (i.e. 5.09 in your example) you can do this by creating a version of this measures that is evaluated after ignoring the filters (indirectly or explicitly) placed on
    the 'Customer' and 'Player' columns. You may also need to ignore the filters place on some other tables or columns that must be ignored in order for the correct total to be returned.
    Without knowing much more about your data model, I can only take a vague guess as to what this calculation would look like in your scenario:
    AMeasureTotal:=
    CALCULATE(
    [AMeasure],
    ALL(Customer[Customer]),
    ALL(Player[Player])
    You can read more about the 'ALL' DAX function here:
    http://technet.microsoft.com/en-us/library/ee634802.aspx
    Hope this helps,
    Michael

  • How to calculate the Grand total

    Hi all,
    I have a table that has three column as Instrument_Name, Instrument_Currency , Value.
    I am using the "table view" to show the data on dashboard.The table shows instrument name , its currency and a value(in that currency).
    Could it be possible that while displaying the grand total of "Value", i should convert the value in a single base currency as USD.
    Thanks

    Hi,
    Well you can and should create a total on the calculation of the Margin%
    But you have to define the calculation correctly, for example if you will use in the calculation the fields without aggregation
    you will get wrong output but if you'll define the calculation as something like:
    CASE WHEN ( SUM(Revenue)+SUM(Cost)) = 0 THEN 0 ELSE SUM(Margin)/( SUM(Revenue)+SUM(Cost)) END
    and then create a total with SUM Aggregation I think you'll get what you asked for

  • How to give ** bydefault in password in module pool screen .

    Hi experts
    how to give  *******  by default in password in module pool screen .
    Thanks

    Hi ,
        Double click on the field u will get a pop up window
        i.e. attribute window for that field.
        in that window you have a tab called Program at the bottom.
       in program tab you have many checkboxes.
      check the check box with name *Entry.
      and activate.
    what ever you enter now will be in password formate
    Regards
    Ajay

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           exceptions
                client_reference             = 1
                foreign_lock                 = 2
                invalid_action               = 3
                no_clientindependent_auth    = 4
                no_database_function         = 5
                no_editor_function           = 6
                no_show_auth                 = 7
                no_tvdir_entry               = 8
                no_upd_auth                  = 9
                only_show_allowed            = 10
                system_failure               = 11
                unknown_field_in_dba_sellist = 12
                view_not_found               = 13
                others                       = 14.
    Regards,
    RIch Heilman

  • How to display image and data in module pool screen?

    Hi,
    I want to display image and relevant data besides the image in module pool screen, I am using docking container to display the image.
    Actually I am able to display image or data any one but not both.
    one more thing I want to display multiple images and their data.
    Please suggest some one if you have any idea.
    Regards,
    Dileep.

    You can try below way, I have used in report.
    DATA: gc_docking              TYPE REF TO cl_gui_docking_container, "#EC NEEDED  "Docking Container
           gc_split                 TYPE REF TO cl_gui_easy_splitter_container, "#EC NEEDED  "Splitter
           gc_top_container         TYPE REF TO cl_gui_container, "#EC NEEDED  "Top Container
           gc_bottom_container      TYPE REF TO cl_gui_container, "#EC NEEDED  "Bottom Container
          gc_document              TYPE REF TO cl_dd_document, "#EC NEEDED  "Document
           gc_events                TYPE REF TO lcl_event_class, "#EC NEEDED  " Local Event Class
           gc_grid                  TYPE REF TO cl_gui_alv_grid, "#EC NEEDED  " ALV Class
    " Creating Docking
    CREATE OBJECT gc_docking
           EXPORTING
             ratio = c_95.
         IF sy-subrc EQ 0.
    * Splitting the Docking container
           CREATE OBJECT gc_split
             EXPORTING
               parent        = gc_docking
               sash_position = c_10 "Position of Splitter Bar (in Percent)
               with_border   = c_1. "With Border = 1 Without Border = 0
         ENDIF.
    *   Placing the containers in the splitter
         gc_top_container = gc_split->top_left_container .
         gc_bottom_container = gc_split->bottom_right_container .
    *   Creating Grid
         CREATE OBJECT gc_grid
           EXPORTING
             i_parent = gc_bottom_container.
       ELSE.
    * Background job handling
         CREATE OBJECT gc_grid
           EXPORTING
             i_parent = gc_docking.
       ENDIF.
    *   Creating the document
       CREATE OBJECT gc_document
         EXPORTING
           style = 'ALV_GRID'.
    Regards,
    Sameer

  • How to add  help documentation in a module pool screen?

    Hi ,
    I have to add documentation for a module pool screen. I have added the documentation for the program in se38 but what can I do to make it visible on the screen I have designed.
    Since I am new to module pool, kindly explain me step by step.
    Thanks,
    Nidhi

    Hello Nidhi,
    if you want at field level you use
      PROCESS ON HELP-REQUEST. in flow logic of screen.
    one mre thing you can add one text edit control on screen and put your text in screen

  • How to get the individual total for the Sales(t1),Cost of Sales,(t2),t1-t2

    Hello BW gurus,
    sorry for the incomplete question.
    This is how i need my report.
    Account Number     Key Figure Type     Company code     Plant     Sales Organization     Fiscal year/period     Z1/007.2006     Z1/008.2006     Z1/009.2006     Z1/010.2006     Z1/011.2006     Z1/012.2006
                             SALES     x1                         
                             SALES     x2                         
                             SALES     x3                         
                             SALES     x4                         
                             SALES     x5                         
                             SALES     x6                         
    Overall Result                         SALES     x1x2..x6
    Similarly i need to get the cost of sales and its overall results
    and then i have to get the gross margin as (Sales - Cost of Sales) for each fiscal period(columnwise).
    i got the Sales and Cost of Sales like this
    Plant     Sales Organization     Fiscal year/period
              SALES
              COST OF SALES
              GROSS MARGIN
              SALES
              COST OF SALES
              GROSS MARGIN
              SALES
              COST OF SALES
              GROSS MARGIN
              SALES
              COST OF SALES
              GROSS MARGIN
              SALES
              COST OF SALES
              GROSS MARGIN
              SALES
              COST OF SALES
              GROSS MARGIN
              SALES
              COST OF SALES
              GROSS MARGIN
    but i need all the sales data first and its total(S)
    and then all the cost of sales data and its total(C)
    and the gross margin (S-C) for individual fiscal period.
    Please reply ASAP.Quick help is appreciated.
    Thanks in advance,
    Regards
    Sam Mathew

    Hi Viraylab,
                     check  <b>VBAP-NETPR</b> field of table <b>VBAP</b>
    It gives the net price corresponding to a line item.
    Goto Tcode VA03.See the <b>item overview</b> tab U will get <b>Net Price</b> field for indivisual line item.
    Reward points if helpful.
    Regards,
    Hemant

Maybe you are looking for