REgarding display in the output

hi experts,
               i m writing the hierarchical codes to display the output similar to the output which we get with the help of tc 'ME5A' ,,,i m giving my coding here,,,my first line is coming but the second line is not coming,,plz help me...
REPORT  ZTE2.
TABLES : eban.
TYPE-POOLS: SLIS.
DATA: BEGIN OF HEADERTAB OCCURS 0,
       matnr like eban-matnr,     "material number
       txz01 like eban-txz01,     "short text
       ekgrp like eban-ekgrp,     "purchase group
       matkl like eban-matkl,     "material group
      END OF HEADERTAB.
DATA: BEGIN OF ITEMTAB OCCURS 0,
       banfn like eban-banfn,      "pr number
       bnfpo like eban-bnfpo,      "pr item
       menge like eban-menge,      "requested quantity
       meins like eban-meins,      "unit of measurement
       lfdat like eban-lfdat,      "delvered date
       afnam like eban-afnam,      "requester name
       werks like eban-werks,      "plant
       lgort like eban-lgort,      "storage location
       statu like eban-statu,      "S
       estkz like eban-estkz,      "C
       frgkz like eban-frgkz,      "R
       bsart like eban-bsart,      "doc type
       pstyp like eban-pstyp,      "item category
       knttp like eban-knttp,      "a/c assignment
       bsmng like eban-bsmng,      "ordered quantity
       frgdt like eban-frgdt,      "pr release date
       bednr like eban-bednr,      "tracking number
       reswk like eban-reswk,      "supplying plant
       dispo like eban-dispo,      "mrp controller
       ebeln like eban-ebeln,      "ponumber
       ebelp like eban-ebelp,      "po item number
       bedat like eban-bedat,      "po date
      END OF ITEMTAB.
DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: V_REPID LIKE SY-REPID.
DATA: G_TABNAME_HEADER TYPE SLIS_TABNAME,
      G_TABNAME_ITEM   TYPE SLIS_TABNAME,
      GS_KEYINFO TYPE SLIS_KEYINFO_ALV.
selection-screen begin of block b1 with frame title text-001.
       SELECT-OPTIONS:s_matnr for eban-matnr.
selection-screen end of block b1.
START-OF-SELECTION.
  V_REPID = SY-REPID.
     SELECT matnr txz01 ekgrp matkl from eban
     INTO TABLE HEADERTAB
     WHERE matnr IN S_matnr.
  IF NOT HEADERTAB[] IS INITIAL.
    SELECT  banfn
            bnfpo
            menge
            meins
            lfdat
            afnam
            werks
            lgort
            statu
            estkz
            frgkz
            bsart
            pstyp
            knttp
            bsmng
            frgdt
            bednr
            reswk
            dispo
            ebeln
            ebelp
            bedat FROM EBAN INTO TABLE
            ITEMTAB  FOR ALL ENTRIES IN HEADERTAB
            WHERE matnr = HEADERTAB-matnr.
  ENDIF.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      I_PROGRAM_NAME               =  V_REPID
      I_INTERNAL_TABNAME           = 'HEADERTAB'
      I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           = 'X'
      I_BUFFER_ACTIVE              = ' '
    CHANGING
      CT_FIELDCAT                  = I_FIELDCAT
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
  IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
   CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      I_PROGRAM_NAME               =  V_REPID
      I_INTERNAL_TABNAME           = 'ITEMTAB'
      I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           = 'X'
      I_BUFFER_ACTIVE              = ' '
    CHANGING
      CT_FIELDCAT                  = I_FIELDCAT
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
  IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  GS_KEYINFO-HEADER01 = 'MATNR'.
  GS_KEYINFO-ITEM01   = 'BANFN'.
  G_TABNAME_HEADER = 'HEADERTAB'.
  G_TABNAME_ITEM   = 'ITEMTAB'.
  CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM             = V_REPID
      IT_FIELDCAT                    = I_FIELDCAT
      I_SAVE                         = 'A'
      I_TABNAME_HEADER               = G_TABNAME_HEADER
      I_TABNAME_ITEM                 = G_TABNAME_ITEM
      IS_KEYINFO                     = GS_KEYINFO
      I_BYPASSING_BUFFER             = 'X'
      I_BUFFER_ACTIVE                = ' '
    TABLES
      T_OUTTAB_HEADER                = HEADERTAB
      T_OUTTAB_ITEM                  = ITEMTAB
  EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
  IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

