ALV list like FBL1N output

Dear all,
     I am developing a report for vendor line items details like FBL1N report.
    It means the vendor name as header and respective account
details as item in alv and again next vendor name as header
and respective account details in alv in the same page.
   How can i get the output like
1.vendor name :XXXXXXXXX
   country        :XXXXXXXXX
respective alv list which contains the account detailsof the vendor....
2.vendor name :YYYYYYY
  country        :YYYYYYY
respective alv list....
how should i declare my alv and get it done.
points will be rewarded..
regards.
siva
Edited by: siva on Jul 22, 2008 3:38 PM

Hi ,
     I have to use variant or layout option i think.
  huv to use these options to get my alv report like FBL1N output.
    In  FBL1N  the function FI_ITEMS_DISPLAY is used.
     But I can't use that function my program.
    Because my output structure is different.
    huv to make it out.
     Regards
   siva
Edited by: siva on Jul 23, 2008 6:47 AM

Similar Messages

  • Output ALV  format as FBL1N For all Vendors as indidual block

    Dear Folks,
                  Please Suggest the Function Module or sample report Format for output as FBL1n for all vendors as group of first vendor and second vendor and so on .. .. .  please suggest
    Regards
    ASHOK K

    Hi ,
         I have to use variant or layout option i think.
      huv to use these options to get my alv report like FBL1N output.
        In  FBL1N  the function FI_ITEMS_DISPLAY is used.
         But I can't use that function my program.
        Because my output structure is different.
        huv to make it out.
         Regards
       siva
    Edited by: siva on Jul 23, 2008 6:47 AM

  • How to save edited ALV List.

    hi all,
    i have created a program which displays two ALV LISTS and i made some of the fileds editable by using input key. Now when i press the SAVE button ,i couldnt capture the edited fileds contents .
    have a look at the code below .
    call function 'REUSE_ALV_BLOCK_LIST_INIT'
        exporting
          i_callback_program             = sy-repid
          i_callback_pf_status_set       = 'SET_PF_STATUS'
          i_callback_user_command        = 'USER_COMMAND'.
    *---------------------for top of page----------------*
          xs_event-name = slis_ev_top_of_page.
          xs_event-form = 'TOP_OF_PAGE'.
          append xs_event to IT_events.
          xs_event-name = slis_ev_top_of_page.
          xs_event-form = 'TOP_OF_PAGE1'.
          append xs_event to IT_events1.
    *---------------------appending 1st alv---------------*
        if not it_DATA is initial.
        call function 'REUSE_ALV_BLOCK_LIST_APPEND'
          exporting
            is_layout                        = gd_layout
            it_fieldcat                      = it_fieldcat
            i_tabname                        = 'IT_DATA'
            it_events                        = IT_events
          tables
            t_outtab                         = it_DATA.
      endif.
    *---------------------appending 2nd alv---------------*
       call function 'REUSE_ALV_BLOCK_LIST_APPEND'
          exporting
            is_layout                        = gd_layout1
            it_fieldcat                      = it_fieldcat1
            i_tabname                        = 'IT_PEND'
           it_events                        = IT_events1
          tables
            t_outtab                         = IT_PEND.
    *---------------------ALV Display------------------------------*
      gt_print-reserve_lines = 2.
          call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'
         exporting
           is_print                      = gt_print.
    endform.                    " report_output
    regards,
    Venkat

    i was able to get the changed data in ALV grid by this code
    data: gd_repid like sy-repid,
            ref_grid type ref to cl_gui_alv_grid.
      if ref_grid is initial.
        call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          importing
            e_grid = ref_grid.
      endif.
      if not ref_grid is initial.
        call method ref_grid->check_changed_data .
    endif.
    is there any equivalent code for ALV LIST like the above code??

  • Help Me Plz In ALV List Display

    hi,
    I am using ALV List display for output pupose and where i am using push buttons  and using  PF-STATUS its fetching other details and its workin fine..my problem is when i press back button and again press the push button .... the same content is repeating or the list is not cleared ......what to do how to clear the content in the list ........
    regrds,
    karthik.

    Clear and Refresh your main internal table in OK_CODE = 'BACK' button.
    Ok den do this..
    if ok_code = 'BACK'.
    p_code = ok_code.
    clear itab[].
    refresh itab.
    endif.
    now for coding of pushbutton,write this.
    if ok_code = 'pusbutton' ( your name of pushbutton)
    if p_code = 'BACK'.
    clear p_code .
    clear itab[]. "ITAB is your displayed main internal table
    refresh itab.
    endif.
    reward if useful.
    Amit Singla
    Message was edited by:
            Amit Singla

  • I wnat to add new fieldtext in the alv list output plz tell me

    hi,
    i whant add new fieldtext in the list output, plz tell me where can i modify it.
    CORRECTIONS
    DATE       CORRECTION NOTE    AUTHOR DESCRIPTION
    09.03.2001 L9CK045451 0388404 XSC    Wrong list output for multiple Os
    05.06.2001 AL0K023393 0410219 Lud    Wrong keydate for search with
                                         Pchbegda and pchendda.
    22.04.2004 S6BK024775 730486  PS     Too many selection parameters in
                                         header
    19.06.2006 S6BK035494 956731  JF     No sorting by qualification
    REPORT RHPK_FIND_PERS_WITH_EXPIRED_QU MESSAGE-ID PQ.
    DATA  AUFRUF(8).
    TABLES : OBJEC, GDSET.
    DATA  LIST.
    DATA  MARKFIELD(1) TYPE C.
    ALV_POOL
    TYPE-POOLS SLIS.
    INCLUDES
    INCLUDE .
    INCLUDE RHPEINI0.
    TABLES
    DATA: orgeh_BUFFER like hrobject OCCURS 1 WITH HEADER LINE.
    DATA: OBJECTS    LIKE HRSOBID    OCCURS 1 WITH HEADER LINE.
    DATA: h_OBJEC    LIKE objec    OCCURS 0 WITH HEADER LINE.
    DATA: pers_objects LIKE HRSOBID    OCCURS 1 WITH HEADER LINE.
    DATA: QUALI_TAB LIKE QUALI_PROF OCCURS 1 WITH HEADER LINE.
    DATA: PERSONS LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
    DATA: H_PERSONS LIKE HRPE_PROFL OCCURS 1 WITH HEADER LINE.
    DATA: LIST_OUTPUT LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
    DATA: BOOK_EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
    DATA: PLAN_EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
    DATA H_SUITED LIKE DYNP_PCRIT-SUITED.
    DATA: O_COLOR LIKE STREEATTR-COLOR.
    DATA: O_INTENSIV LIKE STREEATTR-INTENSIV.
    DATA  SHOW_KEY.
    DATA EVENT.
    DATA: HTEXT LIKE P1000-STEXT.
    DATA: EVENT_TAB LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
    DATA: COLLECTED_EVENTS LIKE PERSQ_PROF OCCURS 1 WITH HEADER LINE.
    DATA: SUBTY_TAB LIKE HRPE_OTYPE_SUBTY OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF  HIDE_STRU,
            PERSTYPE LIKE HROTYPE-OTYPE,
            PERSOBID LIKE HRSOBID-SOBID,
            PERSTXT LIKE PERSQ_PROF-STEXT,
            SCALE_ID LIKE HRPE_PROFQ-SCALE_ID,
            TRAININGTYPE LIKE HRP1000-OTYPE,
            TRAININGID   LIKE HRP1000-OBJID,
            TRAININGSTXT LIKE HRP1000-STEXT,
            QUALID LIKE QUALI_PROF-QUALID,
            QUALTEXT LIKE QUALI_PROF-QUALSTXT,
          END OF HIDE_STRU.
    DATA: BEGIN OF EXTAB OCCURS 10,
             FCODE LIKE RSMPE-FUNC,
          END OF EXTAB.
    DATA:  CURRENT_QUALID LIKE QUALI_PROF-QUALID.
    DATA:  CURRENT_TRAININGSID LIKE HRP1000-OBJID.
    DATA:  CURRENT_TRAININGTYPE LIKE HRP1000-OTYPE.
    DATA: SUBRC LIKE SY-SUBRC.
    VARIABLES
    DATA: OBJID LIKE P1000-OBJID.
    DATA: H_LINE_COUNT TYPE I.
    DATA: H_TABIX1 LIKE SY-TABIX.
    ALV-Variables
    DATA: alv_events_line    TYPE slis_alv_event.         "header line
    DATA ALV_EVENTS TYPE SLIS_T_EVENT.
    DATA GT_ALV_LIST_TOP_OF_LIST TYPE SLIS_T_LISTHEADER.
    DATA: gt_events TYPE SLIS_T_EVENT.
    DATA G_REPID LIKE SY-REPID.
    DATA G_VARIANT LIKE DISVARIANT.
    DATA ALV_USERCOMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
    DATA G_USERCOMMAND_FOR_RANKINGLIST TYPE SLIS_FORMNAME VALUE
    'USER_COMMAND_FOR_RANKINGLIST'.
    DATA ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: ALV_OUTPUT  LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
    DATA: Help_OUTPUT LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
    begin of Dynpro 5020 - POPUP: WEITER
    DATA: OK_CODE_5020   LIKE SY-UCOMM.
    DATA: NO_ORG.                          "if no org selected
    DATA: H_TABIX LIKE SY-TABIX.
    begin of Dynpro 20nn - Header
    TABLES: DYNP_RHPP.
    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-005.
    PARAMETERS:
       H_EVENTS LIKE DYNP_RHPP-GEN_TRAIN,  "with training sugg
       H_QUAL   LIKE DYNP_RHPP-EXPIRED_QUAL. "with Qual
    SELECTION-SCREEN END OF BLOCK B3.
    INITIALIZATION
    INITIALIZATION.
      PERFORM READ_T77S0_PARAMETERS_FOR_PE.
    get user parameters/Planvariante und Beginndatum setzen:
      PCHOTYPE = $ORGEH.
      CALL FUNCTION 'RHP0_USER_PARAMETERS_GET'
           EXPORTING
                FILL_IF_INITIAL = 'X'
           IMPORTING
                PLVAR           = PCHPLVAR
                BEGDA           = PCHBEGDA
                endda           = Pchendda    "Correction 0410219
                WITH_KEY        = SHOW_KEY
              SUBSTITUTE      =
              ESSENTIAL       = only_essential
                ORG_UNIT        = PCHOBJID-LOW
          EXCEPTIONS
                OTHERS     = 0.
    PCHBEGDA = LOW_DATE.   "Correction note: 0410219 / AL0K023393
    get menu text for key on/off
      PERFORM USER_MENU_TEXT_KEY(SAPLRHP0) USING G_MENU_TEXT_KEY.
    start-of-selection
    START-OF-SELECTION.
    terminate the selection if objid isn't given
      READ TABLE PCHOBJID INDEX 1 TRANSPORTING NO FIELDS.
      IF SY-SUBRC <> 0
      AND PCHOBJID IS INITIAL.
        PCHOBJID-SIGN   = 'I'.
        PCHOBJID-OPTION = 'EQ'.
        PCHOBJID-LOW    = '00000001'.
        APPEND PCHOBJID.
        NO_ORG = TRUE.
      ELSE.
        NO_ORG = FALSE.
      ENDIF.
    GET OBJEC.
    terminate the selection if objid isn't given
      IF NO_ORG = TRUE.
        EXIT.
      ENDIF.
      OBJECTS-PLVAR = PCHPLVAR.
      OBJECTS-OTYPE = PCHOTYPE.
      OBJECTS-SOBID = OBJEC-REALO.
      APPEND OBJECTS.
    Für das lesen der Organisationseinheit
      h_OBJEC-PLVAR = OBJEC-PLVAR.
      h_OBJEC-OTYPE = OBJEC-OTYPE.
      h_OBJEC-OBJID = OBJEC-objid.
      append h_objec.
      Read table h_objec index 1 transporting no fields.
      if sy-subrc = 0.
    Fill Buffer
        orgeh_BUFFER = h_OBJEC.
        orgeh_BUFFER[] = h_OBJEC[].
        CALL FUNCTION 'RH_TEXT_BUFFER_FILL'
          TABLES
            OBJECTS = orgeh_BUFFER.
        Loop at h_OBJEC.
          H_TABIX = SY-TABIX.
    Read text of organisation
          CALL FUNCTION 'RH_READ_OBJECT'
               EXPORTING
                    PLVAR     = h_OBJEC-plvar
                    OTYPE     = h_OBJEC-otype
                    OBJID     = h_OBJEC-OBJID
               IMPORTING
                  OBEG      = h_objec-begda
                  OEND      = h_objec-endda
                   SHORT     = short
                    STEXT     = h_OBJEC-stext
              EXCEPTIONS
                    NOT_FOUND = 1
                    OTHERS    = 2.
          IF SY-SUBRC = 0.
            modify h_OBJEC index H_TABIX.
          ENDIF.
        endloop.
      endif.
    end-of-selection
    END-OF-SELECTION.
    read objects of the organizational unit
      OBJID = OBJECTS-SOBID.
      CALL FUNCTION 'RHPH_PICK_UP_PERSONS'
          EXPORTING
               BEGDA      = PCHBEGDA    "Correction 0410219
               ENDDA      = PCHENDDA    "Correction 0410219
             STATUS     = '1'
               WITH_STEXT = 'X'
           TABLES
                OBJECTS    = OBJECTS
                PERSONS    = H_PERSONS
          EXCEPTIONS
               UNDEFINED  = 1
               OTHERS     = 2.
      IF SY-SUBRC = 0.
    prepare objects !
        objects-otype = h_persons-ttype.
        objects-sobid = h_persons-tobid.
        append objects.
      ELSE.
        EXIT.
      ENDIF.
    CLEAR OBJECTS. REFRESH OBJECTS.
    prepare sel_objects !
      pers_objects-PLVAR = PCHPLVAR.
      LOOP AT H_PERSONS.
        pers_objects-OTYPE = H_PERSONS-TTYPE.
        pers_objects-SOBID = H_PERSONS-TOBID.
        APPEND pers_objects.
      ENDLOOP.
    sort objects and delete adjacent duplicates
      SORT Pers_OBJECTS BY PLVAR OTYPE SOBID.
      DELETE ADJACENT DUPLICATES FROM Pers_OBJECTS COMPARING PLVAR OTYPE
    SOBID.
      CALL FUNCTION 'RHPK_FIND_PERS_WITH_EXPIRED_Q'
           EXPORTING
               PLVAR            = PCHPLVAR
               CHECK_BEGDA      = PCHBEGDA
               CHECK_ENDDA      = PCHENDDA
               SUBTY            = $ownsb                        "'B032'
             only_essential   =
             target_otype     =
             target_ap_iea    =
           TABLES
                IMP_PER_TAB     = pers_objects
                QUALI_TAB       = QUALI_TAB
                PERSONS         = LIST_OUTPUT
            altq_tab          =
          EXCEPTIONS
               NO_QUALIFICATION = 1
               NO_PERSON_FOUND  = 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.
    100% case
      READ TABLE pers_objects INDEX 1 TRANSPORTING NO FIELDS.
      IF SY-SUBRC = 0.
        sort pers_objects by otype sobid.
      check the selected persons: if org.unit was selected !
        Loop at pers_objects.
          H_TABIX = SY-TABIX.
          READ TABLE LIST_OUTPUT WITH KEY  OTYPE = pers_objects-OTYPE
                                           SOBID = pers_objects-SOBID
                                           BINARY SEARCH.
          IF SY-SUBRC <> 0.
          person doesn't belong to the selected org.unit
          DELETE LIST_OUTPUT INDEX H_TABIX.
          ENDIF.
        ENDLOOP.
      ENDIF.                               "org.unit check needed ?
    end-of-selection.
      sort h_objec by otype objid.
      sort list_output by otype sobid.
      sort h_persons by ttype tobid.
    ALV-Liste aufbauen
      loop at h_objec.
        loop at h_persons where otype = h_objec-otype     "XSC
                          and   sobid = h_objec-objid.    "XSC
          Read table list_output with key
                                 otype = h_persons-ttype
                                 sobid = h_persons-tobid
                                 binary search.
          if sy-subrc = 0.
            h_tabix1 = sy-tabix.
            while sy-subrc = 0.
              clear alv_output.                            "XSC
              ALV_OUTPUT-otype    = h_objec-otype.
              ALV_OUTPUT-sobid    = h_objec-objid.
              ALV_OUTPUT-stext    = h_objec-stext.
              ALV_OUTPUT-Ptype    = LIST_OUTPUT-otype.
              ALV_OUTPUT-pobid    = LIST_OUTPUT-sobid.
              ALV_OUTPUT-pshort   = LIST_OUTPUT-short.
              ALV_OUTPUT-ptext    = LIST_OUTPUT-stext.
              ALV_OUTPUT-qualid   = LIST_OUTPUT-qualid.
              ALV_OUTPUT-qualstxt = LIST_OUTPUT-qualstxt.
              ALV_OUTPUT-expbegda = LIST_OUTPUT-vbegda.
              ALV_OUTPUT-expendda = LIST_OUTPUT-vendda.
          PERFORM FIND_TRAINING TABLES QUALI_TAB EVENT_TAB COLLECTED_EVENTS
                    USING $PLVAR $GDATE H_EVENTS H_QUAL.
              IF NOT EVENT_TAB[] IS INITIAL.
                READ TABLE COLLECTED_EVENTS WITH KEY
                                     QUALID = LIST_OUTPUT-QUALID.
                IF SY-SUBRC = 0.
                  ALV_OUTPUT-ICON_S_EVENTS = ICON_BOOKEVENT.
                endif.
              ENDIF.
              Append ALV_OUTPUT.
              h_tabix1 = h_tabix1 + 1.
              READ TABLE list_output INDEX h_tabix1
                         COMPARING otype sobid.
            endwhile.
          endif.
        endloop.
      endloop.
    check if indicator for qualification view is set
      IF h_qual = 'X'.                                          "note 956731
        SORT alv_output by qualid OTYPE SOBID ptype pobid       "note 956731
        expbegda expendda.                                      "note 956731
      ELSE.                                                     "note 956731
        SORT alv_output by OTYPE SOBID ptype pobid qualid expbegda expendda.
      ENDIF.                                                    "note 956731
      DELETE ADJACENT DUPLICATES FROM ALV_OUTPUT COMPARING OTYPE SOBID ptype
        pobid qualid expbegda expendda.
    stext_AQ und icon-Feld noch nicht gefüllt
        perform PREPARE_TOP_OF_LIST.
        perform Build_FIELDCAT using GT_FIELDCAT[] H_EVENTS.
        perform ALV_LAYOUT USING alv_layout.
        G_REPID          = SY-REPID.
        G_VARIANT-REPORT = G_REPID.
        PERFORM EVENTTAB_BUILD USING GT_EVENTS.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
        I_INTERFACE_CHECK        = 'X'
            I_CALLBACK_PROGRAM       = G_REPID
        I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
            I_CALLBACK_USER_COMMAND  = ALV_USERCOMMAND
            I_STRUCTURE_NAME         = 'HRPDV_EXPIRED_Q'
            IS_LAYOUT                = ALV_LAYOUT
            IT_FIELDCAT              = GT_FIELDCAT[]
        IT_EXCLUDING             =
        IT_SPECIAL_GROUPS        =
        IT_SORT                  =
        IT_FILTER                =
        IS_SEL_HIDE              =
            I_DEFAULT                = 'X'
            I_SAVE                   = 'A'
            IS_VARIANT               = G_VARIANT
            IT_EVENTS                = GT_EVENTS
        IT_EVENT_EXIT            =
        IS_PRINT                 =
        IS_REPREP_ID             =
        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                 = ALV_OUTPUT
          EXCEPTIONS
              PROGRAM_ERROR            = 1
              OTHERS                   = 2  .
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *&      Form  FIND_TRAINING
          text
         -->P_QUALI_TAB  text
         -->P_EVENT_TAB  text
         -->P_$PLVAR  text
         -->P_GDATE  text
         -->P_H_EVENT  text
         -->P_H_QUAL  text
    FORM FIND_TRAINING TABLES  P_QUALI_TAB STRUCTURE QUALI_TAB
                               P_EVENT_TAB STRUCTURE EVENT_TAB
                               P_COLLECTED_EVENTS STRUCTURE COLLECTED_EVENTS
                       USING   VALUE(P_$PLVAR) LIKE P1000-PLVAR
                               VALUE(P_GDATE) LIKE P1000-GDATE
                               VALUE(P_H_EVENT) TYPE ANY
                               VALUE(P_H_QUAL) TYPE ANY.
      IF NOT P_H_EVENT IS INITIAL.
        READ TABLE EVENT_TAB INDEX 1 TRANSPORTING NO FIELDS.
        IF SY-SUBRC <> 0.
          CLEAR P_EVENT_TAB. REFRESH EVENT_TAB.
          CLEAR P_COLLECTED_EVENTS. REFRESH P_COLLECTED_EVENTS.
          IF EVENT = FALSE.
            EVENT = TRUE.
          ELSE.
            EVENT = FALSE.
          ENDIF.
          CALL FUNCTION 'RHPH_FIND_TRAINING_FOR_QUAL'
               EXPORTING
                    PLVAR            = PCHPLVAR
                    GDATE            = SY-DATUM
                  GET_NAME         = 'X'
               TABLES
                    QUALI_TAB        = QUALI_TAB
                    TO_Q_TAB         = EVENT_TAB
              EXCEPTIONS
                   NO_QUALIFICATION = 1
                   NO_OBJECT_FOUND  = 2
                   TECHNICAL_ERROR  = 3
                   OTHERS           = 4.
          IF SY-SUBRC = 0.
    the found qualifications are picked up into table event_tab
          ENDIF.
          IF SY-SUBRC = 1.
            MESSAGE S015.   "Zu den Eingaben wurden keine Daten gefunden
          ENDIF.
          IF SY-SUBRC > 2.
            EXIT.
          ENDIF.
    collect events when there are double.
    Veranstaltungen kollektieren, Können mehrfach auftauchen, da
    verschiedenen Qualifikationen von gleichen Veranstaltungen vermittelt
          LOOP AT P_EVENT_TAB INTO P_COLLECTED_EVENTS.
            APPEND P_COLLECTED_EVENTS.
          ENDLOOP.
          SORT P_COLLECTED_EVENTS BY QUALID STEXT.
        ENDIF.
      ENDIF.
    ENDFORM.                               " FIND_TRAINING
    *&      Form  PREPARE_TOP_OF_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM PREPARE_TOP_OF_LIST.
      DATA ALV_TOP_OF_LIST TYPE SLIS_LISTHEADER.  "typ, key, info
      DATA STEXT LIKE HRPDV_SUCCESSOR_VIEW-TTEXT.
      DATA P_SUBRC LIKE SY-SUBRC.
      DATA P_STEXT LIKE T777O-OTEXT.
      DATA l_tabix like sy-tabix value 0.
      DATA: h_counter TYPE i.                             "note 730486
      ALV_TOP_OF_LIST-TYP = 'H'.
      ALV_TOP_OF_LIST-INFO = TEXT-REQ.
      APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
    Organisationseinheit
      ALV_TOP_OF_LIST-typ = 'S'.
    Read text for organisationunit
      PERFORM READ_TEXT_OTYPE_T777O(SAPLRHP0) USING SY-LANGU $ORGEH
                                                    P_STEXT P_SUBRC.
      ALV_TOP_OF_LIST-key = P_STEXT.
    fill buffer for read organisation-text
      CALL FUNCTION 'RH_TEXT_BUFFER_FILL'
         EXPORTING
              CHECK_STRU_AUTH = 'X'
              WITH_EXTINT     = ' '
           TABLES
                OBJECTS         = OBJECTS.
    loop at objects for multipleselection
      clear h_counter.                          "note 730486
      LOOP AT OBJECTS.
        $OBJID = OBJECTS-SOBID.
        CALL FUNCTION 'RH_READ_OBJECT'
             EXPORTING
                PLVAR           = OBJECTS-PLVAR
                OTYPE           = OBJECTS-OTYPE
                OBJID           = $OBJID
             IMPORTING
              SHORT           = short
                STEXT           = STEXT
             EXCEPTIONS
                NOT_FOUND       = 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.
        IF h_counter >= 15.                               "note 730486
          MOVE '( ... )' TO ALV_TOP_OF_LIST-INFO.         "note 730486
          APPEND ALV_TOP_OF_LIST TO gt_alv_list_top_of_list.
          "note 730486
          EXIT.                                           "note 730486
        ENDIF.                                            "note 730486
        CONCATENATE $ORGEH OBJECTS-SOBID STEXT INTO
        ALV_TOP_OF_LIST-INFO SEPARATED BY SPACE.
        APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
        CLEAR ALV_TOP_OF_LIST.
        ALV_TOP_OF_LIST-typ = 'S'.
        l_tabix = l_tabix + 1.
        ADD 1 TO h_counter.                         "note 730486
      ENDLOOP.
    CLEAR ALV_TOP_OF_LIST.
      ALV_TOP_OF_LIST-TYP  = 'S'.
      ALV_TOP_OF_LIST-key = TEXT-003.
      WRITE PCHBEGDA TO ALV_TOP_OF_LIST-INFO.
      APPEND ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
      clear ALV_TOP_OF_LIST-INFO.
      ALV_TOP_OF_LIST-key = TEXT-004.
      WRITE PCHENDDA TO ALV_TOP_OF_LIST-INFO.
      Append ALV_TOP_OF_LIST TO GT_ALV_LIST_TOP_OF_LIST.
    ENDFORM.                               " PREPARE_TOP_OF_LIST
    *&      Form  BUILD_FIELDCAT
          text
         -->P_GT_FIELDCAT[]  text
    FORM BUILD_FIELDCAT USING  P_GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV
                               P_H_EVENTS.
      DATA: WA_FIELDCAT LIKE LINE OF P_GT_FIELDCAT.
      DATA: P_REPNAME LIKE SY-REPID,
            L_TABIX LIKE SY-TABIX.         "local variable for sy-tabix.
      P_REPNAME = SY-REPID.
    Erstellen des Feldkataloges
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
               I_PROGRAM_NAME         = P_REPNAME
               I_INTERNAL_TABNAME     =
               I_STRUCTURE_NAME       = 'HRPDV_EXPIRED_Q'
               I_CLIENT_NEVER_DISPLAY = 'X'
               I_INCLNAME             = PRONAME
         CHANGING
               CT_FIELDCAT            = P_GT_FIELDCAT
         EXCEPTIONS
               INCONSISTENT_INTERFACE = 0
               PROGRAM_ERROR          = 0
               OTHERS                 = 0.
      LOOP AT P_GT_FIELDCAT INTO WA_FIELDCAT.
        l_tabix = sy-tabix.
        CASE WA_FIELDCAT-FIELDNAME.
          when 'OTYPE'.
            WA_FIELDCAT-DDICTXT = 'L'.
          when 'SOBID'.
            WA_FIELDCAT-DDICTXT = 'L'.
          WHEN 'STEXT'.
            WA_FIELDCAT-DDICTXT = 'L'.
          when 'PTYPE'.
            WA_FIELDCAT-DDICTXT = 'L'.
          when 'POBID'.
            WA_FIELDCAT-DDICTXT = 'L'.
          when 'PSHORT'.
            WA_FIELDCAT-DDICTXT = 'L'.
          WHEN 'PTEXT'.
            WA_FIELDCAT-DDICTXT = 'L'.
          WHEN 'QUALID'.
            WA_FIELDCAT-DDICTXT = 'L'.
          WHEN 'QUALSTXT'.
            WA_FIELDCAT-DDICTXT = 'L'.
          WHEN 'EXPBEGDA'.
            WA_FIELDCAT-DDICTXT = 'L'.
          WHEN 'EXPENDDA'.
            WA_FIELDCAT-DDICTXT = 'L'.
          WHEN 'ICON_S_EVENTS'.
            IF P_H_EVENTS IS INITIAL.
              WA_FIELDCAT-NO_OUT = 'X'.
            else.
              WA_FIELDCAT-DDICTXT = 'X'.
            endif.
        ENDCASE.
        MODIFY P_GT_FIELDCAT FROM WA_FIELDCAT INDEX l_tabix.
      ENDLOOP.
    ENDFORM.                               " BUILD_FIELDCAT
    *&      Form  ALV_LAYOUT
          text
         -->P_L_ALV_LAYOUT  text
    FORM ALV_LAYOUT USING    P_ALV_LAYOUT  TYPE slis_layout_alv.
    build layout
    P_LAYOUT-BOX_FIELDNAME = 'MARK_X'.   "fieldname for checkbox
      P_ALV_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      P_ALV_LAYOUT-BOX_TABNAME   =  ALV_OUTPUT.   "tabname for checkbox
      p_ALV_layout-info_fieldname = 'ALV_COLOR'.
    ENDFORM.                               " ALV_LAYOUT
    FORM eventtab_build USING
    FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      MOVE 'TOP_OF_PAGE' TO LS_EVENT-NAME.
      MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
      APPEND LS_EVENT TO RT_EVENTS.
    ENDFORM.                    "EVENTTAB_BUILD
    *FORM TOP_OF_PAGE
    FORM TOP_OF_PAGE.                                           "#EC CALLED
      NEW-PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = GT_ALV_LIST_TOP_OF_LIST[].
    ENDFORM.                    "TOP_OF_PAGE
          FORM USER_COMMAND                                             *
    USER_COMMAND for the list of successor view                         *
    -->  r_ucomm                                                       *
    -->  rs_selfield                                                   *
    FORM USER_COMMAND USING ALV_UCOMM LIKE SY-UCOMM
          RS_SELFIELD TYPE SLIS_SELFIELD.                       "#EC CALLED
      DATA: SELECTED_LINE LIKE HRPDV_expired_q.
      DATA: SOBID_QUA LIKE P1000-OBJID.
      DATA: LT_PERS_TAB LIKE HRSOBID OCCURS 0 WITH HEADER LINE.
      CASE ALV_UCOMM.
        WHEN '&IC1'.                       "per Doppelklick auswählen
          READ TABLE ALV_OUTPUT INDEX
          RS_SELFIELD-TABINDEX INTO SELECTED_LINE.
          CASE RS_SELFIELD-FIELDNAME.
            WHEN 'POTYPE' or 'POBID' or 'PTEXT' or 'OTYPE' or 'SOBID' or
    'STEXT' or 'QUALID' or 'QUALSTXT' or 'EXPBEGDA' or 'EXPENDDA'.
              READ TABLE ALV_OUTPUT INDEX RS_SELFIELD-TABINDEX INTO
                    Help_output.
              IF SY-SUBRC <> 0.
                MESSAGE S027.               "Bitte gültige Zeile auswählen
                EXIT.
              Endif.
         IF ALV_OUTPUT-SOBID IS INITIAL.
           MESSAGE S015.  "Zu den Eingaben wurden keine Daten gefunden
         ELSE.
         converte the variable because of the different types
         SOBID_QUA = SELECTED_LINE-SOBID_QUA.
              CALL FUNCTION 'RHPP_SHOW_PROFILE'
                EXPORTING
                  PLVAR        = pchplvar
                  OTYPE        = SELECTED_LINE-PTYPE       "XSC
                  OBJID        = SELECTED_LINE-POBID       "XSC
                  BEGDA        = PCHBEGDA
                  ENDDA        = PCHENDDA
                  MAINTAIN     = ' '
                EXCEPTIONS
                  NO_AUTHORITY = 1
                  NOT_FOUND    = 2
                  OTHERS       = 3.
              CASE SY-SUBRC.
                WHEN 0.
                All right.
                WHEN 1.
                  MESSAGE S015.
                Zu Ihren Eingaben konnten keine Daten gefunden werden!
                WHEN 2.
                  MESSAGE E000.
                Dazu haben sie keine berechtigung!
                WHEN OTHERS.
                  MESSAGE E008.
                Es ist ein unvorhergesehener Fehler aufgetreten.
              ENDCASE.                     "sy-subrc.
              CLEAR ALV_OUTPUT.
       ENDIF.    "IF ALV_OUTPUT-SOBID IS INITIAL.
       CLEAR ALV_OUTPUT-SOBID.
            when 'ICON_S_EVENTS'.
              IF SELECTED_LINE-ICON_S_EVENTS IS INITIAL.
                MESSAGE S027.              "Bitte gültige Zeile auswählen
                EXIT.
              ENDIF.
              CLEAR LT_PERS_TAB.
              REFRESH LT_PERS_TAB.
              LT_PERS_TAB-PLVAR = pchPLVAR.
              LT_PERS_TAB-OTYPE = SELECTED_LINE-PTYPE.          "XSC
              LT_PERS_TAB-SOBID = SELECTED_LINE-POBID.          "XSC
              APPEND LT_PERS_TAB.
              SOBID_QUA = SELECTED_LINE-QUALID.
              CALL FUNCTION 'RHPP_SHOW_SUGGEST_EVENTS'
              EXPORTING
                P_PLVAR      = pchPLVAR
                P_SOBID_QUA  = SOBID_QUA
              P_PROFCY_REQ = SELECTED_LINE-RATING_REQ
                P_GDATE      = sy-datum
              TABLES
              EVENT_TAB    =
                PERS_TAB     = LT_PERS_TAB.
          endcase.
          CLEAR SELECTED_LINE.
      ENDCASE.                             "case sy-ucomm
    CLEAR SY-UCOMM.
    ENDFORM.                    "USER_COMMAND

    Pls be more specific in your question. If you want to include an extra field in your alv output, then read the field catalog table you created through "Reuse_alv_fieldcatalog_merge" and then add an extra entry in it giving the details of the field you want to add.. and then call the "resuse_alv_grid_display",
    Hope this helps. To be able to help you in a better way, kindly revert with any specific issue.
    Reward if helpful,
    Karan

  • ALV list display in a Background job - Spool output

    Hi,
    We are currently working on a report scheduled to be run in the background job, and the ALV list is displayed in the spool output.
    ALV list in the spool does not look the same as front run job, the column headers are all crowded together, and there is no grid in-between different columns or rows. It's hard to read.
    Is there a way to add grid for this kind of output?
    Thanks!

    Hi Deepak:
    I expanded your report into two rows display, and the grid in the spool display simply gone!
    report zzscratch line-size 120 no standard page heading.
    type-pools slis.
    tables pa0001.
    data : li_field type standard table of slis_fieldcat_alv,
    gi_events type standard table of slis_alv_event,
    gr_layout_bck type slis_layout_alv,
    gr_save like disvariant,
    gr_events type slis_alv_event.
    types : begin of gtt_emp,
    pernr type persno,
    ename  like pa0001-ename,
    uname  like pa0001-UNAME,
    end of gtt_emp.
    data : lr_field type slis_fieldcat_alv.
    data : lc_rep like syst-repid.
    data : li_emp type standard table of gtt_emp,
    lr_emp type gtt_emp.
    data : gv_ref_table type lvc_rtname.
    gv_ref_table = 'CATSDB'.
    lr_field-fieldname = 'PERNR'.
    lr_field-ref_tabname = gv_ref_table.
    lr_field-inttype = 'N'.
    lr_field-outputlen = 8.
    lr_field-seltext_l = 'EMPLOYEE Number'.
    append lr_field to li_field.
    lr_field-fieldname = 'ENAME'.
    lr_field-ref_tabname = 'PA0001'.
    lr_field-inttype = 'C'.
    lr_field-outputlen = 40.
    lr_field-seltext_l = 'EMPLOYEE Name'.
    append lr_field to li_field.
    lr_field-fieldname = 'UNAME'.
    lr_field-ref_tabname = 'PA0001'.
    lr_field-inttype = 'C'.
    lr_field-outputlen = 12.
    lr_field-seltext_l = 'User Name'.
    lr_field-row_pos = 2.
    lr_field-col_pos = 1.
    append lr_field to li_field.
    lc_rep = sy-repid.
    gr_layout_bck-edit_mode = 'D'.
    gr_save-report = sy-repid.
    lr_emp-pernr = '00000001'.
    lr_emp-ename = 'abc'.
    lr_emp-uname = 'testus'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000002'.
    lr_emp-ename = 'def'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000003'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000004'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000005'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000006'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000007'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000008'.
    append lr_emp to li_emp.
    end-of-selection.
    Function module for ALV grid display
      call function 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_buffer_active    = 'X'
                i_callback_program = lc_rep
                is_layout          = gr_layout_bck
                it_fieldcat        = li_field
                i_save             = 'A'
                is_variant         = gr_save
                it_events          = gi_events
           TABLES
                t_outtab           = li_emp[]
           EXCEPTIONS
                program_error      = 1
                others             = 2.
      if sy-subrc <> 0.
    clear gr_messages.
    message e023 into gr_messages.
    append gr_messages to gi_messages.
      endif.

  • Multi ALV lists/grid report in one output/screen

    Hi,
    I need to develop a ALV report, where in the output/ALV/List/Grid should look like below (all lists/grids should be fit in only one screen, if there are too many entires in the sub reports user will scroll down each), here am giving the details (MATNR, KUNNR, LIFNR) of the output just for example purpose
                                                 _My_Report_
    Sub_report_1
    MATNR-----Description
    Sub_report_2
    KUNNR-----Name
    Sub_report_3
    LIFNR-----Name
    Sub_report_4
    BANK-----Name
    Its okay to have any kind of ALV either grid or List, when user press F8 on the selection screen all should come in one screen, if there are too many entries then user will scroll down
    Thank you

    Hello,
    You can use blocked alv to achieve this.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          i_callback_program = l_repid.
    *Adding First Block to the List
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                  = w_layo
          it_fieldcat                = it_fcat
          i_tabname                  = text-064
          it_events                  = it_events
          it_sort                    = it_sort
        TABLES
          t_outtab                   = it_mainalv
        EXCEPTIONS
          program_error              = 1
          maximum_of_appends_reached = 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_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                  = w_layo
          it_fieldcat                = it_fcat1
          i_tabname                  = text-094
          it_events                  = it_events1
          it_sort                    = it_sort1
        TABLES
          t_outtab                   = it_field_change
        EXCEPTIONS
          program_error              = 1
          maximum_of_appends_reached = 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.
    Displaying the list
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
        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.
    Thanks.
    ramya.

  • Hide columns for ALV list output in SAP Query SQ01/SQ02

    Hi All,
    I have a requirement to hide the columns which are empty in sap query SQ01 alv list output.
    Please let me know this functionality available in Query (SQ01) like normal reports
    Regards,
    Venkat

    Hi,
    We just can't make changes in this case as this are all system generated programs.
    WE have to write our own reports to make things flexible to match our requirements.
    Things you are asking is not possible.
    Regards,
    Suvendu

  • Submit a program and skip output or dont show the output (alv list)

    hi,
    is it possible to use the submit command and skip output or don't show the output (alv list) ?
    Regrads
    ertas

    Hi all,
    I get the message
    REPORT  ZTEST.
    DATA: jtab TYPE TABLE OF sbook,
          wa_jtab LIKE LINE OF jtab,
          jtab2 TYPE z_incident_li OCCURS 0 WITH HEADER LINE.
    submit Z_INCIDENT_LIST EXPORTING LIST TO MEMORY AND RETURN.
    IMPORT lt_incident_res TO  jtab2 FROM MEMORY ID 'table'.
    LOOP AT jtab2 .
      WRITE / jtab2-RECN.
    ENDLOOP.
    Runtime Errors         RAISE_EXCEPTION
    Date and Time          12.06.2008 17:54:00
    Short text
         Exception condition "CNTL_ERROR" raised.
    What happened?
         The current ABAP/4 program encountered an unexpected
         situation.
    Error analysis
         A RAISE statement in the program "CL_GUI_CONTROL================CP" rais
          exception
         condition "CNTL_ERROR".
         Since the exception was not intercepted by a superior
         program, processing was terminated.
         Short description of exception condition:
         For detailed documentation of the exception condition, use
         Transaction SE37 (Function Library). You can take the called
         function module from the display of active calls.

  • 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

  • End of page in alv list output.

    Hi All,
    Can any body help me out for how to show end of page in alv list output.
    Thanks,
    Rakesh Singh

    Refer this link:
    http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
    Regards,
    Ravi

  • How to change the ColumnName in the output of an ALV List

    ello Experts,
    Can you please let me know how can I change the column name of a field in an ALV List. For eg: I want to see the 'I_FIELDCAT-MATNR' field's name as 'ITEM NUMBER' in the output.
    Thanks for the help

    Hi Raj,
    Have a look at this file.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6
    Reward if useful.
    Thanks
    Aneesh.

  • ALV List output limits

    Hello,
    I have a problem with my ALV List, I use a simple ALV List with much fields and I can't change with ALV Grid, on a specific client works correctly but on another client of the same system I've a dump.
    Is it possible to set a client dependent limits for fields/characters to display for output?
    Thanks
    Antonio

    It's a strange problem because if program runs on '100' client, runs correctly but on '200' client I have a dump but the system is the same...
    If field catalog is wrong I should have the problem with all clients...
    I've tried to remove/change some fields and works but with all fields I've dump only on one client...
    I think there are limits on layout... is it possible?
    Edited by: Aristoteles92 on Nov 23, 2009 5:22 PM

  • LIST_TOO_MANY_LPROS error for alv list output

    Hi All,
    we are displaying two lists in one output by using resue_alv_list_output by passing  list_append = 'X'  to l  IS_LAYOUT   parameter.
    when we are using like this we are getting the LIST_TOO_MANY_LPROS  error.please suggest.
    please find the below error.
    Runtime Errors         LIST_TOO_MANY_LPROS
    Date and Time          08.09.2009 21:06:33
    Short text
    No further list processing possible.
    What happened?
    You requested too many consecutive nested call screens.
    What can you do?
    If possible, leave the current screen level before making a further
    selection (function Back=F3 or Cancel=F12).
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    At present, the maximum permitted number of nested screen levels is
    restricted to 50.
    How to correct the error
    If possible, unnecessary screens should be suppressed beforehand.
    Remember that you can also output a list at the same screen level as
    the details list.
    In some cases, it is better to create a new screen level stack by
    switching to another program or transaction.
    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:
    "LIST_TOO_MANY_LPROS" " "
    "SAPLKKBL" or "LKKBLU01"
    "K_KKB_LIST_DISPLAY"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.

    Just want to give a hit in relevance to what Sandra suggested. You can set a breakpoint in one of callback subroutine but skip first 49 its calls. This means that only when it is called 50th time, processing will stop at this breakpoint. To do that, in debugger set a breakpoint -> go to Breakpoints tab -> enter 49 in Skip field. You will avoid counting number of calls yourself, system will do that for you.
    Regards
    Marcin

  • Output of two ALV lists in background

    HI ALV experts,
    [Soory I just saw that I posted this yesterday with a wrong subject]
    I'm currently working with an existing reports which is quite complex. The report creates an ALV grid and uses a couple of write statements to create some statistics.
    Running the report, we get the ALV grid. Then using BACK/F3 we leave the grid and get the list showing statistics.
    I would like to create an ALV for the statistics. This works fine online: After leaving the grid the statistics ALV is started. But in background, I got just one list.
    I tried this sample:
    FORM batchtest .
      DATA:
        lr_data TYPE REF TO data,
        lo_salv TYPE REF TO cl_salv_table.
      FIELD-SYMBOLS:
        <table>  TYPE table.
    * dynamic table fpr T000
      CREATE DATA lr_data TYPE TABLE OF t000.
      ASSIGN lr_data->* TO <table>.
      SELECT * INTO TABLE <table> FROM t000.
    * show table in grid
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_structure_name = 'T000'
        TABLES
          t_outtab         = <table>
        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.
    * create another table
      TRY.
          CREATE DATA lr_data TYPE TABLE OF t100.
          ASSIGN lr_data->* TO <table>.
          SELECT * INTO TABLE <table> FROM t100 UP TO 100 ROWS.
          cl_salv_table=>factory(
            EXPORTING
              list_display   = if_salv_c_bool_sap=>true
            IMPORTING
              r_salv_table   = lo_salv
            CHANGING
              t_table        = <table> ).
    * display list
          lo_salv->display( ).
        CATCH cx_salv_msg .
          ASSERT 1 = 2.
      ENDTRY.
    ENDFORM.                    " BATCHTEST
    Online, it works fine. In batch, I get only the second table as list. If I exit after calling FUNCTION 'REUSE_ALV_GRID_DISPLAY', I get the first list only. How to get both lists printed in sequence? I will not use ALV block list display, because this would mean major restructuring of the program and no grid online. SUBMIT ist no good idea as well.
    Thanks in advance
    Regards
    Clemens

    Hi
    The option is in layout structure adn has to be set in the next ALV function called, so if the program works in background mode it can call REUSE_ALV_LIST_DISPLAY instaed of CL_SALV_TABLE.
    The call can be place in the END_OF_LIST event of ALV:
    TYPE-POOLS: SLIS.
    PERFORM BATCHTEST.
    FORM BATCHTEST .
      DATA:
        LR_DATA TYPE REF TO DATA,
        LO_SALV TYPE REF TO CL_SALV_TABLE.
      FIELD-SYMBOLS:
        <TABLE>  TYPE TABLE.
      DATA: T_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE.
      DATA: L_PRINT  TYPE SLIS_PRINT_ALV.
      DATA: L_REPORT TYPE SY-REPID.
    * dynamic table fpr T000
      CREATE DATA LR_DATA TYPE TABLE OF T000.
      ASSIGN LR_DATA->* TO <TABLE>.
      SELECT * INTO TABLE <TABLE> FROM T000.
      IF SY-BATCH = 'X'.
    * In background only
        L_PRINT-PRINT              = 'X'. "Print ALV
        L_PRINT-NO_PRINT_LISTINFOS = 'X'.
        T_EVENTS-NAME = 'END_OF_LIST'.    "Call event
        T_EVENTS-FORM = 'END_OF_LIST'.
        APPEND T_EVENTS.
      ENDIF.
      L_REPORT = SY-REPID.
    * show table in grid
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = L_REPORT
          I_STRUCTURE_NAME   = 'T000'
          IT_EVENTS          = T_EVENTS[]
          IS_PRINT           = L_PRINT
        TABLES
          T_OUTTAB           = <TABLE>
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
      IF SY-SUBRC  NE 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CHECK SY-BATCH IS INITIAL.
    * The form for the nex ALV is called by event END_OF_LIST if the
    * program works in background   
      PERFORM NEXT_LIST.
    ENDFORM.                    " BATCHTEST
    FORM NEXT_LIST .
      DATA:
        LR_DATA TYPE REF TO DATA,
        LO_SALV TYPE REF TO CL_SALV_TABLE.
      FIELD-SYMBOLS:
        <TABLE>  TYPE TABLE.
      DATA: LT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    * create another table
      TRY.
          CREATE DATA LR_DATA TYPE TABLE OF T100.
          ASSIGN LR_DATA->* TO <TABLE>.
          SELECT * INTO TABLE <TABLE> FROM T100 UP TO 100 ROWS.
          IF SY-BATCH IS INITIAL. "Online
            CL_SALV_TABLE=>FACTORY(
              EXPORTING
                LIST_DISPLAY   = IF_SALV_C_BOOL_SAP=>TRUE
              IMPORTING
                R_SALV_TABLE   = LO_SALV
              CHANGING
                T_TABLE        = <TABLE> ).
    * display list
            LO_SALV->DISPLAY( ).
          ELSE.                   "In background
            LT_LAYOUT-LIST_APPEND = 'X'. "Append new ALV list
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                I_STRUCTURE_NAME = 'T100'
                IS_LAYOUT        = LT_LAYOUT
              TABLES
                T_OUTTAB         = <TABLE>
              EXCEPTIONS
                PROGRAM_ERROR    = 1
                OTHERS           = 2.
            IF SY-SUBRC  NE 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
          ENDIF.
        CATCH CX_SALV_MSG .
          ASSERT 1 = 2.
      ENDTRY.
    ENDFORM.                    " NEXT_LIST
    FORM END_OF_LIST.
      PERFORM NEXT_LIST.
    ENDFORM.                    "END_OF_LIST
    Max

