Need To Add One Button in The Output

Hi Freinds,
can any one tell how to add one button in the application
tool bar, that is at the final ALV out put screen

Hi,
you just create a pf status and add buttons to it.
then you include that pfstatus in your function module in the
export parameter 'i_callback_pf_status_set'
i found this sample code somewhere you just see how this is done:
create one pfstatus. for example znewstatus is the created
pfstatus. double click on the pfstatus that was created then add the buttons that you require in the appilication tool bar.
pass the form names to the I_CALLBACK_PF_STATUS_SET and I_CALLBACK_USER_COMMAND in grid as shown below.
example for reference:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
FORM SET_PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'ZNEWSTATUS'.
ENDFORM.
FORM USER_COMMAND USING R_UCOM TYPE SY-UCOMM R_SELFIELD TYPE SLIS_SELFIELD.
case R_UCOM
when 'PRINT'. (print is the function code name given to the icon created)
leave to list-processing.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = pass the form name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FMNAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION FMNAME.
reward if useful.
Nishant Rana

Similar Messages

  • Wan to add push button in the output of ALV Grid display.

    Hi Friends,
    I wan to add a Push button in the output of ALV GRID display with STANDARD ikons.
    How to copy standard ikons of GRID output.
    How to apply the copied status into my code.
    Regards,
    Viji

    Hi,
    Goto SE41, create a pf-status for your alv report program.
    On the next screen, click menu EXTRAS --> click option ADJUST TEMPLATES and select radiobutton LIST VIEWER --> you will get all standard buttons of alv in the pf-status.
    Delete the unwanted buttons and also you can add new buttons if reqd.
    Activate pf-status --> and apply in alv program.
    Now to apply this pf-status in your alv report follow code:-
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
         it_sort                           = it_sort        " sort info
        TABLES
          t_outtab                          = it_final      " internal table
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *&      Form  pf
    *       SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
    *       ON WHICH THE ALV GRID IS DISPLAYED
    *       -->RT_EXTAB
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTG_STAT'. "<--pass pf-status name here
    ENDFORM.                    "pf
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
        WHEN '<function_code>'. "<--to handle user actions
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Hope this helps you.
    Regards,
    Tarun

  • How to add One Button to the Table Header.

    Hi,
    I would like to have few Table Header columns as Button and Other Table Header Columns as String. And each Button should have separate action. Please let me know, how can i implement this one.
    Thanks
    Mohan

    do not cross post, this is a bad habit. now do you know about www.google.com. well this is a search engine, learn how to use it before you post. i got this link with this keyword search.
    http://www.exampledepot.com/egs/javax.swing.table/pkg.html
    http://forum.java.sun.com/thread.jspa?threadID=560605&tstart=15
    hope this helps you
    regards
    Aniruddha

  • How to add a button to the toolbar of standard transaction

    hi friends
    currently i am working in IS-OIL(DS)-TSW module, in which we need to add a button to the toolbar of standard transaction(O4nm)
    can anybody help me how to proceed with this
    with regards
    s.janagar

    Hi,
    To be able to add a button to the toolbar of a standard transaction, you can use GuiXT which is a bundled solution within SAP R/3 or Netweaver.  With GuiXT, you can create your own pushbuttons within an R/3 screen or within the toolbar. You can make both the menu functions and the navigation to other transactions directly accessible with your own pushbuttons along with a new icon that you wanted to assign to the pushbuttons.
    Also, you can customize the pushbutton's size effortlessly.  And in your situation of adding it to the toolbar, GuiXT can help to set your pushbuttons automatically to fit onto the toolbar with its designer tool.
    For more information about front end changes, you can view more information about GuiXT at http://www.guixt.com/site/solutions.php
    Thank you and hope this helps!

  • How to find end of the Page in Crystal ? or I need to add one Horizontal line at the end of the page.--- URGENT HELP NEEDED

    Hi friends,
    I need to add one horizontal line  for the detail section at the end of the page.
    I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming.
    Is there any feature to find end of the Page.
    I want report format like this.
    set id  |  set name |  date  Name
      1         x           dddd   vijay
                            dddd   sarathi
                            dddd    reddy
    (End of the page)
    Thanks in advance...
    vijay.

    Do you know how many detail records are showing up per page?
    If you do - you could create a Details B section that is suppressed except for on Record N (where N is a counter, and N is the last Detail record that will show up on a page).
    The Page footer is indeed built so that it will be rendered at the bottom of your physical page of paper.

  • Need to Add a button in ALV Tool Bar

    Hi,
    I have a requirement where in i need to add a button to a standard ALV report. Its using the class CL_GUI_ALV_GRID. There is a Badi for the report. The Report is co05n and the Badi is WORKORDER_INFOSYSTEM . I am getting the handle of
    CL_GUI_ALV_GRID object reference before screen display. Any guidance on how to add new button now to that toolbar?
    Any help will be rewarded.
    Thank you.
    regards,
    Deepthi lakshmi.A.

    Dear Deepthi Lakshmi.A.,
    Refer the standard program BCALV_GRID_05                  Add a Self-Defined Button to the Toolbar.
    PROGRAM BCALV_GRID_05.
    Purpose:
    ~~~~~~~~
    Demonstrate the creation of an own toolbar button.
    To check program behavior
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    The report shows a list of flights of one airline.
    Select one or more lines and press the 'Detail'-Button to popup
    a dialog window with related bookings.
    Essential steps (Search for '§')
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1.Apply steps for event handling for events TOOLBAR and
      USER_COMMAND (see example for print events)
    2.In event handler method for event TOOLBAR: Append own functions
      by using event parameter E_OBJECT.
    3.In event handler method for event USER_COMMAND: Query your
      function codes defined in step 2 and react accordingly.
    4.Call method 'set_toolbar_interactive' to raise event TOOLBAR.
    INCLUDE .
    Predefine a local class for event handling to allow the
    declaration of a reference variable before the class is defined.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    DATA: ok_code LIKE sy-ucomm,
          gt_sflight TYPE TABLE OF sflight,
          gt_sbook TYPE TABLE OF sbook,
          g_repid LIKE sy-repid,
          g_max type i value 100,
          gs_layout   TYPE lvc_s_layo,
          cont_on_main   TYPE scrfname VALUE 'BCALVC_TOOLBAR_D100_C1',
          cont_on_dialog TYPE scrfname VALUE 'BCALVC_TOOLBAR_D101_C1',
          grid1  TYPE REF TO cl_gui_alv_grid,
          grid2  TYPE REF TO cl_gui_alv_grid,
          custom_container1 TYPE REF TO cl_gui_custom_container,
          custom_container2 TYPE REF TO cl_gui_custom_container,
          event_receiver TYPE REF TO lcl_event_receiver.
    Set initial dynpro
    SET SCREEN 100.
    LOCAL CLASSES: Definition
    *===============================================================
    class lcl_event_receiver: local class to
                            define and handle own functions.
    Definition:
    ~~~~~~~~~~~
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
        handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive,
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm.
      PRIVATE SECTION.
    ENDCLASS.
    lcl_event_receiver (Definition)
    *===============================================================
    LOCAL CLASSES: Implementation
    *===============================================================
    class lcl_event_receiver (Implementation)
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_toolbar.
    § 2.In event handler method for event TOOLBAR: Append own functions
      by using event parameter E_OBJECT.
        DATA: ls_toolbar  TYPE stb_button.
    E_OBJECT of event TOOLBAR is of type REF TO CL_ALV_EVENT_TOOLBAR_SET.
    This class has got one attribute, namly MT_TOOLBAR, which
    is a table of type TTB_BUTTON. One line of this table is
    defined by the Structure STB_BUTTON (see data deklaration above).
    A remark to the flag E_INTERACTIVE:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            'e_interactive' is set, if this event is raised due to
            the call of 'set_toolbar_interactive' by the user.
            You can distinguish this way if the event was raised
            by yourself or by ALV
            (e.g. in method 'refresh_table_display').
            An application of this feature is still unknown...
    append a separator to normal toolbar
        CLEAR ls_toolbar.
        MOVE 3 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to show booking table
        CLEAR ls_toolbar.
        MOVE 'BOOKINGS' TO ls_toolbar-function.
        MOVE icon_employee TO ls_toolbar-icon.
        MOVE 'Show Bookings'(111) TO ls_toolbar-quickinfo.
        MOVE 'Detail'(112) TO ls_toolbar-text.
        MOVE ' ' TO ls_toolbar-disabled.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.
      METHOD handle_user_command.
    § 3.In event handler method for event USER_COMMAND: Query your
      function codes defined in step 2 and react accordingly.
        DATA: lt_rows TYPE lvc_t_row.
        CASE e_ucomm.
          WHEN 'BOOKINGS'.
            CALL METHOD grid1->get_selected_rows
                     IMPORTING et_index_rows = lt_rows.
            CALL METHOD cl_gui_cfw=>flush.
            IF sy-subrc ne 0.
    add your handling, for example
              CALL FUNCTION 'POPUP_TO_INFORM'
                   EXPORTING
                        titel = g_repid
                        txt2  = sy-subrc
                        txt1  = 'Error in Flush'(500).
            else.
                      perform show_booking_table tables lt_rows.
            ENDIF.
        ENDCASE.
      ENDMETHOD.                           "handle_user_command
    ENDCLASS.
    lcl_event_receiver (Implementation)
    *===================================================================
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    The instance grid2 is freed not until the program exits from the
    main screen.
    (It is created only once during the first selection of SBOOK,
    no matter how many times the second window is called).
      CALL METHOD custom_container1->free.
      IF not custom_container2 is initial.
        CALL METHOD custom_container2->free.
      ENDIF.
      CALL METHOD cl_gui_cfw=>flush.
      IF sy-subrc ne 0.
    add your handling, for example
        CALL FUNCTION 'POPUP_TO_INFORM'
             EXPORTING
                  titel = g_repid
                  txt2  = sy-subrc
                  txt1  = 'Error in Flush'(500).
      ENDIF.
      LEAVE PROGRAM.
    ENDFORM.
    *&      Module  PBO_100  OUTPUT
          text
    MODULE pbo_100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      g_repid = sy-repid.
      IF custom_container1 is initial.
    select data from table SFLIGHT
        PERFORM select_table_sflight CHANGING gt_sflight.
    create a custom container control for our ALV Control
        CREATE OBJECT custom_container1
            EXPORTING
                container_name = cont_on_main
            EXCEPTIONS
                cntl_error = 1
                cntl_system_error = 2
                create_error = 3
                lifetime_error = 4
                lifetime_dynpro_dynpro_link = 5.
        IF sy-subrc ne 0.
    add your handling, for example
          CALL FUNCTION 'POPUP_TO_INFORM'
               EXPORTING
                    titel = g_repid
                    txt2  = sy-subrc
                    txt1  = 'The control could not be created'(510).
        ENDIF.
    create an instance of alv control
        CREATE OBJECT grid1
               EXPORTING i_parent = custom_container1.
    Set a titlebar for the grid control
        gs_layout-grid_title = 'Flights'(100).
    allow to select multiple lines
        gs_layout-sel_mode = 'A'.
        CALL METHOD grid1->set_table_for_first_display
             EXPORTING i_structure_name = 'SFLIGHT'
                       is_layout        = gs_layout
             CHANGING  it_outtab        = gt_sflight.
    ->Create Object to receive events and link them to handler methods.
    When the ALV Control raises the event for the specified instance
    the corresponding method is automatically called.
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_user_command FOR grid1.
        SET HANDLER event_receiver->handle_toolbar FOR grid1.
    § 4.Call method 'set_toolbar_interactive' to raise event TOOLBAR.
        CALL METHOD grid1->set_toolbar_interactive.
      ENDIF.                               "IF grid1 IS INITIAL
      CALL METHOD cl_gui_control=>set_focus EXPORTING control = grid1.
    ENDMODULE.                             " PBO_100  OUTPUT
    *&      Module  PAI_100  INPUT
          text
    MODULE pai_100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                             " PAI_100  INPUT
    *&      Module  PBO_0101  OUTPUT
          text
    MODULE pbo_0101 OUTPUT.
      IF custom_container2 is initial.
    (the data from sbook is already selected)
    create a custom container control for our ALV Control
        CREATE OBJECT custom_container2
            EXPORTING
                container_name = cont_on_dialog
            EXCEPTIONS
                cntl_error = 1
                cntl_system_error = 2
                create_error = 3
                lifetime_error = 4
                lifetime_dynpro_dynpro_link = 5.
        IF sy-subrc ne 0.
    add your handling, for example
          CALL FUNCTION 'POPUP_TO_INFORM'
               EXPORTING
                    titel = g_repid
                    txt2  = sy-subrc
                    txt1  = 'The control could not be created'(510).
        ENDIF.
    create an instance of alv control
        CREATE OBJECT grid2
               EXPORTING i_parent = custom_container2.
    change title
        gs_layout-grid_title = 'Bookings'(101).
        gs_layout-sel_mode = ' '.
        CALL METHOD grid2->set_table_for_first_display
             EXPORTING i_structure_name = 'SBOOK'
                       is_layout        = gs_layout
             CHANGING  it_outtab        = gt_sbook.
      ELSE.
        CALL METHOD grid2->refresh_table_display.
      ENDIF.                               "IF custom_container2 IS INITIAL.
      CALL METHOD cl_gui_control=>set_focus EXPORTING control = grid2.
      CALL METHOD cl_gui_cfw=>flush.
      IF sy-subrc ne 0.
    add your handling, for example
        CALL FUNCTION 'POPUP_TO_INFORM'
             EXPORTING
                  titel = g_repid
                  txt2  = sy-subrc
                  txt1  = 'Error in Flush'(500).
      ENDIF.
    ENDMODULE.                             " PBO_0101  OUTPUT
    *&      Form  SELECT_TABLE_SFLIGHT
          text
         <--P_GT_SFLIGHT  text
    FORM select_table_sflight CHANGING p_gt_sflight LIKE gt_sflight[].
      SELECT * FROM sflight INTO TABLE p_gt_sflight up to g_max rows.
    ENDFORM.                               " SELECT_TABLE_SFLIGHT
    *&      Form  SELECT_TABLE_SBOOK
          text
         -->P_LS_SFLIGHT  text
         <--P_GT_SBOOK  text
    FORM select_table_sbook USING    p_ls_sflight LIKE LINE OF gt_sflight
                            CHANGING p_gt_sbook LIKE gt_sbook[].
      DATA: lt_sbook LIKE gt_sbook[].
    Select data from sbook according to a line of sflight
    and append that data to table p_gt_sbook
      SELECT * FROM  sbook INTO TABLE lt_sbook
             WHERE  carrid  = p_ls_sflight-carrid
             AND    connid  = p_ls_sflight-connid
             AND    fldate  = p_ls_sflight-fldate.
      APPEND LINES OF lt_sbook TO p_gt_sbook.
    ENDFORM.                               " SELECT_TABLE_SBOOK
    *&      Module  PAI_0101  INPUT
          text
    MODULE pai_0101 INPUT.
      CASE ok_code.
        WHEN 'RETURN'.
          LEAVE TO SCREEN 0.
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                             " PAI_0101  INPUT
    *&      Form  show_booking_table
          text
         -->P_ET_INDEX_ROWS  text
    FORM show_booking_table TABLES p_et_index_rows
                                    STRUCTURE lvc_s_row.
      DATA: ls_selected_line LIKE lvc_s_row,
            lf_row_index TYPE lvc_index,
            ls_sflight LIKE LINE OF gt_sflight.
      CLEAR gt_sbook[].
      LOOP AT p_et_index_rows INTO ls_selected_line.
        lf_row_index = ls_selected_line-index.
    read selected row from internal table gt_sflight
        READ TABLE gt_sflight INDEX lf_row_index INTO ls_sflight.
    select corresponding lines of table sbook
    and append new lines to global table
        PERFORM select_table_sbook USING ls_sflight
                                   CHANGING gt_sbook.
      ENDLOOP.
    call dialog screen and display new alv control
      CALL SCREEN 101 STARTING AT 10 5.
    ENDFORM.                               " show_booking_table
    Regards,
    Naveen.

  • Add additional field in the output list

    Tcode(VL10G) .ie.out put list will not showing one new field.I want to add one more field to output list. field(VIKP-SDABW) In the SHP_VL10_ITEM and write the logic in the exit LV50R_VIEWG05----
    >USEREXIT_PREPARE_LAYOUT_FILL.Plase explain me step-by-step.It is very uggent?Please help me.
    Thanks & Regards,
    sairam

    Hi Sairam,
    Go through this info.
    /3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.      
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits•        Standard SAP functionality can be enhanced without modification to the standard code.
    •        Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    •        Find the appropriate Enhancement.
    •        Enter the ABAP code in the "Z" program within the function module.
    •        Create a project.
    •        Add the Enhancement to the project.
    •        Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    Detailed Steps
    1.    Tools   ABAP Workbench   Utilities   Enhancements   Definition   Utilities   List Enhancements
    2.    Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
    3.    Execute the search.
    Figure 1. Start Your Search for a Master Exit Here
    4.    Look through the list until you find the Enhancement for User exits: Customer Master Data.
    5.    Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
    6.    To continue, double-click on the function module EXIT_SAPMF02D_001
    7.    This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement (see Figure 2).
    Figure 2. The Tables That Are Available for the Enhancement
    8.      To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
    9.      Return to the Source Code tab.
    10.  Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written (see Figure 3).
    Figure 3. Your Program Will Begin After the Include Statement
    11.   Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
    12.   At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
    13.  Enter the following ABAP code into the program (Figure 4):
    User exit to ensure that all US customers have a group key
    entered on the customer master.
    if i_kna1-land1 = 'US' and
    i_kna1-brsch = ' '.
    message e001(F2).
    endif.
    Figure 4. The ABAP Code You Need to Enter
    14.   Note that the table name matches the table name in the import tab tables.
    15.   In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
    16.  Save the program.
    17.  The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools   ABAP Workbench   Utilities   Enhancements   Project Management.
    18.  Enter the project name; begin the name with a "Z."
    19.  Click on the Create button.
    Figure 5. Click on Create After You Type in the Project Name
    20.   Enter in a description for the project.
    21.   Click on the Enhancement Assignments button.
    22.   You will be prompted to save the enhancement. Click on Yes.
    23.   At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
    24.  Enter the name of the enhancement SAPMF02D (see Figure 6).
    Figure 6. Enter the Name of the Enhancement Here
    25.  Save the project.
    26.  Back out of the enhancement assignment.
    27.  Activate the project by hitting the Activate button.
    The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
    Configuring Business Transaction Events
    Basic Steps in Configuring an Event
    •        Make sure the application is active for Business Transaction Events.
    •        Copy the sample interface function module into a "Z" function module.
    •        Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
    •        Activate the function module.
    •        Assign the function module to the event, country and application.
    Example Business Scenario for Business Transaction Events
    Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
    To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
    1.      IMG Menu Path: Financial Accounting   Financial Accounting Global Settings   Use Business Transaction Events   Environment   Infosystem (Processes).
    2.      Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
    3.      Execute the search with the defaults.
    4.      Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution (see Figure 7).
    Figure 7. Find the Correct Interface for the Business Event
    5.      Put your cursor on the event and click on the Sample Function Module button.
    6.      You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding (see Figure 8).
    Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
    7.      Click on the Copy button.
    8.      Enter the "Z" function module name in the To Function Module field (see Figure 9).
    9.      Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to   Function Groups   Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
    Figure 9. Enter Your "Z" Function Module Name Here
    10.  In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
    11.  The system will default into the source code screen where you may enter your ABAP code.
    12.  Notice the tables available for the code. Additional tables may be declared if necessary.
    13.  Enter the following source code (see Figure 10):
    tables: lfa1.
    data: z_groupkey like lfa1-konzs.
    z_groupkey = ' '.
    loop at t_bseg.
    check for vendor lines. If one is found, read the vendor master and
    retrieve the group key field.
    if t_bseg-koart eq 'K'.
      select single konzs from lfa1 into z_groupkey
        where lifnr = t_bseg-lifnr.
    endif.
    Move the group key field into all line items allocation field.
    loop at t_bsegsub.
      t_bsegsub-zuonr = z_groupkey.
      modify t_bsegsub index sy-tabix.
    endloop. "t_bsegsub
    endloop. "t_bseg
    Figure 10. The Screen Where You Enter Your Source Code
    14.  Save the function module.
    15.  Back out to the main Function Builder screen by clicking on the green arrow button.
    16.  Activate the function module by clicking on the Activate button (see Figure 11).
    Figure 11. Activate the Function Module from This Screen
    17.  Assign the function module to the event in the IMG: Financial Accounting   Financial Accounting Global Settings   Business Transaction Events   Settings   Process Function Modules   of an SAP Appl.
    18.  Hit enter past the warning messages that this is SAP data.
    19.  Click on the New Entries button.
    20.  Enter the process for your interface. In your example it is 00001130.
    21.  Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
    22.  Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
    23.  Enter the new "Z" function module (see Figure 12).
    Figure 12. Enter Your New "Z" Function Module Here
    24.  Save the settings. At this point you will be prompted for a CTS number for the configuration change.
    25.  The Business Transaction Event is complete! You are ready for testing.
    Configuring User Exits (Older)
    Basic Steps in Configuring an User Exit
    •      Create a "Z" program for the User Exits and enter the necessary ABAP code.
    •      Enter the new program name into table T80D.
    •      Configure the application to call the User Exit.
    List of User Exits
    •      Variable Field Movements
    •      Substitutions in FI, CO, PCA
    •      Validations in FI, CO, PCA
    •      Rollups in SPL
    •      Fixed Field Movements in SPL
    •      Cost Center Summarization on Detail Screen
    •      Sets Formula Variables
    Example Business Scenario for User Exits
    Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
    To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
    1.      Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools   ABAP Workbench   Development   ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
    2.      You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
    3.      At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change (see Figure 13).
    Figure 13. To Enter Your New Code, Select Source Code and Click on the Change Button
    4.      Enter the following code in the User Exit (Figure 14):
    FORM E01_MVC USING FROM_FIELD TO_FIELD.
    to_field = 'CORP'. "Set a default business unit.
    read table zzbusunit to determine the business unit field.
    select single z_bunit from zzbusunit into to_field
       where hkont = accit_glx-hkont and
        geber = accit_glx-geber and
        fkber = accit_glx-fkber.
    ENDFORM.
    Figure 14. Enter Your New Code at This Screen.
    5.      Activate the program by clicking on the Activate button.
    6.      Change the configuration in the User Exit table to point to your new "Z" program.
    7.      Follow the IMG menu path: Financial Accounting   Special Purpose Ledger   Basic Settings   User Exits   Maintain Client Specific User Exits.
    8.      The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program (see Figure 15).
    Figure 15. Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
    9.      Save the changes.
    10.  The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting ? Special Purpose Ledger ? Basic Settings ? Master Data ? Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
    Figure 16. After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
    11.  Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
    12.  The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
    13.  Save the field movement.
    14.  You are ready to test your User Exit!
    Rewords some points.
    Rgds,
    P.Naganjana Reddy

  • ALV GRID - to include user defined buttons in the output

    Hi,
    Currently I am working on ALV grid output.
    Along with the standard buttons, I need to include my own push buttons.
    When I try to include it using pf-status like this,
    passing parameter  in alv
    I_callback_pf_status_set = G_status
    FORM STANDARD_02 USING EXTAB USING SLIS_T_EXTAB
    set pf-status 'PF_STATUS' EXCLUDING EXTAB.
    ENDFORM
    I have included Confirm and exit buttons
    In the output it shows only the button which I created .
    I want to get both standard buttons which gets displayed when using REUSE_ALV_GRID_DISPLAY and the newly created one .
    Plz help me to resolve this .
    I am just passing my own internal table values to the grid .
    Thanks in advance.
    Regards,
    Uma

    hi
    good
    create ur own GUI status in ur program using SET PF-STATUS '--'. now give that program name and pf status name while u r copying that standard status ie.,of ALV grid Go to transaction SE41 (Menu painter). In the initial screen give the program name SAPLKKBL In the status give STANDARD Then go to the menu bar.in that follow this menu User Interface>Copy--->Status. Then a pop up will appear to give ur program name and the status name.
    thanks
    mrutyun^

  • How to add one button at top of table that creates new rows each time a user clicks on it?

    In the help guide, there is an example of adding buttons to each row - an Add Row and Delete Row button.  I am interested in having one button at the top of the table that can add rows. 

    Hi,
    You can create a table with a header row, where you can place your add button in one of its cells.
    Then you need a script to create a new row in the buttons click event. In a table named 'Table1' with a row named 'Row1' it looks this way:
    Table1._Row1.addInstance()

  • How to add a button on the ALV LIST pop up

    Hi ,
    Can any one help me to add a button on the ALV list which is a pop up using ABAP Objects.
    Thanks in advance.
    Regards,
    Kavya.

    HI ,
    I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
    I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list  but still I am unable to get any additional button on the output ALV popup.
    Please help.
    Regards,
    Kavya.

  • Is it possible to add a button to the toolbar?

    I want to add a "Feedback" button to the toolbar so the users can provide info to me on issues related to the content or new content they need to add.  Since Microsoft HTML output does not have a skin related to there does not seem to be a way to add this...

    Maybe the window you are using was not created with the Microsoft HTML Help simgle source layout as the default layout. Prior to RoboHelp 10 you had to have the default SSL set to the SSL you wanted to use your window for. The window should look like this:
    If you want to read up on why the default SSL is important, you can do here: http://www.cmcandrew.com/robocolumn/archives/407

  • How to add a button to the grouped data in an AdvancedDataGrid?

    Hi,
    Can anyone please suggest how to add a button to the grouped data in the AdvancedDataGrid?
    I have tried extending the AdvancedDataGridGroupItemRenderer and using it as the groupItemRenderer but its not reflecting.
    For the leaf node the itemRenderer property works just fine.
    Please help!

    HI ,
    I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
    I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list  but still I am unable to get any additional button on the output ALV popup.
    Please help.
    Regards,
    Kavya.

  • Add a button to the branch/root in a Flex Tree

    Can someone provide me code or  guide me how to  add a button to all nodes that has children/leaf( but not  to leaf). I tried from the example in this link
    http://www.remwebdevelopment.com/dev/a31/Flex-Checkbox-TreeItemRenderer.html , but I ma getting buttons for all the nodes(including leaf).
    i need to hav ethe button on the rideside corners horizontally to all branches/root.
    Please correct me where i am wrong or provide me correct code. Thanks in advance
    package  
    PKG{
    import mx.controls.Button;  
    import mx.controls.Tree;  
    import mx.controls.treeClasses.TreeItemRenderer;  
    import mx.controls.treeClasses.TreeListData;  
    public class TreeData extends TreeItemRenderer{
    private var bWidth:Number = 30;  
    private var bHeight:Number = 20;  
    public function TreeData(){
    super();}
    var btn:Button=new Button();  
    override protected function createChildren():void{
    //addChild(btn);
    super.createChildren();}
    override public function set data(value:Object):void{
    super.data = value;  
    // get the tree that owns us  
    var _tree:Tree = Tree(this.parent.parent);  
    // if the current node is a branch node  
    //for each(item:Object in  
    if(TreeListData(super.listData).depth=1)                             -or if(TreeListData(super.listData).hasChildren)   these are not working for me{
    btn.width = bWidth;
    btn.height= bHeight;
    btn.label=
    "Remove Attachment";btn.right=10;
    else{
    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{ 
    super.updateDisplayList(unscaledWidth,unscaledHeight); 
    if(super.data){ 
    var tld:TreeListData = TreeListData(super.listData); 
    // if the current node is a branch node  
    if(TreeListData(super.listData).depth=1){
    this.btn.visible=true; 
    this.btn.x=200; 
    this.btn.y = super.label.y+4; 
    //super.label.x = this.btn.x +; 
    //this.btn.y = super.label.y+8; 
    else{
    this.btn.visible=false; 
    this.btn.includeInLayout=false;}

    Hi Albert.
    You need to do a few things for that :
    - Create your own GUI status by copying STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN.
    - Set your own PF-Status using the Exclude table because otherwise your exclude table would become meaningless.
    - define a subroutine to handle the user commands.
    Sample implementation :
    FORM pf_status USING extab TYPE slis_t_extab.
      extab = pf_exclude.   
      SET PF-STATUS 'STANDARD' EXCLUDING extab.       
    ENDFORM.                    "PF_STATUS
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'PF_STATUS'
          is_layout                = layout
          it_fieldcat              = fieldcat
          it_excluding             = pf_exclude
        TABLES
          t_outtab                 = itab
        EXCEPTIONS
          OTHERS                   = 0.
            FORM user_command  USING r_ucomm LIKE sy-ucomm
                                       rs_selfield TYPE slis_selfield.
    ENDFORM.
    Please reward points if found helpful.

  • In table view, how to add one button for selecting page?

    Hi Experts,
    In the OBIEE 11.1.1.6, we have one uncommon requirement that customers want to randomly select actual page to view expected data in table view.
    For example:
    We make use of some columns to create one report in table view, and set 'Rows per Page' equal to '5',
    if this report contains 60 rows, it will have 12 pages, so customers want to select sepcial page number to view the some data. Is it possible to implement this requirement? Maybe we should write JS code.
    Note: Below table view, it has four buttons: First Row, Previous Row, Next Row and Display (500) rows in per page. So we want to add one button to select per page.
    We look at orgnial codes in WebBrowse, but do not know the following codes derive from which JS file.
    Could you please tell me how to find this file?
    <td class="TapeDeckCell"><img class="TapeDeckImage" onclick="" onkeypress="" src="res/s_blafp/viewui/pivot/first_dis.png" title="" alt="" ><img class="TapeDeckImage" onclick="" onkeypress="" src="res/s_blafp/viewui/pivot/previous_dis.png" title="" alt="" ><img class="TapeDeckImageEna" onclick="PTRowScroll('saw_5083_b','5','5', event)" onkeypress="PTRowScroll('saw_5083_b','5','5', event)" src="res/s_blafp/viewui/pivot/next_ena.png" tabIndex="0" onmouseover="PTTD(event, 'res/s_blafp/viewui/pivot/next_ovr.png');" onmouseout="PTTDO(event)" onmousedown="PTTD(event, 'res/s_blafp/viewui/pivot/next_dwn.png');" title="Next 5 Rows" alt="Next 5 Rows" ><img class="TapeDeckImageEna" onclick="*PTRowScroll*('saw_5083_b','-1)', event)" onkeypress="PTRowScroll('saw_5083_b','-1)', event)" src="res/s_blafp/viewui/pivot/showallrows_ena.png" tabIndex="0" onmouseover="PTTD(event, 'res/s_blafp/viewui/pivot/showallrows_ovr.png');" onmouseout="PTTDO(event)" onmousedown="PTTD(event, 'res/s_blafp/viewui/pivot/showallrows_dwn.png');" title="Display maximum (500) rows per page" alt="Display maximum (500) rows per page" > <Span class="TapeDeckRecords">Rows 1 - 5</Span></td>

    Hi Kobe,
    Thanks for listening me.
    I agree 11g have some issues unlike 10g. I've tried the same by creating a measure rcount(1) and name it as Page in RPD. I just pulled column Page in pivot table section 'Pivot Table Prompts' it is working but this may not answer your requirements.
    I would suggest to use the column in Prompt and go by between operator to allow user to select the rows between.
    In the report make Page as prompted.
    If you are okay with this can look forward to tweak it further, like values in the prompt multiple of 5 or 10s some thing like that.
    let me know updates on the same.

  • Need to add one field in MM02

    Hi ,
    I need to add one field in MM02 screen.
    Can u help me in this please.
    I need to do this by using screen exit ,how to do this?
    can u......
    Regards,
    Kalidas

    Hi Kalidas,
    Selection Text: P_TCODE: Transaction Code to Search
    Text Symbols: 001 - Enter the Transaction Code that you want to search through for a User Exit
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    Kindly Reward Points If You Found The Reply Helpful,
    Cheers,
    Chaitanya.

Maybe you are looking for

  • Can't add album artwork in iTunes 10.5.3.3

    I just installed iTunes 10.5.3.3 and now I can't add album artwork.  The Artwork tab is missing from Get Info.  Any ideas?

  • 3d transparency wont translate to pdf or tiff

    Hi! First of all I am new to forums, new to illustrator and am stumped on this. Thank you for your patience with my newbieness. I am creating a logo for a friend. I have an image that I drew, made transparent and then 3d. I want to save it as a pdf o

  • Will System Restore Fix the Problem?

    If I restore my computer to the time before I installed the new iTunes version, will it work ok?

  • IPhoto 11 closes when I try to print after editing a photo

    I can print a photo as it is in iPhoto 11 but if I edit a photo, example remove red eye, and then try to print iPhoto closes itself.  I get the message that iPhoto closed unexpectedly.  Anybody have a fix for this ?

  • Work status error

    Hi gurus, When i`m implementing the work status when i lock a data region and i try to send data instead of receive a message like "this data region has submitted work status" i received and error message that says "Error when try to check work statu