4
5/11/2015 How to modify Standard PFStatus of ALV Grid? | ABAP Thinkers http://abapthinkers.com/howtomodifystandardpfstatusofalvgrid/ 1/4 Last Monday, I was onleave at work as I need to go to the hospital for my last session for my upper back therapy. My wife accompanied all day which turned to be a date at the hospital. How sweet we are. Upon my return to work yesterday, I was loaded with so many tasks. All the developments I have finished last week were being tested by my counterpart. As expected, bugs are found. So all of them want to finish it as deadline is fast approaching. I was under pressure yesterday as everyone says, “This object is critical. We need to deliver on time!” Really??? Anyways, I have done all those stuff within the day. But I was exhausted with all those bugs and enhancement requested. Lesson learned: “Dont take a leave while project is going on. Otherwise, you will be under pressure upon return“. Hehehe… Never mind that crazy day. Everyone of us once feel that pressure. Once you experience it, just smile and stay focus. So today, I would like to share with you this simple tutorial on how to modify the standard PFStatus of an ALV Report using the FM ALV_GRID_DISPLAY. To have an idea about this topic today, take a look with this sample screenshot below. The button download” is added into a standard ALV PFStatus. Basically, some functional consultants request to have this kind of design since it is beneficial to the users from further processing like for instance, in this case, download to excel file. So lets start this tutorial now with the following steps. But before I forget, I assumed you have already created your own custom report program. In this tutorial, I will not discuss further on how to create your first report program. But in case, you haven’t created yet, you can view this simple tutorial in ALV Report using ALV_GRID_DISPLAY. Steps: 1. Since what we would like to achieve is to modify the standard PFStatus, our first step is to copy the GUI Status from the standard program. So, go to tcode SE80 and enter the following program name: SAPLKBBL. This is the program that handles all the standard PFStatus related to ALV display. SUBSCRIBE SUBSCRIBE TO BLOG VIA EMAIL Enter your email address to subscribe to this blog and receive notifications of new posts by email. Email Address TAGS &SE16N ABAP Code ABAP Query ABAP Tip ABAP Tips ABAP Tricks ALV FM REUSE_ALV_GRID_DISPLAY ALV Grid ALV OOP ALV Report Beginners Tutorial Context Menu Data Dictionary Debugger Debugging Debugging Tips Delete Implicit Enhancement Dequeue Dialog Programming Dow nload Dow nload Tables Structures Enhancement Enqueue Function Group Function Module Function Modules Hilite.me Hotspot How To Implicit Enhancement Intermediate Tutorial Link Click Lock Objects Number Range PDF PF Status popup screen Query SAP Query SAP_EDIT SNRO Syntax Highlighter Transport Variants UserGroup Variants CATEGORIES ABAP Code ABAP Query ABAP Tips ALV ALV Grid ALV OOP Basis Beginners Class Data Dictionary Debugging Dialog Programing Enhancement Forms Function Modules How To How to modify Standard PFStatus of ALV Grid? by LEVI ALIANGAN on 11/28/2013 · LEAVE A COMMENT ALV > ALV GRID > HOW TO MODIFY STANDARD PFSTATUS OF ALV GRID? BLOG HOW TO Search

How to Modify Standard PF-Status of ALV Grid

Embed Size (px)

DESCRIPTION

modifying pf status in abap

