Problem with ALV amount field display

hi friend!!
i have a editable ALv out put and in that i am displaying Amount and quantity field. In O/p if i enter 100 its taking as 100,00 .Please tell me how to correct the same.
Plz help me

Try to fill the Ref_fieldname and Ref_tabname in the fieldcatalog.
also specify decimals = 0 for the column which you are editing.
fieldcat-ref_fieldname = 'KWMENG'.
fieldcat-ref_tabname = 'VBAP'.
fieldcat-decimals_out = 0.
"if you want decimals then specify the number how many you want

Similar Messages

  • Problem with ALV Grid Not Displaying Data

    Hi Gurus,
    I have a report program, when i run it I display an output summary on ALV Grid, and when i click on each of the row in the output summary, I'm suppose to see the item detail of each record.
    This item detail is showing for some record and is not showing for some other records (when i use different selections). I debugged it and observed that the table populating the ALV grid actually has records in it. The ALV grid is not just displaying the records.
    I debugged the 2 examples (one showing record and the other not showing), I found out that nothing is different in the way they run till they populate the final internal record to passed to the ALV Grid.
    Please any suggestions on this:
    This is the function code for the ALV grid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = g_program_id
          i_callback_pf_status_set = c_detail_status
          i_callback_user_command  = c_detail_user_comm
          i_grid_title             = lv_grid_title
          is_layout                = w_detail_layout
          it_fieldcat              = i_detail_fieldcat
          it_sort                  = i_detail_sort
        TABLES
          t_outtab                 = i_faglflexa[]   "NEM - detail
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE e064
          WITH sy-subrc.
    Function REUSE_ALV_GRID_DISPLAY failed on detail view SY-SUBRC = &
      ENDIF.

    This is the full code:
    ***INCLUDE ZFIGL_HYPERION_F01.
    *&      Form  open_files
    Open files used by the program.
    FORM open_files.
      OPEN DATASET p_fileot FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
        MESSAGE g_message.
      IF sy-subrc <> 0.
        MESSAGE e056
          WITH g_message.
    Unable to open output file &
      ENDIF.
    ENDFORM.                    " open_files
    *&      Form  close_files
    Close files used by the program.
    FORM close_files.
      CLOSE DATASET p_fileot.
    ENDFORM.                    " close_files
    *&      Form  extract_data
    Extract data from database needed to generate output file and report.
    FORM extract_data.
    Get the required general ledger totals records.
      PERFORM get_faglflext_data.
    Derive any other necessary fields for I_FAGLFLEXT.
      PERFORM derive_add_fields_faglflext.
    Split records by fiscal period.
      PERFORM split_records_by_period.
    Summarize the detail records to allow for creation of the file and
    reporting.
      PERFORM summarize_records_by_period.
    Get the required general ledger actual line items records.
      PERFORM get_faglflexa_data.
    Derive any other necessary fields for I_FAGLFLEXA.
      PERFORM derive_add_fields_faglflexa.
    Sort the detail and summary output tables into key sequence.
      PERFORM sort_output_tables.
    ENDFORM.                    " extract_data
    *&      Form  process_data
    Create the requested file and report.
    FORM process_data.
    Create the local file if requested by the user or the month-end file
    at month-end.
      IF cb_test = c_not_selected.
        PERFORM create_pc_file.
      ELSEIF sy-uname = c_user_batch_admin.
        PERFORM create_output_file.
      ENDIF.
    Create the necessary tables for summary ALV report.
      PERFORM build_summary_layout.
      PERFORM build_summary_field_catalog.
      PERFORM build_summary_sort_table.
    Check to see that there is data in the summary output table.  If yes,
    generate report, if not, then give a message to the user.
      READ TABLE i_output_summary INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        MESSAGE s062.
        STOP.
    No data extracted for selection criteria entered
      ENDIF.
    Generate the summary ALV report view.
      PERFORM generate_summary_alv_report.
    ENDFORM.                    " process_data
    *&      Form  verify_user_selections
    Verify data input by the user.
    FORM verify_user_selections.
      IF NOT p_ryear IS INITIAL.
        IF p_ryear < 2006 OR
           p_ryear > 2100.
          MESSAGE e057.
    Fiscal year is invalid
        ENDIF.
      ENDIF.
    If program is being run in a non-test mode and the user has left the
    fiscal year selection blank, display a error message.
      IF cb_test IS INITIAL AND
         p_ryear IS INITIAL.
        MESSAGE e058.
    A fiscal year must be entered when generating the file
      ENDIF.
    If program is being run in a non-test mode and the user has left the
    period selection blank, display a error message.
      IF cb_test IS INITIAL AND
         s_rpmax IS INITIAL.
        MESSAGE e132.
    A period must be entered when generating the file
      ENDIF.
      IF cb_test IS INITIAL AND
         p_lfile IS INITIAL.
        MESSAGE e071.
    Local filename is required when generating the file
      ENDIF.
    ****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
      IF s_rhype IS NOT INITIAL.
        LOOP AT s_rhype.
          CLEAR r_hyper.
          r_hyper-sign = 'I'.
          r_hyper-option = 'CP'.
          CONCATENATE '' s_rhype-low '' INTO r_hyper-low.
          APPEND r_hyper.
        ENDLOOP.
        SELECT bukrs saknr hyper
               FROM zall_gl_hype INTO TABLE i_zall_gl
               WHERE hyper IN r_hyper.
        LOOP AT i_zall_gl INTO w_zall_gl.
          w_zall_gl1-saknr = w_zall_gl-saknr.
          w_zall_gl2-bukrs = w_zall_gl-bukrs.
          APPEND w_zall_gl1-saknr TO i_zall_gl1.
          APPEND w_zall_gl2-bukrs TO i_zall_gl2.
          CLEAR: w_zall_gl, w_zall_gl1, w_zall_gl2.
        ENDLOOP.
        SORT i_zall_gl1 BY saknr.
        SORT i_zall_gl2 BY bukrs.
        DELETE ADJACENT DUPLICATES FROM i_zall_gl1 COMPARING saknr.
        DELETE ADJACENT DUPLICATES FROM i_zall_gl2 COMPARING bukrs.
        IF s_racct IS INITIAL.
          LOOP AT i_zall_gl1 INTO w_zall_gl1.
            r_saknr-sign = 'I'.
            r_saknr-option = 'EQ'.
            r_saknr-low = w_zall_gl1.
            APPEND r_saknr.
            CLEAR r_saknr.
            CLEAR w_zall_gl1.
          ENDLOOP.
        ELSE.
          r_saknr[] = s_racct[].
        ENDIF.
        IF s_rbukrs IS INITIAL.
          LOOP AT i_zall_gl2 INTO w_zall_gl2.
            r_bukrs-sign = 'I'.
            r_bukrs-option = 'EQ'.
            r_bukrs-low = w_zall_gl2-bukrs.
            APPEND r_bukrs.
            CLEAR r_bukrs.
            CLEAR w_zall_gl2.
          ENDLOOP.
        ELSE.
          r_bukrs[] = s_rbukrs[].
        ENDIF.
      ELSE.
        r_saknr[] = s_racct[].
        r_bukrs[] = s_rbukrs[].
        SELECT bukrs saknr hyper
               FROM zall_gl_hype INTO TABLE i_zall_gl.
      ENDIF.
    ****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
    ENDFORM.                    " verify_user_selections
    *&      Form  get_faglflext_data
    Get FAGLFLEXT (General Ledger: Totals) data from the database.
    FORM get_faglflext_data .
    Use the fiscal year for the selection, if it was populated by the
    user.
      IF NOT p_ryear IS INITIAL.
        SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
               zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
               hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
               hslvt
          INTO TABLE i_faglflext
          FROM faglflext
          WHERE rldnr = c_run_ledger    AND
                rbukrs IN r_bukrs       AND
                racct  IN r_saknr       AND
                rfarea IN s_rfarea      AND
                prctr  IN s_prctr       AND
                ryear  =  p_ryear       AND
                rvers  = c_run_version.
      ELSE.
        SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
             zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
             hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
             hslvt
        INTO TABLE i_faglflext
        FROM faglflext
        WHERE rldnr = c_run_ledger    AND
              rbukrs IN r_bukrs       AND
              racct  IN r_saknr       AND
              rfarea IN s_rfarea      AND
              prctr  IN s_prctr       AND
              rvers  = c_run_version.
      ENDIF.
    ENDFORM.                    " get_faglflext_data
    *&      Form  derive_add_fields_faglflext
    Derive additional fields needed for the I_FAGLFLEXT.
    FORM derive_add_fields_faglflext.
    Get needed company code and profit center data from the database.
      PERFORM get_t001_data.
      PERFORM get_t880_data.
      READ TABLE i_faglflext INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        PERFORM get_cepc_data.
      ENDIF.
      SORT i_zall_gl BY bukrs saknr.
      LOOP AT i_faglflext INTO w_faglflext.
    Get necessary company code data.
        READ TABLE i_t001 INTO w_t001
          WITH KEY bukrs = w_faglflext-rbukrs
                   BINARY SEARCH.
        IF sy-subrc <> 0.
          MESSAGE e059
            WITH w_faglflext-rbukrs.
    Company code & not found on table T001
        ENDIF.
    Determine the entity.
        PERFORM derive_entity USING w_t001-rcomp
                           CHANGING w_faglflext-entity.
    Determine the strategic segment.
        PERFORM derive_strategic_segment USING w_faglflext-rassc
                                               w_faglflext-prctr
                                      CHANGING w_faglflext-strat_seg
                                               w_faglflext-zzsareaim
                                               w_faglflext-zzsarea.
    Determine the strategic segment channel.
        PERFORM derive_strat_seg_chnl USING w_faglflext-rassc
                                            w_faglflext-prctr
                                   CHANGING w_faglflext-strat_seg_chnl.
    Determine the all item ID and all products.
        PERFORM derive_all_item_id USING w_t001-waers
                                CHANGING w_faglflext-all_item_id
                                         w_faglflext-all_products.
    Determine the all customers and all customers channel.
       PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
    *w_faglflext-strat_seg_chnl
                                        CHANGING w_faglflext-all_cust
    *w_faglflext-all_cust_chnl.
    Determine the sub account using the company ID of the trading partner.
       PERFORM derive_sub_account USING w_faglflext-rassc
                               CHANGING w_faglflext-sub_acct.
        PERFORM derive_sub_account USING w_t001-rcomp
                                         w_faglflext-rassc
                           CHANGING w_faglflext-sub_acct.
    ****Begin Basil changes to include hyperion acct in selection (10/03/2007).
        READ TABLE i_zall_gl INTO w_zall_gl
                     WITH KEY bukrs = w_faglflext-rbukrs
                              saknr = w_faglflext-racct
                          BINARY SEARCH.
        IF sy-subrc = 0.
    ****End Basil changes to include hyperion acct in selection (10/03/2007).
    Determine the Hyperion account number from G/L account long text.
          PERFORM derive_hyperion_account USING w_faglflext-racct
                                                w_faglflext-rfarea
                                                "KMK5/22/06 ITR: 20592
                                                w_faglflext-sub_acct
                                                w_faglflext-rassc
                                                w_faglflext-prctr
                         CHANGING w_faglflext-hyperion_acct
                                  w_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
                                  w_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
                                  w_faglflext-zzsarea
                                  w_faglflext-zzsareaim
                                  w_faglflext-strat_seg.
        ENDIF.
    Determine the all customers and all customers channel.
        PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
                                                  w_faglflext-strat_seg_chnl
                                         CHANGING w_faglflext-all_cust
                                                  w_faglflext-all_cust_chnl.
    Update i_FAGLFLEXT with the newly derive fields.
        MODIFY i_faglflext FROM w_faglflext
          TRANSPORTING entity
                       strat_seg
                       strat_seg_chnl
                       all_item_id
                       all_products
                       all_cust
                       all_cust_chnl
                       hyperion_acct
                       sub_acct
                       fiscal_period
                       zzsarea
                       zzsareaim
                       reverse_sign        "NEM8/21/06 ITR: 24286
                       balance_sheet.      "NEM8/21/06 ITR: 24286
      ENDLOOP.
      CHECK s_rhype IS NOT INITIAL.
      SORT s_rhype BY low.
      LOOP AT i_faglflext INTO w_faglflext.
        READ TABLE s_rhype WITH KEY low = w_faglflext-hyperion_acct.
        IF sy-subrc NE 0.
          CLEAR w_faglflext-hyperion_acct.
          MODIFY i_faglflext FROM w_faglflext.
        ENDIF.
      ENDLOOP.
      DELETE i_faglflext WHERE hyperion_acct IS INITIAL.
    ENDFORM.                    " derive_add_fields_faglflext
    *&      Form  derive_entity
    Derive the entity using the company code.
         -->RCOMP  - Company code.
         <--ENTITY - Entity
    FORM derive_entity USING rcomp  TYPE t_t001-rcomp
                    CHANGING entity TYPE t_faglflext-entity.
      CLEAR:
        entity.
    Get necessary global company code data.
      READ TABLE i_t880 INTO w_t880
        WITH KEY rcomp = rcomp
                 BINARY SEARCH.
      IF sy-subrc = 0.
        entity  = w_t880-name2+0(3).
        TRANSLATE entity TO UPPER CASE.
      ELSE.
        MESSAGE e060
          WITH w_t001-rcomp.
    Company code & not found on table T880
      ENDIF.
    ENDFORM.                    " derive_entity
    *&      Form  get_t001_data
    Get T001 (Company Codes) data from the database.
    FORM get_t001_data.
      SELECT bukrs waers rcomp
        INTO TABLE i_t001
        FROM t001
        CLIENT SPECIFIED
        WHERE mandt = sy-mandt.
      SORT i_t001 BY bukrs.
    ENDFORM.                    " get_t001_data
    *&      Form  get_t880_data
    Get T880 (Global Company Data (for KONS Ledger)) data from the
    database.
    FORM get_t880_data.
      SELECT rcomp name2
        INTO TABLE i_t880
        FROM t880
        CLIENT SPECIFIED
        WHERE mandt = sy-mandt.
      SORT i_t880 BY rcomp.
    ENDFORM.                    " get_t880_data
    *&      Form  derive_all_item_id
    Derive the all item ID from the company code currency key.
         -->WAERS       - Currency key.
         <--ALL_ITEM_ID - All item ID.
         <--ALL_ITEM_ID - All item ID.
    FORM derive_all_item_id USING waers        TYPE t_t001-waers
                         CHANGING all_item_id  TYPE t_faglflext-all_item_id
                                  all_products TYPE t_faglflext-all_products
      CLEAR:
        all_item_id.
    Populate all item ID.
      all_item_id = c_all_item_id.
      IF waers = c_us_dollars.
        REPLACE '*' WITH c_united_states INTO all_item_id.
      ELSE.
        REPLACE '*' WITH c_local         INTO all_item_id.
      ENDIF.
    Populate all products.
      all_products   = c_all_products.
      TRANSLATE all_products TO UPPER CASE.
    ENDFORM.                    " derive_all_item_id
    *&      Form  derive_all_customers_fields
    Derive the all customers and all customer channel fields from
    the strategic segment and strategic segment channel respectively.
         -->STRAT_SEG      - Strategic segment.
         -->STRAT_SEG_CHNL - Strategic segment channel.
         <--ALL_CUST       - All customers.
         <--ALL_CUST_CHNL  - All customers channel.
    FORM derive_all_customers_fields USING strat_seg      TYPE
    t_faglflext-strat_seg
                                           strat_seg_chnl TYPE
                                           t_faglflext-strat_seg_chnl
                                  CHANGING all_cust       TYPE
                                  t_faglflext-all_cust
                                           all_cust_chnl  TYPE
                                           t_faglflext-all_cust_chnl.
      CLEAR:
        all_cust,
        all_cust_chnl.
      all_cust        = strat_seg.
      all_cust+2(1)   = c_all_customers.
      TRANSLATE all_cust TO UPPER CASE.
      all_cust_chnl   = strat_seg_chnl.
      TRANSLATE all_cust_chnl TO UPPER CASE.
    ENDFORM.                    " derive_all_customers_fields
    *&      Form  derive_hyperion_account
    Read G/L account long text to get the Hyperion account number.
         -->RACCT         - SAP G/L account number.
         <--HYPERION_ACCT - Hyperion account number.
    FORM derive_hyperion_account USING racct         TYPE t_faglflext-racct
                                       farea         TYPE t_faglflext-rfarea
                                       "KMK5/22/06 ITR 20592
                                       sub_account   TYPE
                                       t_faglflext-sub_acct
                                       rassc         TYPE t_faglflext-rassc
                                       prctr         TYPE t_faglflext-prctr
                          CHANGING hyperion_acct TYPE t_faglflext-hyperion_acct
                                   reverse_sign  TYPE t_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
                                   balance_sheet TYPE t_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
                                   zzsarea       TYPE t_faglflext-zzsarea
                                   zzsareaim     TYPE t_faglflext-zzsareaim
                                   strat_seg     TYPE t_faglflext-strat_seg.
      DATA:
        lv_text_name          TYPE thead-tdname,
        l_strl                TYPE i VALUE 0,
        l_hyperion_acct(10),                       "KMK5/20/06 ITR 20527
        l_farea(10)           VALUE '0000000000',  "KMK5/22/06 ITR 20592
        l_balance_sheet(1),                        "NEM8/17/06 ITR 25792
        l_string              TYPE tline-tdline.   "NEM8/17/06 ITR 25792
      DATA: l_hyp_account_1 TYPE tline-tdline,
            l_hyp_account_2 TYPE tline-tdline,
            l_hyp_account_3 TYPE tline-tdline.
      reverse_sign = '1'.
      SELECT SINGLE bilkt xbilk
        FROM ska1
        INTO (l_hyperion_acct,l_balance_sheet)
        WHERE ktopl = c_global_tcoa
          AND   saknr = racct.
      balance_sheet = l_balance_sheet.
      l_string = w_zall_gl-hyper.
      SEARCH l_string FOR '-'.
      IF sy-subrc = '0'.
        reverse_sign = -1.
      ELSE.
        reverse_sign = 1.
      ENDIF.
      CHECK w_zall_gl-hyper IS NOT INITIAL.
      CLEAR: l_hyp_account_1, l_hyp_account_2, l_hyp_account_3.
      SPLIT w_zall_gl-hyper
        AT ';'
        INTO l_hyp_account_1 l_hyp_account_2 l_hyp_account_3.
      IF l_hyp_account_2 IS INITIAL.      " Only one hyperion account
        hyperion_acct = l_hyp_account_1+0(7).
        l_strl = STRLEN( hyperion_acct ) - 1.
        IF hyperion_acct+l_strl(1) EQ '1'.
          CLEAR sub_account.
          PERFORM repopulate_strategic_segment
            USING rassc prctr
            CHANGING strat_seg.
          zzsareaim = g_hold_sales_type.
          zzsarea = g_hold_sales_area.
        ENDIF.
      ELSE.                                " Two or more hyperion accounts
        IF sub_account > ''.
          hyperion_acct = l_hyp_account_2+0(7).
        ELSE.
          hyperion_acct = l_hyp_account_1+0(7).
        ENDIF.
      ENDIF.
      CLEAR: w_hyperion.
      w_hyperion-racct           = racct.
      w_hyperion-hyperion_acct   = hyperion_acct.
      w_hyperion-reverse_sign    = reverse_sign.
    ENDFORM.                    " derive_hyperion_account
    *&      Form  derive_sub_account
    Determine the sub account based on the company ID of the trading
    partner.
         -->RASSC    - Company ID of trading partner.
         <--SUB_ACCT - Sub account.
    *FORM derive_sub_account USING rassc    TYPE t_faglflext-rassc
                        CHANGING sub_acct TYPE t_faglflext-sub_acct.
    IF rassc IS INITIAL.
       CLEAR: sub_acct.
    ELSE.
       sub_acct  = rassc.
       TRANSLATE sub_acct TO UPPER CASE.
    ENDIF.
    *ENDFORM.                    " derive_sub_account
    FORM derive_sub_account USING rcomp  TYPE t_t001-rcomp
                                  rassc  TYPE t_faglflext-rassc
                    CHANGING sub_acct TYPE t_faglflext-sub_acct.
      IF rassc IS INITIAL.
        CLEAR: sub_acct.
      ELSE.
        READ TABLE i_t880 INTO w_t880
          WITH KEY rcomp = rassc
                   BINARY SEARCH.
        IF sy-subrc = 0.
          sub_acct  = w_t880-name2.
          TRANSLATE sub_acct TO UPPER CASE.
        ELSE.
       MESSAGE e060
         WITH w_t001-rcomp.
    Company code & not found on table T880
        ENDIF.
      ENDIF.
    ENDFORM.                    " derive_sub_account
    *&      Form  repopulate_strategic_segment
    Derive the strategic segment based on the company ID of the trading
    partner or the profit center.
         -->RASSC     - Company ID of trading partner.
         -->PRCTR     - Profit center.
         <--STRAT_SEG - Strategic segment.
    FORM repopulate_strategic_segment USING rassc     TYPE t_faglflext-rassc
                                        prctr     TYPE t_faglflext-prctr
                               CHANGING strat_seg TYPE t_faglflext-strat_seg
      DATA:
        lv_segment              TYPE cepc-segment.
      CLEAR:
        strat_seg.
    Find the valid profit center record.
      LOOP AT i_cepc INTO w_cepc
        WHERE prctr =  prctr    AND
              datab <= sy-datum AND
              datbi >= sy-datum.
    Pad segment with leading zeros if necessary.
        lv_segment      = w_cepc-segment.
        SHIFT lv_segment RIGHT DELETING TRAILING ' '.
        TRANSLATE lv_segment USING ' 0'.
    Get the segment name from FAGL_SEGMT (Master Data for Segments).
        SELECT SINGLE *
          FROM fagl_segmt
          WHERE langu   = sy-langu AND
                segment = lv_segment.
        IF sy-subrc = 0.
          strat_seg      = fagl_segmt-name+0(3).
          TRANSLATE strat_seg TO UPPER CASE.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "repopulate_strategic_segment
    " repopulate_strategic_segment&----
    *&      Form  derive_strategic_segment
    Derive the strategic segment based on the company ID of the trading
    partner or the profit center.
         -->RASSC     - Company ID of trading partner.
         -->PRCTR     - Profit center.
         <--STRAT_SEG - Strategic segment.
    FORM derive_strategic_segment USING rassc     TYPE t_faglflext-rassc
                                        prctr     TYPE t_faglflext-prctr
                               CHANGING strat_seg TYPE t_faglflext-strat_seg
                                        sales_type TYPE t_faglflext-zzsareaim
                                        sales_area TYPE t_faglflext-zzsarea.
      DATA:
        lv_segment              TYPE cepc-segment.
      CLEAR:
        strat_seg.
    *Hold values in Sales Type and Sales area before setting to default
    *values
    In case need to use them later
      g_hold_sales_type = sales_type.
      g_hold_sales_area = sales_area.
    If the company ID of the trading partner is populated, then set the
    strategic segment to a default value.
    And set Sales Type and Sales area to default values     **NEM 07/13/06
      IF NOT rassc IS INITIAL.
        strat_seg   = c_def_strat_seg.
        sales_type  = c_sales_type.
        sales_area  = c_sales_area.
        TRANSLATE strat_seg TO UPPER CASE.
        TRANSLATE sales_type TO UPPER CASE.
        TRANSLATE sales_area TO UPPER CASE.
        EXIT.
      ENDIF.
    Find the valid profit center record.
      LOOP AT i_cepc INTO w_cepc
        WHERE prctr =  prctr    AND
              datab <= sy-datum AND
              datbi >= sy-datum.
    Pad segment with leading zeros if necessary.
        lv_segment      = w_cepc-segment.
        SHIFT lv_segment RIGHT DELETING TRAILING ' '.
        TRANSLATE lv_segment USING ' 0'.
    Get the segment name from FAGL_SEGMT (Master Data for Segments).
        SELECT SINGLE *
          FROM fagl_segmt
          WHERE langu   = sy-langu AND
                segment = lv_segment.
        IF sy-subrc = 0.
          strat_seg      = fagl_segmt-name+0(3).
          TRANSLATE strat_seg TO UPPER CASE.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " derive_strategic_segment
    *&      Form  get_cepc_data
    Get CEPC (Profit Center Master Data Table) data from the database.
    FORM get_cepc_data.
      SELECT prctr datbi kokrs datab khinr segment
        INTO TABLE i_cepc
        FROM cepc
        FOR ALL ENTRIES IN i_faglflext
        WHERE prctr = i_faglflext-prctr.
      SORT i_cepc BY prctr datab.
    ENDFORM.                    " get_cepc_data
    *&      Form  derive_strat_seg_chnl
    Derive the strategic segment channel based on the company ID of the
    trading partner or the profit center area.
         -->RASSC          - Company ID of trading partner.
         -->PRCTR          - Profit center.
         <--STRAT_SEG_CHNL - Strategic segment channel.
    FORM derive_strat_seg_chnl USING rassc          TYPE t_faglflext-rassc
                                     prctr          TYPE t_faglflext-prctr
                            CHANGING strat_seg_chnl TYPE
                            t_faglflext-strat_seg_chnl.
      CLEAR:
        g_setclass,
        g_subclass,
        g_setname,
        strat_seg_chnl.
    If the company ID of the trading partner is populated, then set the
    strategic segment to a default value.
      IF NOT rassc IS INITIAL.
        strat_seg_chnl  = c_def_strat_seg_chnl.
        TRANSLATE strat_seg_chnl TO UPPER CASE.
        EXIT.
      ENDIF.
    Check for SETNAME = 2*** in setleaf table.
      PERFORM get_setleaf_data USING c_prctr_group
                                       prctr
                              CHANGING g_subrc.
      IF g_subrc NE c_no_record.
        PERFORM find_setleaf_record CHANGING g_subrc.
        SELECT SINGLE *
        FROM setheadert
        WHERE  setclass = g_setclass AND
               subclass = g_subclass AND
               setname  = g_setname  AND
               langu    = sy-langu.
        IF sy-subrc = 0.
          strat_seg_chnl    = setheadert-descript+0(2).
          TRANSLATE strat_seg_chnl TO UPPER CASE.
        ENDIF.
      ELSE.
    Find the valid profit center record.
        LOOP AT i_cepc INTO w_cepc
          WHERE prctr =  prctr    AND
                datab <= sy-datum AND
                datbi >= sy-datum.
    Get the correct SETNODE (Lower-level sets in sets) record.
          PERFORM get_setnode_data USING c_prctr_group
                                         w_cepc-khinr
                                CHANGING g_subrc.
          PERFORM find_setnode_record CHANGING g_subrc.
          IF g_subrc = c_no_record.
            EXIT.
          ENDIF.
    If an appropriate SETNODE record still has not been found, then
    keep looking.
          IF g_subrc = c_wrong_record.
            DO.
              PERFORM get_setnode_data USING c_prctr_group
                                             w_setnode-setname
                                    CHANGING g_subrc.
              PERFORM find_setnode_record CHANGING g_subrc.
              IF g_subrc = c_no_record OR
                 g_subrc = c_correct_record.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
    In the end, there was no SETNODE record to find.
          IF g_subrc = c_no_record.
            EXIT.
          ENDIF.
          SELECT SINGLE *
            FROM setheadert
            WHERE  setclass = g_setclass AND
                   subclass = g_subclass AND
                   setname  = g_setname  AND
                   langu    = sy-langu.
          IF sy-subrc = 0.
            strat_seg_chnl    = setheadert-descript+0(2).
            TRANSLATE strat_seg_chnl TO UPPER CASE.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " derive_strat_seg_chnl
    *&      Form  get_setnode_data
    Get SETNODE (Lower-level sets in sets) data from the database.
         -->SETCLASS   - Set class.
         -->SUBSETNAME - Subordinate set ID.
         <--SUBRC      - Return code.
    FORM get_setnode_data USING setclass   TYPE c
                                subsetname TYPE c
                       CHANGING subrc      TYPE sy-subrc.
      SELECT setclass subclass setname
        INTO TABLE i_setnode
        FROM setnode
        WHERE setclass   = c_prctr_group AND
              subsetname = subsetname.
      subrc  = sy-subrc.
    ENDFORM.                    " get_setnode_data
    *&      Form  get_setleaf_data
    Get SETLEAF (Values in Sets) data from the database.
         -->SETCLASS   - Set class.
         -->VALFROM    - Subordinate set ID.
         <--SUBRC      - Return code.
    FORM get_setleaf_data USING setclass   TYPE c
                                valfrom    TYPE c
                       CHANGING subrc      TYPE sy-subrc.
      subrc = c_correct_record.
      SELECT setclass setname valfrom subclass
        INTO TABLE i_setleaf
        FROM setleaf
        WHERE setclass   = c_prctr_group AND
              valfrom = valfrom AND
              setname GE '2000' AND
              setname LE '2999'.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    ENDFORM.                    " get_setleaf_data
    *&      Form  find_setleaf_record
    Find the appropriate SETLEAF record.
         <--SUBRC      - Return code.
    FORM find_setleaf_record CHANGING subrc TYPE sy-subrc.
      subrc  = c_wrong_record.
    If no records were found during selection, then exit the routine.
      READ TABLE i_setleaf INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    Check to see if one of the records has a setname in the 2000 series of
    numbers.
      LOOP AT i_setleaf INTO w_setleaf.
        g_setclass = w_setleaf-setclass.
        g_subclass = w_setleaf-subclass.
        g_setname  = w_setleaf-setname.
        subrc  = c_correct_record.
      ENDLOOP.
    ENDFORM.                    " find_setleaf_record
    *&      Form  find_setnode_record
    Find the appropriate SETNODE record.
         <--SUBRC      - Return code.
    FORM find_setnode_record CHANGING subrc TYPE sy-subrc.
      subrc  = c_wrong_record.
    If no records were found during selection, then exit the routine.
      READ TABLE i_setnode INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    Check to see if one of the records has a setname in the 2000 series of
    numbers.
      LOOP AT i_setnode INTO w_setnode.
        IF w_setnode-setname+0(1) = c_valid_number.
          g_setclass = w_setnode-setclass.
          g_subclass = w_setnode-subclass.
          g_setname  = w_setnode-setname.
          subrc  = c_correct_record.
          EXIT.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " find_setnode_record
    *&      Form  split_records_by_period
    Split the i_FAGLFLEXT records by fiscal period.  This is necessary
    because all (16) fiscal periods are on one record.
    FORM split_records_by_period .
      REFRESH:
        i_output_detail.
      LOOP AT i_faglflext INTO w_faglflext.
    START OF CHANGES BY BAYAPV on 07/07/2007**********************
    *SELECT SINGLE BUKRS
          SAKNR
          XOPVW
          into w_skb1
          from skb1
          FOR ALL ENTRIES IN I_FAGLFLEXT
          where bukrs = w_faglflext-rbukrs
            and SAKNR = w_faglflext-racct.
    *IF w_skb1-XOPVW = 'X'.
    *SELECT BUKRS
          HKONT

  • I have a problem with ALV Grid User Command?

    Hi Experts,
    I have a problem with ALV GRID User Command.
    I am calling TCODE IW33 (Order Display) from the ALV output at first time by selecting an order. But, User command is calling IW33 Initial screen with blank value of order. Even I checked in debugging the value what I selected is passing properly, but once that screen (IW33 Initial) displays, value doesn't appear. Then, Manually, I  created another session and gone to TCODE IW33 and displayed an order. After that I came out from that order. Then again run my ALV program and selected another order, now order is displaying, but not what I selected current order instead of displaying previous order what I just displayed manually. If I selected any other order, system will display the same order what I dislayed manually.
    Here is my code.
    FORM user_command_alv  USING u_ucomm TYPE sy-ucomm
                           us_self_field TYPE slis_selfield.
    CASE u_ucomm.
    WHEN '&IC1'.
    READ TABLE it_final INDEX us_self_field-tabindex INTO wa_final.
            WHEN 'ORDER'.
              IF NOT wa_final-order IS INITIAL.
                SET PARAMETER ID 'COK' FIELD wa_final-order.
                CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.
              ENDIF.
    endform.
    PARAMETER ID 'COK'  also the standard one.
    Could you please help me out, Where I did wrong?
    If I select any order, that order only should display.
    Thanks in advance.
    Regards,
    Sarayu.
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:33 PM

    hi,
    Please check it once the Paramater ID is 'ANR' for IW33 order number.
    Hope this may help.
    Regards,
    Sravanthi

  • Problem with the quantity field

    hi every one
    i am facing a problem with the quantity field (vbap-kwmeng)
    as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
    among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
    once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
    problem is input of length of quantity is 15 and the output length is 19
    so when i am pressing save
    say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
    how can i capture the original changed value.
    vamsi

    what about define two fields in  you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
    you can test it,mybe some one has one better idea.

  • Problem with a Dynpro field (type numc)

    hi everybody.
    I'm developping a ModulPool application in wich i have 2 RadioButtons with 2 textbox fields.
    What i pretend to do is, when the user clicks a radiobutton and strikes Intro, enable the corresponding textbox field and disable the other one.
    My code runs fine, but i have a little problem. When I loop the screen table, to set the appropiate value to the 'input' property, in this case, when i try to disable it (input = '0'), I get a zero character in that field. This field has NUMC type, i'm sure this is the problem
    'cos i've got no problem with the other field (type char). But i can't solve it.
    Anybody's got an idea?
    Thanks

    What you are seeing is the normal behavior of a numeric field represented by the SAPgui.  This is how all numeric fields are displayed via SAPgui.  If you don't want to see the 0,  then you just change the field type to CHAR and handle accordingly.
    Regards,
    Rich Heilman

  • Problem with ALV filter functionality when filtered for multiple values

    Hi,
    I am facing a problem with ALV filter functionality.
    I have displayed an ALV with some columns col_A, col_B and col_C
    col_A---- col_B -
    col_C
    1----
    a -
    abc
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    5----
    f -
    stu
    From the settings link I am applying filter on column col_C and selected multiple values say 'pqr', 'xyz' and 'lmn'.
    Now the ALV is showing rows only for last selection i.e . results are fetched only for value 'lmn'.
    i.e. after applying the filter the ALV table looks as below:
    col_A---- col_B -
    col_C
    3----
    c -
    lmn
    But ideally it should be:
    col_A---- col_B -
    col_C
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    I could not find any OSS note related to this issue.
    Please help me resolve this issue.
    Thanks,
    Feroz

    Hi,
    I am facing a problem with ALV filter functionality.
    I have displayed an ALV with some columns col_A, col_B and col_C
    col_A---- col_B -
    col_C
    1----
    a -
    abc
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    5----
    f -
    stu
    From the settings link I am applying filter on column col_C and selected multiple values say 'pqr', 'xyz' and 'lmn'.
    Now the ALV is showing rows only for last selection i.e . results are fetched only for value 'lmn'.
    i.e. after applying the filter the ALV table looks as below:
    col_A---- col_B -
    col_C
    3----
    c -
    lmn
    But ideally it should be:
    col_A---- col_B -
    col_C
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    I could not find any OSS note related to this issue.
    Please help me resolve this issue.
    Thanks,
    Feroz

  • Problem with ALV search help Dictionary Search Help

    Hello experts
    I have a problem with ALV search help.
    I use DDIC table ZXXX with text table ZXXX_T. I created DDIC search help form table ZXXX. In my WD application, in context on COMPONENTCONTROLLER i set on attribute: 'Input help mode' as 'Dictionary Search Help' and in 'Dictionary Search Help' I pass name of new created DDIC search help.
    I create a input field from that atrribute and search help works fine (there was a value and description for value from text table). So I created ALV witch contains that attribute too.
    Next I set column for this attribute in ALV as editable but on Serch help for this collumn I have only value. I DON'T HAVE TEXT DESCRIPTION FOR VALUE.
    Please help me and tell me what I do wrong?
    Miko

    Hello,
    Thank's for your help. I create DDic Search help for all fields from my ALV. Next I changed 'TYPE' for all ALV fields in COMPONENTCONTROLLER from ZXXX-Zfield to Zfield, and I changed 'Input help mode' from 'Automatic' to 'Dictionary Search Help'. Now I see Value and Description for value in Search Help in my ALV.
    Regards
    Miko

  • Problems with ALV - Excel after changing from 640 to 710

    Hi all,
    first i have to say, that i have tried to set this thread in the SAPGUI-Forum,
    but i didn't get any answers, therefore i try it here.
    I have changed our SAPGUI from 640 to 710. Now i get problems
    with ALV-GRID display.
    When i change the output to EXCEL-Inplace i get the Error-Message:
    0K000
    View cannot be switched: Product is not installed or integration is not active.
    In 640 i don't have any problems. We have ECC6.
    When i use GUI710 and SAP 4.6C i don't have any problems.
    Simple Test is possible with SE16N and change ALV output to excel-inplace.
    Can anybody help?
    Thanks.
    Regards, Dieter

    Hi Dieter,
    we had a similar problem who we resolved installing path the GUI710_1-10002995.EXE.
    Have you tried to install the patch?
    Bye
    Giovanni Mortati

  • Problems with ALV - Excel after changin from 640 to 710

    Hi all,
    i have changed our SAPGUI from 640 to 710. Now i get problems
    with ALV-GRID display.
    When i change to EXCEL-Inplace i get the Error-Message:
    0K000
    View cannot be switched: Product is not installed or integration is not active.
    in 640 i don't have any problems.
    Can anybody help?
    Thanks.
    Regards, Dieter

    Hi Roman,
    in Service.sap.com there is the first patch-level of the new GUI7.10.
    i have install it without any problems.
    The problem i had with excal-inplace is solved.
    Regards, Dieter

  • Problem with ALV grid in edit mode

    Hello, gurus!
    I have a problem with ALV-grid. Sometimes when I call F4 help for a cell, data is inserted in a different cell.  And when I call check_changed_data method, my internal table (passed to ALV-control in set_table_for_first_display) does not updates properly. In what can be a problem?
    Thanks,
    Mikhail

    Hi Prabhu,
    MODULE pbo_100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      title_of_report = text-010.
      SET TITLEBAR '0100' WITH title_of_report.
      DATA: g_event_receiver TYPE REF TO lcl_event_handler.
      IF z_custom_container IS INITIAL .
        CREATE OBJECT z_custom_container
          EXPORTING
            container_name = 'ALV_ZAC'.
        CREATE OBJECT alv_grid
          EXPORTING
            i_parent = z_custom_container.
        g_repid = sy-repid.
        gs_variant-report = g_repid.
        x_save = 'A'.
        PERFORM check_alv_grid_fields.
        ps_layout-cwidth_opt = 'X'.
        ps_layout-edit = 'X'.
        CALL METHOD alv_grid->set_ready_for_input
          EXPORTING
            i_ready_for_input = '1'.
    *    CALL METHOD alv_grid->register_edit_event
    *      EXPORTING
    *        i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        APPEND   s_list_rec   to it_list_rec.
        CALL METHOD alv_grid->set_table_for_first_display
          EXPORTING
            is_layout       = ps_layout
            is_variant      = gs_variant
            i_save          = x_save
          CHANGING
            it_fieldcatalog = pt_fieldcat
            it_outtab       = it_list_rec[].
        CALL METHOD alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDIF.
    FORM check_alv_grid_fields .
      DATA: ls_fcat LIKE LINE OF pt_fieldcat.
    REFRESH pt_fieldcat .
    CLEAR: ps_layout, ls_fcat.
      ls_fcat-fieldname = 'VBELN'.
      ls_fcat-ref_field = 'VBELN'. ls_fcat-ref_table =  'LIPS'. " .
      ls_fcat-outputlen = 9.
    *  ls_fcat-datatype   = 'CHAR'.
    *  ls_fcat-inttype    = 'C'.
      APPEND  ls_fcat TO pt_fieldcat.
      CLEAR: ls_fcat.
      ls_fcat-fieldname = 'ERDAT'.
      ls_fcat-ref_field = 'ERDAT'. ls_fcat-ref_table = 'LIPS'.
      ls_fcat-outputlen = 9.
    *  ls_fcat-f4availabl = 'X' .
    *  ls_fcat-datatype   = 'DATS'.
    *  ls_fcat-inttype    = 'D'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR: ls_fcat.
    ENDFORM.                    " check_alv_grid_fields
    FORM save_p .
      CLEAR l_valid.
      CALL METHOD alv_grid->check_changed_data
        IMPORTING
          e_valid = l_valid.
      IF l_valid IS INITIAL.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel = text-i01
            txt1  = text-i02
            txt2  = text-i03
            txt3  = text-i04.
      ELSE.
        i_dat_reg = zrumm_prr-cdprr.
        CLEAR is_temp_otc.
        freshit i_prrpus_fax.
        freshit i_list2_ot.
        LOOP AT it_list_rec INTO s_list_rec.
          MOVE-CORRESPONDING s_list_rec TO i_list2_ot.
          i_list2_ot-fgrup = 'RECE'.
          i_list2_ot-prrnu = i_num_prr.
          APPEND i_list2_ot.
          MOVE-CORRESPONDING s_list_rec TO i_prrpus_fax.
          APPEND i_prrpus_fax.
        ENDLOOP.
      ENDIF.
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:41 AM
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM

  • Problem with my X7-00 display

    Hi guys, I have big problem with my X7-00 display... like it has been magnetized, but I'm not sure is that even possible. It is discolored, like on old CRT television displays. Any ideas?

    Didn't help Tried hard reset also... nothing.
    Ana Maric

  • Problem with adding new field to the mass change screen in FBL5N

    Hi,
    We have a problem with adding the field XREF3 to the mass change screen. We followed steps described in the SAP Note 640908, but the result is that when we try to mass change some documents in FBL5N and enter some values in the mass change screen, a message appears: "Please enter at least one new value" and nothing is changed.
    If you have faced with such a problem, we would be grateful if you give us some tips.
    Regards,
    Miłosz Włodarczyk

    The problem has been resolved: we didn't activate a code in SE80.

  • Background task problem with alv grid display

    Hello !
    I have a problem when executing my program in background.
    In foreground I have no problem, my ALV appears. In the background I have a dump.
    The current ABAP program "SAPLKKBL" had to be terminated because one of the statements could not be executed.
    I use the function module 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
            i_callback_program      = gd_repid
            i_callback_user_command = 'F533_USER_COMMAND'
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            it_special_groups       = i_fgroup[]
            i_save                  = 'X'
            it_sort                 = gd_sort
            i_buffer_active         = ' '
            i_callback_pf_status_set = 'F534_SET_PF_STATUS'
         TABLES
            t_outtab                = mytab
         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.
    I don't understand where the problem is. Please help me.
    Thank you.

    I love replying to old threads:
    Try this link
    http://scn.sap.com/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job

  • Problem with ALV Grid Hotspot

    Hi ,
    I am having a problem with Hotspot <<removed_by_moderator>>
    I need to Open up SE16 and need to skip the first screen of the Table 'ZLE_WH01' and display the selection screen with the MATNR passed from my ALV Report.
    I tried using Call Transaction and Submit commands, but couldn't achive my target.
    when I used SUBMIT and pass the MATNR Value to the SE16 selection screen for the corresponding Table, the value is appearing in the MATNR field of the Selection screen but the Execute button is not working.
    When I try the Call Transaction Method, the value is not capturing in the 2nd screen. Table name is capturing in the first screen.
    Kindly advice me how to resolve this issue.
    Regards,
    Srinivas
    Edited by: Vijay Babu Dudla on Feb 25, 2009 11:08 PM

    For se16
    Use fm SE16N_INTERFACE

  • Problem with alv print

    Hi,
    I am using alv grid, there is a problem with print, when i look at print preview it shows only 1 row and even the values in that row are incorrect.
    Please help me solv the problem.
    Thanks,
    Sai.

    Here is the code
    *&      Form  DISPLAY
          text
    FORM display.
      DATA : fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    *data : wa_fieldcat type slis_fieldcat_alv.
      DATA : t_header  TYPE slis_t_listheader,
             wa_header TYPE slis_listheader.
      DATA : cnt(3) TYPE c VALUE 0.
    cnt = cnt + 1.
      fieldcatalog-fieldname   = 'XBLNR'.
      fieldcatalog-seltext_m   = 'Invoice No'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 8.
      fieldcatalog-tabname   = 'it_final'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'BLDAT'.
      fieldcatalog-seltext_m   = 'Invoice Date'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 9.
      fieldcatalog-tabname     = 'it_final'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    *CT3 No.
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'SGTXT'.
      fieldcatalog-seltext_m   = 'CT3 No'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 8.
      fieldcatalog-tabname   = 'it_final'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'MBLNR'.
      fieldcatalog-seltext_m   = 'GRR No.'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-tabname     = 'it_final'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'BUDAT'.
      fieldcatalog-seltext_m   = 'GRR DATE'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 9.
      fieldcatalog-tabname     = 'it_final'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'NAME1'.
      fieldcatalog-seltext_m   = 'Vendor Name'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 30.
      fieldcatalog-tabname   = 'it_final'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material No'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 18.
      fieldcatalog-tabname   = 'it_final'.
      fieldcatalog-no_zero   = 'X'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'MAKTX'.
      fieldcatalog-seltext_m   = 'Matdesc'.
      fieldcatalog-col_pos     =  cnt.
      fieldcatalog-outputlen   =  30.
      fieldcatalog-tabname   = 'it_final'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    **Excise Duty
    cnt = cnt + 1.
    fieldcatalog-fieldname   = 'EDUTY'.
    fieldcatalog-seltext_m   = 'EXCISE DUTY '.
    fieldcatalog-col_pos     = cnt.
    fieldcatalog-outputlen   = 30.
    fieldcatalog-tabname   = 'it_final'.
    fieldcatalog-do_sum    = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR  fieldcatalog.
    *Excise Duty
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'DBDTY'.
      fieldcatalog-seltext_m   = 'DEBIT DUTY '.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 12.
      fieldcatalog-tabname   = 'it_final'.
      fieldcatalog-do_sum    = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    *Excise Duty
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'CRDTY'.
      fieldcatalog-seltext_m   = 'CREDIT DUTY '.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 12.
      fieldcatalog-tabname   = 'it_final'.
      fieldcatalog-do_sum    = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    *Credit Date
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'CRDAT'.
      fieldcatalog-seltext_m   = 'Cr. DATE'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 9.
      fieldcatalog-tabname     = 'it_final'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    *Closing Balance
      cnt = cnt + 1.
      fieldcatalog-fieldname   = 'CL_BALANCE'.
      fieldcatalog-seltext_m   = 'BALANCE AMT'.
      fieldcatalog-col_pos     = cnt.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-tabname   = 'it_final1'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_top_of_page   = 'TOP-OF-PAGE'
          it_fieldcat              = fieldcatalog[]
          i_save                   = 'X'
        TABLES
          t_outtab                 = it_final[]
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    ENDFORM.                    "DISPLAY
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    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,
            v_date1(10),
            v_date2(10).
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'B-17 BOND REGISTER - INDIGENOUS RAW MATERIALS'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = ' Report generated on Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    opening balance
      wa_header-typ  = 'S'.
      wa_header-key = ' Opening Amount: '.
      wa_header-info = gv_op_balance.   "Opening amount
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
        i_logo             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "top-of-page

Maybe you are looking for

  • How to connect the two virtual machine .

    I installed VM workstation and created two virtual machine .Please suggest me how to connect them internally each other though vm network editor.I want create RAC Setup for practice.

  • Ipad mini suddenly won't connect

    My mini with retinal display has worked flawlessly since Xmas.  Today it lost connection and will not reconnect.  In General Settings the network (home) is there, but will not connect.  I have turned off router and mini, turned them back on at the sa

  • Can Photoshop Express create the writing the the sand effect?  Please advise how.

    Can someone please help me with creating the sand writing effect in Photoshop Express if this is at all possible?

  • SDM GUI tool

    Helo, Anybody tell me What is SDM GUI tool ? Thanks, Prasad.

  • Computer does not reliable reboot

    In the last few days my iMAC G5 does not shut down or restart without holding down the button in the back. Some of the programs like system preferences will quite responding. All these problems started suddenly. Should I restore the system with time