THE PROBLEM IS  SOLVED

Similar Messages

  • Proxy output not displayed in the output XML

    Hi,
    I have created a web service and is calling the service using SOAP UI tool. To do it i have created an RFC Fm and inported to SAP PI and activated it with the input and output parameters that i need. When i am calling the service through the SOAP UI, in debugging( in the provider class of the service interface of the sproxy transaction ) i am able to see the values filled in one of the parameters but the same is not getting displayed in the output XML.(Response). Can any one please suggest what cud be the reason.
    Thanks

    Hi,
    can give us a hint? Code output, screenshot? btw I hope your service is a Synchronous service.
    Thanks Nick.

  • 2 structures in the column,structure not displaying in the output(RSRT)

    Hello BI Folks,
               I have a requirement where the user enters the input(text variable)
    say 03/2011 then the report output should be Jan,Feb,Mar.
    say  05/2011 then the output should be Jan,Feb,Mar,Apr,May,likewise.
    The report output should be:(if the text variable is---02/2011)
    Brand          Jan              Feb                     Mar                      April                      May                       June                  July                 Aug             Sept           Oct                Nov           Dec
              Sales Foc Sales Foc  Sales Foc  Sales Foc  Sales Foc  Sales Foc Sales Foc Sales  Foc Sales  Foc Sales  Foc Sales  Foc
      A      455    56     38      
      B                03     32
      C
      D       90      2      75     69
    I am acheievin this by using creating 2 structures in the columns.
    1 structure is for jan-dec & another structure for the KPIs(sales,FOC).
    I am writing customer exit to read the text variable & get the data for the variable read.
    lo_year = sy-datum+0(4).
    lmon =sy-datum+4(2).
    READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'text_variable'.
    l_s_range-low = loc_var_range-low.
    ln_value = l_s_range-low+4(2).
    DO ln_value TIMES.
      l_counter = l_counter + 1.
      CONCATENATE 'customer_exit_mons' l_counter INTO lv_text.
      CASE i_vnam.
        WHEN lv_text.
          IF i_step = 2.
            CONCATENATE lo_year lmon '01' INTO lv_startdate.
         **  Call a function module to arrive the enddate.
            CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
              EXPORTING
                day_in            = lv_startdate
              IMPORTING
                last_day_of_month = lv_enddate.
            l_s_range-low = lv_startdate.
            l_s_range-high = lv_enddate.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            CLEAR l_s_range.
          ENDIF.                                                "End IF
      ENDCASE.                                                  " End Case
      lmon = lmon + 1.
    ENDDO.                                                       " End of Do loop
    CLEAR: ln_value , lv_text .
    The problem is i am not getting the query ouput atleast not the query structure.Is there any other way to achieve this type of output.
    Note:--The text variable wil be based on 0calmonth.
               The custmer exit variables Jan-dec is based on 0calday.
    Edited by: shreyaJ on Nov 18, 2011 11:49 AM

    Hi crazymatts,
    Thanks for ur reply.
    There is no data in the text variable (0CALMONTH).
    But i think the structure atleast gets displayed in the output,am not gettin even that.
    And there is no reference characteristics on the text variable.Its a manual input variable which i will be using in my code.
    Thanks,
    Shreya J.
    Edited by: shreyaJ on Nov 23, 2011 8:12 AM

  • Comas(,) are not getting displayed in the output while using OO ABAP

    Hi All,
    I am using ABAP objects to display the ALV report in which there is a requirement to output Quantity fields. The Quantity fields are getting displayed without comas ','. Please help me in getting back the comas in the output.
    Eg:
    Below logic is used in my program.
    Class name: cl_salv_form_layout_grid
    Code:
      obj_footer->create_text(
            row    = v_row_cnt
            column = v_col_cnt
            text   = Quantity).
    Expected output:
    39,545.000
    Current Output:
    39545.000
    Thanks in advance for your help.
    Thanks & Regards,
    Siva.

    Hi,
    Please check if the images are in the server and in the /images alias path.
    thanks,
    Sharmila

  • Added in to fieldcat but do not display in the output

    Dear Experts,
    I meet a problem that I add one recode into the fieldcat.But in output, the field's name do not appear in the output.The following is my code.The content 'Duodate' does not appear on the screen.
    form fieldcat_init using l_fieldcat type slis_t_fieldcat_alv.
      data: ls_fieldcat type slis_fieldcat_alv.
    *head field categories                                       *
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'LIFNR'.
      ls_fieldcat-tabname   = 'ITAB_HD_IT'.
      ls_fieldcat-seltext_l = 'Vonder'.
      ls_fieldcat-key       = 'X'.
      ls_fieldcat-fix_column     = 'X'.
    ls_fieldcat-outputlen = 12.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'NAME1'.
      ls_fieldcat-tabname   = 'ITAB_HD_IT'.
      ls_fieldcat-seltext_l = 'Vonder'.
      ls_fieldcat-key       = 'X'.
      ls_fieldcat-fix_column     = 'X'.
      ls_fieldcat-outputlen = 40.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'VBLNR'.
      ls_fieldcat-tabname   = 'ITAB_HD_IT'.
      ls_fieldcat-seltext_l = 'Payment'.
    ls_fieldcat-outputlen = 10.
      ls_fieldcat-do_sum = 'X'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'WAERS'.
      ls_fieldcat-tabname   = 'ITAB_HD_IT'.
      ls_fieldcat-seltext_l = 'CURR.'.
    ls_fieldcat-outputlen = 10.
      ls_fieldcat-do_sum = 'X'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'WRBTR'.
      ls_fieldcat-tabname   = 'ITAB_HD_IT'.
      ls_fieldcat-seltext_l = 'Amount'.
      ls_fieldcat-outputlen = 15.
      ls_fieldcat-do_sum = 'X'.
      append ls_fieldcat to l_fieldcat.
    *item field categories                                       *
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'BELNR'.
      ls_fieldcat-tabname   = 'ITAB_ITEM_IT'.
      ls_fieldcat-seltext_l = 'Docu.'.
      ls_fieldcat-key       = 'X'.
      ls_fieldcat-fix_column     = 'X'.
      ls_fieldcat-outputlen = 12.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'BLDAT'.
      ls_fieldcat-tabname   = 'ITAB_ITEM_IT'.
      ls_fieldcat-seltext_l = 'Document Date'.
      ls_fieldcat-outputlen = 10.
      ls_fieldcat-key       = 'X'.
      ls_fieldcat-fix_column     = 'X'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'ZFBDT'.
      ls_fieldcat-tabname   = 'ITAB_ITEM_IT'.
      ls_fieldcat-seltext_l = 'BasDte'.
      ls_fieldcat-outputlen = 10.
      ls_fieldcat-key       = 'X'.
      ls_fieldcat-fix_column     = 'X'.
      append ls_fieldcat to l_fieldcat.
        clear ls_fieldcat.
      ls_fieldcat-fieldname = 'ZDUED'.
      ls_fieldcat-tabname   = 'ITAB_ITEM-IT'.
      ls_fieldcat-seltext_l = 'DueDate'.
      ls_fieldcat-outputlen = 10.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'ZTERM'.
      ls_fieldcat-tabname   = 'ITAB_ITEM_IT'.
      ls_fieldcat-seltext_l = 'Cond'.
      ls_fieldcat-outputlen = 4.
      ls_fieldcat-key       = 'X'.
      ls_fieldcat-fix_column     = 'X'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'ZPAYT'.
      ls_fieldcat-tabname   = 'ITAB_ITEM_IT'.
      ls_fieldcat-seltext_l = 'Pmnt term'.
      ls_fieldcat-outputlen = 12.
      ls_fieldcat-key       = 'X'.
      ls_fieldcat-fix_column     = 'X'.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'WAERS'.
      ls_fieldcat-tabname   = 'ITAB_ITEM_IT'.
      ls_fieldcat-seltext_l = 'Currency'.
      ls_fieldcat-outputlen = 4.
      append ls_fieldcat to l_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname = 'WRBTR'.
      ls_fieldcat-tabname   = 'ITAB_ITEM_IT'.
      ls_fieldcat-seltext_l = 'Amount'.
      ls_fieldcat-outputlen = 15.
      append ls_fieldcat to l_fieldcat.
    ENDFORM.                    " FIELDCAT_INIT

    hi,
    try this code.
    ls_fieldcat-fieldname = 'LIFNR'.
    ls_fieldcat-seltext_l = 'Vonder'.
      ls_fieldcat-key = 'X'.
      ls_fieldcat-fix_column = 'X'.
       ls_fieldcat-outputlen = 12.
      append ls_fieldcat to l_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         IT_FIELDCAT                        = l_fieldcat.  " Pass the fielc cat here
    it must work.... and check out thels_fieldcat-fieldname  again.. you have to give the correct fielname in uppercase inside ' '.
    thankyou.

  • Text Variables are not being Displayed in the Output of the Query

    Hi All ,
    We have some column headings , which are populated through the Text Vaiables , But in the Query Ouptput only the tech names of the Text variables are being displayed . can anyone tell me why its happening like this . I want to debug the Query , please guide me in this regard
    Thanks in Advance.. Pls reply me as soon as possible

    Hi Nagarjuna reddy,
    Click on the properties of the infoobject enter the name of the description and next to that you can see the X/? buttion click on the this button and select the field/if the proper field is not there then create a field descriton and select. i hope this is works and correct me if i am wrong. for debuggin the query use a transaction code- RSRT.
    regs,
    Vachan

  • All fields are getting displayed in the output (ALV)

    Hi i have declared an Internal table as folllows -
    DATA: BEGIN OF itab1 OCCURS 0,
    vbeln type vbeln,
    bstnk like vbak-bstnk,
    erdat like vbak-erdat,
    kunnr like vbak-kunnr,
    char type c ,
    END OF itab1.
    and reading data from table VBAK and filling the internal table..
    but when i m displaying data i give the internal table name in the 'reuse grid' function' and structure name 'VBAK'..
    in the ouput it is showing all the fileds of VBAK,,wht to do?

    hi,
    Make sure you have passed the reference table also as itab1 and NOT vbak.
    Also U need to pass the Field Catalog filled in.  IT_FIELDCAT parameter.
    In FM REUSE_ALV_FIELDCATALOG_MERGE ->
    the parameter I_INTERNAL_TABNAME should be set to itab1 and NOT vbak.
    Regards,
    Vivek.
    **->Reward points if helps.

  • How to Read specific data from file and do a calculation and display on the output

    FYI: Below is the function use for the writing:
    -OpenFile(use ASCII)
    -sprintf
    -WriteFile
    Example: Output from the doc file
    …EndTime: 09:34:48 program time: 0.567663 sec
    …EndTime: 09:36:48 program time: 0.666666 sec
    My objective is to read data 0.666666 (FYI: is last sentence of the file) to do some calculation. How can we read specific data(specific location) from file..
    Any advice or help?
    What is the function needed?

    I would consider counting line feeds and checking for end-of file to isolate the last line, which then can be read using fscanf...
    Have a look at getc...
    character = fgetc ( stream );
    if ( character == '\n' ) // new line
    if ( character == EOF ) // end-of-file

  • J1INMIS - To add new columns in the output display - Need of User exits

    Hi,
    Is there Userexits or BADI or Enahncements to add new columns and display in the output for t.code J1INMIS(TDS report - Showing Withholding Tax)?
    If so kindly provide me the details of the same.
    Thanks & Regards,
    Raja Senthil.

    I don't think there is anything for that Tcode. What you can do is append a structure to the WITH_ITEMS structure which is used as item level and then you might have to do some code in the report, maybe through implicit enhancements.

  • Report title displaying for the secondary list

    Hi All,
    I have done a report interactive.The basic list is ALV and the secondary list is normal report.The problem in secondary list is it is diplaying the title "Dynamic list display" I am not getting from where this text is picking up and displaying .The code is as shown below.
    LEAVE TO LIST-PROCESSING.
    write:/ 'converting spool to pdf'.
    The output is displaying as shown below.
    dynamic list display.
    converting spool to pdf.
    I dont want to display dynamic list display in the output.How to suppress this?I even observed in debug mode after leave to list-prcoessing it is going to next line converting spool to pdf.
    Regards
    Mahesh

    use
    TOP-OF-PAGE DURING LINE-SELECTION.
    when ur SY-LSIND
    trigger this event with whtever heading u want in secondary list

  • Display only the last record per material in SAP query

    Hi,
    I have created a SAP Query using the quickviewer that is a join between 2 tables (MSEG and MKPF) that consist of material document information and date of posting.
    The results are fine however I would like only the last record per material to be displayed.
    Can anyone tell what do I need to add so for only the last record per material be displayed in the output.
    Thanks,
    Mark

    Hi Mark,
    May be if you use Control Level processing .........I think you will be able to get the result you want. Try displaying as Below,
    LOOP AT XXXXX.
    AT FIRST material.
    ENDAT.
    AT LAST material.
    *...Display what ever you want here. It will display at end of every material.
    ENDAT.
    ENDLOOP.
    Before using sort the table with key material in ascending.
    Hope what I had to say is helpful to you.
    Cheers,
    Raga Suman.

  • SQ01 - SAP List Viewer - Ability to get the count of the output records

    Hello All,
    I have a problem with the SAP List Viewer output for an SAP Query.
    I have created a SAP query (SQ01) for a table. Its a basic query that queries on just one table (VTBFHA)
    When I run the query, for the output in the SAP List Viewer (ALV) format, Could anyone kindly help me figure out how to get the count of the number of records displayed in the output?
    For Eg: when we run the T code SE16, It gives us the number of records displayed in the output.
    Similarly, does anyone know if there is a way I could display the count of the number of records displayed in the output of the SQ01 query?
    I have tried checking the "Counter" in the basic list tab, but it does not give me the count.
    Any help will be greatly appreciated
    Thanks
    Subhani

    Yes there is a solution. Follow these steps
    Select your query
    Hit the button InfoSet Query
    Go to Edit->Settings->
    Check the box "Count in the Output list" in the Output tab
    Hit Save
    In pop up box select the user group
    hit enter
    Hit the back arrow (F3)
    now Execute the query
    You should be able to see the count in the output.
    The count will appear on the right most column of the output. If it does not go to the "Change layout" option and make sure it is part of the "Displayed columns list".
    Regards

  • Is it possible to display a tag at the selection screen in the output.

    Hi all,
       When you go to se38 and in the program editor screen, at the bottom right end of the screen you find a value called NUM and when you place your cursor on that it displays a tag that says "Num Lock Mode. Double click to toggle."
       My query is, when i execute a report it takes me to the output screen that has a parameter, here i want to display a tag, say "enter the record as it is in the database". Is it possible to have such an option.
       If you'll are wondering why I'm looking for such an option it is just to make a report that can be understood by many.
    P.S: Not only on the NUM field the tag is available. Even on tools like activate display and so on.
    Regards,
    Narayanan Chandran.

    If it's a report program, use a comment in the selcetion screen for information of the user as shown below.
    * Information
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-003.
    SELECTION-SCREEN COMMENT /1(60) text-004. "Text containing the information message
    SELECTION-SCREEN END OF BLOCK b1.
    If you are using a module pool, you can create a tooltip for the element as suggested.

  • Is it Possible to display the output of the ALV list as POP-UP

    Hi Experts,
                     Is it Possible to display the output of the ALV list as POP-UP, if yes then provide some ideas on it.
    thanking in advance,
    Samad.

    Hi samad, it is possible to display alv list as pop-up by using the FM " REUSE_ALV_POPUP_TO_SELECT"
    try this sample code
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
          EXPORTING
       I_TITLE                       =  P1_TITLE
           I_SELECTION                   = 'X'
           I_ZEBRA                       = 'X'
      I_CHECKBOX_FIELDNAME          =
      I_LINEMARK_FIELDNAME          =
      I_SCROLL_TO_SEL_LINE          = 'X'
            I_TABNAME                     = 'T_VBAP'
           I_STRUCTURE_NAME              =  'T_VBAP'
           IT_FIELDCAT                   =  T_FCAT2
           I_CALLBACK_PROGRAM            = 'ZTEST_ALV_POPUP'
       IMPORTING
           ES_SELFIELD                   = I_SELFIELD
           E_EXIT                        = W_EXIT
          TABLES
            T_OUTTAB                      = T_VBAP.
    i think it will solve your problem
    Regards,
    Vijay

  • Total display in the ALV output

    Hi
    Is  do_sum  in the field catalog has some restriction to display SUM in the report output. In my report around 4000 records are displaying. For some of the fields do_sum  functionality used to display the total in the ouput. But for some fields it showing Total and remaining fields Total is not coming and it gives one messag  in the output "The field cannot be totalled because of field overflow". Message is coming from standard Include LSKBHF__ . Is there any way to display for all the fields other than writting logic for that.
    Regards
    Raj

    Example:
    TYPE-POOLS SLIS.
    DATA: BEGIN OF ITAB OCCURS 0,
           BELNR LIKE BSEG-BELNR,
           GJAHR TYPE I,
           WRBTR TYPE I,
           WAERS LIKE BKPF-WAERS,
           TOTAL TYPE P,
           AUGDT type BSEG-AUGDT,
          END OF ITAB.
    DATA: LAYOUT     TYPE SLIS_LAYOUT_ALV,
          IT_EVENTS  TYPE SLIS_T_EVENT,
          FCAT       TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          REC_FCAT   TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
    START-OF-SELECTION.
      FCAT-COL_POS       = 1.
      FCAT-FIELDNAME     = 'BELNR'.
      FCAT-TABNAME       = 'ITAB'.
      FCAT-REF_FIELDNAME = 'BELNR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 2.
      FCAT-FIELDNAME     = 'GJAHR'.
      FCAT-TABNAME       = 'ITAB'.
      FCAT-REF_FIELDNAME = 'GJAHR'.
      FCAT-DATATYPE      = 'INT4'.
      FCAT-INTTYPE       = 'I'.
      FCAT-DO_SUM        = 'X'.
      APPEND FCAT.
      FCAT-COL_POS       = 3.
      FCAT-FIELDNAME     = 'WRBTR'.
      FCAT-TABNAME       = 'ITAB'.
      FCAT-DATATYPE      = 'INT4'.
      FCAT-INTTYPE       = 'I'.
      FCAT-DO_SUM        = 'X'.
      APPEND FCAT.
    FCAT-COL_POS       = 4.
      FCAT-FIELDNAME     = 'TOTAL'.
      FCAT-TABNAME       = 'ITAB'.
    *  FCAT-DATATYPE      = 'INT4'.
      FCAT-INTTYPE       = 'P'.
      FCAT-DO_SUM        = 'X'.
      APPEND FCAT.
    FCAT-COL_POS       = 5.
      FCAT-FIELDNAME     = 'AUGDT'.
      FCAT-TABNAME       = 'ITAB'.
      FCAT-REF_FIELDNAME = 'AUGDT'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
    BREAK DEVELOPER.
      DO 100 TIMES.
        ITAB-WRBTR = SY-INDEX.
        ITAB-GJAHR = SY-INDEX + 1.
       ITAB-TOTAL = ITAB-WRBTR / ITAB-GJAHR.
       itab-AUGDT = sy-datum.
        APPEND ITAB.
      ENDDO.
    *CALLING ALV
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM = 'Z_TOT_ALV'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT   = LAYOUT
          IT_FIELDCAT = FCAT[]
          I_TABNAME   = 'ITAB'
          IT_EVENTS   = IT_EVENTS[]
        TABLES
          T_OUTTAB    = ITAB[].
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