Citation preview

  • 5/11/2015 HowtomodifyStandardPFStatusofALVGrid?| ABAPThinkers

    http://abapthinkers.com/howtomodifystandardpfstatusofalvgrid/ 1/4

    LastMonday,IwasonleaveatworkasIneedtogotothehospitalformylastsessionformyupperbacktherapy.Mywifeaccompaniedalldaywhichturnedtobeadateatthehospital.Howsweetweare.Uponmyreturntoworkyesterday,Iwasloadedwithsomanytasks.AllthedevelopmentsIhavefinishedlastweekwerebeingtestedbymycounterpart.Asexpected,bugsarefound.Soallofthemwanttofinishitasdeadlineisfastapproaching.Iwasunderpressureyesterdayaseveryonesays,Thisobjectiscritical.Weneedtodeliverontime!

    Really???Anyways,Ihavedoneallthosestuffwithintheday.ButIwasexhaustedwithallthosebugsandenhancementrequested.Lessonlearned:Donttakealeavewhileprojectisgoingon.Otherwise,youwillbeunderpressureuponreturn.Hehehe

    Nevermindthatcrazyday.Everyoneofusoncefeelthatpressure.Onceyouexperienceit,justsmileandstayfocus.Sotoday,IwouldliketosharewithyouthissimpletutorialonhowtomodifythestandardPFStatusofanALVReportusingtheFMALV_GRID_DISPLAY.

    Tohaveanideaaboutthistopictoday,takealookwiththissamplescreenshotbelow.ThebuttondownloadisaddedintoastandardALVPFStatus.

    Basically,somefunctionalconsultantsrequesttohavethiskindofdesignsinceitisbeneficialtotheusersfromfurtherprocessinglikeforinstance,inthiscase,downloadtoexcelfile.

    Soletsstartthistutorialnowwiththefollowingsteps.ButbeforeIforget,Iassumedyouhavealreadycreatedyourowncustomreportprogram.Inthistutorial,Iwillnotdiscussfurtheronhowtocreateyourfirstreportprogram.Butincase,youhaventcreatedyet,youcanviewthissimpletutorialinALVReportusingALV_GRID_DISPLAY.

    Steps:1.SincewhatwewouldliketoachieveistomodifythestandardPFStatus,ourfirststepistocopytheGUIStatusfromthestandardprogram.So,gototcodeSE80andenterthefollowingprogramname:SAPLKBBL.ThisistheprogramthathandlesallthestandardPFStatusrelatedtoALVdisplay.

    SUBSCRIBE

    SUBSCRIBE TOBLOGV IA EMA IL

    Enteryouremailaddresstosubscribetothisblogandreceivenotificationsofnewpostsbyemail.

    EmailAddress

    TAGS

    &SE16NABAPCodeABAPQueryABAPTipABAPTipsABAPTricksALVFMREUSE_ALV_GRID_DISPLAYALVGridALVOOPALVReportBeginnersTutorialContextMenuDataDictionaryDebuggerDebuggingDebuggingTipsDeleteImplicitEnhancementDequeueDialogProgrammingDow nloadDow nloadTablesStructuresEnhancementEnqueueFunctionGroupFunctionModuleFunctionModulesHilite.meHotspotHowToImplicitEnhancementIntermediateTutorialLinkClickLockObjectsNumberRangePDFPFStatuspopupscreenQuerySAPQuerySAP_EDITSNROSyntaxHighlighterTransportVariantsUserGroupVariants

    CATEGORIES

    ABAPCode

    ABAPQuery

    ABAPTips

    ALV

    ALVGrid

    ALVOOP

    Basis

    Beginners

    Class

    DataDictionary

    Debugging

    DialogPrograming

    Enhancement

    Forms

    FunctionModules

    HowTo

    HowtomodifyStandardPFStatusofALVGrid?byLEV IA LIANGANon11/28/2013 LEAVEA COMMENT

    ALV >ALV GRID>HOWTOMODIFY STANDARDPFSTATUSOFALV GRID?

    BLOG HOWTO Search

  • 5/11/2015 HowtomodifyStandardPFStatusofALVGrid?| ABAPThinkers

    http://abapthinkers.com/howtomodifystandardpfstatusofalvgrid/ 2/4

    OnceyoudisplayedtheobjectsoftheprogramSAPLKBBL,scrolldownandlookfortheGUIStatusfolder(referscreenshotabove).Fromthelistofstatuses,locatethisstandardonebelow,STANDARD_FULLSCREEN.Actually,youcanselectyourowntoofromthelists.Asforthistutorial,Iselectedthestandard_fullscreenstatuswhichIcommonlyused.

    2.OnceIselectedthestatusthatIprefer,rightclickyourmousetoopenthecontextmenu.Fromthemenu,selectCopy.Thispopupwindowappearsafterwards.Enterherethenameofyourcustomprogramontheparameterinyellow.Thenclickthecopybutton.

    3.Gobacktoyourcustomreportprogram.OpenitinSE38.Displayallobjectlist.Asyouwillnotice,thestandardPFStatusisaddedautomaticallyintoyourcustomprogram.Lookthissamplescreenshotbelow.DontworrywillallthefunctionalityofthePFStatus.Itisthesamewiththestandardaslongasyouwillnotchangethefunctioncodes.

    IDES

    ImplicitEnhancement

    Intermediate

    LockObject

    MaintenanceGenerator

    Performance

    RolesandAuthorizations

    Sapscripts

    SelectionScreen

    Smartforms

    Table

    VersionManagement

    RECENTPOSTS

    PublicSAPIDESSystembyConsolutbidsadieu!!!

    HowtouploadSAPRolestoupdateUsersauthorizations?

    CanIrecovermydeletedABAPprograms?

    HowtoexecuteSQLStatementwithoutchangingABAPCode?

    HowtoescapeABAPlineinDebugMode?

    RECENTCOMMENTS

    levialianganonHowtoimplementaLockobjectinABAP?

    soonlhsonHowtoimplementaLockobjectinABAP?

    soonlhsonHowtoimplementaLockobjectinABAP?

    salilbagchionHowtoimplementaLockobjectinABAP?

    levialianganonHowtoimplementaLockobjectinABAP?

    CONNECT@FACEBOOK

    ABAPThinkers

    408peoplelikeABAPThinkers.

    Facebooksocialplugin

    Like

    META

    Register

  • 5/11/2015 HowtomodifyStandardPFStatusofALVGrid?| ABAPThinkers

    http://abapthinkers.com/howtomodifystandardpfstatusofalvgrid/ 3/4

    4.Openthecopiedstandardstatuslikethenormalwayyoudo.Thenfromthelistoffunctioncodes,addyourowncustomcode.Well,Inthistutorial,IaddedthefunctioncodeDownloadwhichwillappearintheALVstatus.Afteryouadded,saveandactivateit.

    5.InyourABAPcode,setyourcustomizedstatusthisway:

    12345678

    *&**&Formpf_status*&**SetthePFStatusoftheALVGrid**FORMpf_statusUSINGrt_extabTYPEslis_t_extab.SETPFSTATUS'STANDARD_FULLSCREEN'.ENDFORM.

    TheninyourFunctionModule,REUSE_ALV_GRID_DISPLAY,callthenameofyourform,PF_STATUS.Onceyouexecuteyourreport,yournewlyaddedbuttonbesidesfromthestandardbuttonswillbedisplayedintoyourALVGrid.

    12345678910111213141516

    CALLFUNCTION'REUSE_ALV_GRID_DISPLAY'EXPORTINGi_callback_program=syrepidi_callback_pf_status_set='PF_STATUS'i_callback_user_command='F_USER_COMMAND'is_layout=gwa_layoutit_fieldcat=gi_fieldcatalog[]it_sort=gi_sortTABLESt_outtab=gi_outputEXCEPTIONSprogram_error=1OTHERS=2.IFsysubrc=0."#ECNEEDED"donothingENDIF.

    Sothatsit.AsimpleprocesstomodifythestandardPFStatusofanALVGrid.Ifyouhaveanyquestionsorsuggestions,pleaseletmeknow.Leaveyourcommentsbelow.Ifyoufindthisarticleuseful,pleaseshareittoallyourfriendsasSHARINGisCARING.

    ThankyouonceagainandIinviteeveryonetoconnectwithmeonmypage@ABAPTHINKERS.Seeyounexttimefriends.

    Taggedwith:ALVFMREUSE_ALV_GRID_DISPLAYALVGridALVReportPFStatus

    SEARCH

    Login

    EntriesRSS

    CommentsRSS

    WordPress.org

    TOP POSTS & PAGES

    HowtomodifyStandardPFStatusofALVGrid?

    HowtoimplementanImplicitEnhancementinSAPobjects?

    HowtoexecuteSQLStatementwithoutchangingABAPCode?

    HowtoaddaLinkClick(Hotspot)onALVReportusingOOP?

    HowtocreateanumberrangeinSAPusingSNRO?

    CanIrecovermydeletedABAPprograms?

    HowtoimplementaLockobjectinABAP?

    ABAPCode:ALVReportusingFMALV_GRID_DISPLAY

    HowtouploadSAPRolestoupdateUser'sauthorizations?

    HowtodebugpopupscreeninSAP?

    ABAPCode:ALVReportusingFMALV_GRID_DISPLAY ABAPQuery,itsconceptinaNutshell

  • 5/11/2015 HowtomodifyStandardPFStatusofALVGrid?| ABAPThinkers

    http://abapthinkers.com/howtomodifystandardpfstatusofalvgrid/ 4/4

    Youmustlogintopostacomment.

    ABAPThinkers PAGESAboutMeContactMeCopyrightsDisclaimerPrivacyPolicy

    THELATEST

    PublicSAPIDESSystembyConsolutbidsadieu!!!Lastweek,wereceivedanemailfromConsolutTeamupdatingusabout[]

    MORE

    Thanksfordroppingby!Feelfreetojointhediscussionbyleavingcomments,andstayupdatedbysubscribingtotheRSSfeed.

    2014ABAPThinkers