Problem with a pf-status in alv?

Hi guys,
I am displaying a alv grid report(not using OO).I added my own button 'download' in the tool bar.I used my own status.when the user clicks this button,the report is downloaded into a excel file.he will make some changes in the excel file and save it.
In the same program and in the selection screen,the user will import the excel which he saved before and exectues he will get a second alv report.for this i m calling alv_display again with the standard status.But i need a new button 'upload' in the second alv report.this button when clicked will call  some transaction.Can i  create a second status or i can add the upload button to my status which i created already and the hide the previous button when displaying the 2nd alv report.
Any suggestions will be helpful and rewarded.
Thank you.

Hello DP,
U can use the same PF Status. In the PBO , use the code belwo to hide the btns'.
CASE process_mode.
    WHEN tpmco_char_1 OR tpmco_char_2.
      APPEND 'EXCEL' TO tcode.
    WHEN tpmco_char_3.
      APPEND 'TEST' TO tcode.
      APPEND 'ENTER' TO tcode.
  ENDCASE.
  SET PF-STATUS 'STATUS_PROCESS' EXCLUDING tcode.

Similar Messages

  • Problem with WCS Audit status missmatch after upgrade

    We had problem with wcs Audit status missmatch after upgrade to 7.0.164.3  WLC : 6.0.188.0.
    how I can fix the problem?

    Hi,
    Try pinging the WCS from the WLC and vice versa and then try again to refresh config from controllers.. then follow the below if its still not happening..
    Please forwrd the trace level logs from the WCS (Specifically WCS0.0.TXT logs) while recreating the issue!!
    Regards
    Surendra

  • Problem with file download option in ALV via ITS. Please help!

    Hi Experts,
           I have a ALV report which I have web enabled using ITS service. In the ALV there is a delivered functionality for file download. It works fine when the report is run in the SE80. But when I run the ITS service for the report and choose file download option it displays a page saying "this page has been diaplayed due to technical reasons" with title "File properties". In addition it looks for Java runtime in the browser. After all this it opens a popup window for selecting path and file name.
    This is not user friendly and many customers have rasied their concerns on it.
    My question is that,
    Q1: What is the need of this "File properties page"? Why ITS calls this while ABAP editor does not?
    Q2: Is there any way we can suppress this so that it directly opens a popup window for selecting path and file name?
    Please help me.
    Thanks
    Gopal

    Hello Klaus,
    i have also the problem with these intermediate screens!
    We have in between installed patch 22 for ITS 6.20 and SP18 at SAP Netweaver 2004!
    But they are still not processed invisible for the users.
    Are there any additional parameters, which controls this behaviour(~webgui_updown_make_visible is not used!)?
    How can i check, if i have really a.ex. the actual ws.jar-file or other related files of the patch?
    We are using the standalone ITS with an own (modified) IAC with an own CI-design for the webpages. The intermediate screens are displayed with the "normal" SAPGUI-design because of the parameter ~generatedynpro. Without this it does not work, because the template SAPLSIT_0100 is missing!
    Or do you have an example for such a intermediate template with the applet for an upload of a file?
    Thanks in advance
    Felix

  • Problem with top of page in alv

    Hi
    i gotta probelm with my alv report in this , in the first level i am displaying the purchase order header details,in the secod level i am displaying the purchase order item detials..
    I am getting the top of page contents properly in the header level. but when i double click it for item level i am getting the same top of page header instead of displaying the item level what i have mentioned..
    Can any one suggest me some ways to get the item level top of page contents??
    Here is my code.
    REPORT  ZZ_22038_22098_002 NO STANDARD PAGE HEADING LINE-SIZE 650
    MESSAGE-ID ZZ_9838                      .
    TYPE-POOLS: SLIS.
    *type declaration for values from ekko
    TYPES: BEGIN OF I_EKKO,
           EBELN LIKE EKKO-EBELN,
           AEDAT LIKE EKKO-AEDAT,
           BUKRS LIKE EKKO-BUKRS,
           BSART LIKE EKKO-BSART,
           LIFNR LIKE EKKO-LIFNR,
           END OF I_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
          WA_EKKO TYPE I_EKKO.
    *type declaration for values from ekpo
    TYPES: BEGIN OF I_EKPO,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MATNR LIKE EKPO-MATNR,
           MENGE LIKE EKPO-MENGE,
           MEINS LIKE EKPO-MEINS,
           NETPR LIKE EKPO-NETPR,
           END OF I_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE I_EKPO .
    *variable for Report ID
    DATA: V_REPID LIKE SY-REPID .
    *declaration for fieldcatalog
    DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: X_I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          X_WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER,
          X_IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    declaration for events table where user comand or set PF status will
    be defined
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT.
    declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    declaration for variant(type of display we want)
    DATA: I_VARIANT TYPE DISVARIANT,
          I_VARIANT1 TYPE DISVARIANT,
          I_SAVE(1) TYPE C.
    *PARAMETERS : p_var TYPE disvariant-variant.
    *Title displayed when the alv list is displayed
    DATA:  I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
    DATA:  I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
    INITIALIZATION.
      V_REPID = SY-REPID.
      PERFORM BUILD_FIELDCATLOG.
      PERFORM EVENT_CALL.
      PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATLOG
          Fieldcatalog has all the field details from ekko
    FORM BUILD_FIELDCATLOG.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'AEDAT'.
      WA_FIELDCAT-SELTEXT_M = 'DATE.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'LIFNR'.
      WA_FIELDCAT-NO_OUT    = 'X'.
      WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "EVENT_CALL
    *&      Form  POPULATE_EVENT
         Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-NAME.
      ENDIF.
    ENDFORM.                    "POPULATE_EVENT
    *&      Form  data_retrieval
      retreiving values from the database table ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
    ENDFORM.                    "data_retrieval
    *&      Form  bUild_listheader
          text
         -->I_LISTHEADEtext
    FORM BUILD_LISTHEADER USING IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
      DATA HLINE TYPE SLIS_LISTHEADER.
      HLINE-INFO = 'Purchase Order Header Details'.
      HLINE-TYP = 'H'.
      APPEND HLINE TO IT_LISTHEADER.
    ENDFORM.                    "build_listheader
    *&      Form  display_alv_report
          text
    FORM DISPLAY_ALV_REPORT.
      V_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = V_REPID
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
         I_GRID_TITLE                      = I_TITLE_EKKO
         IT_FIELDCAT                       = I_FIELDCAT[]
         I_SAVE                            = 'A'
         IT_EVENTS                         = V_EVENTS
        TABLES
          T_OUTTAB                          = IT_EKKO
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "display_alv_report
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
          PERFORM BUILD_FIELDCATLOG_EKPO.
          PERFORM EVENT_CALL_EKPO.
          PERFORM POPULATE_EVENT_EKPO.
          PERFORM DATA_RETRIEVAL_EKPO.
          PERFORM BUILD_LISTHEADER_EKPO USING X_IT_LISTHEADER.
          PERFORM DISPLAY_ALV_EKPO.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_EKPO
          text
    FORM BUILD_FIELDCATLOG_EKPO.
      X_WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'EBELN'.
      X_WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
      X_WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'EBELP'.
      X_WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
      X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'MATNR'.
      X_WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'MENGE'.
      X_WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'MEINS'.
      X_WA_FIELDCAT-SELTEXT_M = 'UOM'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'NETPR'.
      X_WA_FIELDCAT-SELTEXT_M = 'PRICE'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG_EKPO
    *&      Form  event_call_ekpo
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL_EKPO.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "event_call_ekpo
    *&      Form  POPULATE_EVENT
           Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT_EKPO.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE1'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      ENDFORM.                    "POPULATE_EVENT
    *&      Form  TOP_OF_PAGE
          text
    FORM F_TOP_OF_PAGE1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = X_IT_LISTHEADER.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM DATA_RETRIEVAL_EKPO.
    SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
    ENDFORM.
    FORM BUILD_LISTHEADER_EKPO USING X_IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: HLINE1 TYPE SLIS_LISTHEADER.
    HLINE1-TYP = 'H'.
    HLINE1-INFO = 'Purchase Order Item details'.
    APPEND HLINE1 TO X_IT_LISTHEADER.
    ENDFORM.
    FORM DISPLAY_ALV_EKPO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = V_REPID
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
       I_GRID_TITLE                      = I_TITLE_EKPO
       IT_FIELDCAT                       = X_I_FIELDCAT[]
       I_SAVE                            = 'A'
       IT_EVENTS                         = V_EVENTS
      TABLES
        T_OUTTAB                          = IT_EKPO
    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.
    ENDFORM.

    When you are calling the FM 'REUSE_AVL_GRID_DISPLAY', to display item details, you are passing the form name for 'i_callback_top_of_page' as 'TOP_OF_PAGE' which is for header details. For item details you have created another form, 'F_TOP_OF_PAGE1' pass it to 'i_callback_top_of_page'  instead of  'TOP_OF_PAGE' .

  • Problem with Export to Excel from ALV view.

    Hello @all,
    i have a problem on my webdynpro application. I use the component SALV_WD_TABLE. I become display my data but when i want to export the table to ecel, i became a short dump with the message in the browser: Access via 'NULL' object reference not possible.
    When i look at ST22. The system show this text.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was no
         caught in
        procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)
         was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component (variable: "LR_HEADER").
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    How to correct the error
        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:
        "OBJECTS_OBJREF_NOT_ASSIGNED" "CX_SY_REF_IS_INITIAL"
        "CL_SALV_WD_A_MODEL_TABLE======CP" or "CL_SALV_WD_A_MODEL_TABLE======CM0
        "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD"
        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.
    The exception must either be prevented, caught within proedure
    "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", or its
      possible occurrence must be declared in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:
    Information on where terminated
        Termination occurred in the ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" -
         in "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD".
        The main program was "SAPMHTTP ".
        In the source code you have the termination point in line 19
        of the (Include) program "CL_SALV_WD_A_MODEL_TABLE======CM030".
        The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
        procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", but
         it was neither handled locally nor declared
        in the RAISING clause of its signature.
        The procedure is in program "CL_SALV_WD_A_MODEL_TABLE======CP "; its source
         code begins in line
        1 of the (Include program "CL_SALV_WD_A_MODEL_TABLE======CM030 ".
    Source Code Extract
    Line  SourceCde
        1 method if_salv_bs_model_column~get_header_bind_ddic_field.
        2
        3   data:
        4     ls_column type if_salv_bs_model_columns=>s_type_column.
        5
        6   ls_column = me->if_salv_bs_model_columns~get_column( column ).
        7
        8 *... get column
        9   data:
       10     lr_column type ref to cl_salv_wd_column.
       11
       12   lr_column ?= ls_column-r_column.
       13
       14   data:
       15     lr_header type ref to cl_salv_wd_column_header.
       16
       17   lr_header = lr_column->get_header( ).
       18
    >>>>>   value = lr_header->get_ddic_binding_field( ).
       20
       21 endmethod.
    i hope anybody can help me.
    Regards
    Chris

    Dear
    How you resolved this issue please let us know.
    Thanks

  • Error handling problem with outbound idoc status 02 and  XML HTTP Port

    I set up an ALE scenario to send master data out of SAP via an XML HTTP port.  All goes well until the idoc receives error 02. 
    It looks like idocs in this error status with the use of an XML HTTP port can not be reprocessed via the standard SAP techniques.  Program RBDAGAIN takes them out of the list for reprocessing (even though the connection is back up and running).
    Is there any solution to still use the standard ALE error handling ?

    Hi Karin,
    Looks like based on note 701597, you can only reprocess these idocs manually via a workitem.  I qouted the relevant text below:
    3. Error handling with status '02':
    An HTTP IDoc in status '02' should not automatically be sent once again.
    Up to now, the RBDAGAIN report was used to resend incorrect IDocs.
    However, this report was adjusted and now deletes all IDocs in status 02
    to be routed to a HTTP port from the list of selected IDocs. IDocs to a
    HTTP port in status '02' should only be sent manually via a work item.
    Regards:
    Rex

  • Problem with shopping cart status

    Hi Experts,
    We are implementing SRM 5.0. When i create a shopping cart for services, it creates purchase requisition in the backend but the status of shopping cart, 'Purchase Requisition Created',  is not getting updated in SRM. But when I modify and save that purchse requisition in the backend, only then it updates the shopping cart status. I'm also using CLEANUP_REQREQ_UP and BBP_GET_STATUS_2 programs as background jobs.
    Kindly help me in solving this issue.
    Regards,
    B.Siddhesh

    Hi,
    This issue is resolved now.
    The problem was when service PR is created from SRM on R/3, the system fails to create entries in table ESLH. To resolve this issue we implemented note 922372 and its working fine now.
    Regards,
    B.Siddhesh

  • Problem with 'PRINT' button in OOPs ALV

    Hi All,
    I have developed a OOPs based ALV report. When ever we create an ALV we also have to create Menu bar I did that providing fuctionality for 'BACK' and 'CANCEL' buttons in main toolbar. But user wants funtionality for 'SAVE' and 'PRINT'.
    How do I do this ?  Is there any stadard code which I can paste in PAI and use it. Classic ALVs handle this by default and OOPs doesn't do this it handles only a table level. But in my report I have a header information also. If user uses the standard 'PRINT' button at table level, only table contents are printed not the header information.
    Please let me know how to handle 'PRINT' & 'SAVE' button in OOPs ALV.
    Thanks in advance.

    Hi Ravindar,
      This programe BCALV_TEST_GRID_PRINT has used the normal class cl_gui_alv_grid where as I have used CL_GUI_ALV_TREE class.
    Regards,
    Deepthi.

  • Problem with dispalying Colum name in ALV grid - Urgent

    My requirement is to print the column name as "Sales order item number".
    I declared the field for "Sales order item number" in the output table as
      aupos   LIKE vbrp-aupos
    And in field catalog
    pt_hlp_fieldcat-reptext_ddic = 'Sales order Item number'.
    pt_hlp_fieldcat-seltext_l    = 'Sales order Item number'.
    pt_help_fieldcat-seltext_m    = 'Sales order Item number'.
    pt_hlp_fieldcat-seltext_s   = 'Sales order Item number.'.
    Append pt_hlp_fieldcat.
    My layout is as follows
    PS_LAYOUT-ZEBRA = 'X'.
        PS_LAYOUT-window_titlebar = 'Invoice Buildup'.
        PS_LAYOUT-DETAIL_POPUP = ' '.
        PS_LAYOUT-TOTALS_BEFORE_ITEMS = ' '.
        PS_LAYOUT-GET_SELINFOS = 'X'.
        PS_LAYOUT-GROUP_CHANGE_EDIT = 'X'.
        PS_LAYOUT-confirmation_prompt = 'X'.
        PS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
        PS_LAYOUT-NO_KEYFIX         = 'X'.
        PS_LAYOUT-KEY_HOTSPOT       = 'X'.
    The problem is still it is displaying the field name form the table-field label.
    How can i forcefuly display the colum name irrespect of table field label.
    Thanks in advance....

    See the sample code
    fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    Similarly u can
      fieldcatalog-fieldname   = 'AUPOS'.
      <b>fieldcatalog-seltext_m   = 'Sales order item number'.</b>
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    hope this helps.
    reward points if this helps.

  • Problem with SAP 7.10

    I've a problem with download to xlsf rom ALV GRID with SAP 7.10
    Can I execute a patch download for resolve thi problem?
    Where I can find it?
    Best regards.
    Cristiano

    Hi,
    Please have a look in the below link.
    Upgrade SAP GUI 6.40 to 7.10 SAPLOGON problem
    /message/6593778#6593778 [original link is broken]
    OO Splitter  ALV  grid's  Header  data Download
    Hope this link are helpfull
    Thanks
    kalyan B

  • Strange problem with backgroung processing of BDC for Transcation CLMM

    Folks,
    I have encountered strange problem with BDC.I created an ALV report from output i select any number of rows and hit insert class button on top. If i select less than 10 row and use this statement
    call transaction 'CLMM' mode 'N'
    ,it works fine but if i select more than 10 rows ,the sy-subrc after this statement  
    call transaction 'CLMM' mode 'N'
    is 1001 means an error. I cant understand this problem of Mode N. if  i put statement
    call transaction 'CLMM'
    (foreground processing) here ,everything works fine. Do you have any idea?
    Nirad

    Hi,
    The problem is due to the screen size which can differ between foreground and background mode.
    A screen with 10 table rowsin foreground does not necessarily mean same number of rows would be available in background mode.
    Hence its always better to create recording with Simulate Background Mode as checked.
    When you enter transaction code 'CLMM' in SHDB transaction and start recording, check Simulate Background Mode.
    Hope this helps!
    Cheers,
    Vikram

  • ALV GRID Problem with reading contents

    Hi there! I'm quite new with ABAP and I have some problems with the syntax of it. Maybe I should first describe my aim and then I'll show you my code.
    1. I read contents from two database tables, called 'zbc_dan_registry' and 'zbc_dan_category'.
    'zbc_dan_registry' has 2 columns: name, value.
    zbc_dan_category' has 1 column: category.
    Now I want to have an ALV Grid, that displays the contents of 'zbc_dan_registry' and one additional column with dropdown fields, where the user can select a category for each row. This is, what my code already does.
    Now I want to save the contents of the whole table in a new table 'zbc_dan_registrz' (you see: 'registrz', not 'registry'!) with 3 columns:
    name, category, value.
    My problem is, how can I read the contents of the ALV Grid, with the user selected category for each row, and save them in an internal table? I've tried to adapt the code of "BCALV_EDIT_04", but I don't get it running.
    Some detailled help would be great, you know, I'm really working hard to understand ABAP, but it's really hard for me. Thanks for your support and help!!
    Here's my code so far:
    *& Report  ZBC400_DAN_TESTNO4
    REPORT  ZBC400_DAN_TESTNO4.
    DATA: lt_registrz TYPE TABLE OF zbc_dan_regstrz WITH HEADER LINE,
          lt_category TYPE TABLE OF zbc_dan_category WITH HEADER LINE,
          ls_category TYPE zbc_dan_category, "Struktur Kategorie
          ok_code LIKE sy-ucomm,
          container_r TYPE REF TO cl_gui_custom_container,
          grid_r TYPE REF TO cl_gui_alv_grid,
          gc_custom_control_name TYPE scrfname VALUE 'CONTAINER_REG',
          fieldcat_r TYPE lvc_t_fcat,
          layout_r TYPE lvc_s_layo,
          lt_ddval TYPE lvc_t_drop,
          ls_ddval TYPE lvc_s_drop,
          c TYPE i.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
      DATA g_verifier TYPE REF TO lcl_event_receiver.
      DATA: BEGIN OF gt_outtab OCCURS 0.
        INCLUDE STRUCTURE zbc_dan_regstrz.
        DATA: celltab TYPE lvc_t_styl.
      DATA: END OF gt_outtab.
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
      TYPES: BEGIN OF lt_registrz_key.         "Struktur mit den Schlüsseln der Tabelle 'Registry'
        TYPES:  name TYPE zbc_dan_name,
                value TYPE zbc_dan_value,
                category TYPE zbc_dan_cat.
      TYPES: END OF lt_registrz_key.
      TYPES:  ls_registrz_keys TYPE STANDARD TABLE OF lt_registrz_key,
              ls_registrz_table TYPE STANDARD TABLE OF zbc_dan_regstrz.
      METHODS: get_inserted_rows EXPORTING inserted_rows TYPE ls_registrz_keys.
      METHODS: refresh_delta_tables.
      METHODS: handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
    *  METHODS: get_inserted_rows EXPORTING inserted_rows TYPE registrz_keys.
    *  METHODS: refresh_delta_tables.
      PRIVATE SECTION.
      DATA: inserted_rows TYPE ls_registrz_keys.
      DATA: error_in_data TYPE c.
      METHODS: get_cell_values IMPORTING row_id TYPE int4 pr_data_changed TYPE REF TO cl_alv_changed_data_protocol EXPORTING key TYPE lt_registrz_key.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_data_changed.
        DATA: ls_good TYPE lvc_s_modi,
              ls_new TYPE lvc_s_moce.
        error_in_data = space.
        IF error_in_data = 'X'.
          CALL METHOD er_data_changed->display_protocol.
        ENDIF.
      ENDMETHOD.
      METHOD get_cell_values.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'NAME'
            IMPORTING e_value = key-name.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'VALUE'
            IMPORTING e_value = key-value.
        CALL METHOD pr_data_changed->get_cell_value
          EXPORTING i_row_id = row_id i_fieldname = 'CATEGORY'
            IMPORTING e_value = key-category.
      ENDMETHOD.
      METHOD get_inserted_rows.
        inserted_rows = me->inserted_rows.
      ENDMETHOD.
      METHOD refresh_delta_tables.
        clear me->inserted_rows[].
      ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
        SELECT client name value
          INTO CORRESPONDING FIELDS OF TABLE lt_registrz FROM zbc_dan_regstry.
        SELECT category INTO CORRESPONDING FIELDS OF TABLE lt_category FROM zbc_dan_category.
    CALL SCREEN 0100.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          SET SCREEN 0.
          MESSAGE ID 'BC400' TYPE 'S' NUMBER '057'.
        WHEN 'SAVE'.
          PERFORM save_data.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'DYNPRO100'.
      SET TITLEBAR 'D0100'.
    ENDMODULE.
    MODULE display_alv OUTPUT.
      PERFORM display_alv.
    ENDMODULE.
    FORM display_alv.
    IF grid_r IS INITIAL.
    *----Creating custom container instance
      CREATE OBJECT container_r
      EXPORTING
        container_name = gc_custom_control_name
      EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        others = 6.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT grid_r
        EXPORTING
          i_parent = container_r
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init = 2
          error_cntl_link = 3
          error_dp_create = 4
          others = 5.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          CREATE OBJECT g_verifier.
          SET HANDLER g_verifier->handle_data_changed FOR grid_r.
    *----Preparing field catalog.
          PERFORM prepare_field_catalog CHANGING fieldcat_r.
    *----Preparing layout structure
          PERFORM prepare_layout CHANGING layout_r.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
          CALL METHOD grid_r->set_table_for_first_display
          EXPORTING
    * I_BUFFER_ACTIVE =
    * I_CONSISTENCY_CHECK =
    * I_STRUCTURE_NAME =
    * IS_VARIANT =
    * I_SAVE =
    * I_DEFAULT = 'X'
            is_layout = layout_r
    * IS_PRINT =
    * IT_SPECIAL_GROUPS =
    * IT_TOOLBAR_EXCLUDING =
    * IT_HYPERLINK =
          CHANGING
            it_outtab = lt_registrz[]
            it_fieldcatalog = fieldcat_r
    * IT_SORT =
    * IT_FILTER =
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error = 2
            too_many_lines = 3
            OTHERS = 4.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          ELSE.
            CALL METHOD grid_r->refresh_table_display
    * EXPORTING
    * IS_STABLE =
    * I_SOFT_REFRESH =
          EXCEPTIONS
            finished = 1
            OTHERS = 2.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
        ENDIF.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDFORM.
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
        i_structure_name = 'ZBC_DAN_REGSTR2'
      CHANGING
        ct_fieldcat = pt_fieldcat[]
      EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
      IF sy-subrc <> 0.
    *--Exception handling
      ENDIF.
      LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'NAME'.
            ls_fcat-coltext = 'Name'.
            ls_fcat-outputlen = '40'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'VALUE'.
            ls_fcat-coltext = 'Wert'.
            ls_fcat-outputlen = '30'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CATEGORY'.
              LOOP AT lt_category into ls_category.
                ls_ddval-handle = 1.
                ls_ddval-value = ls_category-category.
    *            ls_ddval-style = cl_gui_alv_grid=>mc_style_enabled.
                APPEND ls_ddval TO lt_ddval.
             ENDLOOP.
             CALL METHOD grid_r->set_drop_down_table
                EXPORTING it_drop_down = lt_ddval.
            ls_fcat-edit = 'X'.
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-coltext = 'Kategorie'.
            MODIFY pt_fieldcat FROM ls_fcat.
        ENDCASE.
      ENDLOOP.
    ENDFORM.
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X'.
      ps_layout-grid_title = 'Kategorie zur Registry hinzufügen'.
      ps_layout-smalltitle = 'X'.
    ENDFORM.
    FORM save_data.
      DATA: ls_ins_keys TYPE g_verifier->ls_registrz_keys,
            ls_ins_key TYPE g_verifier->lt_registrz_key,
            ls_registrz TYPE zbc_dan_regstrz,
            ls_outtab LIKE LINE OF gt_outtab,
            lt_instab TYPE TABLE OF zbc_dan_regstrz.
      CALL METHOD g_verifier->get_inserted_rows IMPORTING inserted_rows = ls_ins_keys.
      LOOP AT ls_ins_keys INTO ls_ins_key.
        READ TABLE gt_outtab INTO ls_outtab
        WITH KEY  name = ls_ins_key-name
                  value = ls_ins_key-value
                  category = ls_ins_key-category.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING ls_outtab TO ls_registrz.
          APPEND ls_registrz TO lt_instab.
        ENDIF.
      ENDLOOP.
      INSERT zbc_dan_regstrz FROM TABLE lt_instab.
      CALL METHOD g_verifier->refresh_delta_tables.
      ENDFORM.

    Hi Hans,
    You raised the Question in the Webdynpro ABAP forum. Here its very diffcult to get the answer from this forum. Please close it here and raise the same question in ABAP General Forum there you will get faster and so many anwsers.
    Please close the question here.
    Warm Regards,
    Vijay

  • Problem with ALV grid in edit mode

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

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

  • Problems with ALV header

    Hi there,
    i've got a little problem with my ALV header. every time when i run my program and want to go back to the selection screen with the BACK-button i see my header again. so i've got to push the BACK-button again to get to the selection screen.
    here's my alv-code
    FORM TOP_OF_PAGE.
      REFRESH header_itab[].
      CLEAR wa_header.
      wa_header-typ = 'H'.
    *  wa_header-key = 'ausw1'.
      wa_header-info = text-001.
      APPEND wa_header TO header_itab.
      CLEAR wa_header.
      IF radio1 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton1'.
        wa_header-info = text-002.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSEIF radio2 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton2'.
        wa_header-info = text-003.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSEIF radio3 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton3'.
        wa_header-info = text-004.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSEIF radio4 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton4'.
        wa_header-info = text-005.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSE.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton5'.
        wa_header-info = text-006.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ENDIF.
      wa_header-typ = 'S'.
      wa_header-key = 'Benutzer:'.
      wa_header-info = sy-uname.
      APPEND wa_header TO header_itab.
      CLEAR wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = header_itab.
    ENDFORM.
    *       FORM alv_füllen                                               *
    FORM alv_fuellen .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program     = my_repid
                i_callback_top_of_page = 'TOP_OF_PAGE'
    *            i_grid_title           = my_title
                it_fieldcat            = feldkatalog_itab
                is_layout              = gs_layout
    *            it_events              = event_itab
           TABLES
                t_outtab               = itab
           EXCEPTIONS
                program_error          = 1
                OTHERS                 = 2.
    ENDFORM.
    *       FORM layout_allg_build                                        *
    FORM layout_allg_build.
           gs_layout-zebra  = 'X'.
           gs_layout-colwidth_optimize = 'X'.
    ENDFORM.
    hope someone can help me.
    regards tobias

    hi,
    i tried some of your ideas but none helped my.
    so here's my complete code
    maybe this is helpful.
    *& Report  z_cd_tool_awdimaiob
    REPORT z_cd_tool_awdimaiob.
    * G L O B A L   I N T E R N  A L   T A B L E S
    DATA: BEGIN OF itab OCCURS 100,
          status TYPE dimaiobpar-zstatus,
          rtyp TYPE  dimaiobpar-zrtyp,
          zahlweg TYPE dimaiobpar-ezawe_x,
          a_status TYPE i,
          a_rtyp TYPE i,
          a_partner TYPE i,
          a_vertraege TYPE i,
          END OF itab .
    * G L O B A L   D A T A
    DATA: ok_code LIKE sy-ucomm,
          wa_test_tab LIKE dimaiobpar,
          my_title TYPE lvc_title,
          my_repid LIKE sy-repid.
    TYPE-POOLS: slis.
    DATA:     feldkatalog_itab  TYPE   slis_t_fieldcat_alv,
         wa_feldkatalog    TYPE   slis_fieldcat_alv,
           event_itab        TYPE   slis_t_event,
           header_itab       TYPE   slis_t_listheader,
           gs_layout         TYPE   slis_layout_alv,
           alv_event         TYPE   slis_alv_event,
           wa_header         TYPE   slis_listheader.
    DATA: t_tab LIKE dimaiobpar.
    *selection-screen
    SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test WITH FRAME TITLE text-010.
    SELECT-OPTIONS: partner FOR  t_tab-partner,
                    astatus FOR  t_tab-zstatus.
    SELECTION-SCREEN END OF BLOCK test.
    *Radiobutton
    SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test2 WITH FRAME TITLE text-020.
    PARAMETERS: radio1 RADIOBUTTON GROUP test DEFAULT 'X',
                radio2 RADIOBUTTON GROUP test,
                radio3 RADIOBUTTON GROUP test,
                radio4 RADIOBUTTON GROUP test,
                radio5 RADIOBUTTON GROUP test.
    SELECTION-SCREEN END OF BLOCK test2.
    * S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    * Select-Abfrage
      PERFORM select_data.
    *END-OF-SELECTION.
    * Feldkatalog fuellen.
      PERFORM feldkatalog_fuellen .
    * Feldkatalog übergeben
      PERFORM alv_feldkatalog.
    * ALV-Event
      perform alv_event.
    * Layout bestimmen.
      PERFORM layout_allg_build.
    * header aufbau
      PERFORM top_of_page.
      SORT itab.
      my_title = 'Auswertung Dimaiobpar'.
      my_repid = sy-repid.
      PERFORM exit_program.
    END-OF-SELECTION.
    * ALV mit daten füllen
      PERFORM alv_fuellen.
    *       FORM alv_event                                                *
    FORM alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = event_itab.
      READ TABLE event_itab
      WITH KEY name = 'TOP_OF_PAGE'
      INTO alv_event.
      IF sy-subrc EQ 0.
        MOVE 'TOP_OF_PAGE' TO alv_event-form.
        APPEND alv_event TO event_itab.
        ENDIF.
    ENDFORM.
    *       FORM alv_feldkatalog                                          *
    FORM alv_feldkatalog.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name     = my_repid
                i_internal_tabname = 'ITAB'
                i_inclname         = my_repid
    *            i_bypassing_buffer = 'X'
           CHANGING
                ct_fieldcat        = feldkatalog_itab
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
    ENDFORM.
    *       FORM header                                                   *
    FORM top_of_page.
      CLEAR wa_header.
      wa_header-typ = 'H'.
    *  wa_header-key = 'ausw1'.
      wa_header-info = text-001.
      APPEND wa_header TO header_itab.
      CLEAR wa_header.
      IF radio1 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton1'.
        wa_header-info = text-002.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSEIF radio2 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton2'.
        wa_header-info = text-003.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSEIF radio3 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton3'.
        wa_header-info = text-004.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSEIF radio4 = 'X'.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton4'.
        wa_header-info = text-005.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ELSE.
        wa_header-typ = 'S'.
        wa_header-key = 'Radiobutton5'.
        wa_header-info = text-006.
        APPEND wa_header TO header_itab.
        CLEAR wa_header.
      ENDIF.
      wa_header-typ = 'S'.
      wa_header-key = 'Benutzer:'.
      wa_header-info = sy-uname.
      APPEND wa_header TO header_itab.
      CLEAR wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = header_itab.
      REFRESH header_itab.
    ENDFORM.
    *       FORM alv_füllen                                               *
    FORM alv_fuellen .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program     = my_repid
                i_callback_top_of_page = 'TOP_OF_PAGE'
    *            i_grid_title           = my_title
                it_fieldcat            = feldkatalog_itab[]
                is_layout              = gs_layout
    *            it_events              = event_itab
           TABLES
                t_outtab               = itab
           EXCEPTIONS
                program_error          = 1
                OTHERS                 = 2.
    ENDFORM.
    *       FORM layout_allg_build                                        *
    FORM layout_allg_build.
           gs_layout-zebra  = 'X'.
           gs_layout-colwidth_optimize = 'X'.
    ENDFORM.
    *       FORM feldkatalog_fuellen                                      *
    FORM feldkatalog_fuellen.
    *Feldkatalog erstellen/füllen mit hilfe der if-schleife anhand des
    *gewählten Radiobuttons
    IF radio1 = 'X'.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'STATUS'.
           wa_feldkatalog-seltext_m     = 'Status'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'RTYP'.
           wa_feldkatalog-seltext_m     = 'Rechungstyp'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'A_RTYP'.
           wa_feldkatalog-seltext_m     = 'Anzahl Rechungstyp'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
    ELSEIF radio2 = 'X'.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'RTYP'.
           wa_feldkatalog-seltext_m     = 'Rechungstyp'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'A_STATUS'.
           wa_feldkatalog-seltext_m     = 'Anzahl Status'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
    ELSEIF radio3 = 'X'.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'STATUS'.
           wa_feldkatalog-seltext_m     = 'Status'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'RTYP'.
           wa_feldkatalog-seltext_m     = 'Rechungstyp'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'A_VERTRAEGE'.
           wa_feldkatalog-seltext_m     = 'Anzahl Verträge'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
    ELSEIF radio4 = 'X'.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'STATUS'.
           wa_feldkatalog-seltext_m     = 'Status'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'RTYP'.
           wa_feldkatalog-seltext_m     = 'Rechungstyp'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'A_PARTNER'.
           wa_feldkatalog-seltext_m     = 'Anzahl GPartner'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
    ELSE.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'STATUS'.
           wa_feldkatalog-seltext_m     = 'Status'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'RTYP'.
           wa_feldkatalog-seltext_m     = 'Rechungstyp'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'ZAHLWEG'.
           wa_feldkatalog-seltext_m     = 'Zahlweg'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
      CLEAR wa_feldkatalog.
           wa_feldkatalog-fieldname     = 'A_PARTNER'.
           wa_feldkatalog-seltext_m     = 'Anzahl GPartner'.
      APPEND wa_feldkatalog TO feldkatalog_itab.
    ENDIF.
    ENDFORM.
    *       FORM select_data                                              *
    FORM select_data.
    *select-abfrage mit hilfe der if-schleife, analog zum Feldkatalog
      IF radio1 = 'X'.
    *   Radiobutton1: Rechungstypen je Satus
        SELECT
           zstatus AS status
           zrtyp AS rtyp
           COUNT( DISTINCT zrtyp ) AS a_rtyp
           INTO CORRESPONDING FIELDS OF itab
           FROM dimaiobpar
           WHERE
           insobject LIKE 'V%' AND
           partner IN partner AND
           zstatus IN astatus
           GROUP BY ZSTATUS zrtyp
           ORDER BY zstatus.
          APPEND itab.
        ENDSELECT.
      ELSEIF radio2 = 'X'.
    * Radiobutton2: Status je Rechungstyp.
        SELECT
               zrtyp AS rtyp
               COUNT( DISTINCT zstatus ) AS a_status
               INTO CORRESPONDING FIELDS OF itab
               FROM dimaiobpar
               WHERE
               insobject LIKE 'V%' AND
               partner IN partner AND
               zstatus IN astatus
               GROUP BY  ZRTYP
               ORDER BY zrtyp.
          APPEND itab.
        ENDSELECT.
      ELSEIF radio3 = 'X'.
    * Radiobutton3: Anzahl Verträge je Status und Rtyp.
        SELECT
             zstatus AS status
             zrtyp AS rtyp
             COUNT( DISTINCT insobject ) AS a_vertraege
             INTO CORRESPONDING FIELDS OF itab
             FROM dimaiobpar
             WHERE
             insobject LIKE 'V%' AND
             partner IN partner AND
             zstatus IN astatus
             GROUP BY ZSTATUS zrtyp
             ORDER BY zstatus.
          APPEND itab.
        ENDSELECT.
      ELSEIF radio4 ='X'.
    *  Radiobutton4: Anzahl GPartner je Status und RTyp.
        SELECT
               zstatus AS status
               zrtyp AS rtyp
               COUNT( DISTINCT partner ) AS a_partner
               INTO CORRESPONDING FIELDS OF itab
               FROM dimaiobpar
               WHERE
               insobject LIKE 'V%' AND
               partner IN partner AND
               zstatus IN astatus
               GROUP BY ZSTATUS zrtyp
               ORDER BY zstatus zrtyp.
          APPEND itab.
        ENDSELECT.
      ELSE.
    * Radiobutton5: Anzahl Kunden nach Zahlweg.
        SELECT
             zstatus AS status
             zrtyp AS rtyp
             ezawe_x AS zahlweg
             COUNT( DISTINCT partner ) AS a_partner
             INTO CORRESPONDING FIELDS OF itab
             FROM dimaiobpar
             WHERE
             insobject LIKE 'V%' AND
             partner IN partner AND
             zstatus IN astatus AND
             ezawe_x IN ('E', 'F', space)
             GROUP BY ZSTATUS zrtyp EZAWE_X
             ORDER BY zstatus zrtyp.
          APPEND itab.
        ENDSELECT.
      ENDIF.
    ENDFORM.
    *       FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    IF sy-ucomm = 'BACK' OR
       sy-ucomm = 'EXIT' OR
       sy-ucomm = 'CANCEL'.
      LEAVE PROGRAM.
      endif.
    ENDFORM.

  • Problems with alv-grid

    hello all,
    i've got a little problem with the output of an internal table with the ALV Grid.
    i have made the declaration of my internal table (itab) with DATA: Begin of itab... and i have build my own fieldcatalog.
    the output of the fieldcatalog is correct but i don't get the results of my itab shown.
    it only shows me the numbers of lines in my itab but not the content.
    for this im using 'REUSE_ALV_FIELDCATALOG_MERGE' and 'REUSE_ALV_GRID_DISPLAY'
    *ALV-Grid
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
          EXPORTING
            i_program_name        = sy-repid
           i_internal_tabname    = 'itab'
          i_structure_name = 'itab'
         i_client_never_display
         i_inclname            = sy-repid
         CHANGING
            ct_fieldcat            = feldkatalog_itab
          EXCEPTIONS
            inconsistent_interface = 1
            program_error          = 2
            OTHERS                 = 3.
    *ALV  call
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
           i_callback_program = sy-repid
                it_fieldcat   = feldkatalog_itab
                i_structure_name = 'itab'
               it_events     = event_itab
           TABLES
                t_outtab      = itab[]
           EXCEPTIONS
                program_error = 1
                OTHERS        = 2.
    when i debug my programm the lines of the itab are filled.
    thanks and regards
    Ayse
    REPORT z_test_auswertung.
    G L O B A L   I N T E R N  A L   T A B L E S
    DATA: BEGIN OF itab OCCURS 100,
          status TYPE dimaiobpar-zstatus,
          rtyp TYPE  dimaiobpar-zrtyp,
          zahlweg TYPE dimaiobpar-ezawe_x,
          a_status TYPE i,
          a_rtyp TYPE i,
          a_partner TYPE i,
          a_vertraege TYPE i,
          END OF itab .
    G L O B A L   D A T A
    DATA: ok_code LIKE sy-ucomm,
          wa_test_tab LIKE dimaiobpar,
          my_title TYPE lvc_title.
    TYPE-POOLS: slis.
    DATA:     feldkatalog_itab   TYPE   slis_t_fieldcat_alv,
         wa_feldkatalog     TYPE   slis_fieldcat_alv,
           event_itab         TYPE   slis_t_event,
           header_itab        TYPE   slis_t_listheader,
           wa_header          TYPE   slis_listheader.
    DATA:
      mycontainer TYPE scrfname VALUE 'BCALV_VARIANTS_0100_C1',
      my_grid             TYPE REF TO cl_gui_alv_grid,
      my_custom_container TYPE REF TO cl_gui_custom_container.
    DATA: t_tab LIKE dimaiobpar.
    *selection-screen
    SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test WITH FRAME TITLE text-010.
    SELECT-OPTIONS: partner FOR  t_tab-partner,
                    astatus FOR  t_tab-zstatus.
    SELECTION-SCREEN END OF BLOCK test.
    *Radiobutton
    SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test2 WITH FRAME TITLE text-020.
    PARAMETERS: radio1 RADIOBUTTON GROUP test DEFAULT 'X',
                radio2 RADIOBUTTON GROUP test,
                radio3 RADIOBUTTON GROUP test,
                radio4 RADIOBUTTON GROUP test,
                rafio5 RADIOBUTTON GROUP test.
    SELECTION-SCREEN END OF BLOCK test2.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
      PERFORM select_data.
    CALL SCREEN 100.
      DATA ttab LIKE itab.
      MOVE itab TO ttab.
    Feldkatalog fuellen.
      PERFORM feldkatalog_fuellen .
    Feldkatalog übergeben
      PERFORM alv_feldkatalog.
    ALV mit daten füllen
      PERFORM alv_füllen.
    END-OF-SELECTION.
      SORT itab.
      my_title = 'Auswertung Dimaiobpar'.
      PERFORM exit_program.
          FORM alv_feldkatalog                                          *
    FORM alv_feldkatalog.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
          EXPORTING
                  i_program_name        = sy-repid
            i_internal_tabname    = 'ITAB[]'
        i_structure_name = 'TTAB'
        i_client_never_display
         i_inclname            = 'ITAB[]'
         i_bypassing_buffer = 'X'
         CHANGING
            ct_fieldcat            = FELDKATALOG_ITAB
            EXCEPTIONS
            program_error          = 1
            OTHERS                 = 2.
    ENDFORM.
          FORM alv_füllen                                               *
    FORM alv_füllen .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
           i_callback_program = sy-repid
           i_grid_title = my_title
                it_fieldcat   = FELDKATALOG_ITAB
               i_structure_name = 'ITAB'
               it_events     = event_itab
           TABLES
                t_outtab      = itab
           EXCEPTIONS
                program_error = 1
                OTHERS        = 2.
    ENDFORM.
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    CALL METHOD G_CUSTOM_CONTAINER->FREE.
    CALL METHOD CL_GUI_CFW=>FLUSH.
      LEAVE PROGRAM.
    ENDFORM.
          FORM feldkatalog_fuellen                                      *
    FORM feldkatalog_fuellen.
      IF radio1 = 'X'.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'status'.
             wa_feldkatalog-seltext_m     = 'Status'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'rtyp'.
             wa_feldkatalog-seltext_m     = 'RTyp'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'a_rtyp'.
             wa_feldkatalog-seltext_m     = 'Anzahl RTyp'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
      ELSEIF radio2 = 'X'.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'rtyp'.
             wa_feldkatalog-seltext_m     = 'RTyp'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'a_status'.
             wa_feldkatalog-seltext_m     = 'Anzahl Status'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
      ELSEIF radio3 = 'X'.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'status'.
             wa_feldkatalog-seltext_m     = 'Status'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'rtyp'.
             wa_feldkatalog-seltext_m     = 'RTyp'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'a_vertraege'.
             wa_feldkatalog-seltext_m     = 'Anzahl Vertraege'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
      ELSEIF radio4 = 'X'.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'status'.
             wa_feldkatalog-seltext_m     = 'Status'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'rtyp'.
             wa_feldkatalog-seltext_m     = 'RTyp'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'a_gpartner'.
             wa_feldkatalog-seltext_m     = 'Anzahl GPartner'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
      ELSE.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'status'.
             wa_feldkatalog-seltext_m     = 'Status'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'rtyp'.
             wa_feldkatalog-seltext_m     = 'RTyp'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'zahlweg'.
             wa_feldkatalog-seltext_m     = 'Zahlweg'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
        CLEAR wa_feldkatalog.
             wa_feldkatalog-fieldname     = 'a_gpartner'.
             wa_feldkatalog-seltext_m     = 'Anzahl GPartner'.
        APPEND wa_feldkatalog TO feldkatalog_itab.
      ENDIF.
    ENDFORM.
          FORM select_data                                              *
    FORM select_data.
      IF radio1 = 'X' .
       WRITE / 'Radiobutton1: Rechungstypen je Satus'.
      WRITE / 'Status, Rtyp, Anzahl-Rtyp'.
       ULINE.
        SELECT
           zstatus AS status
           zrtyp AS rtyp
           COUNT( DISTINCT zrtyp ) AS a_rtyp
           INTO CORRESPONDING FIELDS OF itab
           FROM dimaiobpar
           WHERE
           insobject LIKE 'V%' AND
           partner IN partner AND
           zstatus IN astatus
           GROUP BY ZSTATUS zrtyp
           ORDER BY zstatus.
          APPEND itab.
         WRITE:  / itab.
        ENDSELECT.
      ELSEIF radio2 = 'X'.
       WRITE / 'Radiobutton2: Status je Rechungstyp'.
       WRITE /.
        SELECT
               zrtyp AS rtyp
               COUNT( DISTINCT zstatus ) AS a_status
               INTO CORRESPONDING FIELDS OF itab
               FROM dimaiobpar
               WHERE
               insobject LIKE 'V%' AND
               partner IN partner AND
               zstatus IN astatus
               GROUP BY  ZRTYP
               ORDER BY zrtyp.
          APPEND itab.
         WRITE:    / itab-rtyp, itab-a_status.
        ENDSELECT.
      ELSEIF radio3 = 'X'.
       WRITE / 'Radiobutton3: Anzahl Verträge je Status und Rtyp'.
       WRITE /.
        SELECT
             zstatus AS status
             zrtyp AS rtyp
             COUNT( DISTINCT insobject ) AS a_vertraege
             INTO CORRESPONDING FIELDS OF itab
             FROM dimaiobpar
             WHERE
             insobject LIKE 'V%' AND
             partner IN partner AND
             zstatus IN astatus
             GROUP BY ZSTATUS zrtyp
             ORDER BY zstatus.
          APPEND itab.
         WRITE: / itab-status, itab-rtyp, itab-a_vertraege.
        ENDSELECT.
      ELSEIF radio4 ='X'.
       WRITE: / 'Radiobutton4: Anzahl GPartner je Status und RTyp'.
       WRITE: /.
        SELECT
               zstatus AS status
               zrtyp AS rtyp
               COUNT( DISTINCT partner ) AS a_partner
               INTO CORRESPONDING FIELDS OF itab
               FROM dimaiobpar
               WHERE
               insobject LIKE 'V%' AND
               partner IN partner AND
               zstatus IN astatus
               GROUP BY ZSTATUS zrtyp
               ORDER BY zstatus zrtyp.
          APPEND itab.
        WRITE: / itab-status, itab-rtyp, itab-a_partner.
        ENDSELECT.
      ELSE.
       WRITE / 'Radiobutton5: Anzahl Kunden nach Zahlweg'.
       WRITE /.
        SELECT
             zstatus AS status
             zrtyp AS rtyp
             ezawe_x AS zahlweg
             COUNT( DISTINCT partner ) AS a_partner
             INTO CORRESPONDING FIELDS OF itab
             FROM dimaiobpar
             WHERE
             insobject LIKE 'V%' AND
             partner IN partner AND
             zstatus IN astatus AND
             ezawe_x IN ('E', 'F', space)
             GROUP BY ZSTATUS zrtyp EZAWE_X
             ORDER BY zstatus zrtyp.
          APPEND itab.
         WRITE: / itab-status, itab-rtyp, itab-zahlweg, itab-a_partner
        ENDSELECT.
      ENDIF.
    APPEND itab.
    ENDFORM=

    Hi,
    Make itab into capital letters as below
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    it_fieldcat = feldkatalog_itab
    i_structure_name = 'ITAB'
    * it_events = event_itab
    TABLES
    t_outtab = itab[]
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    <b>Reward for helpful answers</b>

Maybe you are looking for