Update SAP tables after ALV report is displayed

Hi All,
I have to display a ALV report using function module REUSE_ALV_GRID_DISPLAY.
After the report is displayed, user can edit some of the flds in the report, and the fields need to updated in the table. How do I proceed to accomplish this.
Is it possible to use FM 'REUSE_ALV_DRID_DISPLAY' to do this or we need to use OOPS ALV to do this. 
I searched for this in this forum, but couldnt get.
Thanks in advance,
Ananth

You can use the REUSE_ALV_GRID_DISPLAY. and can make it a changable. You can specify the column to be changable. Once the user enters data into that coloumn the interna table automatically gets populated with the values.
I have done a similar program. However you might need to copy some standard GUI status based on your requirements.
Whats ur mail ID. I can send you the program I have developed.
Shreekant

Similar Messages

  • After ALV Report i need to display the text below that

    Hi Experts,
    I need a help.
    I want to display a write statment after alv report is generated.pls help me.
    Please Urgent.

    here is an example
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE' 
                i_callback_html_end_of_list = 'END_OF_LIST_HTML'
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    *&      Form  end_of_list_html
          output at the end of the list - not in printed output       *
    FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
      DATA: ls_text TYPE sdydo_text_element,
            l_grid     TYPE REF TO cl_gui_alv_grid,
            f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
      ls_text = 'Footer title'.
    adds and icon (red triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'ICON_MESSAGE_ERROR_SMALL'.
    adds test (via variable)
      CALL METHOD end->add_text
        EXPORTING
          text         = ls_text
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Bold text'
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Normal text'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Yellow triangle'
          sap_emphasis = 'strong'.
    adds and icon (yellow triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'ICON_LED_YELLOW'.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'More text'.
    *set height of this section
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = l_grid.
      CALL METHOD l_grid->parent->parent->(f)
        EXPORTING
          id     = 3
          height = 14.
    ENDFORM. "end_of_list_html.

  • Dynamic display of fields of table in ALV report.

    To display the records of a table in ALV report dynamically such that first 10 fields of the table should only be displayed excluding 'mandt' field .
    That is field no 2nd to 11th should be displayed.

    parameters: p_vari type slis_vari.
    at selection-screen on value-request for p_vari.
      perform alv_variant_f4 changing p_vari.
    form alv_variant_f4 changing l_vari type slis_vari.
    On F4 for layout selection - Get laouts created to this report.
      data: l_variant type disvariant.
      l_variant-report   = sy-repid.
      l_variant-username = sy-uname.
      call function 'REUSE_ALV_VARIANT_F4'
        exporting
          is_variant = l_variant
          i_save     = 'A'
        importing
          es_variant = l_variant
        exceptions
          others     = 1.
      if sy-subrc = 0.
        l_vari = l_variant-variant.
      endif.
    Create a structure
    data: wa_layout type disvariant.
    fill up the layout with selected fields.
    wa_layout-report = sy-repid.
    wa_layout-username = sy-uname " Choose this if you want user specific
    wa_layout-variant = p_vari.
    Assign the same to the REUSE_ALV_GRID_DISPLAY
    it is a import paramter  IS_VARIANT = wa_layout.
    All you have to do is first execute the report and save layouts what exactly you want
    and then next time you run the report you will get a chance to select the layout of your own.
    or
    You can get rid of MANDT field from fieldcatalog and internal table by creating a new
    structure. I mean, if you know you always want to display the field from 2 to 11 then simply
    delete the field from fieldcatalog.
    You can assign to different field catalog using Field symbols and change your internal
    table as well since you have created a dynamic internal table.
    Let me know if you need more.

  • ALV report which displays Delivery and Invoice details..by linking vbfa.

    Hi...
    I wants to develop an ALV Report, which displays Delivery details as well as Invoice details for a range of given sale orders.
    For this report I am using Tables : VBAK,VBAP,LIKP,LIPS,VBFA tables .
    Here VBFA is a table for Document flow how to link this with report ??
    Please reply.
    Regards ,
    ASHOK
    Moderator message : Not enough re-search before posting, spec dumping not allowed. Thread locked.
    Edited by: Vinod Kumar on Aug 1, 2011 9:58 AM

    VBFA has VBELV and POSNV can be used to map VBAP (sales order item) i.e.
    VBFA-VBELV = VBAP-VBELN AND
    VBFA-POSNV = VBAP-POSNV
    with VBTYP_N = J Values available in VBFA-VBELN and VBFA-POSNN will be LIPS -VBELN and LIPS-POSNR
    VBTYP_N/ VBTYP_V = J stands for delivery and C stands for order
    Nitesh

  • ALV Report to display the status of the requests raised through ESS

    Hi All,
    We have to develop a ALV report to display the status of the requests raised through ESS
    for Leave, Travel & Event Management, Travel and Appraisal workflows.
    ESS Travel, ESS TEM, ESS Apraisal workflows are associted with SAP Business Objects.
    we are using the function module SWI_WORKITEMS_OF_OBJTYPE_GET to get
    the top level work item id's by passing the object type like PDRELA_025, BUS2089.
    By using SWP_WORKFLOW_LOG_READ function we are getting the workflow log
    by passing top level work item id's as imort parameter. 
    The report output should have the following fields
    Initiator, Initiator Personal No, Request Type( Leave, Travel etc.. )
    Date of application of the request, Status ( Approved by RM, Rejected etc )
    Name of the Approver, Approved / Rejected Date.
    The logic should be work for all the above ESS workflows and should be generalized.
    Can any one please let me know the procedure to get the required information from the workflow log.
    It would be great if any one suggest on the same how to proceed further to get the information as mentioned above.
    Thanks & Regards,
    Jagadeeswara Rao Balla.

    Hello,
    You can get most of that information from fm SAP_WAPI_GET_HEADER, input is workitem_id.
    regards
    Rick Bakker
    Hanabi Technology

  • How to devolped an Interactive ALV Report to display sales orders

    hi,
             how to devolped an Interactive ALV Report to display sales orders pertaining to the selected Customers and item details in the secondary list.For this report what are the tables and fields wehave to used give with example.
    thank you
    radhakrishna

    Hi,
    look via se38 for BCALV* and SALV*.
    Try ABAPDOCU.
    Regards, Dieter

  • Question on updating a table based on report data

    Hi all,
    I am building a new stock request form for our site and I have a report that provides a listing of all requests that have a status of pending based on supv_approve flag being Null.
    I want to be able to update the table BGNA_NEW_STOCK_REQUESTS and set SUPV_APPROVE Flag to either Y or N depending on what the user sets as the value in the report. (by changing the standard report column to a text field and setting it to a named LOV with values Y or N, I can change each row in the displayed report to either be Y or N - but have yet to figure out how you then update the table with those values)
    Each row of the report has a unique ID - I just havent figured out how you update a table by chaging the values displayed in a report. I get that I can change the feild type from standard report column to text field but havent figured out how to get an update button to actually update the table once I changed the NULL value to Y or N
    any help is greatly appreciated!
    Edited by: user8607582 on Aug 10, 2009 1:51 PM
    Edited by: user8607582 on Aug 10, 2009 1:58 PM

    Hello Danny,
    Add a column to the sql that is something like this:
    select apex_item.checkbox(1,<keyfieldname> "Approved", (then the rest of your query for your report).
    This will put a check-box on your report. Move it to the beginning of the line for a better user-interface.
    When the user clicks the "Submit" button, ONLY those lines that have a check in the box are sent back. Create a process on your page that does the following:
    for i in 1..apex_application.g_f01.count Loop
    <do the processing of Approved transactions using this syntax for your update processing... where <keyfieldname> = apex_application.g_f01(i);
    <set all of the remaining as "N" if you wish or leave the supervisor's approval as NULL>
    end loop;
    This will then allow you process all of those items that were checked.
    I hope this helps,
    Don.
    You can reward this reply by marking it as either Helpful or Correct :)

  • Updating SAP  Table using JCO

    Dear All
                      How to update SAP Table (Any single or multiple tables) through Java code using JCO. Can any body provide sample code regarding this...
    Thanks&Regards
    mgreddy

    Hi,
    I think for that anyway you will have to use JCO as the middleware to connect to SAP R/3.
    So what you can to do is to write three RFCs and call them through JCO from your JAVA application.
    1. First BAPI for reading the dictionary information about an SAP table.
    2. Second to read data from the table.
    3. And, third to write data to that table.
    But if you want to edit any table (and not a specific table) then your program will become even more complex since then you will have to pass the table name and information dynamically to the BAPIs.
    Best regards,
    Guru.

  • Updating a table through ALV

    Hi all,
    I have one requirement.
    I need to display output using alv grid display.Next when somebody select the rows in the grid display and press a push button then the selected fields are updated in the ztable created.
    How can i achieve this.
    How to get a push button on the alv.
    how to update the the table with the selected rows.
    Please give some suggestions for this.
    Thanks to all in advance.

    CHk this program...
    U have to mention button names in PF-status creation
    REPORT  ZVA0T_PRCTR_FAL NO STANDARD PAGE HEADING MESSAGE-ID RA.
                              Modification Log                           *
    Program Name  : ZVA0T_PRCTR_FAL                                      *
    Author        : Suman K                                              *
    Date Written  : 04/27/2004                                           *
    Request #     : SAGK901471                                           *
    Requested by  : Torrence Roundtree                                   *
    Description   : This program is for maintainance of table            *
                    ZVA0T_PRCTR_FAL. The program has been copied from    *
                    custom program named ZSSVT_USR_TBL_MAINTENANCE and   *
                    done with essential changes to include table         *
                    ZVA0T_PRCTR_FAL and selection screen options. The    *
                    existing program documentation is as below           *
    Program Specifications:                                              *
    Mod date  Programmer        Reference    Description                 *
    *04/27/2005 Suman K           SAGK901471   Initial Development         *
    Type pools                                                           *
    TYPE-POOLS : slis.                     " Used for ALV display
    Tables
    TABLES: ZVA0T_PRCTR_FAL .              " LO43 Profit Center Listings
    Constants
    CONSTANTS:
    For authorization check for modifying Table Entries
      c_act_auth_01 LIKE tactz-actvt VALUE '01',
      c_act_auth_02 LIKE tactz-actvt VALUE '02',
      c_act_auth_06 LIKE tactz-actvt VALUE '06',
      c_table       LIKE dd02l-tabname VALUE 'ZVA0T_PRCTR_FAL',
                                           " Table name
      c_save        TYPE c VALUE 'A',      " Save
      c_chg(3)      TYPE c VALUE 'CHG',    " Change Group
      c_a           TYPE c VALUE 'A',      " Cancel Indicator
      c_ct(2)       TYPE c VALUE 'CT'.     " Style Name
    Work Variables declaration
    DATA:
      w_transaction_code LIKE tstc-tcode,  " Transaction Code
      w_variant          TYPE disvariant,  " Variant
      ok_code            LIKE sy-ucomm.    " OK Code
    Reference variables for the ALV grid control........................
    DATA:
      w_grid TYPE REF TO cl_gui_alv_grid,  " ALV Grid
      w_custom_container TYPE REF TO cl_gui_custom_container.
                                           " Reference to Container
    Variables used in User_command_0100
    DATA:
      w_confirm_ind    TYPE c,             " Deletion Indicator
      W_SUBRC          LIKE SY-SUBRC.      " Subrc
    Flag declaration
    DATA:
      fl_chng   TYPE c,                    " Flag
      fl_cancel TYPE c.                    " Flag
    Internal tables declaration
    To store the function codes.........................................
    DATA:
      BEGIN OF wa_fcode,
        fcode LIKE sy-ucomm,               " User Command
      END OF wa_fcode.
    Table for User Command
    DATA: t_fcode LIKE STANDARD TABLE OF wa_fcode.
    To store the data of ZVA0T_PRCTR_FAL table
    DATA:
      T_ZVA0T_PRCTR_FAL LIKE STANDARD TABLE
                          OF ZVA0T_PRCTR_FAL.
    Table used in User_command_0100
    DATA:
      t_selected_rows  TYPE lvc_t_row.     " Selected row information
    DATA:
      FS_SELECTED_ROWS LIKE LINE OF T_SELECTED_ROWS.
                                           " Work area for Selected Rows
    Selection screen elements
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-008.
    SELECT-OPTIONS:
      s_prctr FOR ZVA0T_PRCTR_FAL-leg_prctr.
                                           " Profit Center
    SELECTION-SCREEN: END OF BLOCK blk1.
    SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-009.
    PARAMETERS:
      p_varant  LIKE ltdx-variant.         " ALV variant
    SELECTION-SCREEN: END OF BLOCK blk2.
    Initialization
    INITIALIZATION.
    Authorization check for transaction code
      SELECT tcode
        FROM tstc
        INTO w_transaction_code
          UP TO 1 ROWS
       WHERE pgmna EQ sy-repid.
      ENDSELECT.
      IF sy-subrc EQ 0.
        AUTHORITY-CHECK OBJECT 'S_TCODE'
                     ID 'TCD' FIELD w_transaction_code.
        IF sy-subrc NE 0.
          MESSAGE e100 WITH text-e01 w_transaction_code.
        ENDIF.                             " IF SY-SUBRC NE 0
      ENDIF.                               " IF SY-SUBRC EQ 0
    At selection screen                                                 *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varant.
    to get the existing values for the display variant
      PERFORM f4_on_display_variant CHANGING p_varant.
    AT SELECTION-SCREEN ON p_varant.
    validates the diplay variant
      IF p_varant IS NOT INITIAL.
        PERFORM validate_variant.
      ENDIF.                               " IF P_VARANT IS NOT INITIAL
    Start Of Selection
    START-OF-SELECTION.
      CALL SCREEN 0100.
    *&      Form  f4_on_display_variant
    This subroutine is used to get the existing values for display variant
    The parameter passed to the subroutine is Variant parameter
    FORM f4_on_display_variant CHANGING p_varant TYPE any.
      DATA: lw_variant LIKE disvariant.    " Variant
      lw_variant-report   = sy-repid.
      lw_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = lw_variant
          i_save     = c_save
        IMPORTING
          es_variant = lw_variant
        EXCEPTIONS
          OTHERS     = 1.
      IF sy-subrc EQ 0.
        p_varant = lw_variant-variant.
      ELSE.
        MESSAGE s100 WITH text-012.
      ENDIF.                               " IF SY-SUBRC EQ 0
    ENDFORM.                               " F4_ON_DISPLAY_VARIANT
    *&      Form  validate_variant
    This subroutine validates the variant entered onthe selection screen
    There are no interface parameters to be passed to the subroutine
    FORM validate_variant .
      CLEAR w_variant.
      w_variant-report = sy-repid.
      MOVE p_varant TO w_variant-variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
        EXPORTING
          i_save        = c_save
        CHANGING
          cs_variant    = w_variant
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
      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 SY-SUBRC <> 0
    ENDFORM.                               " VALIDATE_VARIANT
    *&      Module  STATUS_0100  OUTPUT
    This is the PBO module for the ALV GRid dispaly
    MODULE status_0100 OUTPUT.
    Check the User authorizations and display the PF status accordingly
      PERFORM check_authorizations.
    Set the user status as per Authorizations
      SET PF-STATUS 'ZVA0T_PRCTR_FAL' EXCLUDING t_fcode.
      SET TITLEBAR 'ZVA0T_PRCTR_FAL'.
    Instantiate the container control and Grid control.
      IF w_custom_container IS INITIAL.
        CREATE OBJECT w_custom_container
           EXPORTING
              container_name = 'CUSTOM_CONTAINER'.
        CREATE OBJECT w_grid
           EXPORTING
             i_parent = w_custom_container.
      ENDIF.                               " IF W_CUSTOM_CONTAINER IS ...
    Clearing the work variables
      PERFORM intialize.
    Retrieve the table contents
      PERFORM get_data.
    Display the data in the ALV Grid control
      PERFORM display_data.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Form  check_authorizations
    This subroutine is used to check the user authorizations
    There are no interface parameters to be passed
    FORM check_authorizations .
      REFRESH t_fcode.
    Authorization check for Create entry
      AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
               ID 'ACTVT' FIELD c_act_auth_01
               ID 'TABLE' FIELD c_table.
      IF sy-subrc NE 0.
        PERFORM fillcode USING 'CREA'.
        PERFORM fillcode USING 'COPY'.
      ENDIF.                               " IF SY-SUBRC NE 0
    Authorization check for Change the entry
      AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
               ID 'ACTVT' FIELD c_act_auth_02
               ID 'TABLE' FIELD c_table.
      IF sy-subrc NE 0.
        PERFORM fillcode USING 'CHNG'.
      ENDIF.                               " IF SY-SUBRC NE 0
    Authorization check for Delete the entry
      AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
               ID 'ACTVT' FIELD c_act_auth_06
               ID 'TABLE' FIELD c_table.
      IF sy-subrc NE 0.
        PERFORM fillcode USING 'DELE'.
      ENDIF.                               " IF SY-SUBRC NE 0
    ENDFORM.                               " CHECK_AUTHORIZATIONS
    *&      Form  fillcode
    This subroutine is used to fill the function code in the table t_fcode
    The parameter that passed to this subroutine is function code
    FORM fillcode  USING    value(p_fcode) TYPE any.
      CLEAR wa_fcode.
      MOVE p_fcode TO wa_fcode-fcode.
      APPEND wa_fcode TO t_fcode.
    ENDFORM.                               " FILLCODE
    *&      Form  intialize
    This subroutine is used to initialize the work variables
    There are no interface parameters that need to be passed
    FORM intialize .
      CLEAR   t_ZVA0T_PRCTR_FAL.
      REFRESH t_ZVA0T_PRCTR_FAL.
    ENDFORM.                               " INITIALIZE
    *&      Form  get_data
    This subroutine is used to get data from the table
    There are no interfaces parameters that need to be passed
    FORM get_data .
    retrieve the status and codegroup from the table
      REFRESH t_ZVA0T_PRCTR_FAL.
      SELECT *
        FROM ZVA0T_PRCTR_FAL
        INTO TABLE t_ZVA0T_PRCTR_FAL
       WHERE leg_prctr IN s_prctr.
      IF sy-subrc NE 0.
      ENDIF.                               " IF SY-SUBRC NE 0
    ENDFORM.                               " GET_DATA
    *&      Form  display_data
    This subroutine is used to display the data in the ALV Grid control
    *There are no interface parameters that need to be passed to subroutine
    FORM display_data .
      DATA:
        w_grid_layout TYPE lvc_s_layo,     " Grid Layout
        LT_fieldcat   TYPE lvc_t_fcat.     " Field Catalog
      DATA:
        FS_FIELDCAT LIKE LINE OF LT_FIELDCAT.
    Filling the Layout
      w_grid_layout-grid_title = text-001.
      w_grid_layout-sel_mode   = c_save.
      w_grid_layout-stylefname = c_ct.
      w_grid_layout-cwidth_opt = 'X'.
    Filling the Variant structure
      w_variant-report   = sy-repid.
      w_variant-username = sy-uname.
      w_variant-variant  = p_varant.
    Filling the fieldcatalog.............................................
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = c_table
        CHANGING
          ct_fieldcat      = lt_fieldcat.
    To make the ALV list use the medium text label from DDIC
      LOOP AT lt_fieldcat INTO FS_FIELDCAT.
        MOVE 'M' TO fs_fieldcat-colddictxt.
        MODIFY lt_fieldcat FROM FS_FIELDCAT.
      ENDLOOP.                             " LOOP AT T_FIELDCAT
      CALL METHOD w_grid->set_table_for_first_display
        EXPORTING
          i_structure_name              = c_table
          is_variant                    = w_variant
          i_save                        = c_save
          is_layout                     = w_grid_layout
        CHANGING
          it_outtab                     = t_ZVA0T_PRCTR_FAL
          it_fieldcatalog               = lt_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      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.                               " IF SY-SUBRC NE 0
    ENDFORM.                               " DISPLAY_DATA
    *&      Module  USER_COMMAND_0100  INPUT
    This is the PAI module for the screen 100.
    MODULE user_command_0100 INPUT.
      REFRESH t_selected_rows.
      CLEAR   FS_SELECTED_ROWS.
      CLEAR fl_chng.
    Getting the selected rows
      CALL METHOD w_grid->get_selected_rows
        IMPORTING
          et_index_rows = t_selected_rows.
    If more than one record is selected, error message
      DESCRIBE TABLE t_selected_rows.
      IF sy-tfill GT 1
      AND SY-UCOMM NE 'REFR'
      AND SY-UCOMM NE 'CREA'
      AND SY-UCOMM NE 'DELE'.
        MESSAGE e048(zcsv_sfdr).
      ENDIF.                               " IF SY-TFILL GT 1
    Read the first record
      READ TABLE t_selected_rows INTO FS_SELECTED_ROWS INDEX 1.
      READ TABLE t_ZVA0T_PRCTR_FAL
            INTO ZVA0T_PRCTR_FAL INDEX fs_selected_rows-index.
      CLEAR W_SUBRC.
      W_SUBRC = SY-SUBRC.
      CASE ok_code.
        WHEN 'CREA'.
          CLEAR ZVA0T_PRCTR_FAL.
          CALL SCREEN 0200.
        WHEN 'COPY'.
          IF W_SUBRC EQ 0.
            IF t_selected_rows IS NOT INITIAL.
              CALL SCREEN 0200.
            ELSE.
              MESSAGE e100 WITH text-013.
            ENDIF.                         " IF T_SELECTED_ROWS IS NOT ...
          ELSE.
            MESSAGE e100 WITH text-014.
          ENDIF.                           " IF W_SUBRC EQ 0
        WHEN 'CHNG'.
          IF W_SUBRC EQ 0.
            MOVE 'X' TO fl_chng.
            IF t_selected_rows IS NOT INITIAL.
              CALL SCREEN 0200.
            ELSE.
              MESSAGE e100 WITH text-e04.
            ENDIF.                         " IF T_SELECTED_ROWS IS NOT ...
          ELSE.
            MESSAGE e100 WITH text-014.
          ENDIF.                           " IF W_SUBRC EQ 0
        WHEN 'DELE'.
          IF t_selected_rows IS NOT INITIAL.
            IF W_SUBRC EQ 0.
              CALL FUNCTION 'POPUP_TO_CONFIRM'
                EXPORTING
                  titlebar              = text-002
                  text_question         = text-003
                  text_button_1         = text-004
                  text_button_2         = text-005
                  default_button        = '1'
                  display_cancel_button = 'X'
                IMPORTING
                  answer                = w_confirm_ind.
              IF w_confirm_ind EQ '1'.
                LOOP AT T_SELECTED_ROWS INTO FS_SELECTED_ROWS.
                  CLEAR ZVA0T_PRCTR_FAL.
                  READ TABLE T_ZVA0T_PRCTR_FAL
                        INTO ZVA0T_PRCTR_FAL INDEX fs_selected_rows-index.
                  IF SY-SUBRC EQ 0.
                    DELETE ZVA0T_PRCTR_FAL.
                    IF sy-subrc NE 0.
                      W_SUBRC = 4.
                    ENDIF.                 " IF SY-SUBRC EQ 0
                  ENDIF.                   " IF SY-SUBRC EQ 0
                ENDLOOP.                   " LOOP AT T_SELECTED_ROWS ...
                IF W_SUBRC EQ 0.
                  MESSAGE s100 WITH text-010.
                ELSE.
                  MESSAGE   e100 WITH text-e03.
                ENDIF.                     " IF W_SUBRC EQ 0
              ELSEIF w_confirm_ind EQ '2'.
              ENDIF.                       " IF W_CONFIRM_IND EQ '1'
            ELSE.
              MESSAGE e100 WITH text-014.
            ENDIF.                         " IF W_SUBRC EQ 0
          ELSE.
            MESSAGE e100 WITH text-e05.
          ENDIF.                           " IF T_SELECTED_ROWS IS NOT ...
        WHEN 'BACK'.
          SET SCREEN 0.
          LEAVE SCREEN.
        WHEN 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.                             " CASE OK_CODE
      CLEAR ok_code.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Module  exit  INPUT
    This subroutine is used to leave the current screen
    MODULE exit INPUT.
      CALL METHOD w_custom_container->free.
      CALL METHOD cl_gui_cfw=>flush.
      SET SCREEN 0.
      LEAVE SCREEN.
    ENDMODULE.                             " EXIT  INPUT
    *&      Module  STATUS_0200  OUTPUT
    This module is used to set the PF Status of the modify screen
    MODULE status_0200 OUTPUT.
      SET PF-STATUS 'STATUS_200'.
    ENDMODULE.                             " STATUS_0200  OUTPUT
    *&      Module  modify_0200  OUTPUT
    This module is used to print the values on the screen
    MODULE modify_0200 OUTPUT.
      IF NOT fl_chng IS INITIAL.
        LOOP AT SCREEN.
          IF screen-group1 EQ c_chg.
            screen-required = '0'.
            screen-output   = '1'.
            screen-input    = '0'.
            MODIFY SCREEN.
          ENDIF. 
        ENDLOOP.                           " LOOP AT SCREEN
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 EQ c_chg.
            screen-required = '1'.
            screen-output   = '1'.
            screen-input    = '1'.
            MODIFY SCREEN.
          ENDIF. 
        ENDLOOP.                           " LOOP AT SCREEN
      ENDIF.                               " IF NOT FL_CHNG IS INITIAL
    ENDMODULE.                             " MODIFY_0200  OUTPUT
    *&      Module  exit_0200  INPUT
    This module is used to exit from the screen on pressing exit button
    MODULE exit_0200 INPUT.
      IF sy-datar IS INITIAL
      AND fl_cancel IS INITIAL.
        CLEAR fl_chng.
        LEAVE PROGRAM.
      ELSE.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            titlebar              = text-011
            text_question         = text-006
            text_button_1         = text-004
            text_button_2         = text-005
            default_button        = '1'
            display_cancel_button = 'X'
          IMPORTING
            answer                = w_confirm_ind.
        CASE w_confirm_ind.
          WHEN '1'.
            sy-ucomm = 'SAVE'.
            CLEAR fl_cancel.
          WHEN '2'.
            CLEAR fl_chng.
            CLEAR fl_cancel.
            LEAVE PROGRAM.
          WHEN c_a.
            fl_cancel = 'X'.
        ENDCASE.                           " CASE W_CONFIRM_IND
      ENDIF.                               " IF SY-DATAR IS INITIAL
    ENDMODULE.                             " EXIT_0200  INPUT
    *&      Module  USER_COMMAND_0200  INPUT
    This module is used to update the database table with the user values
    MODULE user_command_0200 INPUT.
      IF sy-ucomm EQ 'SAVE'.
        PERFORM SAVE.
      ELSEIF SY-UCOMM EQ 'BACK'.
        PERFORM BACK_CANCEL.
        IF SY-UCOMM EQ 'SAVE'.
          PERFORM SAVE.                    " IF SY-UCOMM EQ 'SAVE'
        ENDIF.
      ELSEIF SY-UCOMM EQ 'CANC'.
        PERFORM BACK_CANCEL.
        IF SY-UCOMM EQ 'SAVE'.
          PERFORM SAVE.                    " IF SY-UCOMM EQ 'SAVE'
        ENDIF.
      ELSEIF SY-UCOMM EQ 'ENTE'.
        fl_cancel = 'X'.
      ENDIF.                               " IF SY-UCOMM EQ 'SAVE'
    ENDMODULE.                             " USER_COMMAND_0200  INPUT
    *&      Form  BACK_CANCEL
    This subroutine provides functionality for BACK & CANCEL
    form BACK_CANCEL .
      IF sy-datar IS INITIAL
      AND fl_cancel IS INITIAL.
        CLEAR fl_chng.
        SET SCREEN 0.
        LEAVE SCREEN.
      ELSE.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            titlebar              = text-011
            text_question         = text-006
            text_button_1         = text-004
            text_button_2         = text-005
            default_button        = '1'
            display_cancel_button = 'X'
          IMPORTING
            answer                = w_confirm_ind.
        CASE w_confirm_ind.
          WHEN '1'.
            sy-ucomm = 'SAVE'.
            CLEAR fl_cancel.
          WHEN '2'.
            CLEAR fl_chng.
            CLEAR fl_cancel.
            SET SCREEN 0.
            LEAVE SCREEN.
          WHEN 'A'.
            fl_cancel = 'X'.
        ENDCASE.                           " CASE W_CONFIRM_IND
      ENDIF.                               " IF SY-DATAR IS INITIAL
    endform.                               " BACK_CANCEL
    *&      Form  SAVE
    This subroutine provides functionality for SAVE
    form SAVE .
        MOVE:
          SY-DATUM TO ZVA0T_PRCTR_FAL-erdat,
          SY-UZEIT TO ZVA0T_PRCTR_FAL-erzet,
          SY-UNAME TO ZVA0T_PRCTR_FAL-ernam.
        IF fl_chng IS INITIAL.
          INSERT ZVA0T_PRCTR_FAL.
          IF sy-subrc EQ 0.
            MESSAGE s100 WITH text-010.
          ELSE.
            MESSAGE e100 WITH text-e03.
          ENDIF.                           " IF SY-SUBRC EQ 0
        ELSE.
          MODIFY ZVA0T_PRCTR_FAL.
          IF sy-subrc EQ 0.
            MESSAGE s100 WITH text-010.
          ELSE.
            MESSAGE e100 WITH text-e03.
          ENDIF.                           " IF SY-SUBRC EQ 0
          CLEAR t_ZVA0T_PRCTR_FAL.
        ENDIF.                             " IF FL_CHNG IS INITIAL
        SET SCREEN 0.
        LEAVE SCREEN.
    endform.                               " SAVE
    Reward if helpful...

  • Problem to connect SAP tables with Crystal report 2011

    Hi,
    I am new in Crystal report,
    I Install CR 2011 in my PC now when I make a new connection under path FIle->New->Blank Report I choose SAP Table,Cluster or Function
    here I give Clint,User and Password and try to connect then following msg will display 
    Logon Failed.
    Details: You do not have necessary rights to design report against the SAP system . Please check with your System Administrator.

    Hi,
    Step 1:After Clicking SAP BW Query, you need to goto SAP tab from the context menu and click on
    Step 2: Create New Report from a Query
    Step 3: Click on OLAP tab, Here you can select your Cube and select SAP Business Information Warehouse
    Step 4: Go back to SAP tab and click on Start BW Query Designer(this allows selection of the cube from the Query designer Interface)
    You will understand automatically about further steps once you are able to follow the above steps............
    Regards,
    Suman

  • How can i exceed the sap screen in ALV report.

    hi sap Gurus,
    i need solution from you regarding to increase the SAP screen in ALV customised report.
    now what we are getting the problem is:
    we developed the report, in that lot of fields are there.
    because of that the fields are going in second line.
    but actually the max length is showing in SAP is :X_65_255.
    Please give me the solution to increase the screen.
    Regards,
    SOMU.

    Hi,
    The standard screen which is displayed once u execute it not possible to change, but can follow one guide line.. by reducing the feild discrption( columns) on the report .
    Eg : sold to part can be changed to SP or someother conversion which user understands. ( Before this user confirmation should be taken for this change)
    Kindly Reward points if usefull
    Regards
    vK

  • Strange issue in updating custom table after upgrade ECC6.0! Please help!

    Hello everyone:
        I have some code (shown below) that deletes and updates some SAP tables and one custom table:
        DELETE T5UBV   FROM TABLE DEL_T5UBV.
      DELETE ZCHRZIP FROM TABLE DEL_ZCHRZIP.
      MODIFY ZCHRZIP FROM TABLE WRITE_ZCHRZIP.
      MODIFY T5UBV   FROM TABLE WRITE_T5UBV.
    COMMIT WORK.
    For SAP table the code above works fine but for custom table it overrides all exisiting data! It should keep some existing data in custom table ZCHRZIP and append any extra data from internal table WRITE_ZCHRZIP. This functions as designed if I run in fore ground but in background it just overrides instead of modifying and appending! This is happening only after upgrade ECC6.0. Any thoughts? Please let me know.
    Thanks.
    Mithun

    Mithun,
    Comment below code
    DELETE ZCHRZIP FROM TABLE DEL_ZCHRZIP.
    <b>Reward if it helps,</b>
    Satish

  • Updating SAP table field directly?

    Hi all,
    The client is using SAP for 2-3 years and this will be replaced by new SAP system ( same version - 4.6c) in few months.
    So as to get data from old system we are doiong conversion right now. In this client, PO creator name is very important and it drives so many things. When we will do conversion and convert old PO into the PO in the new system, the username ( created by) will be "batch user".
    Client somehow want to retain the username, the original username of old POs.
    For this, they are asking to update the EKKO-ERNAM field directly once the new POs are created ( we will have old PO - new PO mapping and user name).
    In my view, it is not advisable to update the SAP standard table directly. But i want the opinion from you guys that what are the implications of updating field directly. Is it advisable? Is there any other way to meet this requirement?
    Thanks,
    Pratik

    Hi palaniappan,
    1. Good question and good concern !
    2. Your concern is absolytely correct.
    3. Sap does not advise to
       update SAP standard tables directly
       thru any z program
      (It may stop support in future)
    4. But for your requirement,
       it the po user will be "batch user",
       then
       thru some Z program,
       u may do so.
    5. BUT
       Please take care that
       a) u have signed specifications of this logic
          and concern from the FUNCTIONAL CONSULTANT !
         (only after that one should do)
    regards,
    amit m.

  • Updation of table after Print and Print-Preview in smartform

    Hi,
    I am having a requirement where i need to print multiple deliveries with the sales order data each delivery on a new page using smartform.
    Now , i am using SSF_OPEN, SSF_CLOSE Fm's for the same. I need to update a Z table after the user clicks on PRINT from the pop-up or print from the print preview screen.
    I tried using the output_info parameter in the smartform where i read from a post that the OUTPUTDONE parameter becomes "X" in the job_output_info when the user clicks print wither in the two ways said before.
    This does not work out in case if the FM'S SSF_OPEN and SSF_CLOSE are used.
    Kindly help me on the same.
    Thanks in advance

    yes i tried that..using the AT new event for a Delivery and then a command to go to the NEW PAGE, but somehow when i execuet the form, i could not see the layout..so in the debug i saw the subrc after the FM is run..it says SUBRC = 2 i.e. internal error. I am not able to figure that out.
    So i had to use these open and close, nowi just want to update a z table if the user clicks on the print button (print preview screen) after using the print preview .
    Kindly suggest.
    Thanks.

  • Alv report colour display

    hi
    i have a requirment in my alv report ,i need to show values of material description i.e  only gsm values in different colour i. 296 GSM and corresponding below values 285 GSM,.below show is sample output onf my alv report.
    materialno                              material deccription
                              GB CPB HWC 296 GSM 055.000 X 092.000
                              GB CPB HWC 296 GSM 082.000 X 117.000
                              GB CPB HWC 285 GSM 045.200 X 070.500
                              GB CPB HWC 285 GSM 045.200 X 070.500
                              GBCPB HWC 285 GSM 045.200 X 070.500
                              GB CPB HWC 285 GSM 045.200 X 070.500

    Hi
    i am sending you a code where i had colored one field
    you can refer this program and you can understand very well where exactly what we have to do for colors
    reward if usefull
    REPORT zalv_with_colored_fields  .
    TYPE-POOLS : slis.
    DATA : BEGIN OF it_final1 OCCURS 0,
             carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
             cityfrom TYPE spfli-cityfrom,
             cityto TYPE spfli-cityto,
             cellcolors TYPE lvc_t_scol,
             END OF it_final1 .
    DATA : BEGIN OF it_final OCCURS 0,
             carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
             cityfrom TYPE spfli-cityfrom,
             cityto TYPE spfli-cityto,
             END OF it_final .
    DATA : git_cellcolors TYPE TABLE OF lvc_s_scol,
           gwa_color    TYPE lvc_s_scol,
           layout       TYPE slis_layout_alv.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
           wa_fieldcat LIKE LINE OF it_fieldcat.
    START-OF-SELECTION .
      SELECT carrid connid cityfrom cityto FROM spfli INTO TABLE it_final .
      wa_fieldcat-col_pos   = '0'.
      wa_fieldcat-tabname   = 'IT_FINAL' .
      wa_fieldcat-fieldname = 'CARRID' .
      wa_fieldcat-seltext_m = 'Carrier ID'(001) .
      APPEND wa_fieldcat TO it_fieldcat .
      wa_fieldcat-col_pos   = '1'.
      wa_fieldcat-tabname   = 'IT_FINAL' .
      wa_fieldcat-fieldname = 'CONNID' .
      wa_fieldcat-seltext_m = 'Flight Connection Number'(002) .
      APPEND wa_fieldcat TO it_fieldcat .
      wa_fieldcat-col_pos   = '2'.
      wa_fieldcat-tabname   = 'IT_FINAL' .
      wa_fieldcat-fieldname = 'CITYFROM' .
      wa_fieldcat-seltext_m = 'City from'(003) .
      APPEND wa_fieldcat TO it_fieldcat .
      wa_fieldcat-col_pos   = '3'.
      wa_fieldcat-tabname   = 'IT_FINAL' .
      wa_fieldcat-fieldname = 'CITYTO' .
      wa_fieldcat-seltext_m = 'City to'(004) .
      APPEND wa_fieldcat TO it_fieldcat .
      LOOP AT it_final .
        it_final1-carrid   = it_final-carrid.
        it_final1-connid   = it_final-connid.
        it_final1-cityfrom = it_final-cityfrom.
        it_final1-cityto   = it_final-cityto.
        CLEAR gwa_color.
      <b>  IF it_final-carrid    = 'AA' .
          gwa_color-fname     = 'CARRID'.
          gwa_color-nokeycol  = '1'.
         gwa_color-color-col = '6'.
          gwa_color-color-int = '1'.</b>
          APPEND gwa_color TO git_cellcolors.
          it_final1-cellcolors = git_cellcolors.
        ENDIF.
        IF it_final-carrid    = 'AZ' .
          gwa_color-fname     = 'CARRID'.
         gwa_color-nokeycol  = '1'.
          gwa_color-color-col = '5'.
          gwa_color-color-int = '1'.
          APPEND gwa_color TO git_cellcolors.
          it_final1-cellcolors = git_cellcolors.
        ENDIF.</b>
        REFRESH git_cellcolors.
        APPEND it_final1.
        CLEAR : it_final , it_final1 .
      ENDLOOP.
      layout-coltab_fieldname = 'CELLCOLORS'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          is_layout   = layout
          it_fieldcat = it_fieldcat
        TABLES
          t_outtab    = it_final1.

Maybe you are looking for

  • HP Officejet Pro L7680 All-in-one Printer - Failure to access update.

    I cannot access the update for my printer. I have upgraded to  Windows 7 32-bit. I keep receiving the error message:  could not connect to Content URL/Default Content.  Can someone please help me by telling me what to do?  I am having no other issues

  • How to change status of Campaign

    Hi I have writtend following code to change the status of the campaign Data : lit_status_comt TYPE crmt_status_comt, wa_status_comt LIKE LINE OF lit_status_comt, lit_field_names TYPE crmt_input_field_names_tab, wa_input_field_names LIKE LINE OF lit_f

  • Does the Apple Iphone A1429 work in South Africa

    I heard there are two iphone 5 models a A1428 and A1429., someone is sending me the iphone 5 A1429 model, does this iphone work with south african networks

  • Error in compiling an entity object

    I am new to OAF. I am trying to create a page. I created a new workspace, two projects, In one project an entity object and in the 2nd project created a view object based on the entity object and an application module. I am getting some error when I

  • Help! please! digital-in not working in vista with xfi ga

    I just bought a digital I/O module for my Xfi Gamer card. I was using the youppax driver set. I am not getting any sound from the Digital in on the card. Also the digital I/O selection is greyed out in my control panel. Does anyone know how to get th