ALV GRID short dump issue

could anybody advice, ALV GRID FM(field catalog issue)is getting short dump, but workig fine for ALV LIST.
PERFORM create_field_catalog USING:
    'TRAFFIC_LIGHT' ' ' 15 'Status'   'Status' ' ',
    'VKORG'     ' ' 15 'Sales Org'    'Sales Org' ' ',
    'VTWEG'     ' ' 15 'Dist Channel' 'Dist Channel' ' ',
    'KUNRG'     ' ' 15 'Payer'        'Payer' ' ',
    'PAYER'     ' ' 15 'Payer Name'   'Payer Name' ' ',
    'KUNAG'     ' ' 15 'Ship-To'      'Ship-To' ' ',
    'SHIPTO'    ' ' 15 'Ship-To Name' 'Ship-To Name' ' ',
    'SHIPTOPAR' ' ' 15 'Bill to Party' 'Bill To Party' ' ',
    'KDGRP'     ' ' 15 'Customer Grp' 'Customer Grp' ' ',
    'ZCUSTPO'   ' ' 15 'Customer PO'  'Customer PO' ' ',
    'VBELN'     ' ' 15 'Billing Doc'  'Billing Doc' ' ',
    'FKDAT'     ' ' 15 'Billing Date' 'Billing Date' ' ',
    'FKART'     ' ' 15 'Billing Type' 'Billing Type' ' ',
    'ZOUTPUT'   ' ' 15 'Output Type'  'Output Type' ' ',
    'NETWR'     ' ' 15 'Net Value'    'Net Value' 'X',
    'KWERT'     ' ' 15 'Total VAT'    'Total VAT' 'X',
    'WAERK'     ' ' 15 'Currency'     'Currency' ' ',
    'XBLNR'     ' ' 15 'Reference'    'Reference' ' ',
    'DELNO'     ' ' 15 'Delivery #'   'Delivery #' ' ',
    'TLINE'     ' ' 15 'Manifest #'   'Manifest #' ' ',
    'ZBOL'      ' ' 15 'Bill Of Ldng' 'Bill of Ldng' ' ',
    'LIFEX'     ' ' 15 'Ext Del #'    'Ext Del #' ' ',
    'POSNR'     ' ' 15 'Item'         'Item' ' ',
    'MATNR'     ' ' 18 'Material'     'Material' ' ',
    'KDMAT'     ' ' 15 'Cust Matl'    'Cust Matl' ' ',
    'WERKS'     ' ' 15 'Plant'        'Plant' ' ',
    'ZZPLAT'    ' ' 10 'Platform'     'Platform' ' ',
    'ZZPRONUM'  ' ' 10 'Program'      'Program' ' ',
    'ZZPROCODE' ' ' 10 'Prod Code'    'Prod Code' ' ',
    'FKIMG'     ' ' 15 'Qty'          'Qty' ' ',
    'VRKME'     ' ' 15 'UoM'          'UoM' ' ',
    'ARKTX'     ' ' 15 'Description'  'Description' ' ',
    'KBETR'     ' ' 15 'Price'        'Price' ' ',
    'VATRT'     ' ' 15 'VAT Rate'     'VAT Rate' ' ',
    'KWERT_D'   ' ' 15 'Item VAT'     'Item VAT' 'X',
    'NETWR_D'   ' ' 15 'Item Net Value' 'Item Net Value' 'X',
    'VGBEL'     ' ' 15 'Ref Document' 'Ref Document' ' ',
    'VGPOS'     ' ' 13 'Ref Doc Line' 'Ref Doc Line' ' ' .
FORM create_field_catalog USING fieldname TYPE c
                                inttype   TYPE c
                                outputlen TYPE i
                                coltext   TYPE c
                                seltext   TYPE c
                                do_sum    TYPE c.
  DATA: l_f_fieldcat TYPE slis_fieldcat_alv.
  l_f_fieldcat-fieldname    = fieldname.
  l_f_fieldcat-inttype      = inttype.
  l_f_fieldcat-outputlen    = outputlen.
  l_f_fieldcat-seltext_m    = coltext.
  l_f_fieldcat-seltext_l    = seltext.
  l_f_fieldcat-reptext_ddic = coltext.
  l_f_fieldcat-do_sum     = do_sum.
  APPEND l_f_fieldcat TO t_field_catalog.
  CLEAR l_f_fieldcat.
ENDFORM.   "CREATE_FIELD_CATALOG
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = v_repid
          i_callback_user_command = 'F_USER_COMMAND'
          i_grid_settings         = f_grid_settings
          is_layout               = f_grid_layout
          is_print                = f_print_settings
          i_background_id         = 'BACK'
          it_events               = t_events[]
          it_fieldcat             = t_field_catalog
          it_sort                 = t_sortcat[]
          i_default               = 'X'
          i_save                  = 'A'
          is_variant              = f_variant
        TABLES
          t_outtab                = t_output4
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.

BEGIN OF t_output4 OCCURS 0,
        traffic_light TYPE c,
        vkorg LIKE vbrk-vkorg,
        vtweg LIKE vbrk-vtweg,
        kunrg LIKE vbrk-kunrg,
        payer LIKE adrc-name1,
        kunag LIKE vbrk-kunag,
        shipto LIKE adrc-name1,
        shiptopar LIKE likp-kunnr,
        kdgrp  LIKE vbrk-kdgrp,
        zcustpo LIKE vbkd-bstkd,
        vbeln LIKE vbrk-vbeln,
        fkdat LIKE vbrk-fkdat,
        fkart LIKE vbrk-fkart,
        zoutput LIKE dnast-kschl,
        netwr LIKE vbrk-netwr,
        kwert LIKE konv-kwert,
        waerk LIKE vbrk-waerk,
        xblnr LIKE vbrk-xblnr,
        delno LIKE likp-vbeln,
        t_line LIKE tline-tdline,
        zbol LIKE likp-bolnr,
        lifex LIKE likp-lifex,
        posnr LIKE vbrp-posnr,
        matnr LIKE vbrp-matnr,
        kdmat LIKE lips-kdmat,
        werks LIKE vbrp-werks,
        zzplat LIKE vbrp-zzplat,
        zzpronum LIKE vbrp-zzpronum,
        zzprocode LIKE a802-zzprocode,
        fkimg LIKE vbrp-fkimg,
        vrkme LIKE vbrp-vrkme,
        arktx LIKE vbrp-arktx,
        kbetr LIKE konv-kbetr,
        vatrt TYPE p DECIMALS 1,
        kwert_d LIKE konv-kwert,
        netwr_d LIKE vbrp-netwr,
        vgbel LIKE vbrp-vgbel,
        vgpos LIKE vbrp-vgpos,
      END OF t_output4,