Maybe you are looking for

  • Text in table cells as links to open a new document

    I am using cs 5.5 on a mac. I have a table in an introduction chapter that is an 8 by 8 table. Each of the 64 cells of the table contain a number. That number is the appropriate chapter for them to read and each chapter is a separate document in a bo

  • Servlet initialisation problem

    Hi! I am very new to servlet and would appreciate your assistance in this problem. I am using j2sdk1.3.1_08, Tomcat 4.1.27, Log4j 1.2.28 I would like to initialise log4j using servlet. Following are the codes I used. Somehow, this servlet does not ge

  • Javac not detecting package statements

    Initially I was using eclipse to set my packages for grouping classes, but recently I decided to try and organize some bytecode files by using notepad just to see if it would work fine in dos. I put two .java files in a directory and made up a packag

  • Mac mini wireless options

    I have a pre-Intel Mac mini, early 2005 vintage, without an Apple Extreme Card pre-installed. My iBook G4 (and the MacBook I plan to purchase soon) both have the Card, and I want to get my Mac mini ready for both high-speed Internet use and a potenti

  • Solaris 10 b69  and EPIA Mini-ITX Boards

    I am trying to install the Solaris 10 on a EPIA PD see http://www.viaembedded.com/product/epia_PD_spec.jsp?motherboardId=241 for details But then when it starts loading the kernel (no matter which install option I choose) as it passes controll to the