Skip to Content

ALV button in Application tool bar ?

Hello,

I want to keep a button in the ALV report screen application bar for this what is the function that i have to use ?

And when i click the button i should be able to communicate with another data ? Please help me to achieve this requirment.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 06:43 AM

    Hi ,

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = repname

    i_callback_pf_status_set = 'SET_PF_STATUS'

    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

    form set_pf_status.

    set pf-status 'SAT'. " Here u can create a button

    endform

    Edited by: A kumar on Aug 12, 2008 8:47 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 06:44 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 06:46 AM

    Hi

    Check the below link it will helpful

    http://saptechnical.com/Tutorials/ALV/HighlightVisitedRecord/Demo.htm

    Regards,

    Syf

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 06:47 AM

    Hi,

    First thing you copy the standard PF status to z pf-status and add the required buttons in that and use that include like this,

    Form PFSTATUS

    set pf-status 'ZPFSTATUS'. " Here u can create a button

    ENDFORM.

    Give this form name in the following FM

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = repname

    i_callback_pf_status_set = 'PFSTATUS'

    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

    AND in the USE_COMMAND form you write the code what you need to ferform after clicking that button,

    Hope this will sove you problem

    Regards,

    KP

    Edited by: krishna prasad on Aug 12, 2008 8:58 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 06:47 AM

    Hi,

    First thing you copy the standard PF status to z pf-status and add the required buttons in that and use that include like this,

    Form PFSTATUS

    set pf-status 'ZPFSTATUS'. " Here u can create a button

    ENDFORM.

    Give this form name in the following FM

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = repname

    i_callback_pf_status_set = 'PFSTATUS'

    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

    AND in the USE_COMMAND form you write the code what you need to ferform after clicking that button,

    Hope this will sove you problem

    Regards,

    KP

    Edited by: krishna prasad on Aug 12, 2008 8:59 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 12, 2008 at 06:51 AM

    Hello,

    For this you need to create a GUI Status for this & attach this to the ALV.

    1. Go to SE41 & copy the GUI 'STANDARD' of the program 'SAPLSALV' to 'ZSTANDARD' & assign it to ur program.

    2. Then try this bit of code:

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = SY-REPID
          I_CALLBACK_PF_STATUS_SET = 'F_PF_STATUS'  "--> Perform to associate GUI-Status to the ALV
          I_CALLBACK_USER_COMMAND  = 'F_USER_COMMAND'
          IS_LAYOUT                = FP_ST_LAYOUT
          IT_FIELDCAT              = FP_IT_FIELDCAT
          I_SAVE                   = 'A'
        TABLES
          T_OUTTAB                 = FP_IT_OUTPUT
        EXCEPTIONS
          PROGRAM_ERROR            = 1
          OTHERS                   = 2.
      IF SY-SUBRC <> 0.
    *   Error in calling Standard ALV Functional Module
        MESSAGE I019. "Error Occured in ALV Function Module
        LEAVE LIST-PROCESSING.
      ENDIF.
    
    FORM   F_PF_STATUS
    USING  FP_IT_EXTAB TYPE SLIS_T_EXTAB.                       "#EC CALLED
    
        SET PF-STATUS L_C_STATUS EXCLUDING FP_IT_EXTAB.
    ENDFORM.
    

    In FP_IT_EXTAB add the buttons u want to delete.

    Hope this helps.

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.