Similar Messages

  • ALV Grid throwing dump in total function

    Hi,
      My ALV grid program, is working fine in development server, for the total and subtotal function. However, the same program is throwing a short dump in Quality server when we try to get the total.Please help!
    Regards,
    Anita Jeyan

    Hi ,
    Please go to ST22 and check what is the reason for error.
    Let me know the error.
    The reason might be due to some less data size or some data type mismatch.
    Regards,
    Uma
    Edited by: UmaDave on Jun 9, 2010 12:10 PM
    Edited by: UmaDave on Jun 9, 2010 12:10 PM

  • ALV Grid sub total issue

    Hi SAP Experts,
    Currently I have ALV Grid table as below as example :
    FIELD1
    FIELD2
    Account
    Amount
    1. Rev
    1.Rev
    Acct1
    100.00
    1. Rev
    1.Rev
    Acct2
    50.00
    Subtotal FIELD2 (1.Rev)
    150.00
    Subtotal FIELD1 (1.Rev)
    150.00
    2. Cost
    2.1 Cost1
    Acct3
    100.00
    2. Cost
    2.1 Cost1
    Acct4
    75.00
    Subtotal FIELD2  (2.1 Cost1)
    175.00
    2. Cost
    2.2 Cost2
    Acct5
    25.00
    Subtotal FIELD2 (2.2 Cost 2)
    25.00
    | Subtotal FIELD1 (2.Cost)                | 200.00             |          
    I have 2 questions.
    First, as you can see, I have 2 subtotal for 1.Rev eventhough 1.Rev actually only need one subtotal because there is no subgroup for 1.Rev. Is it possible to have only one subtotal for this 1.Rev but I still maintained 2 subtotal for 2.Cost because 2.Cost has subgroup?
    My 2nd issue is I need to insert another row exactly below Subtotal FIELD1 (2.Cost) row like this:
    Gross Margin
    (Some formula)
    This row does not come from any sub total. The problem is I can not just insert this column and put Gross Margin description in FIELD1 because I will have 3 row like below :
    Gross Margin
    (Formula)
    Subtotal FIELD2 (blank)
    (Formula) sub total
    Subtotal FIELD1 (Gross Margin)
    (Formula) sub total
    Is there any way I can insert Gross Margin Row without creating new subtotal for it so it will only have one line in the ALV Grid table? Please help. Thank you.
    Regards,
    Abraham

    Hi Vijay.
    I'm not posting this before I search everywhere and this is not the first time I post in this forum so I know what I should do before posting. If I miss something, maybe you can give me at least a hint whether it can be done or not.
    This report that I am using is ALV Grid using REUSE_ALV_GRID_DISPLAY function module and not OOP using dialog module. I never said I need sample code because I only want to know is there a way to do that using ALV Grid which until now I will say that SAP ALV grid has this limitation where you can not insert row without including it in the subtotal.
    So, I would be very thankful if someone can give me some clarity on this thing and Vijay, if you really don't know what is the answer, I really appreciate if you can hold your self from making that kind of reply. It does not need experienced ABAP Consultant to write such remarks. Thanks.
    Regards,
    Abraham

  • REGARDING ALV REPORT SHORT DUMP

    hI ALL,
    IAM GETTING FOR THE FOLLOWING CODE,
    PLEASE WHY THE ERROR IN ECC 6.0
    TABLES AND DATA DECLARATION.
    *TABLES: mara,makt.",marc.
    data syrepid like sy-repid.
    data sydatum(10). " LIKE sy-datum.
    data sypagno(3) type n.
    WHEN USING MORE THAN ONE TABLE IN ALV WE NEEED TO DECLARE THE TYPE
    GROUP (TYPE-POOLS--------->SLIS)
    type-pools : slis.
    INTERNAL TABLE DECLARATION.
    INTERNAL TABLE TO HOLD THE VALUES FROM THE MARA TABLE
    data: begin of t_mara occurs 0,
    matnr like mara-matnr,
    meins like mara-meins,
    mtart like mara-mtart,
    matkl like mara-matkl,
    end of t_mara.
    INTERNAL TABLE TO HOLD THE CONTENTS FROM THE EKKO TABLE
    data : begin of t_marc occurs 0,
    matnr like mara-matnr,
    werks like marc-werks,
    minbe like marc-minbe.
    data: end of t_marc.
    INTERNAL TABLE TO HOLD THE VALUES FROM MAKT TABLE.
    data : begin of t_makt occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    spras like makt-spras,
    end of t_makt.
    INTERNAL TABLE WHICH ACTUALLY MERGES ALL THE OTHER INTERNAL TABLES.
    data: begin of itab1 occurs 0,
    matnr like mara-matnr,
    meins like mara-meins,
    maktx like makt-maktx,
    spras like makt-spras,
    werks like marc-werks,
    minbe like marc-minbe,
    end of itab1.
    THE FOLLOWING DECLARATION IS USED FOR DEFINING THE FIELDCAT
    AND THE LAYOUT FOR THE ALV.
    HERE AS slis_t_fieldcat_alv IS A INTERNAL TABLE WITHOUT A HEADER LINE
    WE EXPLICITELY DEFINE AN INTERNAL TABLE OF THE SAME STRUCTURE AS THAT
    OF slis_t_fieldcat_alv BUT WITH A HEADER LINE IN THE DEFINITION.
    THIS IS DONE TO MAKE THE CODE SIMPLER.
    OTHERWISE WE MAY HAVE TO DEFINE THE STRUCTURE AS IN THE NORMAL SAP
    PROGRAMS.
    IN THE FIELDCATALOG TABLE WE ACTUALLY PASS THE FIELDS FROM ONE OR
    MORE TABLES AND CREATE A STRUCTURE
    IN THE LAYOUT STRUCTURE WE BASICALLY DEFINE THE FORMATTING OPTIONS
    LIKE DISPLAY IN THE ZEBRA PATTERN ,THE HOTSPOT OPTIONS ETC.
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
    fieldlayout type slis_layout_alv.
    DECLARING THE EVENTTABLE INTERNL TABLE FOR USING EVENTS LIKE
    TOP-OF-PAGE ETC.
    data : eventstab type slis_t_event with header line.
    DECLARING AN INTERNAL TABLE TO HOLD THE DATA FOR THE TOP-OF-PAGE
    data : heading type slis_t_listheader with header line.
    data : heading1 type slis_t_listheader with header line.
    data : heading2 type slis_t_listheader with header line.
    data : heading3 type slis_t_listheader with header line.
    data : heading4 type slis_t_listheader with header line.
    data : heading5 type slis_t_listheader with header line.
    data : heading6 type slis_t_listheader with header line.
    data : heading7 type slis_t_listheader with header line.
    data : heading8 type slis_t_listheader with header line.
    STRUCTURE TO PASS THE COLOR ATTRIBUTES FOR DISPLAY.
    data : colorstruct type slis_coltypes.
    INITIALIZATION. *
    initialization.
    syrepid = sy-repid.
    sypagno = sy-pagno.
    clear fieldcatalog.
    START-OF-SELECTION. *
    start-of-selection.
    SUBROUTINE TO POPULATE THE COLORSTRUCT
    perform fill_colorstruct using colorstruct.
    SUBROUTINE TO POPULATE THE FIELDS OF THE FIELD CATALOGUE
    perform populate_fieldcatalog.
    SUBROUTINE TO SELECT DATA FROM VARIOUS TABLES AND POPULATE IT IN THE
    INTERNAL TABLE.
    perform selectdata_and_sort.
    SUBROUTINE TO POPULATE THE LAYOUT STRUCTURE.
    perform populate_layout using fieldlayout.
    SUBROUTINE TO CALL THE FUNCTION MERGE TO ENSURE PROPER DISPLAY.
    perform merge_fieldcatalog.
    SUBROUTINE TO POPULATE THE EVENTSTAB.
    perform fill_eventstab tables eventstab.
    SUBROUTINE TO POPULATE THE HEADING TABLES.
    perform fill_headingtable tables heading using 'HEADING'.
    perform fill_headingtable tables heading1 using 'HEADING1'.
    perform fill_headingtable tables heading2 using 'HEADING2'.
    perform fill_headingtable tables heading3 using 'HEADING3'.
    perform fill_headingtable tables heading4 using 'HEADING4'.
    perform fill_headingtable tables heading5 using 'HEADING5'.
    perform fill_headingtable tables heading6 using 'HEADING6'.
    perform fill_headingtable tables heading7 using 'HEADING7'.
    perform fill_headingtable tables heading8 using 'HEADING8'.
    SUBROUTINE TO DISPLAY THE LIST.
    perform display_alv_list.
    FORMS
    IN THIS SUBROUTINE WE POPULATE THE FIELDCATALOG TABLE WITH THE NAMES
    OF THE TABLE,FIELDNAME,WHETHER IT IS KEY FIELD OR NOT,HEADING AND
    COLUMN JUSTIFICATION.
    form populate_fieldcatalog.
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'MATNR' 'X' .
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'MEINS' ' '.
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'MAKTX' ' ' .
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'MTART' ' ' .
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'MATKL' ' ' .
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'SPRAS' ' ' .
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'WERKS' ' ' .
    perform fill_fields_of_fieldcatalog tables fieldcatalog
    using 'ITAB1' 'MINBE' ' ' .
    endform. " POPULATE_FIELDCATALOG
    FORM FILL_FIELDS_OF_FIELDCATALOG *
    --> FIELDCATALOG *
    --> P_TABNAME *
    --> P_FIELDNAME *
    --> P_KEY *
    --> P_KEY *
    form fill_fields_of_fieldcatalog tables fieldcatalog
    structure fieldcatalog
    using p_tabname
    p_fieldname
    p_key.
    p_no_out.
    fieldcatalog-tabname = p_tabname.
    fieldcatalog-fieldname = p_fieldname.
    fieldcatalog-key = p_key.
    fieldcatalog-emphasize = '1234'.
    *fieldcatalog-no_out = p_no_out.
    append fieldcatalog.
    endform. " FILL_FIELDSOFFIELDCATALOG
    FORM POPULATE_LAYOUT *
    --> FIELDLAYOUT *
    form populate_layout using fieldlayout type slis_layout_alv.
    fieldlayout-f2code = '&ETA' .
    fieldlayout-zebra = 'X'.
    FOR THE WINDOW TITLE.
    fieldlayout-window_titlebar = 'ALV with Events'.
    fieldlayout-colwidth_optimize = 'X'.
    fieldlayout-no_vline = ' '.
    *fieldlayout-no_input = 'X'.
    fieldlayout-confirmation_prompt = ''.
    fieldlayout-key_hotspot = 'X'.
    This removes the column headings if the flag is set to 'X'
    fieldlayout-no_colhead = ' '.
    *fieldlayout-hotspot_fieldname = 'MAKTX'.
    fieldlayout-detail_popup = 'X'.
    fieldlayout-coltab_fieldname = 'X'.
    endform. " POPULATE_LAYOUT
    FORM SELECTDATA_AND_SORT *
    form selectdata_and_sort.
    select matnr meins mtart matkl from mara
    into corresponding fields of t_mara
    up to 500 rows .
    select matnr maktx spras from makt
    into corresponding fields of t_makt
    where matnr = t_mara-matnr and
    spras = sy-langu.
    select matnr werks minbe from marc
    into corresponding fields of t_marc
    where matnr = t_mara-matnr.
    append t_marc.
    endselect.
    append t_makt.
    endselect.
    append t_mara.
    endselect.
    perform populate_itab1.
    sort itab1 by matnr.
    endform. " SELECTDATA_AND_SORT
    FORM MERGE_FIELDCATALOG *
    form merge_fieldcatalog.
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
    exporting
    i_program_name = syrepid
    i_internal_tabname = 'ITAB1'
    i_structure_name = 'COLORSTRUCT'
    I_CLIENT_NEVER_DISPLAY = 'X'
    i_inclname = syrepid
    changing
    ct_fieldcat = fieldcatalog[]
    exceptions
    inconsistent_interface = 1
    program_error = 2
    others = 3.
    endform. " MERGE_FIELDCATALOG
    IN THIS FUNCTION THE MINIMUM PARAMETERS THAT WE NEED TO PASS IS AS
    FOLLOWS:-
    i_callback_program --> CALLING PROGRAM NAME
    i_structure_name --> STRUCTURE NAME.
    is_layout --> LAYOUT NAME.
    it_fieldcat ---> BODY OF THE FIELD CATALOGUE INTERNAL TABLE
    form display_alv_list.
    call function 'REUSE_ALV_LIST_DISPLAY'
    exporting
    I_INTERFACE_CHECK = ' '
    i_callback_program = syrepid
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    i_structure_name = 'ITAB1'
    is_layout = fieldlayout
    it_fieldcat = fieldcatalog[]
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    THE FOLLOWING PARAMETER IS SET AS 'A' INORDER TO DISPLAY THE STANDARD
    TOOL BAR
    i_save = 'A'
    IS_VARIANT = ' '
    it_events = eventstab[]
    IT_EVENT_EXIT =
    IS_PRINT =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    tables
    t_outtab = itab1
    exceptions
    program_error = 1
    others = 2.
    endform. " DISPLAY_ALV_LIST
    *& Form POPULATE_ITAB1
    text
    --> p1 text
    <-- p2 text
    form populate_itab1.
    loop at t_mara.
    loop at t_makt where matnr = t_mara-matnr.
    loop at t_marc where matnr = t_mara-matnr.
    move-corresponding t_mara to itab1.
    move-corresponding t_makt to itab1.
    move-corresponding t_marc to itab1.
    append itab1.
    endloop.
    endloop.
    endloop.
    endform. " POPULATE_ITAB1
    *& Form FILL_EVENTSTAB
    text
    -->P_EVENTSTAB text *
    form fill_eventstab tables p_eventstab structure eventstab.
    WHEN THE FOLLOWING FUNCTION IS CALLED THE SYSTEM POPULATES THE
    INTERNAL TABLE EVENTSTAB WITH A LIST OF EVENTS NAME.
    AS SHOWN BELOW WHEN USING I_LIST_TYPE = 0 THE FUNCTION RETURNS 14
    EVENTS NAME.
    call function 'REUSE_ALV_EVENTS_GET'
    exporting
    i_list_type = 0
    importing
    et_events = p_eventstab[]
    exceptions
    list_type_wrong = 1
    others = 2.
    BY CALLING THE ABOVE FUNCTION WE FIRST POPULATE THE EVENTSTAB WITH
    THE PREDEFINED EVENTS AND THEN WE MOVE THE FORM NAME AS SHOWN BELOW.
    WE ASSIGN A FORM NAME TO THE EVENT AS REQUIRED BY THE USER.
    FORM NAME CAN BE ANYTHING.THE PERFORM STATEMENT FOR THIS FORM
    IS DYNAMICALY CALLED.
    read table p_eventstab with key name = slis_ev_top_of_page.
    if sy-subrc = 0 .
    move 'TOP_OF_PAGE' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_top_of_coverpage.
    if sy-subrc = 0 .
    move 'TOP_OF_COVERPAGE' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_end_of_coverpage .
    if sy-subrc = 0 .
    move 'END_OF_COVERPAGE' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_foreign_top_of_page.
    if sy-subrc = 0 .
    move 'FOREIGN_TOP_OF_PAGE' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_foreign_end_of_page.
    if sy-subrc = 0 .
    move 'FOREIGN_END_OF_PAGE' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_list_modify.
    if sy-subrc = 0 .
    move 'LIST_MODIFY' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_top_of_list.
    if sy-subrc = 0 .
    move 'TOP_OF_LIST' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_end_of_page.
    if sy-subrc = 0 .
    move 'END_OF_PAGE' to p_eventstab-form.
    append p_eventstab.
    endif.
    read table p_eventstab with key name = slis_ev_end_of_list .
    if sy-subrc = 0 .
    move 'END_OF_LIST' to p_eventstab-form.
    append p_eventstab.
    endif.
    endform. " FILL_EVENTSTAB
    *& Form FILL_HEADINGTABLE
    text
    -->P_HEADING text *
    form fill_headingtable tables p_heading structure heading
    using tablename.
    case tablename.
    when 'HEADING'.
    p_heading-typ = 'H'.
    concatenate
    ' REPORT NAME:-' syrepid
    ' ABB Industry Pte Ltd' into p_heading-info.
    append p_heading.
    write sy-datum using edit mask '__/__/____' to sydatum.
    concatenate
    ' DATE:-' sydatum ' USER: ' sy-uname 'PAGE NO:' sypagno
    into p_heading-info.
    append p_heading.
    when 'HEADING1'.
    p_heading-typ = 'H'.
    p_heading-info = 'TOP-OF-COVER-PAGE'.
    append p_heading.
    when 'HEADING2'.
    p_heading-typ = 'H'.
    p_heading-info = 'END-OF-COVER-PAGE'.
    append p_heading.
    when 'HEADING3'.
    p_heading-typ = 'H'.
    p_heading-info = 'FOREIGN-TOP-OF-PAGE'.
    append p_heading.
    when 'HEADING4'.
    p_heading-typ = 'H'.
    p_heading-info = 'FOREIGN-END-OF-PAGE'.
    append p_heading.
    WHEN 'HEADING5'.
    P_HEADING-TYP = 'H'.
    P_HEADING-INFO = 'LIST-MODIFY'.
    APPEND P_HEADING.
    when 'HEADING6'.
    p_heading-typ = 'H'.
    p_heading-info = 'END-OF-PAGE'.
    append p_heading.
    when 'HEADING7'.
    p_heading-typ = 'H'.
    p_heading-info = 'END-OF-LIST'.
    append p_heading.
    when 'HEADING8'.
    p_heading-typ = 'H'.
    p_heading-info = 'TOP-OF-LIST'.
    append p_heading.
    endcase.
    endform. " FILL_HEADINGTABLE
    FORM TOP_OF_PAGE *
    form top_of_page.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading[]
    exceptions
    others = 1.
    endform.
    *& Form FILL_COLORSTRUCT
    text
    -->P_COLORSTRUCT text *
    form fill_colorstruct using p_colorstruct type slis_coltypes .
    p_colorstruct-heacolfir-col = 6.
    p_colorstruct-heacolfir-int = 1.
    p_colorstruct-heacolfir-inv = 1.
    endform. " FILL_COLORSTRUCT
    FORM TOP_OF_COVERPAGE *
    form top_of_coverpage.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading1[]
    exceptions
    others = 1.
    endform.
    FORM END_OF_COVERPAGE *
    form end_of_coverpage.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading2[]
    exceptions
    others = 1.
    endform.
    FORM FOREIGN_TOP_OF_PAGE *
    form foreign_top_of_page.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading3[]
    exceptions
    others = 1.
    endform.
    FORM FOREIGN_END_OF_PAGE *
    form foreign_end_of_page.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading4[]
    exceptions
    others = 1.
    endform.
    FORM LIST_MODIFY *
    *FORM LIST_MODIFY.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEADING5[]
    EXCEPTIONS
    OTHERS = 1.
    *ENDFORM.
    FORM END_OF_PAGE *
    form end_of_page.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading6[]
    exceptions
    others = 1.
    endform.
    FORM END_OF_LIST *
    form end_of_list.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading7[]
    exceptions
    others = 1.
    endform.
    FORM TOP_OF_LIST *
    form top_of_list.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = heading8[]
    exceptions
    others = 1.
    endform.
    SHORT DUMP IS
    This error may occur if
    - You address a typed field symbol before it has been set with
       ASSIGN
    - You address a field symbol that pointed to the line of an
       internal table that was deleted
    - You address a field symbol that was previously reset using
       UNASSIGN or that pointed to a local field that no
       longer exists
    - You address a global function interface, although the
       respective function module is not active - that is, is
       not in the list of active calls. The list of active calls
       can be taken from this short dump.
    PLEASE GIVE ME ANSWER.
    REGARDS

    HI I MADE SOME CHANGES TO UR CODE...
    RUN IF THIS IS THE REQ ...
    IN SELECT QUERIES OF RETRIEVING DATA..
    form selectdata_and_sort.
      select matnr meins mtart matkl from mara
      into corresponding fields of TABLE t_mara
    WHERE MATNR = T_MARA-MATNR.
      up to 200 rows .
      IF SY-SUBRC = 0.
        MESSAGE I001 WITH ' DATA RET FROM MARA'.
      ENDIF.
      IF T_MARA[] IS NOT INITIAL .
    select
           matnr
           maktx
           spras
           From
           makt
           into corresponding fields of TABLE t_makt
            FOR ALL ENTRIES IN T_MARA
           where matnr = t_mara-matnr and
           spras = sy-langu.
      ENDIF.
      IF SY-SUBRC = 0 .
      MESSAGE I001 WITH ' DATA RET FROM MAKT'.
      ENDIF.
      IF T_MAKT[] IS NOT INITIAL.
          select matnr
                 werks
                 minbe
                 from marc
                 into corresponding fields of  TABLE t_marc
                 FOR ALL ENTRIES IN
                 T_MAKT where matnr = t_maKT-matnr.
        ENDIF.
    ENDFORM.                    "selectdata_and_sort
    JUST TRY THIS CODE..

  • DTP Short dump issue

    Hi Expert,
    I face a DTP shortdump issue on loading data from PSA to DSO
    The DSO is write optimize.
    DTP is using symantic loading and support 3 processor, pack size is default
    Situation is as below:
    1. This issue occurs every two days. In some situation, it will occur everday
    2. The DTP will face short dump. Then when we rerun the DTP, everything goes will
    3. Not all the system face this issue (for example, we have dev/qas/prd, this issue cannot be reproduced in qas)
    Below is the shortdump point in ST22
       when '3'.
          select single * from rsmonicdp into l_s_monicdp where
                 rnr   = l_rnr and
                 icube = p_ods and
                 dp_nr = i_datapakid.
          if sy-subrc <> 0.
            data: l_s_iccont type rsiccont.
            data: l_s_reqdone    type rsreqdone.
            select single * from rsreqdone into l_s_reqdone where
                   rnr = l_rnr.
            if sy-subrc <> 0.
              message x000.
            endif.
            l_s_reqdone-datum = l_s_reqdone-datum + 3.
            if l_s_reqdone-datum < sy-datum.
              select single * from rsiccont into l_s_iccont where
                     rnr   = l_rnr and
                     icube = p_ods.
              if sy-subrc <> 0.
                exit.
              else.
                message x000.
              endif.
            else.
               message x000. (Shortdump here)
            endif.
          endif.
          l_s_monicdp-status     = icon_red_light.
    Could you kindly let me know you face simulation issue before and possible solution?
    Thanks and best regards
    Alex yang

    Hi KP,
    Thanks for your information.
    Please check below information in ST22 side
    Error analysis
        Short text of error message:
    Status Manager *****
        Long text of error message:
        Technical information about the message:
        Message class....... "RSSTATMAN"
        Number.............. 000
        Variable 1.......... " "
        Variable 2.......... " "
        Variable 3.......... " "
        Variable 4.......... " "
    How to correct the error
        Probably the only way to eliminate the error is to correct the program.
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "MESSAGE_TYPE_X" " "
        "CL_RSSM_STATMAN_TARGET_ODSO===CP" or "CL_RSSM_STATMAN_TARGET_ODSO===CM007"
        "IF_RSBK_DATAPACKAGE_OBSERVER~UPDATE_STATUS_TABLES"
    BTW, do you think this issue will be related to larger data volum in DSO side?
    Thanks and best regards
    Alex yang

  • Short Dump issue

    Dear all,
    hi,
    i am working on upgrade from 4.6 to ECC6.
    during unicode this statement is not working in ZReports.
    IMPORT: it_vbrp          FROM   DATABASE indx(st) ID '1' ,
    It is giving short dump. with message When importing object "IT_VBRP", the structure did not match the
    structure of the target object. The error occurred in component
    no. 3.
    what should i do.
    any help would be fine for me.
    Thanks
    Jairaj kumar

    Dear all,
    hi,
    i am working on upgrade from 4.6 to ECC6.
    during unicode this statement is not working in ZReports.
    IMPORT: it_vbrp          FROM   DATABASE indx(st) ID '1' ,
    It is giving short dump. with message When importing object "IT_VBRP", the structure did not match the
    structure of the target object. The error occurred in component
    no. 3.
    what should i do.
    any help would be fine for me.
    Thanks
    Jairaj kumar

  • Short dump issue while loading data

    Hello All,
    We are trying to load the data to  the cube , but every time it is throwing us a short dump with the below error.
    We have found a SAP Note as well  for the below error , Please suggest, how to implement the same.
    Error:
    Runtime Errors         CONVT_NO_NUMBER
    METHOD end_routine.
    === Segments ===
       FIELD-SYMBOLS:
         <RESULT_FIELDS>    TYPE _ty_s_TG_1.
       DATA:
         MONITOR_REC     TYPE rstmonitor.
       ... "insert your code here
    --  fill table "MONITOR" with values of structure "MONITOR_REC"
    -   to make monitor entries
       ... "to cancel the update process
        raise exception type CX_RSROUT_ABORT.
    *Fiscal year quarter addition
       loop at RESULT_PACKAGE assigning <RESULT_FIELDS>.
         if <RESULT_FIELDS>-/bic/zsp_Mon BETWEEN 1 and 3.
           CONCATENATE 'FY' <RESULT_FIELDS>-fiscper+2(2) 'Q3' INTO
           <RESULT_FIELDS>-/bic/zsp_FYQA.
         elseif <RESULT_FIELDS>-/bic/zsp_Mon BETWEEN 4 and 6.
           CONCATENATE 'FY' <RESULT_FIELDS>-fiscper+2(2) 'Q4' INTO
           <RESULT_FIELDS>-/bic/zsp_FYQA.
         elseif <RESULT_FIELDS>-/bic/zsp_Mon BETWEEN 7 and 9.
           CONCATENATE 'FY' <RESULT_FIELDS>-fiscper+2(2) 'Q1' INTO
           <RESULT_FIELDS>-/bic/zsp_FYQA.
         elseif <RESULT_FIELDS>-/bic/zsp_Mon BETWEEN 10 and 12.
           CONCATENATE 'FY' <RESULT_FIELDS>-fiscper+2(2) 'Q2' INTO
           <RESULT_FIELDS>-/bic/zsp_FYQA.
      endif.
    endloop.
    ENDDMETHOD.                    "end_routine
    THOD inverse_end_routine.
    IMPORTING

    Hi,
    As suggested by note, you need to put this code in end routine.
    Check the syntax , if error go through it and fix syntax (take help of ABAPer if required) and
    activate Transformation and DTP.
    Thank-You.
    Regards,
    VB

  • ALV GRID out put issue

    hi,
    how to increase the font size of the output of alv grid...
    Actually my list is printing nearly 50 lins in one page how to control it to 20 and how to increase the font size in the alv grid output
    can anyone guide me its bit urgent  plzzzzzz
    SIRI

    Ya Rich,
    Actually... While i am taking all the records on the paper i got all the records on one page so if they wanted to enter some more data in the last filed which i provided blank they were telling that its too small font and its not so easy to enter
    so they were asking me to do the above job
    how to do that can u guide me plz
    SIRI

  • ALV Grid Display - Dump when exporting (via right click)

    Hi,
    We have an ALV filled with a dynamic table because we needed dynamic columns. Our ALV has totals and subtotals. When exporting ALV via right click I get the following error:
    OBJECTS_OBJREF_NOT_ASSIGNED
    I observed two facts:
    1.- If I disable subtotals and totals (commentig wa_cat-do_sum = 'X') export works properly, otherwise I get the dump.
    2.- Having totals and subtotals enabled, if I use export icon (top toolbar) the export works properly, but using right-click export gets the same dump.
    Our fieldcat is like this:
        CLEAR wa_cat.
        wa_cat-fieldname = g_cols.
        wa_cat-seltext_s = gi_subdiv-btrtl.
        wa_cat-seltext_l =  gi_subdiv-btrtl.
        wa_cat-datatype = 'INT4'.
        wa_cat-do_sum = 'X'.
        wa_cat-outputlen = '6'.
        APPEND wa_cat TO fs_fldcat.
    and we call ALV:
    * Call ABAP List Viewer (ALV)
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          it_fieldcat            = fs_fldcat
          i_callback_program     = v_repid
          is_layout              = s_layout
          i_callback_user_command  = 'USER_COMMAND'
          it_sort                = t_sort
    *      i_callback_top_of_page = 'F_TOP_OF_PAGE'
          i_save                 = 'X'
        TABLES
          t_outtab               = <t_dyntable>.
    Any help will be appreciated!
    Thanks,
    Josep

    Hi kat_k,
    I tried to do what you say, but I still get the same error!
    More ideas?
    Thanks!
    Josep

  • SAP Short Dumps and PCI Compliance

    We've run into an issue with our PCI Compliance audit around being able to see unencrypted credit cards in short dump messages in SAP.  Has anyone run into this issue?
    Only work around I've got at this point is to restrict all access to short dumps and require many documented signoffs before turning on and off access to a short dump.  This is pretty cumbersome, and still leaves a hole in my overall security.
    We've managed to purge restricted CC data from our XI logging, and done everything right with encryption, but this short dump issue just doesn't seem to have a solution.
    Can anyone help?  We're on 6.0.
    Thanks!

    Hi David,
    This is an interesting situation you have described. ABAP short-dumps or run-time errors as they are also known as, are unhandled exceptions during program execution. The conditions that cause such exceptions is unknown or cannot be handled at run-time. To help analyze what went wrong with the said program during execution, it is necessary for the dump to contain all possible information including data values passed between programs when the error occurs. Encryption of restricted data values is a program step in itself. If the dump were to occur after this step then of course it would contain encrypted CC info. Unfortunately in your case it exposes restricted CC info because the dump occurs BEFORE this step.
    I don't believe there is a way to prevent this from happening -- for the same reason that the program logic does not know at run-time how to "handle" the exception. If occurrences of such dumps is fairly common in your system, you may want to investigate the likely causes -- for example, missing or incorrect customization. Analyzing the short dumps will probably give you a clue. Your customization team may be able to identify a pre-condition that causes this unhandled exception. If this exception can then be handled (via a program change) that returns a meaningful error instead of a short dump you would be able to close the security hole. This however entails modification to SAP standard code. I don't usually recommend such changes, but given the sensitive nature of your data it may be worth consideration.
    I personally advocate restricted access to ST22. The steps you have undertaken to enforce this may be cumbersome despite efforts to keep it simple. I suppose that's the price we pay in administering the system. If you have not already done so, you may also want to ensure that short-dumps that contain restricted CC info are not saved (using the "Keep" feature in ST22) for easy retrieval at a later point in time or they are saved, it be available only to 'restricted eyes'. Short-dumps are normally saved in the system for 7 or 14 days (not sure of exact # of days). The bigger challenge in my opinion is: How do you prevent the restricted info from being viewed by the user who during the course of program/transaction execution encounters the said short dump? No amount of security controls around ST22 will mitigate this risk. The only option that remains is program change (as mentioned above). But to get there you first need to know what causes the exception.
    Regards.
    Ashutosh

  • REUSE_ALV_LIST_DISPLAY give short dump beyond 100 columns

    Hi,
    I have more than 170 columns in my internal table and this gives short dump when it reached 100the column because the structure RS_HEADER which displays column header can only hold 99 columns.
    Is there anyway I still use REUSE_ALV_LIST_DISPLAY  and overcome the short dump issue.
    Regards
    Kasi

    Although I have not encountered such a case, I would suggest the following: After 99 field, modify the field catalog by setting the excess fields as no_out = abap_true (provided TYPE-POOLS: abap is declared) Then, the user should be limited to a certain number of fields and if he/she wants more fields to be displayed, then he/she should change the layout. I hope that works.

  • Control Framework: Fatal error - GUI cannot be reached-ALV Grid in Bckgrnd

    I have an ALV grid which dumps in the background. But works fine in the foreground.
    I thought I am not using Control framework anywhere. But I get 'COntrol framework :Fatal error - GU cannot be reached' error.
    I am using a docking container that I have split using a splitter.
    I have no custom container in my screen. What else could be causing the Control framework error ? Any suggestions is appreciated. But please do not tell me to use 'REUSE_ALV*' or Classical reporting
    Here are the PBO modules of my screen and here are my data declarations.
    ALV Data declarations :
    data :gt_sort type lvc_t_sort,
            gr_event_handler TYPE REF TO lcl_event_handler ,
         o_docking type ref to cl_gui_docking_container,"Docking Container
         o_grid type ref to cl_gui_alv_grid,"Grid
         o_split type ref to cl_gui_easy_splitter_container,"Splitter
         o_top_container type ref to cl_gui_container,   "Top Container
         o_bottom_container type ref to cl_gui_container,"Bottom Container
         o_document type ref to cl_dd_document.          "Document
    module status_0100 output.
    if o_docking is initial.
      set pf-status 'ZSTATUS_0100'.
      set titlebar 'ZTITLE_0100'.
    Creating Objects
      perform create_objects.
    Filling top of page
      perform fill_top_of_page.
    Filling the fieldcatalog table
    perform build_fieldcat. "we already got'em
    Displaying the output
      perform display_output.
    endif.
    Here is the Form Create_objects called in the PBO.
    form create_objects .
    Creating Docking Container
      CREATE OBJECT o_docking
             EXPORTING
               RATIO                       = '95'.
      IF sy-subrc eq 0.
    Splitting the Docking container
        CREATE OBJECT o_split
          EXPORTING
           PARENT            = o_docking
           sash_position     = 25 "Position of Splitter Bar (in Percent)
           with_border       = 0. "With Border = 1 Without Border = 0
      Placing the containers in the splitter
        o_top_container = o_split->top_left_container .
        o_bottom_container = o_split->bottom_right_container .
      Creating Grid
        CREATE OBJECT o_grid
          EXPORTING
            i_parent          =  o_bottom_container.
      Creating the document
        CREATE OBJECT o_document
        EXPORTING
            style  = 'ALV_GRID'.
         CREATE OBJECT gr_event_handler .
      ENDIF.
    endform.                    " create_objects
    form fill_top_of_page .
    data : lv_char(255) type c.
    Calling the methods for dynamic text
       CALL METHOD o_document->add_gap
        EXPORTING
          width      = 140.
      CALL METHOD o_document->add_text
        EXPORTING
          text          = 'Plant Attainment Report '
          sap_fontsize  = 'Large'
          sap_color     = cl_dd_area=>list_key_int
          sap_emphasis  = cl_dd_area=>strong. " For bold
    Display the data
      CALL METHOD o_document->display_document
        EXPORTING
           parent             = o_top_container.
    Calling the method of ALV to process top of page
      CALL METHOD o_grid->list_processing_events
        EXPORTING
          i_event_name      = 'TOP_OF_PAGE'
          i_dyndoc_id       = o_document.
    endform.                    " fill_top_of_page
    form display_output .
      gx_variant-report = sy-repid.
      gs_layout-zebra = 'X'.
      gs_layout-sel_mode ='X'.
      gs_layout-cwidth_opt = 'X'.
      call method o_grid->set_table_for_first_display
        exporting
          is_variant      = gx_variant
          i_save          = 'A'
          is_layout       = gs_layout
        changing
          it_fieldcatalog = it_fldcat
          it_outtab       = <gt_tabletotal>.
        IF sy-subrc <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SET HANDLER gr_event_handler->handle_print_top_of_page FOR o_grid .
    endform.                    " display_output 
    Edited by: Shareen Hegde on Jul 23, 2009 5:03 PM (I have no clue why 
    .. doesn't work anymore. My code looks messed up..Sorry folks!

    Nilesh,
    If i put all these create objects inside the      IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.   ENDIF , will I be still able to use ,
    call method o_grid->set_table_for_first_display
        exporting
          is_variant      = gx_variant
          i_save          = 'A'
          is_layout       = gs_layout
        changing
          it_fieldcatalog = it_fldcat
          it_outtab       = <gt_tabletotal>.
         in background ? WIll I not get - OBJECTS_OBJREF_NOT_ASSIGNED   erorr ?
    How can I call the set_table_for_first_display without creating the object reference ?
    Here is my creat object routine.
    form create_objects .
    * Creating Docking Container
    IF CL_GUI_ALV_GRID=>OFFLINE( ) .
      CREATE OBJECT o_docking
             EXPORTING
               RATIO                       = '95'.
      IF sy-subrc eq 0.
    * Splitting the Docking container
        CREATE OBJECT o_split
          EXPORTING
           PARENT            = o_docking
           sash_position     = 25 "Position of Splitter Bar (in Percent)
           with_border       = 0. "With Border = 1 Without Border = 0
    *   Placing the containers in the splitter
        o_top_container = o_split->top_left_container .
        o_bottom_container = o_split->bottom_right_container .
    *   Creating Grid
        CREATE OBJECT o_grid
          EXPORTING
            i_parent          =  o_bottom_container.
    *   Creating the document
        CREATE OBJECT o_document
        EXPORTING
            style  = 'ALV_GRID'.
         ENDIF.
         CREATE OBJECT gr_event_handler .
    endif.
    endform.                    " create_objects

  • ALV Grid Collect Statment for SUM the data.

    Hellow Experts,
    i am new to ABAP i have on programme which output is coming like ,
    Prod.ID   ... .... ... Qnty in Date1 .. Qnty in  Date2... Qnty in Date3........Qnty in Date31.
    0001                       12.1               0.00               10.1
    0001                       12.1               0.00               10.1
    I need the summestion of qnty against that date , and prodId should not repate my Output should be like this,
    Prod.ID   ... .... ... Qnty in Date1 .. Qnty in  Date2... Qnty in Date3........Qnty in Date31.
    0001                       24.2               0.00               20.2
    0002                       12.1               0.00               10.1
    I wrote collect statment but its not working , plz help me for this, and one more thing that i am passing the data to gt_data.
    My code is here,
    TABLES: AFRU,AUFK,VBAK,KNA1,VBAP,VBKD.
    DATA: BEGIN OF i_alv OCCURS 0,
          ARBID TYPE AFRU-ARBID,
          BUDAT TYPE AFRU-BUDAT,
          WERKS TYPE AFRU-WERKS,
          LMNGA TYPE AFRU-LMNGA,
          AUFNR TYPE AFRU-AUFNR,
          KDAUF TYPE AUFK-KDAUF,
          KDPOS TYPE AUFK-KDPOS,
          VBELN TYPE VBAK-VBELN,
          KUNNR TYPE VBAK-KUNNR,
          NAME1 TYPE KNA1-NAME1,
          MATNR TYPE VBAP-MATNR,
          KDKG1 TYPE VBKD-KDKG1,
      end of i_alv.
    TYPES: BEGIN OF ty_data,
             lmnga TYPE AFRU-LMNGA,
             BUDAT TYPE AFRU-BUDAT,
             ARBID TYPE AFRU-ARBID,
             aufnr TYPE AFRU-AUFNR,
             kdauf TYPE AUFK-KDAUF,
             name1 TYPE KNA1-NAME1,
             matnr TYPE VBAP-MATNR,
             kdkg1 TYPE VBKD-KDKG1,
           END OF ty_data,
           tt_data TYPE STANDARD TABLE OF ty_data,
           BEGIN OF ty_dyn1,                                    "#EC NEEDED
             ARBID TYPE AFRU-ARBID,
             aufnr TYPE AFRU-AUFNR,
             kdauf TYPE AUFK-KDAUF,
             name1 TYPE KNA1-NAME1,
             matnr TYPE VBAP-MATNR,
             kdkg1 TYPE VBKD-KDKG1,
           END OF ty_dyn1,
           BEGIN OF ty_dyn2,                                    "#EC NEEDED
             date  TYPE AFRU-LMNGA,
           END OF ty_dyn2,
           BEGIN OF ty_cols,
             date TYPE BUDAT,
           END OF ty_cols,
           tt_cols TYPE SORTED TABLE OF ty_cols WITH UNIQUE KEY date.
    DATA: gt_data TYPE tt_data,
          gt_data2 type tt_data,
          gt_cols TYPE tt_cols,
          gs_col  TYPE ty_cols.
    DATA: go_sdescr     TYPE REF TO cl_abap_structdescr,
          go_sdescr_new TYPE REF TO cl_abap_structdescr,
          go_tdescr     TYPE REF TO cl_abap_tabledescr,
          gdo_handle    TYPE REF TO data,
          gs_component  TYPE abap_compdescr,
          gs_comp       TYPE abap_componentdescr,
          gt_components TYPE abap_component_tab,
          gr_data       TYPE REF TO cl_salv_table,
          gr_funct      TYPE REF TO cl_salv_functions,
          gr_columns    TYPE REF TO cl_salv_columns_table,
          gr_column     TYPE REF TO cl_salv_column_table,
          g_col         TYPE lvc_fname,
          g_txt         TYPE scrtext_l.
    FIELD-SYMBOLS: <t_data> TYPE ANY TABLE,
                   <s_data> TYPE any,
                   <c> TYPE any,
                   <d> TYPE ty_data.
    DATA:  pono TYPE ztecerti-pono,
           jobno TYPE ztecerti-jobno,
           sdk TYPE string,
           insert TYPE c,
           ok_code LIKE sy-ucomm.
    CALL SCREEN 100.
    START-OF-SELECTION.
    * Populate test data
    FORM get_data.
      SELECT A~ARBID
             A~BUDAT
             A~WERKS
             A~LMNGA
             A~AUFNR
             B~KDAUF
             B~KDPOS
             C~VBELN
             C~KUNNR
             D~NAME1
             E~MATNR
             F~KDKG1
        INTO CORRESPONDING FIELDS OF TABLE  gt_data
                   FROM AFRU AS A INNER JOIN AUFK AS B ON A~AUFNR EQ B~AUFNR
                                  INNER JOIN VBAK AS C ON B~KDAUF = C~VBELN
                                  INNER JOIN KNA1 AS D ON C~KUNNR = D~KUNNR
                                  INNER JOIN VBAP AS E ON B~KDAUF = E~VBELN
                                  INNER JOIN VBKD AS F ON B~KDAUF = F~VBELN
      WHERE   A~ARBID = '10000181' AND  A~BUDAT BETWEEN  PONO AND jobno
      GROUP BY A~ARBID A~LMNGA  A~BUDAT A~WERKS  A~AUFNR B~KDAUF   F~KDKG1   E~MATNR  D~NAME1 C~KUNNR   C~VBELN  B~KDPOS
    ORDER BY B~KDPOS.
    *collect gt_data into gt_data2.
    *gt_data
    *LOOP AT gt_data ASSIGNING <d>.
    ENDFORM.
    Thanking you i realy need it badly

    Answer is fully given here: Re: alv grid Cross Tab Issue....
    m.

  • Short dump while export grid alv with subtotals.

    hello,
    its strange and i face first time that my grid alv report goin to short dump while i done subtotals and send it to local file thru export.
    if am not doing subtotals then export it to local file it goin fine.
    whats it has problem plz give ur helping hends.
    here i copied a dump msg also.
    Short text
        Error at assignment: Overwritten protected field.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLKKBL" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        A new value is to be assigned to the field "<L_UNIT>", although this field is
        entirely or partly protected against changes.
        The following are protected against changes:
        - Character literals or numeric literals
        - Constants (CONSTANTS)
        - Parameters of the category IMPORTING REFERENCE for functions and
        methods
        - Untyped field symbols not yet assigned a field using ASSIGN
        - TABLES parameters if the actual parameter is protected against changes
        - USING reference parameters and CHANGING parameters for FORMs, if the
        actual parameter is protected against changes and
        - Accesses using field symbols if the field assigned using ASSIGN is
        protected (or partially protected, e.g. key components of an internal
        table with the type SORTED or HASHED TABLE) against changes
        - Accesses using references, if the field bound to the reference is
        protected (or partially protected) against changes
        - External write accesses to READ-ONLY attributes,
        - Content of a shared object area instance accessed using a shared lock
        (ATTACH_FOR_READ).
    regards amit.

    & Object Id               :                                                  &
    & Object Name             :                                                  &
    & Function Module Name    : Sales Register                                   &
    & Transaction Code        :                                                  &
    & Author                  : Amit gujargoud                                      &
    & Module Name             : SD                                               &
    & Sub-Module              :                                                  &
    & Program Type            : Dialog            Create Date     : 02/02/2007   &
    & SAP Release             : ECC 6.0                                          &
    & Description             : Sales Register - Detail                           &
    *& Report  ZSALESREGISTER
    REPORT  zsd_salesregister.
    *&       TYPE-POOLS
    TYPE-POOLS : slis.
    *&       TABLES
    TABLES: vbrp,  "Billing Document: Item Data
            vbrk,  "Billing Document: Header Data
            lips,  "SD document: Delivery: Item data
            lfa1,  "Vendor Master (General Section)
            kna1,  "General Data in Customer Master
            vbak,  "Sales Document: Header Data
            vbpa,  "Sales Document: Partner (Gopal)
            likp,  "SD Document: Delivery Header Data
            vbap,  "Sales Document: Item Data
            vbkd,  "Sales Document: Business Data
            mara.  "General Material Data
    *&       DATA DECLARATION
    DATA: BEGIN OF i_report OCCURS 100,
            vbeln LIKE vbrp-vbeln,        "Billing Document
      posnr LIKE vbrp-posnr,
      matnr  LIKE mara-matnr ,
      aubel LIKE vbrp-aubel,        "Sales Document
       fkimg LIKE vbrp-fkimg,        "Actual billed quantity
       vrkme LIKE vbrp-vrkme,        "Sales unit
       arktx LIKE vbrp-arktx,        "Short text for sales order item
       vgbel LIKE vbrp-vgbel,        "Doc number of the reference document
       werks  LIKE vbap-werks,
      vkgrp  LIKE vbrp-vkgrp,
      fklmg LIKE vbrp-fklmg,
      volum LIKE vbrp-volum,
       vkbur  LIKE vbrp-vkbur,
      vtweg_auft LIKE vbrp-vtweg_auft,
            auart  LIKE vbak-auart,
            tabix LIKE sy-tabix,          "Internal Table, Current Row Index
            name1 LIKE kna1-name1,                              "Name1
            exnum LIKE j_1iexchdr-exnum,  "Official Excise Document Number
            orqty TYPE p DECIMALS 0,
            penqty TYPE p DECIMALS 0,     "Cumulative order qty in sls units
            openqty TYPE p DECIMALS 0,    "Cumulative order qty in sls units
            ean11 LIKE lips-ean11,        "International Article No(EAN/UPC)
           volum LIKE lips-volum,
            lgmng LIKE lips-lgmng,
            traid LIKE likp-traid,
            ort01 LIKE lfa1-ort01,        "City
            lifnr LIKE lfa1-lifnr,        "A/c Number of Vendor or Creditor
            netwr LIKE vbrp-netwr,        "Net val of bill item in doc currency
            kunnr LIKE vbak-kunnr,        "Sold-to party
            adrnr LIKE vbpa-adrnr,        "Address
            city1 LIKE adrc-city1,        "City
            tprtr LIKE lfa1-name1,                              "Name 1
            knumv LIKE konv-knumv,        "Number of the document condition
            kposn LIKE konv-kposn,
            rate  LIKE konv-kbetr,        "Rate (cond amount or percentage)
            bas_val LIKE konv-kwert,      "Rate (cond amount or percentage)
            exc_duty LIKE konv-kwert,     "Rate (cond amount or percentage)
            ed_cess LIKE konv-kwert,      "Rate (cond amount or percentage)
            freight LIKE konv-kwert,      "Rate (cond amount or percentage)
            pack    LIKE konv-kwert,      "Rate (cond amount or percentage)
            cst LIKE konv-kwert,          "Rate (cond amount or percentage)
            vat LIKE konv-kwert,          "Rate (cond amount or percentage)
            ent_tax LIKE konv-kwert,      "Rate (cond amount or percentage)
            tot_inv LIKE konv-kwert,       "Rate (cond amount or percentage)
            tot_inv_round LIKE konv-kwert,   "Rate (cond amount or percentage)
            disc_tot  LIKE konv-kwert,       "Discount total - Z001 to Z020
            vat_rate LIKE konv-kbetr,
            cst_rate LIKE konv-kbetr,
            lst_rate LIKE konv-kbetr,
            mwsbk LIKE vbrk-mwsbk,
            bas_tax LIKE konv-kwert,
            dev_tax LIKE konv-kwert,
            tcs_tax LIKE konv-kwert,
            bas_tot LIKE konv-kwert,
            lst     LIKE konv-kwert,
            vkorg   LIKE vbak-vkorg,
            mvgr1   LIKE mvke-mvgr1,
            mvgr2   LIKE mvke-mvgr2,
            mvgr3   LIKE mvke-mvgr3,
            mvgr4   LIKE mvke-mvgr4,
            mvgr5   LIKE mvke-mvgr5,
            text1   LIKE tvm1t-bezei,
            text2   LIKE tvm1t-bezei,
            text3   LIKE tvm1t-bezei,
            text4   LIKE tvm1t-bezei,
            text5   LIKE tvm1t-bezei,
            bismit_area TYPE p DECIMALS 4,   " Size (L*B) in mm
            face_area  TYPE p DECIMALS 2,   " Face Area Declaration
            notional_area TYPE p DECIMALS 2,
            stock_pcs TYPE p ,               " decimals 3 Pcs of Stock
            labst  LIKE mard-labst,           " Valuated Unrestricted-Use Stock
            bismt  LIKE mara-bismt,           " Size (L*B) in mm
            normt  LIKE mara-normt,           " Industry Standard Description
            temp   TYPE p DECIMALS 2,
            temp1  TYPE p DECIMALS 2,
            temp2  TYPE p DECIMALS 2,
            temp3  TYPE p DECIMALS 2,
            temp4  TYPE p DECIMALS 2,
            temp5  TYPE p DECIMALS 2,
            temp6  TYPE p DECIMALS 2,
            temp7  TYPE p DECIMALS 2,
            temp8  TYPE p DECIMALS 2,
            temp9  TYPE p DECIMALS 2,
            temp10 TYPE p DECIMALS 2,
            temp11 TYPE p DECIMALS 2,
            temp12 TYPE p DECIMALS 2,
            temp13 TYPE p DECIMALS 0,
            temp14 TYPE p DECIMALS 0,
            temp15 TYPE p DECIMALS 0,
            temp16 TYPE p DECIMALS 2,
            temp17 TYPE p DECIMALS 2,
            temp18 TYPE p DECIMALS 2,
            temp19 TYPE p DECIMALS 2,
            temp20 TYPE p DECIMALS 2,
            temp21 TYPE p DECIMALS 2,
            waybill(20) TYPE c,
            audat  LIKE vbak-audat,     "Document Date (Date Received/Sent)
            lgort  LIKE vbap-lgort,     "Storage location
            lgobe  LIKE t001l-lgobe,    "Description of storage location
            erdat  LIKE vbrk-erdat,     "Date on which the record was created
            exdat  LIKE j_1iexchdr-exdat,  "Excise Document Date
            vbtyp  LIKE vbak-vbtyp,        "SD document category
            acdt   LIKE likp-wadat_ist,    "Actual goods movement date
            fkdat  LIKE vbrk-fkdat,
            ship   LIKE kna1-name1,      "Name1 (Ship-to party)
            fksto  LIKE vbrk-fksto,
            fkart  LIKE vbrk-fkart,
            bezei  LIKE t005u-bezei,
            vtweg  LIKE vbak-vtweg,
            spart  LIKE vbak-spart,
            matkl  LIKE mara-matkl,
            wgbez  LIKE t023t-wgbez,
            mtart  LIKE mara-mtart,
            labor  LIKE mara-labor,
            ferth  LIKE mara-ferth,
            lbtxt  LIKE t024x-lbtxt,
            niels  LIKE kna1-niels,
            kukla  LIKE kna1-kukla,
            desc   LIKE tvkbt-bezei,
            brsch  LIKE kna1-brsch,
            zeinr  LIKE mara-zeinr,
            bzirk  LIKE vbrk-bzirk,
            area_desc   LIKE tnlst-bezei,
            dist_desc   TYPE tkukt-vtext,
            taluka_desc TYPE t016t-brtxt,
            sales_desc  TYPE tvgrt-bezei,
            kmein       LIKE konv-kmein,    "Sales Unit
            challan     LIKE likp-vbeln,
            END OF i_report.
    data for MVKE
    DATA: BEGIN OF i_report_mvke OCCURS 0,
            vbeln   LIKE vbrp-vbeln,        "Billing Document
            aubel   LIKE vbrp-aubel,        "Sales Document
            vkorg   LIKE vbak-vkorg,
            matnr   LIKE mara-matnr ,
            vtweg   LIKE vbak-vtweg,
            END OF i_report_mvke.
    ***********************TEMP COPY
    DATA: BEGIN OF i_report_temp OCCURS 0,
           vbeln LIKE vbrp-vbeln,        "Billing Document
      posnr LIKE vbrp-posnr,
      matnr  LIKE mara-matnr ,
      aubel LIKE vbrp-aubel,        "Sales Document
       fkimg LIKE vbrp-fkimg,        "Actual billed quantity
       vrkme LIKE vbrp-vrkme,        "Sales unit
       arktx LIKE vbrp-arktx,        "Short text for sales order item
       vgbel LIKE vbrp-vgbel,        "Doc number of the reference document
       werks  LIKE vbap-werks,
      vkgrp  LIKE vbrp-vkgrp,
      fklmg LIKE vbrp-fklmg,
      volum LIKE vbrp-volum,
       vkbur  LIKE vbrp-vkbur,
      vtweg_auft LIKE vbrp-vtweg_auft,
            auart  LIKE vbak-auart,
            tabix LIKE sy-tabix,          "Internal Table, Current Row Index
            name1 LIKE kna1-name1,                              "Name1
            exnum LIKE j_1iexchdr-exnum,  "Official Excise Document Number
            orqty TYPE p DECIMALS 0,
            penqty TYPE p DECIMALS 0,     "Cumulative order qty in sls units
            openqty TYPE p DECIMALS 0,    "Cumulative order qty in sls units
            ean11 LIKE lips-ean11,        "International Article No(EAN/UPC)
           volum LIKE lips-volum,
            lgmng LIKE lips-lgmng,
            traid LIKE likp-traid,
            ort01 LIKE lfa1-ort01,        "City
            lifnr LIKE lfa1-lifnr,        "A/c Number of Vendor or Creditor
            netwr LIKE vbrp-netwr,        "Net val of bill item in doc currency
            kunnr LIKE vbak-kunnr,        "Sold-to party
            adrnr LIKE vbpa-adrnr,        "Address
            city1 LIKE adrc-city1,        "City
            tprtr LIKE lfa1-name1,                              "Name 1
            knumv LIKE konv-knumv,        "Number of the document condition
            kposn LIKE konv-kposn,
            rate  LIKE konv-kbetr,        "Rate (cond amount or percentage)
            bas_val LIKE konv-kwert,      "Rate (cond amount or percentage)
            exc_duty LIKE konv-kwert,     "Rate (cond amount or percentage)
            ed_cess LIKE konv-kwert,      "Rate (cond amount or percentage)
            freight LIKE konv-kwert,      "Rate (cond amount or percentage)
            pack    LIKE konv-kwert,      "Rate (cond amount or percentage)
            cst LIKE konv-kwert,          "Rate (cond amount or percentage)
            vat LIKE konv-kwert,          "Rate (cond amount or percentage)
            ent_tax LIKE konv-kwert,      "Rate (cond amount or percentage)
            tot_inv LIKE konv-kwert,       "Rate (cond amount or percentage)
            tot_inv_round LIKE konv-kwert,   "Rate (cond amount or percentage)
            disc_tot  LIKE konv-kwert,       "Discount total - Z001 to Z020
            vat_rate LIKE konv-kbetr,
            cst_rate LIKE konv-kbetr,
            lst_rate LIKE konv-kbetr,
            mwsbk LIKE vbrk-mwsbk,
            bas_tax LIKE konv-kwert,
            dev_tax LIKE konv-kwert,
            tcs_tax LIKE konv-kwert,
            bas_tot LIKE konv-kwert,
            lst     LIKE konv-kwert,
            vkorg   LIKE vbak-vkorg,
            mvgr1   LIKE mvke-mvgr1,
            mvgr2   LIKE mvke-mvgr2,
            mvgr3   LIKE mvke-mvgr3,
            mvgr4   LIKE mvke-mvgr4,
            mvgr5   LIKE mvke-mvgr5,
            text1   LIKE tvm1t-bezei,
            text2   LIKE tvm1t-bezei,
            text3   LIKE tvm1t-bezei,
            text4   LIKE tvm1t-bezei,
            text5   LIKE tvm1t-bezei,
            bismit_area TYPE p DECIMALS 4,   " Size (L*B) in mm
            face_area  TYPE p DECIMALS 2,   " Face Area Declaration
            notional_area TYPE p DECIMALS 2,
            stock_pcs TYPE p ,               " decimals 3 Pcs of Stock
            labst  LIKE mard-labst,           " Valuated Unrestricted-Use Stock
            bismt  LIKE mara-bismt,           " Size (L*B) in mm
            normt  LIKE mara-normt,           " Industry Standard Description
            temp   TYPE p DECIMALS 2,
            temp1  TYPE p DECIMALS 2,
            temp2  TYPE p DECIMALS 2,
            temp3  TYPE p DECIMALS 2,
            temp4  TYPE p DECIMALS 2,
            temp5  TYPE p DECIMALS 2,
            temp6  TYPE p DECIMALS 2,
            temp7  TYPE p DECIMALS 2,
            temp8  TYPE p DECIMALS 2,
            temp9  TYPE p DECIMALS 2,
            temp10 TYPE p DECIMALS 2,
            temp11 TYPE p DECIMALS 2,
            temp12 TYPE p DECIMALS 2,
            temp13 TYPE p DECIMALS 0,
            temp14 TYPE p DECIMALS 0,
            temp15 TYPE p DECIMALS 0,
            temp16 TYPE p DECIMALS 2,
            temp17 TYPE p DECIMALS 2,
            temp18 TYPE p DECIMALS 2,
            temp19 TYPE p DECIMALS 2,
            temp20 TYPE p DECIMALS 2,
            temp21 TYPE p DECIMALS 2,
            waybill(20) TYPE c,
            audat  LIKE vbak-audat,     "Document Date (Date Received/Sent)
            lgort  LIKE vbap-lgort,     "Storage location
            lgobe  LIKE t001l-lgobe,    "Description of storage location
            erdat  LIKE vbrk-erdat,     "Date on which the record was created
            exdat  LIKE j_1iexchdr-exdat,  "Excise Document Date
            vbtyp  LIKE vbak-vbtyp,        "SD document category
            acdt   LIKE likp-wadat_ist,    "Actual goods movement date
            fkdat  LIKE vbrk-fkdat,
            ship   LIKE kna1-name1,      "Name1 (Ship-to party)
            fksto  LIKE vbrk-fksto,
            fkart  LIKE vbrk-fkart,
            bezei  LIKE t005u-bezei,
            vtweg  LIKE vbak-vtweg,
            spart  LIKE vbak-spart,
            matkl  LIKE mara-matkl,
            wgbez  LIKE t023t-wgbez,
            mtart  LIKE mara-mtart,
            labor  LIKE mara-labor,
            ferth  LIKE mara-ferth,
            lbtxt  LIKE t024x-lbtxt,
            niels  LIKE kna1-niels,
            kukla  LIKE kna1-kukla,
            desc   LIKE tvkbt-bezei,
            brsch  LIKE kna1-brsch,
            zeinr  LIKE mara-zeinr,
            bzirk  LIKE vbrk-bzirk,
            area_desc   LIKE tnlst-bezei,
            dist_desc   TYPE tkukt-vtext,
            taluka_desc TYPE t016t-brtxt,
            sales_desc  TYPE tvgrt-bezei,
            kmein       LIKE konv-kmein,    "Sales Unit
            challan     LIKE likp-vbeln,
            END OF i_report_temp.
    DATA: BEGIN OF i_vbap OCCURS 0 ,
            posnr LIKE vbap-posnr,
            vbeln LIKE vbap-vbeln ,
            matnr LIKE vbap-matnr ,
            werks LIKE vbap-werks,
       kwmeng LIKE vbap-kwmeng,
      lgort LIKE vbap-lgort,
            matkl LIKE mara-matkl,
            wgbez LIKE t023t-wgbez,
            mtart LIKE mara-mtart,
          END OF i_vbap .
    DATA : w_temp_cal(20) TYPE c.
    DATA : w_face_area TYPE p DECIMALS 4,
           w_notinal_area TYPE p DECIMALS 4.
    **MVKE
    DATA: BEGIN OF itab_mvke OCCURS 0,
          matnr   LIKE mvke-matnr,
          vkorg   LIKE vbak-vkorg,
          vtweg   LIKE mvke-vtweg,
          mvgr1   LIKE mvke-mvgr1,
          mvgr2   LIKE mvke-mvgr2,
          mvgr3   LIKE mvke-mvgr3,
          mvgr4   LIKE mvke-mvgr4,
          mvgr5   LIKE mvke-mvgr5,
          END OF itab_mvke.
    **TVM1T
    DATA : BEGIN OF itab_tvm1t OCCURS 0,
            spras LIKE tvm1t-spras,
          mvgr1 LIKE tvm1t-mvgr1,
          bezei LIKE tvm1t-bezei,
      END OF itab_tvm1t.
    DATA : BEGIN OF itab_tvm2t OCCURS 0,
          spras LIKE tvm2t-spras,
        mvgr2 LIKE tvm2t-mvgr2,
        bezei LIKE tvm2t-bezei,
    END OF itab_tvm2t.
    DATA : BEGIN OF itab_tvm3t OCCURS 0,
          spras LIKE tvm3t-spras,
        mvgr3 LIKE tvm3t-mvgr3,
        bezei LIKE tvm3t-bezei,
    END OF itab_tvm3t.
    DATA : BEGIN OF itab_tvm4t OCCURS 0,
          spras LIKE tvm4t-spras,
        mvgr4 LIKE tvm4t-mvgr4,
        bezei LIKE tvm4t-bezei,
    END OF itab_tvm4t.
    DATA : BEGIN OF itab_tvm5t OCCURS 0,
          spras LIKE tvm5t-spras,
        mvgr5 LIKE tvm5t-mvgr5,
        bezei LIKE tvm5t-bezei,
    END OF itab_tvm5t.
    DATA:      itab_t024x TYPE STANDARD TABLE OF t024x WITH HEADER LINE,
          it_report LIKE LINE OF i_report OCCURS 0,
          i_mvke LIKE LINE OF itab_mvke OCCURS 0.
    **VBKD
    DATA: BEGIN OF i_vbkd OCCURS 0 ,
            vbeln LIKE vbkd-vbeln ,
            posnr LIKE vbkd-posnr ,
           bzirk LIKE vbkd-bzirk ,
          END OF i_vbkd .
    DATA: BEGIN OF i_lips OCCURS 0,
       vbeln LIKE lips-vbeln,
            ean11 LIKE lips-ean11,
             volum LIKE lips-volum,
             lgmng LIKE lips-lgmng,
            waybill(20) TYPE c,
          END OF i_lips.
    DATA: BEGIN OF i_vbrk OCCURS 0,
            vbeln LIKE vbrk-vbeln,
            rfbsk LIKE vbrk-rfbsk,      "Status for transfer to accounting
            erdat LIKE vbrk-erdat,      "Dt on which the record was created
            fkdat LIKE vbrk-fkdat,      "CHANGE MADE BY PARTHA RAHAMAN
            fksto LIKE vbrk-fksto,      "GOPAL:: CANCELLED DOC. DO NOT PRNT.
            netwr LIKE vbrk-netwr,
            fkart LIKE vbrk-fkart, "Gopal:when billng typ=s1 do not pnt 1jul
            knumv LIKE vbrk-knumv,
            mwsbk LIKE vbrk-mwsbk,
            bzirk LIKE vbrk-bzirk,
            vtweg LIKE vbrk-vtweg,
            spart LIKE vbrk-spart,
           END OF i_vbrk.
          *structure for MARD Table by kalika
    DATA : BEGIN OF itab_mard OCCURS 0,
           matnr LIKE mard-matnr,
          werks LIKE mard-werks,
           labst LIKE mard-labst,          " Valuated Unrestricted-Use Stock
          lgort LIKE mard-lgort,          " Storage Location
           END OF itab_mard.
          *structure for MARD Table by kalika
    DATA:BEGIN OF i_kna1 OCCURS 0,
          vbeln LIKE vbak-vbeln,
          name1 LIKE kna1-name1,
          kunnr LIKE kna1-kunnr,
          regio LIKE kna1-regio,
         bezei LIKE t005u-bezei,
          land1 LIKE kna1-land1,
          vkgrp LIKE vbak-vkgrp,
          niels LIKE kna1-niels,
          kukla LIKE kna1-kukla,
          brsch LIKE kna1-brsch,
          vkbur LIKE vbak-vkbur,
         END OF i_kna1.
    DATA:BEGIN OF i_t005u OCCURS 0,
         spras LIKE t005u-spras,
        land1 LIKE t005u-land1,
       bland LIKE t005u-bland,
         bezei LIKE t005u-bezei,
         END OF i_t005u.
    DATA:BEGIN OF i_tnlst OCCURS 0,
       spras LIKE t005u-spras,
    niels LIKE tnlst-niels,
       bezei LIKE t005u-bezei,
       END OF i_tnlst.
    DATA:BEGIN OF itab_tkukt OCCURS 0,
    spras LIKE tkukt-spras,
    kukla LIKE tkukt-kukla,
    vtext LIKE tkukt-vtext,
    END OF itab_tkukt.
    DATA : BEGIN OF itab_t016t OCCURS 0,
          spras LIKE t016t-spras,
           brsch LIKE t016t-brsch,
           brtxt LIKE t016t-brtxt,
      END OF itab_t016t.
    DATA : BEGIN OF itab_tvgrt OCCURS 0,
          spras LIKE tvgrt-spras,
          vkgrp LIKE tvgrt-vkgrp,
          bezei LIKE tvgrt-bezei,
      END OF itab_tvgrt.
    *DATA: i_t005u  TYPE STANDARD TABLE OF t005u WITH HEADER LINE.
    DATA:BEGIN OF i_kna2 OCCURS 0,
         kunnr LIKE kna1-kunnr,
         name1 LIKE kna1-name1,   " For Ship-to-Party
          END OF i_kna2.
    DATA:BEGIN OF i_vbak OCCURS 0,
         vbeln LIKE vbak-vbeln,
         vbtyp LIKE vbak-vbtyp,
         audat LIKE vbak-audat,
         auart LIKE vbak-auart,
         vtweg LIKE vbak-vtweg,
         spart LIKE vbak-spart,
         vkbur LIKE vbak-vkbur,
         vkorg LIKE vbak-vkorg,
         END OF i_vbak.
    DATA:BEGIN OF i_adrc OCCURS 0,
          vbeln LIKE vbpa-vbeln,
          kunnr LIKE kna1-kunnr,
          city1 LIKE adrc-city1,
         name1 LIKE kna1-name1,      "Name1 (Ship-to party)
         END OF i_adrc.
    DATA:BEGIN OF i_lfa1 OCCURS 0,
          lifnr LIKE vbpa-lifnr,
          vbeln LIKE vbpa-vbeln,
          name1 LIKE lfa1-name1,
         END OF i_lfa1.
    DATA : BEGIN OF it_knumv OCCURS 0,
            vbeln LIKE vbrk-vbeln,
            knumv LIKE vbrk-knumv,
          END OF it_knumv.
    DATA : BEGIN OF it_rate OCCURS 0,
            ksteu LIKE konv-ksteu,    "Condition control
            knumv LIKE konv-knumv,    "Number of the document condition
            kschl LIKE konv-kschl,    "Condition type
            kbetr LIKE konv-kbetr,    "Rate (condition amount or percentage)
            kwert LIKE konv-kwert,    "Condition value
            kposn LIKE konv-kposn,
            kmein LIKE konv-kmein,    "Sales Unit
           END OF it_rate.
    DATA: BEGIN OF itab_exnum OCCURS 0,
           exnum LIKE j_1iexchdr-exnum,  "Official Excise Document Number
           exdat LIKE j_1iexchdr-exdat,  "Excise Document Date
           rdoc LIKE j_1iexchdr-rdoc,    "Reference Document 1
            status LIKE j_1iexchdr-status,
           END OF itab_exnum.
    DATA: BEGIN OF itab_qty OCCURS 0,
          kwmeng LIKE vbap-kwmeng,
          vbeln LIKE vbap-vbeln,
          lgort LIKE vbap-lgort,
          END OF itab_qty.
    *DATA: BEGIN OF i_stloc OCCURS 0,
         lgort LIKE t001l-lgort,
         lgobe LIKE t001l-lgobe,
         END OF i_stloc.
    DATA:t_line LIKE STANDARD TABLE OF tline INITIAL SIZE 0
         WITH HEADER LINE,
    "     itab_tvkbt LIKE STANDARD TABLE OF tvkbt WITH HEADER LINE,
         w_tdname LIKE thead-tdname.
    DATA : BEGIN OF itab_tvkbt OCCURS 0,
      spras LIKE tvkbt-spras,
      vkbur LIKE tvkbt-vkbur,
      bezei LIKE tvkbt-bezei,
      END OF itab_tvkbt.
    DATA: BEGIN OF i_exchdr OCCURS 0,
          exnum LIKE j_1iexchdr-exnum,
          exdat LIKE j_1iexchdr-exdat,
          rdoc  LIKE j_1iexchdr-rdoc,
          END OF i_exchdr.
    DATA: BEGIN OF i_likp OCCURS 0,
          vbeln LIKE likp-vbeln,
          wadat_ist LIKE likp-wadat_ist,
          traid LIKE likp-traid,
          bolnr LIKE likp-bolnr,
          END OF i_likp.
    DATA: BEGIN OF i_mara OCCURS 0,
          matnr LIKE mara-matnr,
          matkl LIKE mara-matkl,
          mtart LIKE mara-mtart,
          labor LIKE mara-labor,
         wgbez LIKE t023t-wgbez,
          bismt LIKE mara-bismt,
          normt LIKE mara-normt,
          ferth LIKE mara-ferth,
          zeinr LIKE mara-zeinr,
          extwg LIKE mara-extwg,
          spart LIKE mara-spart,
          END OF i_mara.
    DATA: BEGIN OF i_t023t OCCURS 0,
          matkl LIKE t023t-matkl,
          wgbez LIKE t023t-wgbez,
          END OF i_t023t.
    DATA : var_length(20)  TYPE c,
           var_breadth(20)  TYPE c.
    DATA: p_w_value LIKE konv-kwert.
    DATA : it_fieldcat    TYPE  slis_t_fieldcat_alv,      " Event for Table to creater fieldcatalog
           wa_fieldcat     LIKE LINE OF it_fieldcat,      " Work Area for table field catalog
           lt_top_of_page   TYPE  slis_t_listheader,      " Header table for top of page
            i_layout        TYPE  slis_layout_alv .      " It will fill the layout
           gt_event   TYPE  slis_t_event.                 " Table Event
    *DATA :
         "itab_tnlst TYPE STANDARD TABLE OF tnlst WITH HEADER LINE,
         "      itab_tkukt TYPE STANDARD TABLE OF tkukt WITH HEADER LINE,
    *"      itab_t016t TYPE STANDARD TABLE OF t016t WITH HEADER LINE,
         itab_tvgrt TYPE STANDARD TABLE OF tvgrt WITH HEADER LINE.
    *&       SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK block
                                      WITH FRAME TITLE text-100.
    SELECT-OPTIONS: s_date FOR vbrk-fkdat OBLIGATORY,
                    s_vkbur FOR vbak-vkbur OBLIGATORY,
                    s_vtweg FOR vbrk-vtweg OBLIGATORY,
                    s_werks FOR vbap-werks,
                    s_spart FOR vbrk-spart OBLIGATORY,
                    s_matkl FOR mara-matkl.
    PARAMETERS:
                r_opt3  RADIOBUTTON GROUP grp1,
                r_opt2  RADIOBUTTON GROUP grp1.
               r_opt4  RADIOBUTTON GROUP grp1,
               r_opt5  RADIOBUTTON GROUP grp1,
               r_opt1  RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN END OF BLOCK block.
    *&       INITIALIZATION
    INITIALIZATION.
      r_opt2 = 'X'.
    *&     START-OF-SELECTION.
    START-OF-SELECTION.
    *select data from VBRP
    SELECT vbeln
            posnr
            matnr
            aubel
            fkimg
            vrkme
            arktx
            vgbel
            werks
            vkgrp
             fklmg
             volum
             vkbur
             vtweg_auft
            FROM vbrp
            INTO  TABLE i_report
            WHERE "erdat IN s_date
            AND   spart IN s_spart
               vkbur IN s_vkbur
            AND   vtweg_auft IN s_vtweg.
    **logic for Pending, Summary & Detail Report
      IF
         r_opt1 EQ 'X' OR
        r_opt2 EQ 'X'  OR
               r_opt3 EQ 'X'.
        SELECT vbeln
                  rfbsk
                  erdat
                  fkdat
                  fksto
                  netwr
                  fkart
                  knumv
                  mwsbk
                  bzirk
                  vtweg
                  spart
                  FROM vbrk INTO TABLE i_vbrk
                 FOR ALL ENTRIES IN i_report
                  WHERE "vbeln = i_report-vbeln
                 " and
                  fkdat IN s_date
                  AND   fkart IN ('ZBHR', 'ZTZT', 'ZKRP', 'ZRUD', 'ZBSR',
                                'ZGHT', 'ZKOL', 'ZPTN', 'ZRNC', 'ZCND',
                                'ZDLH', 'ZGZB', 'ZGUR', 'ZHSR', 'ZJPR',
                                'ZLKW', 'ZBLR', 'ZCHN', 'ZCBM', 'ZHUB',
                                'ZHYD', 'ZKOC', 'ZAHD', 'ZIND', 'ZMUM',
    *********************MODIFICATION BY CHAKRAPANI  (ADDITION OF ZVIJ AND ZHWH ) 18.05.2007
                                'ZNGP', 'ZPNE', 'ZRPR' , 'ZEXP', 'ZDEM','ZVIJ', 'ZHWH','JEX' )
    *********************MODIFICATION BY CHAKRAPANI  (ADDITION OF ZVIJ AND ZHWH ) 18.05.2007
                  AND   vtweg IN s_vtweg
                 AND   spart IN s_spart
                  AND   fksto NE 'X'.
        IF i_vbrk[] IS NOT INITIAL.
          SELECT   vbeln
                   posnr
                   matnr
                   aubel
                   fkimg
                   vrkme
                   arktx
                   vgbel
                   werks
                   vkgrp
                    fklmg
                    volum
                    vkbur
                    vtweg_auft
                   FROM vbrp
                   INTO  TABLE i_report
            FOR ALL ENTRIES IN i_vbrk
                   WHERE vbeln = i_vbrk-vbeln "erdat IN s_date
            AND   spart IN s_spart
                   AND  vkbur IN s_vkbur
                   AND   vtweg_auft IN s_vtweg.
        ENDIF.
       ELSEIF r_opt4 EQ 'X' OR
              r_opt5 EQ 'X'.
         SELECT   vbeln
                  rfbsk
                  erdat
                  fkdat
                  fksto
                  netwr
                  fkart
                  knumv
                  mwsbk
                  bzirk
                  vtweg
                  spart
                  FROM vbrk INTO CORRESPONDING FIELDS OF TABLE i_vbrk
                  FROM vbrk INTO TABLE i_vbrk
                  FOR ALL ENTRIES IN i_report
                  WHERE vbeln = i_report-vbeln
                  AND   fkart EQ 'ZEXP'
                  AND   vtweg IN s_vtweg
                  AND   spart IN s_spart
                  AND   fksto NE 'X'.
       ENDIF.
        SORT i_vbrk BY vbeln ASCENDING.
      ENDIF.
    change amit by my self may be removed
      IF i_report[] IS NOT INITIAL.
        REFRESH it_report.
        it_report[] = i_report[].
        DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
        SORT it_report BY aubel.
    *select VBAP data
        SELECT posnr vbeln matnr werks
        kwmeng lgort
        FROM vbap
        INTO  TABLE i_vbap
        FOR ALL ENTRIES IN it_report
        WHERE vbeln = it_report-aubel.
      ENDIF.
    change amit by my self may be removed
    *select data from VBKD
    IF NOT i_vbap[] IS INITIAL.
       SELECT vbeln posnr
         FROM vbkd
         INTO TABLE i_vbkd
         FOR ALL ENTRIES IN i_vbap
         WHERE vbeln = i_vbap-vbeln.
    ENDIF.
      SORT i_vbap BY vbeln ASCENDING.
      IF i_report[] IS NOT INITIAL.
        REFRESH it_report.
        it_report[] = i_report[].
        DELETE ADJACENT DUPLICATES FROM it_report COMPARING matnr.
        SORT it_report BY matnr.
        SELECT
        matnr
        matkl
        mtart
        labor
        bismt
        normt
        ferth
        zeinr
        extwg
        spart
        FROM mara
        INTO TABLE i_mara
        FOR ALL ENTRIES IN i_report
        WHERE matnr = i_report-matnr
          AND   spart IN s_spart.
      ENDIF.
       IF NOT i_mara[] IS INITIAL.
         SORT i_mara BY matnr.
         SELECT matnr
                labst
                FROM mard
                INTO TABLE itab_mard
                FOR ALL ENTRIES IN i_mara
                WHERE matnr = i_mara-matnr.
       ENDIF.
    ENDIF.
      DATA : it_mara LIKE LINE OF i_mara OCCURS 0.
      IF NOT i_mara[] IS INITIAL.
        REFRESH it_mara.
        it_mara[] = i_mara[].
        DELETE ADJACENT DUPLICATES FROM it_mara COMPARING matkl.
        SORT it_mara BY matkl.
        SELECT matkl wgbez
          FROM t023t
          INTO  TABLE i_t023t
          FOR ALL ENTRIES IN it_mara
          WHERE matkl = it_mara-matkl.
    *T024X
        REFRESH it_mara.
        it_mara[] = i_mara[].
        DELETE ADJACENT DUPLICATES FROM it_mara COMPARING labor.
        SORT it_mara BY labor.
        SELECT * FROM t024x
        INTO TABLE itab_t024x
        FOR ALL ENTRIES IN it_mara
        WHERE labor = it_mara-labor
        AND spras = sy-langu.
      ENDIF.
    *begin of change amit
      LOOP AT i_vbap.
        READ TABLE i_mara WITH KEY matnr = i_vbap-matnr.
        IF sy-subrc = 0.
    *material type & material group
          i_vbap-mtart = i_mara-mtart.
          i_vbap-matkl = i_mara-matkl.
        ENDIF.
        MODIFY i_vbap.
      ENDLOOP.
    *Material Group Description
    *end of change amit
    IF i_report[] IS NOT INITIAL.
       REFRESH it_report.
       it_report[] = i_report[].
       DELETE ADJACENT DUPLICATES FROM it_report COMPARING vgbel.
       SORT it_report BY vgbel.
       SELECT vbeln
              ean11
              volum
              lgmng
              FROM lips
              INTO  TABLE i_lips
              FOR ALL ENTRIES IN it_report
              WHERE vbeln = it_report-vgbel.
    ENDIF.
      IF i_report[] IS NOT INITIAL.
        REFRESH it_report.
        it_report[] = i_report[].
        SORT it_report BY vgbel.
        DELETE ADJACENT DUPLICATES FROM it_report COMPARING vgbel.
          IF i_lips[] IS NOT INITIAL.
        SELECT vbeln
               wadat_ist
               traid
               bolnr
               FROM likp
               INTO TABLE i_likp
               FOR ALL ENTRIES IN it_report
               WHERE vbeln = it_report-vgbel.
      ENDIF.
       SORT i_lips BY vbeln ASCENDING.
       LOOP AT i_lips.
         REFRESH t_line.
         CLEAR   w_tdname.
         w_tdname = i_lips-vbeln.
         CALL FUNCTION 'READ_TEXT'
           EXPORTING
             client                  = sy-mandt
             id                      = 'ZVOW'
             language                = sy-langu
             name                    = w_tdname
             object                  = 'VBBK'
           TABLES
             lines                   = t_line
           EXCEPTIONS
             id                      = 1
             language                = 2
             name                    = 3
             not_found               = 4
             object                  = 5
             reference_check         = 6
             wrong_access_to_archive = 7
             OTHERS                  = 8.
         IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
         ENDIF.
         LOOP AT t_line.
           CONCATENATE i_lips-waybill t_line-tdline INTO i_lips-waybill.
         ENDLOOP.
         IF sy-subrc EQ 0.
           MODIFY i_lips.
         ENDIF.
       ENDLOOP.
    *IF i_report[] IS NOT INITIAL.
       REFRESH it_report.
       it_report[] = i_report[].
       SORT it_report BY aubel.
       DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
      SELECT a~vbeln
             b~name1
             b~kunnr
             b~regio
             b~land1
             a~vkgrp
             b~niels
             b~kukla
             b~brsch
             a~vkbur
             FROM vbak AS a
             INNER JOIN kna1 AS b
             ON akunnr = bkunnr
             INTO TABLE i_kna1
             FOR ALL ENTRIES IN i_report
             WHERE vbeln = i_report-aubel.
            AND land1 = 'IN'.
    *endif.
      DATA : it_kna1 LIKE LINE OF i_kna1 OCCURS 0.
      IF NOT i_kna1[] IS INITIAL.
        REFRESH it_kna1.
        it_kna1[] = i_kna1[].
        SORT it_kna1 BY regio.
        DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING regio.
        SELECT spras
          land1
          bland
          bezei FROM t005u
                 INTO TABLE i_t005u
                 FOR ALL ENTRIES IN it_kna1
                 WHERE bland = it_kna1-regio
                 AND spras = 'EN' AND land1 = 'IN'.
        REFRESH it_kna1.
        it_kna1[] = i_kna1[].
        SORT it_kna1 BY niels.
        DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING niels.
        SELECT spras niels bezei FROM tnlst
               INTO TABLE i_tnlst
               FOR ALL ENTRIES IN it_kna1
               WHERE niels = it_kna1-niels
               AND spras = sy-langu.
        REFRESH it_kna1.
        it_kna1[] = i_kna1[].
        SORT it_kna1 BY kukla.
        DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING kukla.
        SELECT spras kukla vtext FROM  tkukt
              INTO TABLE itab_tkukt
              FOR ALL ENTRIES IN it_kna1
              WHERE kukla = it_kna1-kukla
              AND spras = sy-langu.
        REFRESH it_kna1.
        it_kna1[] = i_kna1[].
        SORT it_kna1 BY brsch.
        DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING brsch.
        SELECT spras brsch brtxt FROM t016t
           INTO TABLE itab_t016t
             FOR ALL ENTRIES IN it_kna1
             WHERE brsch = it_kna1-brsch
             AND spras = sy-langu.
        REFRESH it_kna1.
        it_kna1[] = i_kna1[].
        SORT it_kna1 BY vkgrp.
        DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING vkgrp.
        SELECT spras vkgrp bezei FROM tvgrt
            INTO TABLE itab_tvgrt
            FOR ALL ENTRIES IN it_kna1
            WHERE vkgrp = it_kna1-vkgrp
            AND spras = sy-langu.
      ENDIF.
      SORT i_kna1 BY vbeln ASCENDING.
      IF i_report[] IS NOT INITIAL.
        REFRESH it_report.
        it_report[] = i_report[].
        SORT it_report BY aubel.
        DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
        SELECT a~vbeln
               a~kunnr
               b~city1
               FROM vbpa AS a
               INNER JOIN adrc AS b
               ON aadrnr = baddrnumber
               INTO TABLE i_adrc
               FOR ALL ENTRIES IN it_report
               WHERE vbeln = it_report-aubel
               AND parvw = 'WE'.
        SORT i_adrc BY vbeln ASCENDING.
      ENDIF.
      DATA : it_adrc LIKE LINE OF i_adrc OCCURS 0.
      IF i_adrc[] IS NOT INITIAL.
        REFRESH it_adrc.
        it_adrc[] = i_adrc[].
        SORT it_adrc BY kunnr.
        DELETE ADJACENT DUPLICATES FROM it_adrc COMPARING kunnr.
        SELECT kunnr name1
               FROM kna1
               INTO TABLE i_kna2
               FOR ALL ENTRIES IN it_adrc
              WHERE kunnr = it_adrc-kunnr.
      ENDIF.
    SELECT a~lifnr
            a~vbeln
            b~name1
           FROM vbpa AS a
            INNER JOIN lfa1 AS b
            ON alifnr = blifnr
            INTO TABLE i_lfa1
            FOR ALL ENTRIES IN i_report
            WHERE vbeln = i_report-vgbel
            AND parvw = 'SP'.
      SORT i_lfa1 BY vbeln ASCENDING.
    change amit by my self may be removed
      IF i_report[] IS NOT INITIAL.
        REFRESH it_report.
        it_report[] = i_report[].
        SORT it_report BY vbeln.
        DELETE ADJACENT DUPLICATES FROM it_report COMPARING vbeln.
        SELECT exnum
               exdat
               rdoc
              status
               FROM j_1iexchdr
               INTO TABLE itab_exnum
               FOR ALL ENTRIES IN it_report
               WHERE rdoc = it_report-vbeln AND status =  'P' OR status = 'C' .
      ENDIF.
    change amit by my self may be removed
    change amit by my self may be removed
      IF i_report[] IS NOT INITIAL.
        REFRESH it_report.
        it_report[] = i_report[].
        SORT it_report BY aubel.
        DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
        SELECT kwmeng
               vbeln
               lgort
               FROM vbap
               INTO TABLE itab_qty
               FOR ALL ENTRIES IN it_report
               WHERE vbeln = it_report-aubel.
      ENDIF.
    change amit by my self may be removed
      SORT itab_qty BY vbeln.
      CHECK NOT i_vbrk[] IS INITIAL.
      SORT i_report BY vbeln.
      DATA : t_vbrk LIKE LINE OF i_vbrk OCCURS 0.
      REFRESH t_vbrk.
      t_vbrk[] = i_vbrk[].
      SORT t_vbrk BY knumv.
      DELETE ADJACENT DUPLICATES FROM t_vbrk COMPARING knumv.
      SELECT ksteu
             knumv
             kschl
             kbetr
             kwert
             kposn
             kmein
             FROM konv
             INTO  TABLE it_rate
             FOR ALL ENTRIES IN t_vbrk
             WHERE knumv = t_vbrk-knumv
             AND kschl IN ('ZR00',          "Basic Price
                           'ZR01',          "Basic Price
                           'ZR02',          "Basic Price
                           'ZR03',          "Basic Price
                           'ZR04',          "Basic Price
                           'ZR05',          "Basic Price
                           'JEXP',          "Excise
                           'JECS',          "ED
                           'ZG03',          "Freight
                           'ZG04',          "Freight
                           'JCST',          "CST
                           'JLST',          "LST
                           'ZDEV',         "Dev Tax
                           'Z001',         "Discount
                           'Z002',         "Discount
                           'Z003',         "Discount
                           'Z004',         "Discount
                           'Z005',         "Discount
                           'Z006',         "Discount
                           'Z007',         "Discount

  • Short Dump while executing ALV Grid.

    Hi All,
    I m getting a short dump while trying to execute an ALV.
    The dump exception is of type
    CX_SY_DYN_CALL_ILLEGAL_TYPE class.
    The message displayed is :  " Call to form 'GI_FIELDCAT' is incorrect .The actual parameter in PERFORM is different data type than requested for form GI_FIELDCAT "  .
    The part of programe included is as follows:
      FORM build_fieldcat .
        PERFORM gi_fieldcat USING 'MBLNR' text-014 '1' '20'.
        PERFORM gi_fieldcat USING 'ZEILE' text-005 '2' '4'.
        PERFORM gi_fieldcat USING 'MATNR' text-006 '3' '18'.
        PERFORM gi_fieldcat USING 'MAKTX' text-028 '4' '40'.
        PERFORM gi_fieldcat USING 'MATKL' text-029 '5' '40'.
        PERFORM gi_fieldcat USING 'BUDAT' text-027 '6' '10'.
        PERFORM gi_fieldcat USING 'MENGE' text-026 '7' '9'.
        PERFORM gi_fieldcat USING 'DMBTR' text-025 '8' '13'.
        PERFORM gi_fieldcat USING 'WAERS' text-011 '9' '5'.
        PERFORM gi_fieldcat USING 'RSNUM' text-012 '10' '10'.
        PERFORM gi_fieldcat USING 'PSPHI' text-013 '11' '10'.
    ENDFORM.                    " build_fieldcat
    FORM gi_fieldcat  USING    fieldname TYPE slis_fieldcat_alv-fieldname
                               colmname  TYPE slis_fieldcat_alv-seltext_m
                               colmpos   TYPE slis_fieldcat_alv-col_pos
                               outputlen TYPE slis_fieldcat_alv-outputlen.
      wa_fieldcat-fieldname   = fieldname.
      wa_fieldcat-seltext_m   = colmname.
      wa_fieldcat-col_pos     = colmpos.
      wa_fieldcat-outputlen   = outputlen.
    wa_fieldcat-
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " gi_fieldcat
    Can ayone gimmi a solution for the same.

    Hi,
    Try to change ur code like the below.
    Attached: sample code
    Building field catalog
      PERFORM modify_catlog USING:
      'GT_OUTPUT' 'AUART'  text-t02  '1',
      'GT_OUTPUT' 'KUNNR'  text-t03  '2',
      'GT_OUTPUT' 'NAME'   text-t04  '3',
      'GT_OUTPUT' 'KWMENG' text-t05  '4',
      'GT_OUTPUT' 'VRKME'  text-t06  '5',
      'GT_OUTPUT' 'LFIMG'  text-t07  '6',
      'GT_OUTPUT' 'GEWEI'  text-t08  '7',
      'GT_OUTPUT' 'VOLUM'  text-t09  '8',
      'GT_OUTPUT' 'VOLEH'  text-t10  '9',
      'GT_OUTPUT' 'BRGEW'  text-t11 '10',
      'GT_OUTPUT' 'UOMGW'  text-t12 '11',
      'GT_OUTPUT' 'VARCE'  text-t13 '12',
      'GT_OUTPUT' 'UOMVR'  text-t14 '13'.
    FORM modify_catlog USING    pa_tabname TYPE string
                                pa_field   TYPE string
                                pa_text    TYPE string
                                pa_pos     TYPE string.
      CLEAR gs_fieldcatalog.
    *Modifying field catalog
      gs_fieldcatalog-col_pos = pa_pos.
      gs_fieldcatalog-fieldname = pa_field.
      gs_fieldcatalog-tabname = pa_tabname.
      gs_fieldcatalog-seltext_m = pa_text.
      APPEND gs_fieldcatalog TO gt_fieldcatalog.
      CLEAR gs_fieldcatalog.
    l_repid = sy-repid.
    To call function to display ALV output
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program = l_repid
                it_fieldcat        = gt_fieldcatalog
                     TABLES
                t_outtab           = gt_output
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH text-t16.
      ENDIF.
    Reward if helpful.
    Regards,
    Ramya

Maybe you are looking for

  • Problem with popup in a page fragment

    JDev 11.1.2.1 I'm using the code described here to launch popup from a backing bean. http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf How-to launch a popup programmatically from Java Starting Oracle JDeve

  • Error in using select option

    hi, i have used some fields in import in se37. I want that fields to be a select-options. so i gave associated type as selopt. but when i write a select query in source code it shows an error the IN operation with 'BSTYP' is followed neither by an in

  • Mac Mini 1.66, CPU upgraded now won't boot, what can I do?

    I have an older Mac Mini which came with a 1.66GHz CPU.  I had previously upgraded the RAM to 2GB and it was perfectly happy with that. A friend gave me a SLA4D Core 2 Duo CPU which was in working order when he gave it to me at least... I installed t

  • Defaulting setup in Oracle Order Management

    Hello Guys, I am trying to add SHIP_FROM_ORG in the defaulting setup's for line level of OM. Could you guys give me a clue and that will be great. Problem---> Opening SO form in OM, it is throwing an note "Cannot get Valid Name for - Ship_from_org" T

  • Apps crashing when being launched

    Hi there I am having problems with apps crashing when being launched. This has been happening for a week or so to just a few apps (Google Chrome, Open Office etc) and so far I have just been trashing the apps and re-installing them but it now seems t