Functionality of queries to be added to custom ALV GRID program

I have got a requirement in which we have created a custom program. Earlier it used to be a query for that. Now the customer wants the same options such as ABC analysis , Graphics , Import to excel, word processing etc., options to be added to the custom program. What I have observed is that these are present in the  PF status of the ALV grid display which I am using . Is there any way to trigger the functionality of them directly after displaying the ALV. i.e. If the user wants to see the ABC analysis checks the option and we need to get the ABC analysis which is there in the ALV display

Varun,
I have never tried this but try callig the function LVC_ABC_ANALYSIS and pass the field catalog and the field on which you want to do the analysis, after the SET_TABLE_FOR_FIRST_DISPLAY method or the REUSE* function.
Regards,
Ravi
Note : Please mark the helpful answers

Similar Messages

  • Adding pushbutton  in alv grid list

    hai friends,
                     i have developed an alv grid list and i place a pushbutton called 'GETEXCEL'.when i click on 'GETEXCEL' it should generate an excel sheet and it should get placed in application server.
    for the reference plz check my code also.
    the issue is when i debug, the transfer statement is getting executed then it is going to the standard program(moduel pool) and then it is not going to application server.of course excel sheet is also getting generated.can anybody find the solution for this.
    *&      Form  events_get
          text
    -->  p1        text
    <--  p2        text
    FORM events_get .
    *DATA t_event TYPE slis_t_event.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = tab_events
    EXCEPTIONS
       LIST_TYPE_WRONG       = 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.
      READ TABLE tab_events INTO wa_events WITH KEY name = 'USER_COMMAND'.
      wa_events-form = 'USER_COMMAND'.
      MODIFY tab_events FROM wa_events TRANSPORTING form WHERE name =
      wa_events-name.
      READ TABLE tab_events INTO wa_events WITH KEY name = 'PF_STATUS_SET'.
      wa_events-form = 'PF_STATUS_SET'.
      MODIFY tab_events FROM wa_events TRANSPORTING form WHERE name =
      wa_events-name.
    ENDFORM.                    " events_get
    **& Form pf_status_set
    FORM pf_status_set USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'STATUS'.
    ENDFORM.                           " pf_status_set
    **& Form user_command
    FORM user_command
    USING u_comm TYPE sy-ucomm
    r_selfield TYPE slis_selfield.
    CASE u_comm.
        WHEN 'GETEXCEL'.
          PERFORM f400_column_headings.
          PERFORM f500_generate_excel_file.
          PERFORM f600_transfer_excel_file.
      ENDCASE.
    ENDFORM.                    "user_command
    then i am passing the parameters in grid fm also for user command and set pf status.

    Hi Mahesh,
    1. No need to populate the EVENTS table in your case, just pass the Subroutine names for PF status and USER_COMMAND to GRId Display
      I_CALLBACK_PFSTATUS  = 'PF_STATUS_SET'.
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    2. make sure you pass SY-REPID/SY-CPROG  to REUSE_ALV_GRID_DISPLAY  FM

  • Custom Function on OO ALV Grid

    I am trying to implement ALV_GRID_XT to enhance the ALV Grid toolbar by adding couple of custom funcitons.As per the SAP documentation I have created 2 methods ON_TOOLBAR - one for adding items on toolbar and the other ON_USER_COMMAND - for processing if the user clicks on the custom function.
    I am unable to relate the ALV Grid instance onto the method ON_USER_COMMAND . One of the funciton is to calculate the average of column which represents percentage excluding cells with zero values. Once the user selects column(s) and clicks on the Percent button on the ALV grid my piece of code should trigger ON_USER_COMMAND and then display the average percentage on the Totals row.
    Method ON_USER_COMMAND has only one parameter E_UCOMM which i am able to get in the method but I am not able to get the instance of the ALV grid so that I can play around with the data in the Grid.
    I could have used a local class and then enhanced the ALV toolbar but this requirement is needed for about 20 reports and hence thought of implementing it globally.
    Any ideas would be appreciated.

    Hi there
    You need to set the handlers of course and register the events
    I'm using also a Z-class  using functionality from the ALV Grid
    in the application program
    data: z_object type ref to zcl_*      "my z_class"
    * Instantiate your Z class
    create object z_object
           exporting
                      z_object = z_object
                      cfname = 'CCONTAINER1'.
    Now in your Constructor for your Z-Class have a variable
    say grid1 which is defined as a type ref to cl_gui_alv_grid.
    Code the methods you require --. The trick is to instantiate your OWN Z class and within  YOUR CLASS  instantiate the GRID1 variable as an instance of cl_gui_alv_grid - then you can use methods etc from that class in your own Z class simple via  something like this
    method CONSTRUCTOR.
    create object grid_container1
            exporting
        container_name = cfname.
        create object  grid1
           exporting
              i_parent = grid_container1.
        set handler z_object->on_user_command for grid1.
        set handler z_object->on_toolbar for grid1.
        set handler z_object->handle_data_changed for grid1.
        set handler z_object->handle_data_changed_finished for grid1.
        set handler z_object->on_dubbelklik for grid1.
        set handler z_object->on_hotspot for grid1.
        call method grid1->register_edit_event
            exporting
               i_event_id = cl_gui_alv_grid=>mc_evt_enter.
      endmethod.
    method display_grid .
    get reference of g_outtab into g_outtab1.
         get reference of g_fldcat into g_fldcat1.
        struct_grid_lset-edit = i_edit.    "To enable editing in ALV
        struct_grid_lset-zebra = i_zebra.
        struct_grid_lset-cwidth_opt = i_opt.
        struct_grid_lset-grid_title = i_gridtitle.
    *    struct_grid_lset-ctab_fname = 'T_CELLCOLORS'.
    *    struct_grid_lset-stylefname = 'CELLTAB'.
         struct_grid_lset-ctab_fname = style_fname.
         struct_grid_lset-stylefname = style_ctab.
    *     export gt_outtab from gt_outtab to memory id 'gt_outtab'.
        call method grid1->set_table_for_first_display
           exporting
                 is_layout       = struct_grid_lset
           changing
                 it_outtab       = gt_outtab
                 it_fieldcatalog = it_fldcat.
      endmethod.
    You need to add the buttons to the toolbar with your ON TOOLBAR method
    for example
    method on_toolbar .
    type-pools icon.
    clear ls_toolbar.
         move  0 to ls_toolbar-butn_type.
         move 'EXCEL' to ls_toolbar-function.
         move  space to ls_toolbar-disabled.
         move  icon_xxl to ls_toolbar-icon.
         move 'Excel' to ls_toolbar-quickinfo.
         move  'EXCEL' to ls_toolbar-text.
         append ls_toolbar to e_object->mt_toolbar.
        perform   toolbar  in program (caller) if found
         using e_object.
    endmethod.
    Now the functionality should work in the ON_USER_COMMAND .
    Here's my ON_USER_COMMAND method within the class
    method ON_USER_COMMAND.
    *        FOR EVENT before_user_command OF cl_gui_alv_grid
    *        IMPORTING
    *          e_ucomm
    *          sender
    * When defined in SE24 you don't need to code the
    * FOR EVENT etc as this is already defined as an event handler
    case e_ucomm.
          when 'EXIT'.
            leave program.
          when 'EXCEL'.
           call method me->download_to_excel.
          when 'SAVE'.
          when 'PROC'.
            call method me->process.
          when 'REFR'.
            call method me->refresh.
            when 'SWITCH'.
            call method me->switch.
           when 'TEST'.
            call method me->get_cell.
           endcase.
    endmethod.
    Add whatever  extra functionality you want to the on_user_command so long as you've defined toolbars..
    Cheers
    jimbo

  • ALV Grid throwing dump in total function

    Hi,
      My ALV grid program, is working fine in development server, for the total and subtotal function. However, the same program is throwing a short dump in Quality server when we try to get the total.Please help!
    Regards,
    Anita Jeyan

    Hi ,
    Please go to ST22 and check what is the reason for error.
    Let me know the error.
    The reason might be due to some less data size or some data type mismatch.
    Regards,
    Uma
    Edited by: UmaDave on Jun 9, 2010 12:10 PM
    Edited by: UmaDave on Jun 9, 2010 12:10 PM

  • Visibility of ALV grid toolbar functions of the Custom report in ITS screen

    Hi all,
    I am working on SRM 5.0  with INTERNAL ITS.I have  created a custom report and a transaction code  for the same.Now in the SRM Web menu,I have provided a link for this report.
    The problem I am facing is that in the O/P screen of the report,I have an ALV grid being displayed with 1 custom icon at the end of the std ALV toolbar.Now in the SAPGUI,this icon is displayed correctly at the end of the ALV toolbar but in the Web screen,i can see only few of the functions(visible as buttons in the SRM web screen/IE)  in the ALV toolbar and rest of them being displayed under an additional button "MORE".Is there any way i can show the custom icon as a button which is directly visible on the SRM web screen and not under the  options MORE?
    All inputs will be  highly appreciated and rewarded.

    Hello!
    There are several possibilities how to call transaction:
    - You can call it as service (that is what you do when you test it from SICF)
    - You can call it through service (or alias) WEBGUI (not using service for the specific transaction to call it)
    If you are calling it through WEBGUI then parameter ~SINGLETRANSACTION should be added to service (or alias) of WEBGUI. And there should be added also Log Off URL (in SICF). At this case it should navigate back to the URL which is specified in SICF.
    Hope this helps!
    Best regards,
    Rorijs

  • Adding a custom field in standard search criteria in SAP SRM SLM

    Hi Friends,
    Currently we are using SAP SRM with SLM system .
    In SLM system we have a functionality to replicate the supplier to other system ( like ECC SUS etc).
    As per the requirement we have done some enhancement and now we need to enhance the standard search functionality by
    adding our custom filed to one of the search parameter field
    Kindly refer the screen shot
    Click on Supplier Lifecycle Management -> Distribute Supplier
    Kindly suggest the steps to implement this change.

    Hi,
    See this thread:
    Vendor Master Extension in SRM
    For custom fields for vendor master,you can use the BADI's BBP_GET_VMDATA_CF(In SRM) and BAdI BBP_MAP_VMDATA_CF (In R/3).
    Other related links:
    http://www.sapdevelopment.co.uk/enhance/bdt/bdthome.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/2f/696d360856e808e10000009b38f839/content.htm
    F4 for customer table fields
    Look for the OSS Note for more details.
    Note 675800 - Business partner enhancement SRM on maintenance screen
    BR,
    Deepti.

  • Adding new custom fields in FB01

    Hello all.
    I am having a requirment as i need to add the custome fields in Fb01 transaction at item level.
    I have added the custome fields in Bseg table, now i wan to display this fields in the Fb01 screen.
    Is thios possible to do so.

    First, I hope you are using the ECC 6.0 since this is a new functionality (or ECC 5.0????). Second, tell us the steps you have followed.
    Fernando.

  • Error while adding a custom field with Input help via AET

    Hi All,
    I need to add two custom field under Service orders at Item level in component BT140I_SRVP.
    One field is required to have the input search help f4 and autopopulates the second field
    I am able to add one field(not requiring help) successfully through AET .
    I have created one Zsearch_help in se11 and its successfully running  and Autopopulating seocnd field while I am testing it
    While adding second field through AET,I need to enter following details as -
    field label,search relevant ,serach help etc.
    When I type the name of my 'Zsearch_help' against field search help it gives me following error
    'Search help is not compatible'.
    Secondly,not getting getter and setter methods for the attrributes in BTAdminI.
    Last,please tell me if i create zhelp and activate it,would it automatically appear in the list on AETwhile assiging it to input field?
    Please help me out.Kindly be detailed as I am new to SAP CRM.
    Thanks,
    Shivani

    The question is answered in CRM 7.0 forum:
    Getting error while adding a custom field (with input help) through AET

  • Adding a custom webpart to webpart page not a safe control issue

    When I am adding a custom web part to web part page I am getting below error as a popup. Plz help if any body resolved the same issue.
    Unable to add selected web part(s). (Web Part Name): A Web Part or Web Form Control on this Page cannot be displayed or imported.
    The type could not be found or it is not registered as safe
    Regards.
    Avinash.
    Avinash

    Hi,
    Here you go. This should help you.
    ow many times have you guys faced an issue like this ?"The type could not be found or it is not registered as safe." .To resolve this, make sure that you add safe controls around your web part assembly in web.config.
    <SafeControls>
    < SafeControl Assembly=”WebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=abcdeddf23232″ Namespace=”Mywebpart.WebPart” TypeName=”*” Safe=”True” />
    < /SafeControls>
    The above ensure that your web part code is secured and wont let any anonymous users to access the web part.
    Happy SharePointing ;-)
    http://www.c-sharpcorner.com/Blogs/15024/
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • I added a custom ringtone . Then later I tried to add another three set  but now after sync . Am not able to get rid of the first one... It's still there as my custom ringtone. But my iPhone in iTunes shows all four... But the phone shows only one...?

    I added a custom ringtone . Then later I tried to add another three set  but now after sync . Am not able to get rid of the first one... It's still there as my custom ringtone. But my iPhone in iTunes shows all four... But the phone shows only one...?

    Paul--you are a life-saver!! Worked great. I did have to look around to make sure I was getting 4.9 instead of 4.7 (even when the file was named 4.9 at techspot.com), but I finally got the right file, did the install as you suggested, and everything is now fine. One note, though, that I haven't seen mentioned in any of this thread: when I first tried to open up iTunes after getting back to 4.9, the following message appeared: "The file iTunes Library.itl cannot be read because it was created by a newer version of iTunes." I merely went to the old .itl file that was created when I did the update to iTunes 5, renamed it, moved it over to my now new 4.9, and iTunes opened fine. My library was a few days out of date, because of the few days' lag from the time I did the iTunes update, but that was easily taken care of, and everything's now working fine. Thanks again!!!

  • Adding customer field to selection screen of RFKORD11 - Customer  Statement Printing Program:

    Hello,
    We are required to add an important customer field to selection screen of customer
    statement printing program: RFKORD11 for our South African branch.
    Please advise us regarding this matter,
    is there a proper user-exit or a repair is needed?
    Kind Regards.

    Enhancement
    text
    F050S001
    FIDCMT, FIDCC1,
      FIDCC2: Edit user-defined IDoc segment
    F050S002
    FIDCC1: Change
      IDoc/do not send
    F050S003
    FIDCC2: Change
      IDoc/do not send
    F050S004
    FIDCMT, FIDCC1,
      FIDCC2: Change outbound IDoc/do not send
    F050S005
    FIDCMT, FIDCC1,
      FIDCC2 Inbound IDoc: Change FI document
    F050S006
    FI Outgoing IDoc:
      Reset Clearing in FI Document
    F050S007
    FIDCCH Outbound:
      Influence on IDoc for Document Change
    F180A001
    Balance Sheet
      Adjustment
    FARC0001
    Enhancements within
      archiving (FI)
    FARC0002
    Additional Checks for
      Archiving MM Vendor Master Data
    FEDI0001
    Function exits for
      EDI in FI
    FICT0001
    Exits for
      inter-company transactions
    RFAVIS01
    Customer Exit for
      Changing Payment Advice Segment Text
    RFBVX001
    Enhancement for bank
      directory transfer (Austria)
    RFEPOS00
    Line item display:
      Checking of selection conditions
    SAPLBANK
    User exit: Bank data
    SAPLF040
    WF: Preliminary
      posting (authorized for release)
    SAPLF051
    Workflow for FI
      (pre-capture, release for payment)
    SAPLFCPD
    One-time account data
      or different payee in booking
    SAPLSSRV
    User exit: Bank
      account numbers
    RFKORIEX
    Automatic
      correspondence
    please check which one  is better .

  • Adding custom fields to notifications-approval tab alv grid

    Transaction IW21 - Create PM Notifications.
    on the Approval Tab - there is an ALV grid that contains lots of fields. I know that i can click on the upper right hand corner and modifiy the layout by hidding fields. I want to add some custom fields to this grid.
    I added my fields to view QMSM and now when I look at the database table using SE16 - i can see my new fields.
    But how do I add them to this ALV grid?
    Please and Thank you,
    Julia Ramos
    Orange County Public Schools.

    I have read SAP OSS NOTE:  586523 Customer-defined fields in list editing. This note helped me add these same fields to many of the standard reporting transactions. IQS8, IW28, IW29, IW38, IW39
    I added my fields to
    QMEL - Quality Notification
    RIHQMEL_LIST - Display structure reporting for QMEL
    RQMQMEL - Quality notification - header data
    RQMQMSM - Quality notification - measures (reporting)
    Then i ran SAP program BALVBUFDEL. This program refreshs the alv buffer. This was very cool in that it allows us to access and report on all of my custom fields thru the standard reporting transactions!
    I thought this same logic might work for transaction IW21. I found the structure used by the approval tab alv program, QMSM,  and created an append structure, ZAQMSM with my fields - ran the balvbufdel program to refresh the alv buffers - but i still can not see my fields in the approval tab. I believe that there must be a way to do this - i will keep trying different things and read thru move OSS notes. If you have any sugestions or ideas - they would be greatly appreciated.
    Thanks

  • Regarding adding a Custom field to Standard Table

    Hi ABAPers,
    Can any one explain the below spec-description.
    "The purpose of this design is to provide the foundation for a more automated solution to the invoice reconciliation process.  This design calls for adding a custom field to the standard SAP table EINE as well as a data maintenance tool for the same.  There will also be a new custom table for storing values associated with the new EINE field.  These new tables will also provide users with the ability to determine which PIR are soon to expire."
    We have to add one custom field to standard table EINE, how we can add this custom field to STND table.
    According to me we can add it through append structure. is it correct or not.
    and what is data maintenance tool.
    Pls.............Explain in details.
    Thanks in advance.
    Regards,
    Ramana Prasad. T

    Hi,
    Goto SE11 ,give ur table name.Then press display button.Then in the application tool bar press on append structure ...Now create a zstructure and add ur custom field and then activate the table.
    Regards,
    nagaraj

  • HR Custom InfoTypes problem when added to custom Infoset Report for PA

    Hi, I am having an issue with the adhoc query /SAPQUERY/HR_ADM. I added the custom infotypes 9* I created to this standard infoset by using SQ02 and adding these by going into the menu path Edit--> Change InfoType selection. I regenerated this object and attached to a transport. The query runs fine in the DEV system where I made the change...I can choose fields for output or selection from the standard infotypes and custom infotypes as expected. I migrated this transport to the test system and now when I try to do the same thing I get an error when I try to click on any object in my custom infotype and some of the standard infotype. I tried regenerating and resending to the test system and still have the same issue. This is the error in the dump:
        79 * create work area                                                
        80   create data data_wa like line of data_table.                    
        81   assign data_wa->* to <data_wa>.                                 
        82   assign component fcat_wa-fieldname OF STRUCTURE <data_wa>       
        83     to <field>.                                                   
        84                                                                   
        85   loop at t_fcat into fcat_wa.                                    
        86     field_filled = 'X'.                                           
        87     assign component fcat_wa-fieldname OF STRUCTURE <data_wa>     
        88     to <field>.                                                   
        89     if sy-subrc <> 0.                                             
    >>>>>       raise internal_error.                                       
    It appears the TEXT488 is the value in the fcat_wa-fieldname and I do not see this in the data_wa.
    Does anyone know how to fix this problem or what I might try or look at to see what the difference is between the DEV system (where it works ok) the the Test system where it is giving me an error?
    Thanks in advance for any help you can provide.
    Laurie

    After further investigation I found the problem to this was in the generation of the objects. Even though I generated before attaching to a transport  and all looked ok, there is some sort of bug causing it to not generate properly so I had to sign on to each environment and generate the object in SQ02 including in Production. After I did this the custom infotypes were accessible in the Infoset.

  • Adding New Customer Address to an Existing one

    Adding New Customer Address to an Existing one
    Hi
    We have a lot customers set up in Oracle and they only have a
    ship to address and now we would like to add the bill to address
    to these customers. Since there are a lot of customers I was
    wondering is there is an open interface we can use to that.
    Thank you
    alpha

    Hi Chandu,
    1.In Infospoke -> General tab -> DataSouce(here infobject - 0BPARTNER).
    2.  Destination tab -> choose radio button(DB Table or Flat file).
    3. Goto tab infoobjects -> select required fields you want to send from left to right.
    4. Give the selection accordingly(here i think PATRNER). But it should be available in your datasouce(Infoobject-0BPARTNER), if you want to give selection on this. I didnt understad what you mean of <b>"hide"</b> in your previous reply. If this is not available in your infoobject(OBPARTNER), How CAN YOU GIVE SELECTION ON THIS attribute...?
    5. Try to add this field in Infoobject(0BPARTNER) and populate.
    6. Trnasformation tab.
       Here you can see Source Structure, Target Structure and Addin implementation.
    Source Structure - system will generate according to the field you selected in InfoObjects tab(You cant change it).
    Target Structure - You can define your own structure if you want or you can modify the generated structure. By default system generates Target Structure same as Source structure(if you want to add any more fields you can add here, but you have to populate those fields with your own coding in BAdi), Which is Addin implementation.
    Srini
    Message was edited by: Srini

Maybe you are looking for

  • "Running Oracle Spatial Web Services" tutorial error

    Hi, I am currently working on setting up the WFS service with OC4J. I completed the initial tutorial to set it up and everything went well. I am now trying to run the WFS demos from WSCLIENT and using this tutorial: http://www.oracle.com/technology/o

  • Doubt in BDC direct input method

    Hi experts I dont know how to upload data in SAP data base by using BDC direct input coding method. Can u people explain this with coding? Thanks in advance. Regards Antony

  • Can't view slideshow once site is published

    Hello-does anyone have any advice on this. I published my website and then went to view it to find that it would not let me view the slideshow or click on a photo to enlarge. A box came up saying this...Firefox can't open because it cannot read the p

  • ISL best practice

    Hello All, I have 2 MDS 9509 sitting across two sites on a same fabric with Intersite DWDN link = 1 Gbps I have 48 port blades and 12 port blades. Since the ISL max theoritical bandwidth is 1 Gbps, i think of locking the switch ISL ports at 1 Gbps (E

  • Previous revision

    We need a report to show the quantities for the current Purchase Order (PO), and the quantities for the previous revision. This way we can see at a glance how the quantities have changed. You can see a screen shot at the foot of this page http://www.