Upload
ashish-mohapatra
View
38
Download
6
Embed Size (px)
DESCRIPTION
alv oops splitter container
Citation preview
1/30/2015 DisplayingALVinSplitterContainerwithheadingusingABAPOO
http://sapuniversity.eu/displayingalvinsplittercontainerwithheadingusingooabap/ 1/5
Home AboutUs SAPTRAINING Authors BecomeanAuthor OtherSAPResources Contact
Home AboutUs SAPTRAINING Authors BecomeanAuthor OtherSAPResources Contact
HomeSAPABAPDisplayingALVinSplitterContainerwithheadingusingABAPOO
Displaying ALV in Splitter Container withheading using ABAP OO
7December2012| AvinashPalavai| 3Comments| SAPABAP
Introduction:
SplitterContainercanbeusedtodisplaydataeitherfromtwoormoretablesorfromasingletablebasedonparticularconditionsinALVformatusingasinglecontaineratatime.
Theclassesthatareusedforachievingthisareasfollows,
1. CL_GUI_CUSTOM_CONTAINER.2. CL_GUI_SPLITTER_CONTAINER.3. CL_GUI_CONTAINER.4. CL_GUI_ALV_GRID.5. CL_DD_DOCUMENT.
Procedure:
1. Firstwehavetodesignamodulepoolscreen(ScreenNo.100)withtwocustomcontrols,eachforALVandHeadingasbelow,
1. Namethefirstcontrolas"HEADING".
Loading
>
Categories
GeencategorieSAPCRMSAPbasicknowledgeSAPSDSAPFICOSAPHCMSAPBW/BISAPAuthorizationsSAPABAPSAPBASISSAPCareerSAPWorkflow
Disclaimer
SAPUNIVERSITY.EUisnotaffiliatedorrelatedtoanydivisionorsubsidiaryofSAPAG.
SAP,SAPR/3,R/3software,R/2software,ABAP/4programminglanguage,BAPIprogramminginterface,BWIsoftware,AcceleratedSAPmethodology,andandanyotherSAPtrademarksareregisteredtrademarksofSAPAG
Send me Weekly Updates!First Name
SignMeUpNow!
1/30/2015 DisplayingALVinSplitterContainerwithheadingusingABAPOO
http://sapuniversity.eu/displayingalvinsplittercontainerwithheadingusingooabap/ 2/5
2. Namethesecondcontrolas"MAIN_CONT".3. Saveandactivatethescreen.4. Dothebelowcodinginthereportprogram.5. HereitookacaseofdisplayingthematerialdetailsofaparticularmaterialtypeZSEM',in
theparentsplitalvlistandthedescriptionsofthosematerialsthatarelistedinparentsplitalvinchildsplitalv.
6. TheheadingbeingmaintainedforthisALVis'MaterialMasterReport'.*****************************Coding*********************************REPORTZOOALV_WITH_SPLITTER.DATA:O_CCTYPEREFTOCL_GUI_CUSTOM_CONTAINER.DATA:O_SCTYPEREFTOCL_GUI_SPLITTER_CONTAINER.DATA:O_PART1TYPEREFTOCL_GUI_CONTAINER.DATA:O_PART2TYPEREFTOCL_GUI_CONTAINER.DATA:ALV_GRID1TYPEREFTOCL_GUI_ALV_GRID.DATA:ALV_GRID2TYPEREFTOCL_GUI_ALV_GRID.DATA:I_MARATYPETABLEOFMARA.DATA:I_MAKTTYPETABLEOFMAKT.DATA:DDTYPEREFTOCL_DD_DOCUMENT.
STARTOFSELECTION.
callSCREEN100.
*&**&ModuleSTATUS_0100OUTPUT*&*
1/30/2015 DisplayingALVinSplitterContainerwithheadingusingABAPOO
http://sapuniversity.eu/displayingalvinsplittercontainerwithheadingusingooabap/ 3/5
*text**MODULESTATUS_0100OUTPUT.*SETPFSTATUS'xxxxxxxx'.*SETTITLEBAR'xxx'.PERFORMcreate_objects.PERFORMspli_main_cont.PERFORMDISP_HEADING.PERFORMdisp_alv1.PERFORMdisp_alv2.ENDMODULE."STATUS_0100OUTPUT*&**&FormCREATE_OBJECTS*&**text***>p1text*p1text*GET_CONTAINEREXPORTINGROW=1COLUMN=1RECEIVINGCONTAINER=O_PART1.
CALLMETHODO_SC>GET_CONTAINEREXPORTINGROW=2COLUMN=1RECEIVINGCONTAINER=O_PART2.ENDFORM."SPLI_MAIN_CONT
*&**&FormDISP_ALV1*&**text***>p1text*SET_TABLE_FOR_FIRST_DISPLAYEXPORTINGI_STRUCTURE_NAME='MARA'CHANGINGIT_OUTTAB=I_MARA.ENDFORM."DISP_ALV1
*&**&FormDISP_ALV2*&**text***>p1text*SET_TABLE_FOR_FIRST_DISPLAYEXPORTINGI_STRUCTURE_NAME='MAKT'CHANGINGIT_OUTTAB=I_MAKT.
ENDFORM."DISP_ALV2
*&**&FormDISP_HEADING*&**text***>p1text*HEADING.CALLMETHODDD>ADD_TEXTEXPORTINGTEXT='MATERIALMASTERREPORT'SAP_STYLE=HEAD.
CALLMETHODDD>DISPLAY_DOCUMENTEXPORTINGCONTAINER='HEADING'.
1/30/2015 DisplayingALVinSplitterContainerwithheadingusingABAPOO
http://sapuniversity.eu/displayingalvinsplittercontainerwithheadingusingooabap/ 4/5
ENDFORM."DISP_LOGO
7. Saveandactivatetheentireprogram.Execute(F8),
8. TheresultclearlyillustratesthepurposeandadvantageofdisplayingtheALVinSplitterContainer.
AvinashPalavai,SAPTechnicalConsultant,StraVisITSolutions.MoreaboutAvinashPalavai
Tweet
0 0
3 thoughts on Displaying ALV in Splitter Container withheading using ABAP OO
Leave a Reply
Name*
Email*
Share
0
Facebooksocialplugin
Addacomment...
Commentusing...
By MOHIT on 26 November 2013 at 11:49
Kindlyreviewhecodeyouhavgiven..willitworkinanycase..waitingfortheupdatedone..
Comment
By Avinash Palavai on 27 November 2013 at 04:23
Thatisaworkingcode,andwillwork....
Comment
By Rafa on 18 December 2013 at 20:18
Noworkingcode.Pleaseupdate.
Comment
1/30/2015 DisplayingALVinSplitterContainerwithheadingusingABAPOO
http://sapuniversity.eu/displayingalvinsplittercontainerwithheadingusingooabap/ 5/5
Comment
PostComment
Home AboutUs SAPTRAINING Authors BecomeanAuthor OtherSAPResources Contact