• ABAP Online Training @ $50

    Now you can learn ABAP by watching and listening video classes by experienced consultant.

  • ABAP Tutorials N Materials

    Read, Surf and Download useful ABAP tips, tutorials, code and download many eBooks and documents free

  • Latest ABAP Job in India

    Get all latest opening for SAP ABAP and related jobs, vaccancies across India and apply for the same.

    Monday, October 29, 2012


    This requirement can be completed in couple of steps. First of all write down the selection screen code for button to display in the screen.

     "This code will button to application toolbar
    SELECTION-SCREEN FUNCTION KEY 1. 

    Now we need to put some meaningful text for that button.

    INITIALIZATION .
    Data: FUNCTEXT type smp_dyntxt.

    Clear Functext.
    Functext-text = 'Display'.
    sscrfields-functxt_01 = functext.

    You can multiple buttons this way.....

    Next we need to assign some action to this button to work properly. For that we have to assign the PF status first.

    AT SELECTION SCREEN OUTPUT.
    Set PF-STATUS 'ZTEST'.

    Double click on that ZTEST and do the configuration. Provide a function code there, e.g. "DISP" . Then you can use the function code to catch the button press and based on that write code. If you like to do anything on screen itself, like to hide something, write the code below

    AT SELECTION-SCREEN OUTPUT.
      if sy-ucomm = 'DISP'.
          your code here
      endif.

    If you want to revoke some other functionality in the main code, then write in start-of-selection the below code

    if sy-ucomm = 'DISP'.
           your code here
    endif.
    Easy2learnabap.co.in @ 2012 All product names on this web site are trademarks of the companies that own them .

    Easy2learnabap.co.in is not affiliated with SAP AG in any way. SAP AG is the registered trademark holder of SAP, SAP R/3, mySAP, ABAP, xApps, NetWeaver, and other proprietary terms.

    The technical information on this site is verified to the greatest extent possible, however, any information found on this site is used at the site visitor's own risk. All the tutorials are collected from various sources, if anyone is having problem with the content, report this to us. We will take action accordingly.

    Easy2learnabap.co.in reserves the right to correct any errors or omissions in any portion of this site at any time without obligation.

    This website is created to teach people about ABAP technology. The Video contents provided in Premium service are completely owned by us and copyrighted.