Problem in Decimal displaying of Data in BI 7.0 DSO

Hi Experts,
                    We were creating similar ODS which was in 3.5 in BI 7.0 Version.While transferring routine from 3.5 to 7.
There is difference in display of data.
In BI 7.0  ODS it is showing as 22.73
In BW 7.0 DSO it is showing as 22.72
I have written routine in BI7 as follows which is same as in BW 3.5 ODS for Keyfigure1.
The calcualtion for routine is
Keyfigure1 = Keyfigure2 * Keyfigure3.
Ex: 9.000 * 2.5249999999999
The result for this routine in transformation is displaying as 22.72(During testing of rule) in BI7 but result in ODS is showing as 22.73.
Please share information about what might be reasons for these Change in display

Hi Ananda,
                 I have one more key figure which dispalys in FLTP formaat..
The keyfigure i am using is of type CURR

Similar Messages

  • Problem with decimal display

    Hi everybody,
    when I make reports by report painter (GRR1), I can choose decimal display (for example: 1,234 or 1.234). But when I make reports by drilldown report (KE84), SAP use default point instead of comma. I can't change it. How to choose decimal display is comma (1,234) in drilldown report?
    Thanks

    Hi Sangram,
    I changed setting according to your instruction. But It's useless. When I execute report, SAP still display $1.745.600.
    Edited by: Phu Quoc Si on Dec 22, 2011 8:42 AM

  • Problem in displaying the data of columns into rows in sap script

    hi,
    i am working on a sap script and i have to display the dat which is displayed in column into rows but it is not displaying it properly.
    eg, C
        12.1
        Si
        5.5
    it is displaying the data right now like this but i want to display the  data like this:-
    eg, C      Si
        12.1   5.5
    plzzprovide me guidelines how to solve this problem.

    hi,
    i am using this code to display the data:-
    plzz provide me guidelines where i am getting wrong?
    TOPparCOMPONENT DESP,,,,,, INS. LOT #, , , , , , MIC,,,,,,,,,, MIC VALUEparENDTOPparFINAL
    PROTECT
    IF &I_FINAL-PRUEFLOS& NE '000000000000'
    &I_FINAL-MAKTX(23)&&i_final-prueflos(12Z)&
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ELSE
    &I_FINAL-MAKTX(23)&     
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ENDIF
    ENDPROTECT
    ITEMHEAD
    POSITION WINDOW
    SIZE WIDTH +0 . 4 CH HEIGHT +1 LN
    BOX FRAME 10 TW
    BOX HEIGHT '1.35' LN INTENSITY 20
    IF &PAGE& = '1'
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '43' LN FRAME '10' TW
    For horizontal line at top
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '43' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '43' LN FRAME '10'TW
    ELSE
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '45' CM HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '20' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '47' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '47' LN FRAME '10'TW
    ENDIF
    LINEFEED
    NEWPAGE
    NEW-PAGE
    provide me guidelines to solve this problem.
    Edited by: ricx .s on Mar 13, 2009 5:58 AM

  • Problem in displaying extension data at item level in JSP!!!

    Hi Experts,
    I am facing a problem when i try to display extension data in JSP. This is how i have coded in CRM system and in JSP:
    After searching an order in the webshop let say order no 1, and i ll select this order no .1. Now the BADI CRM_ISA_BASKET_ITEMS is triggered and in the method getitems_getdata, i have written a code with hard coded values like this:
    method IF_EX_CRM_ISA_BASKET_ITEMS~GETITEMS_GET_DATA..
    data:wa_extension like line of ct_extension.
    wa_extension-ref_guid = '498AB6EC7B623152E1000000AC1383C5'.(ref guid is item guid of the order 1)
    wa_extension-name = 'Z_CustomItemExtData'.
    wa_extension-value = 'he is a good boy'(hardcoded value) .
    append wa_extension to ct_extension.
    endmethod.
    And in JSP i have written code like this to display:
    <%--  code for extension data --%>                       
    <tr>
    <td class="identifier">Ext data</td>
    <td class="value" ><%= JspUtil.encodeHtml(orderitem.getExtensionData("Z_CustomItemExtData")) %></td>
    </tr>
    But i am not getting the value in the JSP which i have hard coded in the BADI method. Is there any thing wrong in the above code? Please help me in this as i am very much new to ABAP.
    Thanks a lot in Advance!!
    Regards,
    lakshman.

    hi,
    did you hardcode the ref-guid too? This could be the problem.
    Regards
    Michael

  • Problem with displaying chart data

    Hello everybody,
    I have problem with displaying chart data correctly. I'm using a cartesian chart with DateTimeAxis. The stockdata I'm using is for half a year and
    with ticks for every day. The problem is, that Flex displays the data of february in march together with the data of march. I have added a picture
    to show the result. The second column of the grid is for february and the third for march.
    Could anybody help me with this problem. Thanks in advance.
    Thomas

    Hi Chris,
    thanks for your reply. Here you get the source code:
    The following method creates the LineChart:
            public function init():void
                model.upperChart = this;
                model.upperChartStyle.setChartViewStyle(this);
                this.hAxis = new MyDateTimeAxis();
                model.upperChartData.configureHAxis(this.hAxis);
                this.vAxis = new LinearAxis();
                model.upperChartData.configureVAxis(this.vAxis);           
                this.vAxisTitle = new Label();
                this.vAxisTitle.text = model.upperChartData.getVAxisTitle();
                model.upperChartStyle.setVAxisTitleLabelStyle(this.vAxisTitle);
                this.vAxisTitle.x = 10
                this.vAxisTitle.y = 0;
                this.addChild(this.vAxisTitle);
                this.myChart = new CartesianChart();
                //remove default datatip
                this.myChart.showDataTips = false;
                this.myChart.x = 10;
                this.myChart.y = 0;
                this.myChart.width = 768; 
                this.myChart.height = 196;
                model.upperChartStyle.setChartStyle(this.myChart);
                this.addChild(this.myChart);
                //Remove line shadow
                this.myChart.seriesFilters = null;
                this.myChart.horizontalAxis = this.hAxis;
                this.myChart.verticalAxis = this.vAxis;
                this.hAxisRenderer = new AxisRenderer();
                model.upperChartData.configureHAxisRenderer(this.hAxisRenderer);
                this.hAxisRenderer.axis = this.hAxis;        
                model.upperChartStyle.setHAxisRendererStyle(this.hAxisRenderer);
                this.myChart.horizontalAxisRenderers.push(this.hAxisRenderer);
                this.vAxisRenderer = new AxisRenderer();
                model.upperChartData.configureVAxisRenderer(this.vAxisRenderer);
                this.vAxisRenderer.axis = this.vAxis;
                model.upperChartStyle.setVAxisRendererStyle(this.vAxisRenderer);
                this.myChart.verticalAxisRenderers.push(this.vAxisRenderer);
                model.upperChartStyle.setVAxisDataLabelStyle(this.vAxisMinLabel);
                this.addChild(this.vAxisMinLabel);   
                model.upperChartStyle.setSeriesStyle(model.upperChartData.series, model.upperChartData.shares);           
                this.myChart.dataProvider = model.upperChartData.dataProvider;
                this.myChart.series = model.upperChartData.series;
    The data for dataprovider and series you can see in attached file dataprovider.xml.
    xfield is equivalent to timestamp
    yfield is equivalent to absolute
    I think the problem could be the configuration of the datetimeaxis. The following method shows the parameter for the datetimeaxis:
            public function configureHAxis(axis:MyDateTimeAxis):void
                axis.parseFunction = UtilityClass.parseYYYYMMDDHHNNSSString2Date;
                axis.dataUnits = "days";
                axis.dataInterval = 1;
                axis.title = "";
                axis.minimum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-01-07 00:00:00").time);
                axis.maximum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-07-06 00:00:00").time);
    And finally you get the function, that I'm using for string to date conversion:
            public static function parseYYYYMMDDHHNNSSString2Date(input:String):Date
                var result:Date = new Date();
                var year:Number = Number(input.substring(0,4));
                var month:Number = Number(input.substring(5,7));
                var date:Number = Number(input.substring(8,10));
                var hours:Number = Number(input.substring(11,13));
                var minutes:Number = Number(input.substring(14,16));
                var seconds:Number = Number(input.substring(17,19));           
                result.setUTCFullYear(year);
                result.setUTCMonth(month-1);
                result.setUTCDate(date);
                result.setUTCHours(hours);
                result.setUTCMinutes(minutes);
                result.setUTCSeconds(seconds);
                return result;           
    I hope that will help to locate the reason for the wrong chart visualization.
    Thanks for any help.

  • Sql Devloper 4.0.0.13 - problems with displaying user data types

    Hi,
    I have installed new version of sqldeveloper and have discovered some problems with displaying user data types. The data that is described as VARCHAR2 are displayed with ‘???’.
    The problem persist in table view, script output and exported files.
    My type is described as follows:
    create or replace TYPE "DPTY_ADRESA" AS OBJECT
      ID_DPSF_OPCINE                                         NUMBER,
      ID_DPSF_MJESTA                                        NUMBER,
      OPCINA                                            VARCHAR2(100),
      MJESTO                                            VARCHAR2(100),
      ULICA                                 VARCHAR2(200),
      BROJ                                   VARCHAR2(20),
      SPRAT                VARCHAR2(20),
      OSTALO                             VARCHAR2(100),
      CONSTRUCTOR FUNCTION dpty_adresa RETURN SELF AS RESULT
    add MEMBER FUNCTION dajAdresu RETURN VARCHAR2 cascade;
    when make select column from table that contains this type I get next results:
    CASE 1:
    SQLDeveloper Version 3.2.20.09; Build MAIN-09.87; JDK 1.6.0_43; Windows 7 64 bit
    Select:
    select id, adresalokacija
    from dptr_saglasnosti
    where id = 1;
    Result:
            ID ADRESALOKACIJA
             1 COMP.DPTY_ADRESA(124,4913,'TRAIK','TURBE','BABANA','3452','0',NULL)
    END CASE 1;
    CASE 2:
    SQLDeveloper Version 4.0.0.13; Build MAIN-13.80; JDK 1.7.0_40; Windows 7 64 bit
    Select1:
    select id, adresalokacija
    from dptr_saglasnosti
    where id = 1;
    Result1:
    ID ADRESALOKACIJA
             1 COMP.DPTY_ADRESA(124,4913,'???','???','???','???','???',NULL)    
    But if I select one element it is displayed normal.
    Select2:
    select id, a.adresalokacija.opcina
    from dptr_saglasnosti a
    where id = 1;
    Result2:
    ID ADRESALOKACIJA.OPCINA
             1 TRAVNIK                  
    END CASE 2;
    I have tried this scenario on three different pc with same output.
    Pleas help me to get rid of the '???' in result.
    Best Regards,
    Omer

      I tried on SQLDeveloper Version 4.0.0.13; Build MAIN-13.80; JDK 1.7.0_45; Windows 7 64 bit; NLS setting is default
    all data can show,No ??? in result
    Test step as following:
    create or replace TYPE "DPTY_ADRESA" AS OBJECT
      ID_DPSF_OPCINE                                         NUMBER,
      ID_DPSF_MJESTA                                        NUMBER,
      OPCINA                                            VARCHAR2(100),
      MJESTO                                            VARCHAR2(100),
      ULICA                                 VARCHAR2(200),
      BROJ                                   VARCHAR2(20),
      SPRAT                VARCHAR2(20),
      OSTALO                             VARCHAR2(100),
      CONSTRUCTOR FUNCTION dpty_adresa RETURN SELF AS RESULT
    alter TYPE "DPTY_ADRESA" add MEMBER FUNCTION dajAdresu RETURN VARCHAR2 cascade;
    CREATE TABLE dptr_saglasnosti (
    adresalokacija        DPTY_ADRESA,
      id    number);
      INSERT INTO dptr_saglasnosti VALUES (
      DPTY_ADRESA (65,225,'Vrinda Mills', '1-800-555-4412','sss','aaaa','eeeee','attta'),1 );
    select id, adresalokacija from dptr_saglasnosti where id = 1;
    ID ADRESALOKACIJA
    1    HRCP.DPTY_ADRESA(65,225,'Vrinda Mills','1-800-555-4412','sss','aaaa','eeeee','attta')

  • LSMW problem during display converted data

    Dear Expert,
    We have problem in LSMW during display converted data.
    When using display converted data, the output will show many of rows based on data content.
    For example, contains 6 rows. But when we want to see details of the data for one row (example row 2) by double clicking on it, the problem occurs, the output will show the details of the data from the last row (row 6).
    Please your advice.
    Thanks and Regards

    Hi,
    There seems to be sorting issue. Do you have dependency on data while executing the script?
    how about reading the data , is it getting uploaded correctly?
    Regards

  • Query not displaying correct data

    hi all
    my query is not displaying correct data.
    in data target secondary sales is showing 1.800 value but in query it is showing
    2.00.my requirement is my query shuld show 1.800 value. i also tried to change decimal points but not changes has happend.plz let me knw what is the problem
    thanks in advance
    shalini gupta

    With which u r reconciling the data.
    With R3 or Cube.
    I think check ur key figure, have u taken the key figure 'with TAX' one or with out tax one??
    Regards,
    Manoj.

  • Problem with decimal

    Hi Experts,
    I'm having a problem with decimal.
    I have a alv data grid that can be edited.Once I press enter the value for the decimal fields are changed.
    Example: If i input 5.00 in the field then I press enter it converts it to 0.05
    And If I input 2.01 in the field it shows an error Too many decimal places(Maximum 0)
    DATA INPUT for my internal table:
    DATA: BEGIN OF it_data OCCURS 0,
       docno LIKE zit_haul_line-docno,
       line  LIKE zit_haul_line-line,
       eqpno LIKE zit_haul_line-eqpno,
       rpt LIKE zit_haul_line-rpt,
       notrip LIKE zit_haul_line-notrip,
       trc LIKE zit_haul_line-trc,
       escfee LIKE zit_haul_line-escfee,
       tollfee LIKE zit_haul_line-tollfee,
       repr LIKE zit_haul_line-repr,
       others LIKE zit_haul_line-others,
       tba LIKE zit_haul_line-tba,
       dik LIKE zit_haul_line-dik,
       locorg LIKE zit_haul_line-locorg,
       locdes LIKE zit_haul_line-locdes,
    END OF it_data.
    DATA: wa_data LIKE it_data.
    Here is my code in change ALV Change.
    FORM data_changed USING ir_data_changed TYPE REF TO cl_alv_changed_data_protocol.
       DATA ls_modi TYPE lvc_s_modi.
       DATA: ratepertrip LIKE zit_haul_line-rpt,
             nooftrip LIKE zit_haul_line-notrip,
             lv_value TYPE lvc_value ,
             totalrent LIKE zit_haul_line-trc,
             escortfee LIKE zit_haul_line-escfee,
             tollfee LIKE zit_haul_line-tollfee,
             represent LIKE zit_haul_line-repr,
             others LIKE zit_haul_line-others,
             lv_value1 TYPE lvc_value,
             totalbill LIKE zit_haul_line-tba.
       DATA: eqpno LIKE equi-equnr,
             gv_equnr LIKE equi-equnr.
    * Check each modification:
       LOOP AT ir_data_changed->mt_mod_cells INTO ls_modi.
          CASE ls_modi-fieldname.
           WHEN 'EQPNO'.
             CONDENSE ls_modi-value.
             SELECT SINGLE equnr
               INTO gv_equnr
               FROM equi
               WHERE equnr EQ ls_modi-value.
             IF sy-subrc NE 0.
               CALL METHOD ir_data_changed->add_protocol_entry
                 EXPORTING
                   i_msgid     = '00'
                   i_msgty     = 'E'
                   i_msgno     = '398'
                   i_msgv1     = 'Equipment Number does not exist:'
                   i_msgv2     = ls_modi-value
                   i_msgv3     = ''
                   i_msgv4     = ''
                   i_fieldname = ls_modi-fieldname
                   i_row_id    = ls_modi-row_id.
             ENDIF.
         ENDCASE.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'RPT'
         IMPORTING e_value = ratepertrip.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'NOTRIP'
         IMPORTING e_value = nooftrip.
       CLEAR totalrent.
         ls_modi-fieldname = 'TRC'.
         IF ratepertrip = ''.
           ratepertrip = 1.
         ELSEIF nooftrip = ''.
           nooftrip = 1.
         ENDIF.
         totalrent = ratepertrip * nooftrip.
         CALL METHOD ir_data_changed->modify_cell
           EXPORTING i_row_id = ls_modi-row_id
           i_fieldname = ls_modi-fieldname
           i_value = totalrent.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'ESCFEE'
         IMPORTING e_value = escortfee.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'TOLLFEE'
         IMPORTING e_value = tollfee.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'REPR'
         IMPORTING e_value = represent.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'OTHERS'
         IMPORTING e_value = others.
       CLEAR totalbill.
         ls_modi-fieldname = 'TBA'.
         totalbill = escortfee + tollfee + represent + others.
         totalbill = totalrent + totalbill.
         CALL METHOD ir_data_changed->modify_cell
           EXPORTING i_row_id = ls_modi-row_id
           i_fieldname = ls_modi-fieldname
           i_value = totalbill.
       ENDLOOP.
    ENDFORM.                    "data_changed

    Hi,
    Can you check my code. I've tried changing the data types of my internal table and my output is stll same when I press enter.
    The output should be 2.00 3.00 5.00 7.00
    Also if I enter 12345.00 the output should be 12,345.00.
    Thank you so much for the help.
    * ALV required data objects.
    TYPE-POOLS: sdydo, icon, slis.
    DATA: w_title     TYPE lvc_title,
           w_repid     TYPE sy-repid,
           w_comm      TYPE slis_formname,
           w_status    TYPE slis_formname,
           x_layout    TYPE slis_layout_alv,
           ls_events   TYPE LINE OF slis_t_event,
           t_events    TYPE slis_t_event,
           t_fieldcat  TYPE slis_t_fieldcat_alv,
           x_sort      type LINE OF slis_t_sortinfo_alv,
           t_sort      TYPE slis_t_sortinfo_alv,
           ls_heading  TYPE slis_listheader,
           t_heading   TYPE slis_t_listheader,
           ls_fieldcat TYPE slis_fieldcat_alv,
           gs_variant  LIKE disvariant,
            gt_events            TYPE slis_t_event,
            gs_events            TYPE slis_alv_event.
    DATA:
       wa_layout     TYPE slis_layout_alv,
       wa_events         TYPE slis_alv_event,
       wa_sort TYPE slis_sortinfo_alv.
    TYPES: BEGIN OF t_header,
            line01(555) TYPE c,
            line02(555) TYPE c,
            END OF t_header.
    DATA: is_print TYPE slis_print_alv,
           gset TYPE lvc_s_glay,
           %runmode TYPE aqlimode.
    data: it_sortcat   type slis_sortinfo_alv occurs 1.
    DATA: gw_header  TYPE t_header.
    " END OF ALV DATA
    "========================================================================================================================
    DATA: BEGIN OF it_data OCCURS 0,
       docno LIKE zit_haul_line-docno,
       line  LIKE zit_haul_line-line,
       eqpno LIKE zit_haul_line-eqpno,
       rpt TYPE p DECIMALS 2,  "LIKE zit_haul_line-rpt,
       notrip TYPE p DECIMALS 2,
       trc TYPE p DECIMALS 2,
       escfee TYPE p DECIMALS 2,
       tollfee TYPE p DECIMALS 2,
       repr TYPE p DECIMALS 2,
       others TYPE p DECIMALS 2,
       tba TYPE p DECIMALS 2,
       dik LIKE zit_haul_line-dik,
       locorg LIKE zit_haul_line-locorg,
       locdes LIKE zit_haul_line-locdes,
    END OF it_data.
    DATA: wa_data LIKE it_data.
    DATA: it_modified TYPE STANDARD TABLE OF zit_haul_line WITH HEADER LINE.
    DATA: wa_modified TYPE STANDARD TABLE OF zit_haul_line WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: r_create RADIOBUTTON GROUP rad1  USER-COMMAND a DEFAULT 'X'.
       SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
       PARAMETERS: r_proj RADIOBUTTON GROUP rad2 MODIF ID A.
       PARAMETERS: r_cost RADIOBUTTON GROUP rad2 MODIF ID A.
       SELECTION-SCREEN END OF BLOCK b2.
    PARAMETERS: r_post RADIOBUTTON GROUP rad1.
    PARAMETERS: r_rev RADIOBUTTON GROUP rad1.
       SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME.
         PARAMETERS: p_docno LIKE mseg-belnr MODIF ID B,
                     p_post LIKE sy-datum MODIF ID B.
       SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME.
    PARAMETERS: p_trand LIKE sy-datum,
                 p_cost LIKE csks-kostl,
                 p_proj TYPE string,
                 p_wbs TYPE string,
                 p_nwa TYPE string.
    SELECTION-SCREEN END OF BLOCK b4.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
       IF r_create = 'X'.
         IF screen-group1 = 'A'.
            screen-active = 1.
         ENDIF.
       ELSE.
         IF screen-group1 = 'A'.
            screen-active = 0.
         ENDIF.
       ENDIF.
       IF r_post = 'X' OR r_rev = 'X'.
         IF screen-group1 = 'B'.
            screen-active = 1.
         ENDIF.
       ELSE.
         IF screen-group1 = 'B'.
            screen-active = 0.
         ENDIF.
       ENDIF.
       MODIFY SCREEN.
    ENDLOOP.
    START-OF-SELECTION.
    PERFORM get_data.
    PERFORM display_report.
    FORM get_data.
    it_data-line = '001'.
    APPEND it_data.
    it_data-line = '002'.
    APPEND it_data.
    it_data-line = '003'.
    APPEND it_data.
    it_data-line = '004'.
    APPEND it_data.
    it_data-line = '005'.
    APPEND it_data.
    it_data-line = '006'.
    APPEND it_data.
    it_data-line = '007'.
    APPEND it_data.
    it_data-line = '008'.
    APPEND it_data.
    it_data-line = '009'.
    APPEND it_data.
    it_data-line = '010'.
    APPEND it_data.
    ENDFORM.
    "ALV DISPLAY ====================================================================================================================================
    "&      Form  PF_WRITE_FIELDCAT
    *&      Form  pf_write_fieldcat
    *       text
    *      -->FNAME      text
    *      -->TNAME      text
    *      -->TEXT       text
    *      -->LEN        text
    FORM pf_write_fieldcat  USING fname
                                   tname
                                   text
                                   len
                                   edt.
    *                              key
    *                              sum.
       ls_fieldcat-fieldname     = fname.
       ls_fieldcat-tabname       = tname.
       ls_fieldcat-seltext_l     = text.
       ls_fieldcat-outputlen     = len.
    *  ls_fieldcat-key           = key.
    *  ls_fieldcat-do_sum        = sum.
       ls_fieldcat-edit = edt.
       IF len = '0'.
         ls_fieldcat-outputlen     = '1'.
         ls_fieldcat-no_out = 'X'.
       ENDIF.
       APPEND ls_fieldcat TO t_fieldcat.
       CLEAR ls_fieldcat.
    *  To set ENTER Event!
       gs_events-name = 'CALLER_EXIT'.
       gs_events-form = 'CALLER_EXIT'.
       APPEND gs_events TO gt_events.
    *   To change the ALV Changed Protocoll
       gs_events-name = 'DATA_CHANGED'.
       gs_events-form = 'DATA_CHANGED'.
       APPEND gs_events TO gt_events.
    ENDFORM.                    " PF_WRITE_FIELDCAT
    *&      Form  display_report
    FORM display_report.
       is_print-no_print_selinfos = 'X'.
       is_print-no_print_listinfos = 'X'.
       is_print-print_ctrl = 'X'.
       PERFORM pf_write_fieldcat USING:
    *  'DOCNO'                  'IT_DATA'  'Line'                   ' ' '',
       'LINE'                  'IT_DATA'  'Line'                   ' ' '',
       'EQPNO'                 'IT_DATA'  'Equipment No.'          ' ' 'X',
       'RPT'           'IT_DATA'  'Rate per Trip'          ' ' 'X',
       'NOTRIP'              'IT_DATA'  'No of Trip'             ' ' 'X',
       'TRC'             'IT_DATA'  'Total Rental Charges'   ' ' '',
       'ESCFEE'             'IT_DATA'  'Escort Fee'             ' ' 'X',
       'TOLLFEE'               'IT_DATA'  'Toll Fee'               ' ' 'X',
       'REPR'             'IT_DATA'  'Representation'         ' ' 'X',
       'OTHERS'                'IT_DATA'  'Others'                 ' ' 'X',
       'TBA'               'IT_DATA'  'Total Billable Amount'  ' ' '',
       'DIK'              'IT_DATA'  'Distance in KM'         ' ' 'X',
       'LOCORG'             'IT_DATA'  'Location Origin'        ' ' 'X',
       'LOCDES'             'IT_DATA'  'Location Destination'   ' ' 'X'.
    * Layout
       x_layout-zebra = 'X'.
       x_layout-no_keyfix = ' '.
       x_layout-colwidth_optimize = 'X'.
    * GUI Status
       w_status = 'SET_PF_STATUS'.
       w_repid = sy-repid.
    * User commands
       w_comm = 'USER_COMMAND'.
    *  gs_variant-variant = p_var1.
    *  gs_variant-handle  = space.
    *  gs_variant-report  = sy-repid.
       gs_variant-report  = sy-repid.
       gs_variant-username = sy-uname.
       gset-no_colwopt = 'X'.
    * Displays the ALV grid
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           i_callback_program = sy-repid
           it_fieldcat        = t_fieldcat
           is_layout          = x_layout
           "it_sort            = t_sort
           it_sort                 = it_sortcat
    *      i_callback_pf_status_set = w_status
           "i_callback_user_command  = w_comm
           I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    *      i_callback_html_top_of_page  = 'TOP_OF_PAGE'
           i_callback_top_of_page  = 'TOP-OF-PAGE'
    *      i_callback_html_end_of_list = 'END-OF-PAGE'
           is_variant         = gs_variant
           i_save             = 'A'
           is_print           = is_print
           it_events          = gt_events
    *      i_grid_title       = w_title
         TABLES
           t_outtab           = IT_DATA
         EXCEPTIONS
           program_error      = 1
           OTHERS             = 2.
    ENDFORM.                    " display_report
    FORM data_changed USING ir_data_changed TYPE REF TO cl_alv_changed_data_protocol.
       DATA ls_modi TYPE lvc_s_modi.
       DATA: ratepertrip LIKE zit_haul_line-rpt,
             nooftrip LIKE zit_haul_line-notrip,
             lv_value TYPE lvc_value ,
             totalrent LIKE zit_haul_line-trc,
             escortfee LIKE zit_haul_line-escfee,
             tollfee LIKE zit_haul_line-tollfee,
             represent LIKE zit_haul_line-repr,
             others LIKE zit_haul_line-others,
             lv_value1 TYPE lvc_value,
             totalbill LIKE zit_haul_line-tba.
       DATA: eqpno LIKE equi-equnr,
             gv_equnr LIKE equi-equnr.
    * Check each modification:
       LOOP AT ir_data_changed->mt_mod_cells INTO ls_modi.
          CASE ls_modi-fieldname.
           WHEN 'EQPNO'.
             CONDENSE ls_modi-value.
             SELECT SINGLE equnr
               INTO gv_equnr
               FROM equi
               WHERE equnr EQ ls_modi-value.
             IF sy-subrc NE 0.
               CALL METHOD ir_data_changed->add_protocol_entry
                 EXPORTING
                   i_msgid     = '00'
                   i_msgty     = 'E'
                   i_msgno     = '398'
                   i_msgv1     = 'Equipment Number does not exist:'
                   i_msgv2     = ls_modi-value
                   i_msgv3     = ''
                   i_msgv4     = ''
                   i_fieldname = ls_modi-fieldname
                   i_row_id    = ls_modi-row_id.
             ENDIF.
         ENDCASE.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'RPT'
         IMPORTING e_value = ratepertrip.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'NOTRIP'
         IMPORTING e_value = nooftrip.
       CLEAR totalrent.
         ls_modi-fieldname = 'TRC'.
         IF ratepertrip = ''.
           ratepertrip = 1.
         ELSEIF nooftrip = ''.
           nooftrip = 1.
         ENDIF.
         totalrent = ratepertrip * nooftrip.
         CALL METHOD ir_data_changed->modify_cell
           EXPORTING i_row_id = ls_modi-row_id
           i_fieldname = ls_modi-fieldname
           i_value = totalrent.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'ESCFEE'
         IMPORTING e_value = escortfee.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'TOLLFEE'
         IMPORTING e_value = tollfee.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'REPR'
         IMPORTING e_value = represent.
       CALL METHOD ir_data_changed->get_cell_value
         EXPORTING i_row_id = ls_modi-row_id
         i_fieldname = 'OTHERS'
         IMPORTING e_value = others.
       CLEAR totalbill.
         ls_modi-fieldname = 'TBA'.
         totalbill = escortfee + tollfee + represent + others.
         totalbill = totalrent + totalbill.
         CALL METHOD ir_data_changed->modify_cell
           EXPORTING i_row_id = ls_modi-row_id
           i_fieldname = ls_modi-fieldname
           i_value = totalbill.
       ENDLOOP.
    ENDFORM.                    "data_changed
    FORM caller_exit USING is_data TYPE slis_data_caller_exit.
    * Switch to OO_ALV:
       DATA: lr_alv TYPE REF TO cl_gui_alv_grid.
       CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
         IMPORTING
           e_grid = lr_alv.
    * Register ENTER as edit event:
       CALL METHOD lr_alv->register_edit_event
         EXPORTING
           i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    * pls. use MC_EVT_MODIFIED if leaving the cell should trigger the edit event!
    ENDFORM. "CALLER_EXIT
    *&      Form  TOP-OF-PAGE
    *       text
    FORM top-of-page.
    *ALV Header declarations
       DATA: t_header TYPE slis_t_listheader,
             wa_header TYPE slis_listheader,
             t_line LIKE wa_header-info,
             ld_lines TYPE i,
             ld_linesc(10) TYPE c.
       DATA: text TYPE sdydo_text_element,
             a_right   TYPE REF TO cl_dd_area.
       DATA: tran TYPE string,
             send TYPE string,
             wbs TYPE string,
             nwa TYPE string.
       text = 'Create Hauling Charges for Project'.
       wa_header-typ  = 'S'.
       wa_header-info = text.
       APPEND wa_header TO t_header.
       CLEAR: wa_header.
       gw_header-line01 = text.
       CONCATENATE 'Transaction Date: ' p_trand INTO tran SEPARATED BY space.
       text = tran.
       wa_header-typ  = 'S'.
       wa_header-info = text.
       APPEND wa_header TO t_header.
       CLEAR: wa_header.
       gw_header-line01 = text.
       CONCATENATE 'Sender Cost Center: ' p_cost INTO send SEPARATED BY space.
       text = send.
       wa_header-typ  = 'S'.
       wa_header-info = text.
       APPEND wa_header TO t_header.
       CLEAR: wa_header.
       gw_header-line01 = text.
       CONCATENATE 'Receiver WBS: ' p_wbs INTO wbs SEPARATED BY space.
       text = wbs.
       wa_header-typ  = 'S'.
       wa_header-info = text.
       APPEND wa_header TO t_header.
       CLEAR: wa_header.
       gw_header-line01 = text.
       CONCATENATE 'Receiver Network and NWA: ' p_nwa INTO nwa SEPARATED BY space.
       text = nwa.
       wa_header-typ  = 'S'.
       wa_header-info = text.
       APPEND wa_header TO t_header.
       CLEAR: wa_header.
       gw_header-line01 = text.
       CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
         EXPORTING
           it_list_commentary = t_header.
    ENDFORM.                    "top-of-page
    FORM pf_set_top_page_heading  USING typ
                                         key
                                         info.
       ls_heading-typ = typ.
       ls_heading-key = key.
       ls_heading-info = info.
       APPEND ls_heading TO t_heading.
    ENDFORM.                    " PF_SET_TOP_PAGE_HEADING
    *&      Form  PF_SET_TOP_PAGE_EVENTS
    FORM pf_set_top_page_events  USING name
                                        form.
       ls_events-name = name.
       ls_events-form = form.
       APPEND ls_events TO t_events.
       CLEAR ls_events.
    ENDFORM.                    " PF_SET_TOP_PAGE_EVENTS
    *&      Form  REUSE_ALV_GET_VARIANT
    FORM reuse_alv_get_variant
       USING    value(iv_repid)   TYPE  sy-repid
                value(iv_handle)  TYPE  slis_handl
       CHANGING iv_variant        TYPE  disvariant-variant.
       DATA: lv_exit(1) TYPE c,
             ls_variant TYPE disvariant.   " Structure for Variant
       MOVE: iv_variant TO ls_variant-variant,
             iv_handle  TO ls_variant-handle,
             iv_repid   TO ls_variant-report.
       CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
         EXPORTING
           is_variant    = ls_variant
           i_save        = 'A'
         IMPORTING
           e_exit        = lv_exit
           es_variant    = ls_variant
         EXCEPTIONS
           not_found     = 1
           program_error = 2
           OTHERS        = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
       IF lv_exit = space.
         MOVE ls_variant-variant TO iv_variant.
       ENDIF.
    ENDFORM.                    " REUSE_ALV_GET_VARIANT                 "
    FORM user_command USING w_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    CASE w_ucomm.
    WHEN '&DATA_SAVE'.
    *  READ TABLE it_data INTO wa_data." INDEX rs_selfield-tabindex.
       DELETE it_data WHERE eqpno IS INITIAL.
       LOOP AT it_data INTO wa_data.
         CONDENSE wa_data-eqpno.
         MOVE-CORRESPONDING wa_data TO wa_modified.
         APPEND wa_modified TO it_modified.
       ENDLOOP.
       MODIFY zit_haul_line FROM TABLE it_modified.
    ENDCASE.
    ENDFORM. "user_command

  • Problem with decimal point in Korea and Japan

    Hi all,
    I have one problem with decimal points.
    I need to change in my out put cuurency values as per japan or korea standards.
    Please help me is there any function module for this one.
    program using alv grid display.
    i use write statement but it is not working. Because
    data: L_AMT  type glpca-hsl,
             G_AMT  TYPE CHAR15.
    CURR this value is 'JPY'.
    WRITE L_AMT CURRENCY CURR TO G_AMT.
    here i need to do
    L_AMT = G_AMT.   "" going to runtime error.
    if i taken like
    data: L_AMT  TYPE CHAR15,
             G_AMT  TYPE CHAR15.
    CURR this value is 'JPY'.
    WRITE L_AMT CURRENCY CURR TO G_AMT.   "" it is not working
    Regards
    margani

    Hello,
    This is pretty basic, whenever you've currency & quantity fields you need to pass the corres. reference fields.
    In your case you need to populate the cfieldname & ctabname fields of the FieldCat.
    BR,
    Suhas

  • Not displaying the data in to the table..wht is the issue

    I have problem for the displaying the RFC Model object date in to the table.
    I have created the Table in the view, Then  i have choosed  the "create  binding" option in the outLine window to map the perticular RFC model object to the Table to display. The data is not displaying in the table . But the RFC model object contains data. when i am trying to display with MessageMaganger.reporSuccess(). it is diplaying the data.
    Can any one tell me what is the issue.

    First, in your view layout in NWDS,  look at the tableview,  do you see fieldnames in the columns and rows.  If so, then I believe that you have bound correctly.    Also, in your executeBAPI method,  make sure that it looks something like this.
        public void executeBapi_Gl_Acc_Getlist_Input( )
        //@@begin executeBapi_Gl_Acc_Getlist_Input()
        try{
             wdContext.currentBapi_Gl_Acc_Getlist_InputElement().modelObject().execute();
        catch (Exception ex)
                  ex.printStackTrace();
    <b>    wdContext.nodeOutput().invalidate();</b>
        //@@end
    Regard,
    Rich Heilman

  • DataGrid does not display XML data

    Hello, and thanks for reading this...
    I am having a problem displaying XMLList data in a DataGrid.
    The data is coming from a Tree control, which is receiving it
    from a database using HTTPService.
    The data is a list of "Job Orders" from a MySQL database,
    being formatted as XML by a PHP page.
    If it would be helpful to see the actual XML, a sample is
    here:
    http://www.anaheimwib.com/_login/get_all_orders_test2.php
    All is going well until I get to the DataGrid, which doesn't
    display the data, although I know it is there as I can see it in
    debug mode. I've checked the dataField property of the appropriate
    DataGrid column, and it appears correct.
    Following is a summary of the relevant code.
    ...An HTTPService named "get_all_job_orders" retrieves
    records from a MySQL database via PHP...
    ...Results are formatted as E4X:
    HTTPService resultFormat="e4x"
    ...An XMLListCollection's source property is set to the
    returned E4X XML results:
    ...The "order" node is what is being used as the top-level of
    the XML data.
    <mx:XMLListCollection id="jobOrdersReviewXMLList"
    source="{get_all_job_orders.lastResult.order}"/>
    ...The "jobOrdersReviewXMLList" collection is assigned to be
    the dataProvider property of a Tree list, using the @name syntax to
    display the nodes correctly, and a change event function is defined
    to add the records to a DataGrid on a separate Component for
    viewing the XML records:
    <mx:Tree dataProvider="{jobOrdersReviewXMLList}"
    labelField="@name"
    change="jobPosForm.addTreePositionsToDG(event)"/>
    ...Here is the relevant "jobPosForm" code (the Job Positions
    Form, a separate Component based on a Form) :
    ...A variable is declared:
    [Bindable]
    public var positionsArray:XMLList;
    ...The variable is initialized on CreationComplete event of
    the Form:
    positionsArray = new XMLList;
    ...The Tree's change event function is defined within the
    "jobPosForm" Component.
    ...Clicking on a Tree node fires the Change event.
    ...This passes an event object to the function.
    ...This event object contains the XML from the selected Tree
    node.
    ...The Tree node's XML data is passed into the positionsArray
    XMLList.
    ...This array is the dataProvider for the DataGrid, as you
    will see in the following block.
    public function addTreePositionsToDG(event:Event):void{
    this.positionsArray = selectedNode.positions.position;
    ...A datagrid has its dataProvider is bound to
    positionsArray.
    ...(I will only show one column defined here for brevity.)
    ...This column has its dataField property set to "POS_TITLE",
    a field in the returned XML record:
    <mx:DataGrid width="100%" variableRowHeight="true"
    height="75%" id="dgPositions"
    dataProvider="{positionsArray}" editable="false">
    <mx:columns>
    <mx:DataGridColumn width="25" headerText="Position Title"
    dataField="POS_TITLE"/>
    </mx:columns>
    </mx:DataGrid>
    In debug mode, I can examine the datagrid's dataProvider
    property, and see that the correct XML data from the Tree control
    is present. However, The datagrid does not display the data in any
    of its 6 columns.
    Does anyone have any advice?
    Thanks for your time.

    Hello again,
    I came up with a method of populating the DataGrid from the
    selected Item of a Tree Control which displays complex XML data and
    XML attributes. After the user clicks on a Tree branch, I call this
    function:
    public function addTreePositionsToDG(event:Event):void{
    //Retrieve all "position" nodes from tree.
    //Loop thru each Position.
    //Add Position data to the positionsArray Array Collection.
    //The DataGrid dataprovider is bound to this array, and will
    be updated.
    positionsArray = new ArrayCollection();
    var selectedNode:Object=event.target.selectedItem;//Contains
    entire branch.
    for each (var position:XML in
    selectedNode.positions.position){
    var posArray:Array = new Array();
    posArray.PK_POSITIONID = position.@PK_POSITIONID;
    posArray.FK_ORDERID = position.@FK_ORDERID;
    posArray.POS_TITLE = position.@POS_TITLE;
    posArray.NUM_YOUTH = position.@NUM_YOUTH;
    posArray.AGE_1617 = position.@AGE_1617;
    posArray.AGE_1821 = position.@AGE_1821;
    posArray.HOURS_WK = position.@HOURS_WK;
    posArray.WAGE_RANGE_FROM = position.@WAGE_RANGE_FROM;
    posArray.WAGE_RANGE_TO = position.@WAGE_RANGE_TO;
    posArray.JOB_DESCR = position.@JOB_DESCR;
    posArray.DES_SKILLS = position.@DES_SKILLS;
    positionsArray.addItem(posArray);
    So, I just had to manually go through the selected Tree node,
    copy each XML attribute into a simple Array, then ADD this Array to
    an ArrayCollection being used as the DataProvider for the DataGrid.
    It's not elegant, but it works and I don't have to use a Label
    Function, which was getting way too complicated. I still think that
    Flex should have an easier way of doing this. There probably is an
    easier way, but the Flex documentation doesn't provide an easy path
    to it.
    I want to thank you, Tracy, for the all the help. I checked
    out the examples you have at www.cflex.net and they are very
    helpful. I bookmarked the site and will be using it as a resource
    from now on.

  • Cannot display the data from a varaible in front end

    hi,
    i not able to display the data in the table from the variable.
    steps how the module should work.
    In OEO:
    1. data to be accepted from user, values to be passed to the program in database according to the data accepted.
    In Oracle Express:
    2. values is accepted in database program as arguments. according to arguments the limits are applied and calculation is made for leaf level and then assigned to variable
    3. rollup is called in database program.
    In OEO:
    4. the data is shown in tables here the user can limit his view of the data according to his needs.
    my problem:
    the data acceptence from oeo is working fine and the backend or the database part(program, rolllups etc) are working fine. when values are passed thru express command box the program is working fine.
    i am not able to get the calculated data form the variable which stores it and display in the table. the database connectivity is fine.
    note: the display of data in table is in other page not in the data acceptence page.
    pls also let me know how to check in oracle administrator whether the values sent from oeo and accepted in backend properly.
    i will be thankfull if any helps me out to solve this problem.
    naveen

    hi,
    i not able to display the data in the table from the variable.
    steps how the module should work.
    In OEO:
    1. data to be accepted from user, values to be passed to the program in database according to the data accepted.
    In Oracle Express:
    2. values is accepted in database program as arguments. according to arguments the limits are applied and calculation is made for leaf level and then assigned to variable
    3. rollup is called in database program.
    In OEO:
    4. the data is shown in tables here the user can limit his view of the data according to his needs.
    my problem:
    the data acceptence from oeo is working fine and the backend or the database part(program, rolllups etc) are working fine. when values are passed thru express command box the program is working fine.
    i am not able to get the calculated data form the variable which stores it and display in the table. the database connectivity is fine.
    note: the display of data in table is in other page not in the data acceptence page.
    pls also let me know how to check in oracle administrator whether the values sent from oeo and accepted in backend properly.
    i will be thankfull if any helps me out to solve this problem.
    naveen

  • Product Revenue Bookings and Backlog Dashboard does not display any data

    Product Revenue Bookings and Backlog Dashboard does not display any data even though the load completed successfully.
    They are able to see just the parameters.
    Not sure if the upgrade of the database from 9.2.0.6 to 10.2.0.3 is a factor.
    What can I check?
    Is there some table to verify that the data exists for display in the Product Revenue Bookings and Backlog Dashboard?
    Screenshot is at:
    https://gtcr.oracle.com/gtcr-dir/gtcr_5637/6415786.993/Product_Revenue_Bookings_Backlog_Dashboard.doc
    Support suggested to create a new request set and run the initial load with load all summaries option; but there was no change in the Product Revenue Bookings and Backlog Dashboard.
    Any ideas?

    hi
    We have faced the similar problem after the upgrade to 10G
    What we did was
    Ran the initial load of time dimension, Item setup request set, and the request set of all the dash board in the clear and initial load mode..
    we were able to get the data once the clear and load is completed successfully
    Regards
    Ramesh Kumar S

  • Calculating the total in alv and displaying the date

    Hi,
    I am trying to calculate the totals of netwr and fkimg in a report but the following coding cannot giv me the right answer so if there is anyone with the solution for this problem may you please help me out and how can i display the date on my report......here is my coding:
    REPORT  Z_DAILY_STOCK_NEW.
    TYPE-POOLS: SLIS.
                       TABLES
    TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
               ALV FIELDS
    DATA: it_fieldcat TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_cnt LIKE sy-tabix.
         total ref to data.
        t_alv LIKE TABLE OF s_error WITH HEADER LINE.
    DATA: gr_layout TYPE slis_layout_alv,
          gr_tab_group TYPE slis_t_sp_group_alv,
          gr_repid LIKE sy-repid,
          gr_events TYPE slis_t_event,
          gr_print  TYPE slis_print_alv,
          gr_user   TYPE slis_formname VALUE 'USER_COMMAND'.
             SELECTION SCREEN
    SELECT-OPTIONS:
      s_werks FOR vbrp-werks,
      s_auart FOR vbak-auart.
             DEFINITION OF AN INTERNAL TABLE
    DATA: begin of i_stocktab occurs 0,
             kunag LIKE vbrk-kunag,
             name1 LIKE kna1-name1,
             ort01 LIKE kna1-ort01,
             inco1 LIKE vbrk-inco1,
             vkgrp LIKE vbrp-vkgrp,
             fkimg LIKE vbrp-fkimg,
             netwr LIKE vbrk-netwr,
          end of i_stocktab.
             START OF SELECTION
       SELECT vbrkkunag kna1name1 kna1ort01 vbrkinco1 vbrp~vkgrp
              vbrpfkimg vbrknetwr
              FROM kna1 inner join vbrk on kna1kunnr EQ vbrkkunrg
                        inner join vbak on kna1kunnr EQ vbakkunnr
                        inner join vbrp on vbrkvbeln EQ vbrpvbeln
              INTO i_stocktab
              WHERE vbrp~werks IN s_werks
              AND   vbak~auart IN s_auart.
              APPEND i_stocktab.
       ENDSELECT.
    *DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM build_event.
    PERFORM build_print.
    PERFORM calc_total.
    PERFORM display_alv_report.
    FORM build_fieldcatalog.
      w_cnt = 1.
      it_fieldcat-fieldname = 'KUNAG'.
      it_fieldcat-seltext_m = 'Soldtp'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-key       = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NAME1'.
      it_fieldcat-seltext_m = 'Name'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'ORT01'.
      it_fieldcat-seltext_m = 'City'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'INC01'.
      it_fieldcat-seltext_m = 'Incoterms'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'VKGRP'.
      it_fieldcat-seltext_m = 'Sales Group'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'FKIMG'.
      it_fieldcat-seltext_m = 'Invoiced Qty'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
    *it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NETWR'.
      it_fieldcat-seltext_m = 'Invoiced Value'.
      it_fieldcat-col_pos   = w_cnt.
      it_fieldcat-emphasize = 'X'.
    it_fieldcat-do_sum    = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    ENDFORM.
    FORM build_layout.
        gr_layout-no_input           = 'X'.
        gr_layout-colwidth_optimize  = 'X'.
        gr_layout-totals_text        = 'Totals: '(201).
        gr_layout-detail_popup       = 'X'.
    ENDFORM.
    FORM build_event.
      DATA i_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
         EXPORTING
           i_list_type = 0
         IMPORTING
           et_events   = gr_events[].
       READ TABLE gr_events WITH KEY name = slis_ev_user_command
                            INTO i_event.
       if sy-subrc = 0.
         MOVE gr_user TO i_event-form.
         APPEND i_event TO gr_events.
       endif.
    ENDFORM.
    *FORM calc_total.
    LOOP AT it_fieldcat into wa_fieldcat
    WHERE fieldname EQ 'FKIMG' OR
           fieldname EQ 'NETWR'.
           wa_fieldcat-do_sum   = 'X'.
           wa_fieldcat-datatype = 'QUAT'.
    modify it_fieldcat from wa_fieldcat.
    ENDLOOP.
    *ENDFORM.
    FORM build_print.
         gr_print-reserve_lines = '2'.
         gr_print-no_coverpage  = 'X'.
    ENDFORM.
    FORM calc_total.
    DATA: total type ref to data,
          subtotal1 type ref to data.
      field-symbols <fkimg> like sflight.
      field-symbols <netwr> like sflight.
      call method grid1-> get_subtotals
         importing
            ep_collect00 = subtotal
            ep_collect01 = total.
      assign total to <fkimg>.
      assign total to <netwr>.
    ENDFORM.
    *&          FUNCTION ALV DISPLAY
    FORM display_alv_report.
    gr_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
       I_CALLBACK_PROGRAM                = gr_repid
       I_CALLBACK_USER_COMMAND           = slis_ev_user_command
       I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE' " see FORM
       IS_LAYOUT                         = gr_layout
       IT_FIELDCAT                       = it_fieldcat[]
       IT_SPECIAL_GROUPS                 = gr_tab_group
       I_SAVE                            = 'X'
       IT_EVENTS                         = gr_events
       IS_PRINT                          = gr_print
      TABLES
        t_outtab                          = i_stocktab
      EXCEPTIONS
        PROGRAM_ERROR                     = 1
        OTHERS                            = 2.
    IF sy-subrc <> 0.
    ENDIF.
    ENDFORM.
    FORM top-of-page.
    *ALV Header deaclarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader,
            t_line LIKE wa_header-info,
            ld_lines TYPE i,
            ld_linesc TYPE c.
    *Title
       wa_header-typ  = 'H'.
       wa_header-info = 'Report for daily Stock Returns'.
       APPEND wa_header TO t_header.
       CLEAR wa_header.
    *Total No. Records Selected
    DESCRIBE TABLE i_stocktab LINES ld_lines.
      ld_linesc = ld_lines.
      CONCATENATE 'Total No. of Records Selected:' ld_linesc
                              INTO t_line SEPARATED BY space.
      wa_header-typ = 'A'.
      wa_header-info = t_line.
      APPEND wa_header TO t_header.
      CLEAR: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
             it_list_commentary = t_header.
    ENDFORM.

    Try This
    REPORT z_daily_stock_new.
    TYPE-POOLS: slis.
    * TABLES
    TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
    * ALV FIELDS
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_cnt LIKE sy-tabix.
    * total ref to data.
    * t_alv LIKE TABLE OF s_error WITH HEADER LINE.
    DATA: gr_layout TYPE slis_layout_alv,
    gr_tab_group TYPE slis_t_sp_group_alv,
    gr_repid LIKE sy-repid,
    gr_events TYPE slis_t_event,
    gr_print TYPE slis_print_alv,
    gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
    * SELECTION SCREEN
    SELECT-OPTIONS:
    s_werks FOR vbrp-werks,
    s_auart FOR vbak-auart.
    * DEFINITION OF AN INTERNAL TABLE
    DATA: BEGIN OF i_stocktab OCCURS 0,
    kunag LIKE vbrk-kunag,
    name1 LIKE kna1-name1,
    ort01 LIKE kna1-ort01,
    inco1 LIKE vbrk-inco1,
    vkgrp LIKE vbrp-vkgrp,
    fkimg LIKE vbrp-fkimg,
    netwr LIKE vbrk-netwr,
    END OF i_stocktab.
    * START OF SELECTION
    SELECT vbrk~kunag kna1~name1 kna1~ort01 vbrk~inco1 vbrp~vkgrp
    vbrp~fkimg vbrk~netwr
    FROM kna1 INNER JOIN vbrk ON kna1~kunnr EQ vbrk~kunrg
    INNER JOIN vbak ON kna1~kunnr EQ vbak~kunnr
    INNER JOIN vbrp ON vbrk~vbeln EQ vbrp~vbeln
    INTO i_stocktab
    WHERE vbrp~werks IN s_werks
    AND vbak~auart IN s_auart.
      APPEND i_stocktab.
    ENDSELECT.
    *DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM build_event.
    PERFORM build_print.
    PERFORM calc_total.
    PERFORM display_alv_report.
    *       FORM build_fieldcatalog                                       *
    FORM build_fieldcatalog.
      w_cnt = 1.
      it_fieldcat-fieldname = 'KUNAG'.
      it_fieldcat-seltext_m = 'Soldtp'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-key = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'NAME1'.
      it_fieldcat-seltext_m = 'Name'.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'ORT01'.
      it_fieldcat-seltext_m = 'City'.
      it_fieldcat-col_pos = w_cnt.
      it_fieldcat-emphasize = 'X'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    *  w_cnt = w_cnt + 1.
    *  it_fieldcat-fieldname = 'INC01'.
    *  it_fieldcat-seltext_m = 'Incoterms'.
    *  it_fieldcat-emphasize = 'X'.
    *  APPEND it_fieldcat TO it_fieldcat.
    *  CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'VKGRP'.
      it_fieldcat-seltext_m = 'Sales Group'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      it_fieldcat-fieldname = 'FKIMG'.
      it_fieldcat-seltext_m = 'Invoiced Qty'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-ref_tabname  = 'VBRP' .
      it_fieldcat-ref_fieldname = 'FKIMG' .
      it_fieldcat-do_sum = 'X' .
    * *it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
      w_cnt = w_cnt + 1.
      clear it_fieldcat .
      it_fieldcat-fieldname = 'NETWR'.
      it_fieldcat-seltext_m = 'Invoiced Value'.
      it_fieldcat-emphasize = 'X'.
      it_fieldcat-ref_tabname  = 'VBRP' .
      it_fieldcat-ref_fieldname = 'NETWR' .
      it_fieldcat-do_sum = 'X' .
    * it_fieldcat-do_sum = 'x'.
      APPEND it_fieldcat TO it_fieldcat.
      CLEAR it_fieldcat.
    ENDFORM.
    *       FORM build_layout                                             *
    FORM build_layout.
      gr_layout-no_input = 'X'.
      gr_layout-colwidth_optimize = 'X'.
      gr_layout-totals_text = 'Totals: '(201).
      gr_layout-detail_popup = 'X'.
    ENDFORM.
    *       FORM build_event                                              *
    FORM build_event.
      DATA i_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = gr_events[].
      READ TABLE gr_events WITH KEY name = slis_ev_user_command
      INTO i_event.
      IF sy-subrc = 0.
        MOVE gr_user TO i_event-form.
        APPEND i_event TO gr_events.
      ENDIF.
    ENDFORM.
    *FORM calc_total.
    * LOOP AT it_fieldcat into wa_fieldcat
    * WHERE fieldname EQ 'FKIMG' OR
    * fieldname EQ 'NETWR'.
    * wa_fieldcat-do_sum = 'X'.
    * wa_fieldcat-datatype = 'QUAT'.
    * modify it_fieldcat from wa_fieldcat.
    * ENDLOOP.
    *ENDFORM.
    FORM build_print.
      gr_print-reserve_lines = '2'.
      gr_print-no_coverpage = 'X'.
    ENDFORM.
    *       FORM calc_total                                               *
    FORM calc_total.
      DATA: total TYPE REF TO data,
      subtotal1 TYPE REF TO data.
    *  FIELD-SYMBOLS <fkimg> LIKE sflight.
    *  FIELD-SYMBOLS <netwr> LIKE sflight.
    *  CALL METHOD grid1-> get_subtotals
    *  IMPORTING
    *  ep_collect00 = subtotal
    *  ep_collect01 = total.
    *  ASSIGN total TO <fkimg>.
    *  ASSIGN total TO <netwr>.
    ENDFORM.
    *& FUNCTION ALV DISPLAY
    FORM display_alv_report.
      gr_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gr_repid
                i_callback_user_command = slis_ev_user_command
                i_callback_top_of_page  = 'TOP-OF-PAGE'  " see FORM
                is_layout               = gr_layout
                it_fieldcat             = it_fieldcat[]
                it_special_groups       = gr_tab_group
                i_save                  = 'X'
                it_events               = gr_events
                is_print                = gr_print
           TABLES
                t_outtab                = i_stocktab
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.
    *       FORM top-of-page                                              *
    FORM top-of-page.
    *ALV Header deaclarations
      DATA: t_header TYPE slis_t_listheader,
      wa_header TYPE slis_listheader,
      t_line LIKE wa_header-info,
      ld_lines TYPE i,
      ld_linesc TYPE c.
    *Title
      wa_header-typ = 'H'.
      wa_header-info = 'Report for daily Stock Returns'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    *Total No. Records Selected
      DESCRIBE TABLE i_stocktab LINES ld_lines.
      ld_linesc = ld_lines.
      CONCATENATE 'Total No. of Records Selected:' ld_linesc
      INTO t_line SEPARATED BY space.
      wa_header-typ = 'A'.
      wa_header-info = t_line.
      APPEND wa_header TO t_header.
      CLEAR: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = t_header.
    ENDFORM.

Maybe you are looking for

  • External Service as Callable Object

    Hii Frens,               I have created an external service as a callable object.It executes a BAPI but when i test the service it doesnt give the output. A username is the input for the BAPI and output is a structure.But am not getting the output in

  • Register the device with another network

    Hi everyone! I have a huge problem with my Bb. I bought the device  in an Orange shop in UK and before leaving permanently the country, I unlocked it so that I could use an Italian SIM card. Now I'm in Italy and the problem is that I cannot register

  • Export error. Please help

    Hi ALL, When i try to export the database i am getting the following error. Please help C:\>exp cas/compass@prd_test file='I:\Prd_dumb222_refresh\backup_before_refresh\exp_cas_backupbeforefresh_020310.dmp' log='I:\Prd_dumb222_refresh\backup_before_re

  • How do I sync old notes to Gmail

    Hey, I'm using an iPhone 4S running version 6.1.3. I've added Gmail to the 'Mail, Contacts, Calender...' section under settings and have Notes enabled. However, only the notes which I make after adding will be synchronized. Is there a way to synchron

  • OES11 SP1 nss process high cpuq

    Hi, since sunday, on one of my oes11sp1 cluster node, the cpu is very high. I have some nss xx process (where xx is a number) wich take a lot of cpu, and my server is swapping (his got 32Gb of Ram). The other node is fine. I can't find the root cause