Maybe you are looking for

  • Crystal Report Server XI recurring report instance is not viewable

    I have scheduled a report to be run every morning, and each instance return status is "success". However, I encountered the following problem when I try to view instances of the report: There is a long time period of waiting (seems to be waiting for

  • Instantiating a PDF-file that is present as an attachmeent in a SOFM object

    Hi all, I have a workflow that processes incoming customer request that come in via e-mail. For each e-mail a workflow is triggered using transaction SO28. This results in a workflow with a SOFM attachment. If the incoming e-mail contains an attachme

  • FILE-BPM-MULTIPLE BAPIS

    HI EXPERTS, I AM FRESHER IN BPM. HERE IS A SCENARIO I HAVE TO IMPLEMENT.     A TEXT FILE(SALES) WAS RECEIVED AND IT SHOULD BE SEND TO XI(BPM) WHICH WILL BE CONNECTED TO 4 BAPI'S . HERE THE SCENARIO IS,  BASED ON THE FIRST BAPI RESPONSE , SECOND BAPI

  • HELP!!!! file won't open but could open before

    ok so this file was opened a few hours ago and work was done on it. we went on and worked on other projects and now had corrections to do on it again but now it just won't open.  in fact all of the files found within the job folder won't open. i can

  • Password stopped working suddenly

    I walked away from my MacBook Air for a few minutes, and it went to sleep. Now the password to log in to the computer isn't working. I'm currently on the guest account. I'm not really sure how this could happen, and I'm a little worried it was hacked