Abap objects and selection screen

Hello everybody,
I am interested in your ways of implementing selection-screens in the style of ABAP Objects.
In earlier times (when I used to implement ABAP objects in a procedural way) I just put the selection-screen commands in an include or a form routine of my ABAP report. So it was possible to run the report in background.
Now I read something about selection-screens/dynpros and "separation of concerns" in the book "ABAP Objects" written by Keller. He advises using function groups to encapsulate presentation from logical matters. (Selection-screen commands are in an automatically generated include now). I implemented this way. (ABAP report with a local class, which has a main method, where function module of the function group is called). It works, but i see no chance to run my report in background now.. but I need to run the report in background.
Does anybody know a solution without deleting function group?
What do you think is the best way of using selection-screen-commands and ABAP Objects, especially regarding running in background?
Thx for your advise in advance.
Kind regards,
Anne

Hi Naimesh,
thx for explanation. I am not sure, if I understood everything in the right way.
Where do you write the code for building the selection-screen? (PARAMETERS, SELECT-OPTIONS etc.)
If you write these commands in a class method, you will get a syntax error ( because it's forbidden per definition of ABAP objects). So, am I right assuming that you put the coding just at the beginning of the ABAP report ? And after START-OF-SELECTION-event you start the processing... ?
Furthermore, I don't really understand why you create an separate class for ALV. I found your "SAP abap help"-blog, where you explained the concept of MVC ((By the way, well done!), but you didn't mention an "ALV class" there..
Mh.. another question - have you ever combined MVC with object services?
At the moment I'm working on a software project where I use object services. I created 2 persistent classes via SE24 and one local class in my ABAP Report.
I don't really see possibility to implement MVC in this project without change very much of coding and class structure...
In my opinion the M (data&business logic) are my existing global classes and my local class is kind of Controller class?!
Thx in advance,
Anne

Similar Messages

  • ABAP Objects and BADI

    HI
    Can anyone give me the link for ABAP Objects and BADI'S.
    I would like to have ABAP Objects with Example as well as BADIS.
    Please tell me as iam new to those.
    Thanks in advance

    Hi,
    ABAP objects have an elaborated list plz mention specific objects u want to know.
    These are few of the links which I got through the sdn.sap for the objects like ALV,LSMW,IDOCS, etc..
    Start with this.Refer this
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Reports
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SAPScripts
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    SAP SCRIPT FIELDS
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
    scripts easy material
    http://www.allsaplinks.com/sap_script_made_easy.html
    Debugging Document.
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Remote Function Call:
    RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
    RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
    RFCs manage the communication process, parameter transfer and error handling.
    http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Refer this
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    http://www.techinterviews.com/?p=198
    http://www.techinterviews.com/?p=326
    http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
    http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
    http://www.sap-img.com/abap/abap-interview-question.htm
    http://www.allinterview.com/Interview-Questions/ABAP.html
    links for OO ABAP.
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    some more materials.
    Go through the following Documents Links & Materials for ABAP Objects
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    /people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/07/09/understandingABAPObjects&
    Please visit the following links:
    http://service.sap.com/erp
    http://solutionbrowser.erp.sap.fmpmedia.com/ (Functional prespective)
    http://service.sap.com/instguides --> mySAP Business Suite Applications --> mySAP ERP --> mySAP ERP 2005 --> Upgrade
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOVC/LOVC.pdf
    For Functionality Differences pls refer to the below site -
    http://solutionbrowser.erp.sap.fmpmedia.com/
    FOR BADI'S:
    Check this blogs 2 find a BADI:
    How to find if we have a BADI in Transaction VB02
    Re: BADI for screen enhancement in MM01  transaction
    Re: BADI and User exits
    How To Define a New BAdI Within the Enhancement Framework (Some Basics About the BAdI,BAdI Commands in ABAP,
    When to Use a BAdI?)
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    How to implement a BAdI And How to Use a Filter
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    Introducing Business Add-Ins
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f3202186-0601-0010-6591-b832b1a0d0de
    How to implement BAdi in Enhancement Framework
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702
    Business Add-Ins
    http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm
    BAdI: Customer-Defined Functions in the Formula Builder
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    Difference Between BADI and User Exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    To Use BADI - Business Add In you need to Understand ABAP OO Interface Concept
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    You can check the links for Step by Step Badi Implemntation
    (very helpful self learning docs).
    BADI Step by Step Implementation.
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/63ee7f486cc143a560799d8803ce29/content.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/badi-general+information&
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    The specified item was not found.
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    http://www.allsaplinks.com/badi.html
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-serieshttps:///people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework /people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40921dd7-d5cf-2910-1894-bb62316afbd1
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
    Difference Between BADI and User Exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Doc plz on abap object and Module pool prog

    Hi all,
    Please any send the details and use full documents on ABAP objects and Module Programming.
    Its very orgent for me
    THanks and Regards
    vamsin
    [email protected]

    Hi ALL,
    Thank you for your replies, I guess I dint convey my question properly,
    I have called a Selection-Screen in Module Pool .
    These were the steps which i followed to archive this.
    1. Created a subscreen area in your screen layout (Main Screen- Module Pool).
    2.  In the Top Include of  Module pool program declared a Selection-Screen as a subscreen.
         TOP-INCLUDE.
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
        SELECTION-SCREEN BEGIN OF BLOCK d3 WITH FRAME TITLE text-003.
          PARAMETERS : grdate RADIOBUTTON GROUP r2  DEFAULT 'X' USER-COMMAND FR1.  " GRN date
          PARAMETERS : crdate RADIOBUTTON GROUP r2 .       " Current Date
        SELECTION-SCREEN END OF BLOCK d3.
       SELECTION-SCREEN END OF SCREEN 400.
    3.  In the PBO and PAI of the Main Screen called Subscreen.
          PBO
    CALL SUBSCREEN SUB_SCREEN_STAPLES INCLUDING 'zprogram' '0400'.
         PAI
    CALL SUBSCREEN SUB_SCREEN_STAPLES..
    I have to do certain operations when the user selects the radio button on subscreen (which is actually a Selection-Screen).
    I have tried to assign the function code  to radio button and as this screen is a Selection-Screen I cannot use PAI and PBO.
    Used the below code in TOP-INCLUDE.
    TOP-Include
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP r2.
      CASE ok_rb.
        WHEN 'FR1' .
          IF crdate = 'X'.
            pdate = sy-datum.
          ELSE.
            pdate = sy-datum + 1.
          ENDIF.
      ENDCASE.
    But after executing this logic the flow is going to PAI which is validating the mandatory fields of Module-Pool Screen (which is not part of sub screen), hence not solving my purpose.
    Is there any way by which I can Only trigger the AT-Selection screen for the selection screen.
    or Any other approach which will solve my purpose.
    Thanks a lot for Suggestions and Inputs.

  • Difference between abap object and function

    hi all,
    i read the book on abap object of the difference between abap object and classical abap.
    i know that there is only 1 instance of a specific function group but somehow i still not so clear why subsequent vehicle cannot use the same function. i also can use the do and loop to call the function? if cannot then why?
    hope can get the advice.
    thanks
    using function *********
    function-pool vehicle.
    data speed type i value 0.
    function accelerate.
    speed = speed + 1.
    endfunction.
    function show_speed.
    write speed.
    endfunction.
    report xx.
    start-of-selection.
    *vehicle 1
    call function 'accelerate'.
    call function 'accelerate'.
    call function 'show_speed'.
    *vehicle 2
    *vehicle 3
    *****abap object*******
    report xx.
    data: ov type ref to vehicle,
             ov_tab type table of ref to vehicle.
    start-of-selection.
    do 5 times.
    create object ov.
    append ov to ov_tab.
    enddo.
    loop at ov_tab into ov.
    do sy-tabix times.
    call method ov->accelerate.
    enddo.
    call method ov->show_speed.
    endloop.

    Hi
    Now try this:
    REPORT ZTEST_VEHICLEOO .
    PARAMETERS: P_CAR   TYPE I,
                P_READ  TYPE I.
    *       CLASS vehicle DEFINITION
    CLASS VEHICLE DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA: MAX_SPEED   TYPE I,
                    MAX_VEHICLE TYPE I,
                    NR_VEHICLES TYPE I.
        CLASS-METHODS CLASS_CONSTRUCTOR.
        METHODS CONSTRUCTOR.
        METHODS ACCELERATE.
        METHODS SHOW_SPEED.
        METHODS GET_SPEED EXPORTING E_SPEED TYPE I.
      PRIVATE SECTION.
        DATA: SPEED      TYPE I,
              NR_VEHICLE TYPE I..
    ENDCLASS.
    *       CLASS vehicle IMPLEMENTATION
    CLASS VEHICLE IMPLEMENTATION.
      METHOD CLASS_CONSTRUCTOR.
        NR_VEHICLES = 0.
      ENDMETHOD.
      METHOD CONSTRUCTOR.
        NR_VEHICLES = NR_VEHICLES + 1.
        NR_VEHICLE  = NR_VEHICLES.
      ENDMETHOD.
      METHOD ACCELERATE.
        SPEED = SPEED + 1.
        IF MAX_SPEED < SPEED.
          MAX_SPEED   = SPEED.
          MAX_VEHICLE = NR_VEHICLE.
        ENDIF.
      ENDMETHOD.
      METHOD SHOW_SPEED.
        WRITE: / 'Speed of vehicle nr.', NR_VEHICLE, ':', SPEED.
      ENDMETHOD.
      METHOD GET_SPEED.
        E_SPEED = SPEED.
      ENDMETHOD.
    ENDCLASS.
    DATA: OV     TYPE REF TO VEHICLE,
          OV_TAB TYPE TABLE OF REF TO VEHICLE.
    DATA: V_TIMES TYPE I,
          FL_ACTION.
    DATA: V_SPEED TYPE I.
    START-OF-SELECTION.
      DO P_CAR TIMES.
        CREATE OBJECT OV.
        APPEND OV TO OV_TAB.
      ENDDO.
      LOOP AT OV_TAB INTO OV.
        IF FL_ACTION = SPACE.
          FL_ACTION = 'X'.
          V_TIMES = SY-TABIX * 2.
        ELSE.
          FL_ACTION = SPACE.
          V_TIMES = SY-TABIX - 2.
        ENDIF.
        DO V_TIMES TIMES.
          CALL METHOD OV->ACCELERATE.
        ENDDO.
        CALL METHOD OV->SHOW_SPEED.
      ENDLOOP.
      SKIP.
      WRITE: / 'Higher speed', VEHICLE=>MAX_SPEED, 'for vehicle nr.',
                VEHICLE=>MAX_VEHICLE.
      SKIP.
      READ TABLE OV_TAB INTO OV INDEX P_READ.
      IF SY-SUBRC <> 0.
        WRITE: 'No vehicle', P_READ.
      ELSE.
        CALL METHOD OV->GET_SPEED IMPORTING E_SPEED = V_SPEED.
        WRITE: 'Speed of vehicle', P_READ, V_SPEED.
      ENDIF.
    Try to repeat this using a function group and I think you'll undestand because it'll be very hard to do it.
    By only one function group how can u read the data of a certain vehicle?
    Yes you can create in the function group an internal table where u store the data of every car: in this way u use the internal table like it was an instance, but you should consider here the example is very simple. Here we have only the speed as characteristic, but really we can have many complex characteristics.
    Max

  • Abap objects and alv

    using abap objects and alv  There should be  push button (Switch drill down button) at the top of the report. While pressing Switch drill down button it should display a popup window like
    material
    material gorup
    plant
    For example if a material group is selected, the report should be displayed with respect to material group.
    For example if it is Plant, the report should be displayed with respect to Plant.
    Standard Drill down should be first with respect to material it should be displayed…after clicking it with respect to vendor it should be displayed…after that w.r.t month.
    There should be  push button ( topno button) at the top of the report.
    you have to choose a key figure field and press topno.if  PO value is chosen and if you press topno and give value as 3,the top three po value should be displayed.
    Totals for Po value, order quantity and GR quantity should be displayed..
    please, can anybody send me the code for above criteria immediatly.

    Go through the Standard programs.. BCALV_GRID_*
    BCALV_GRID_05 suits ur req.
    Regards
    Bhavani

  • Program using BAPI and selection screens

    program to compare two infoobjects using BAPI and selection screen in ABAP

    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • ABAP Objects and EJB

    Hi every one,
    Can <b>ABAP Objects and EJB</b> be compared?
    -Naveen.

    Hi Naveen,
    Check this guide- might be useful-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/dc09af90-0201-0010-d09b-bd611a11070b
    Regards,
    Moorthy

  • Include and selection screen

    Hi Experts ,
         i have a problem regarding include and selection screen.
    i have an include program , in which i have  defined my selection screen. and this include has been called in many program .
      but problem is that i have to maintain selection text and text element for every program .
    is there any way ....that i have a single selection text and text element for every program ...in which that include called .
    Thanks and Regards
    Priyank Dixit

    Hi again,
    1. I tried the same thing - include bdcrecx1
       and it only provides radiobuttons, parameters and checkboxes.
       The labels/text elements are totally empty.
    PS: Only after we GOTO--->Text Elements
         and again activate them, (by ticking the 'dictionary checkbox or entering some appropriate text);
    do they appear properly in the selection screen.
    regards,
    amit m.

  • Craete a simple abap object to select data from a table and display

    Hi,
    I know the concept of abap objects but i never worked on it,
    can any one give me simple example of how to create an abap object to display data from mara table.also please send me documents or info regd ABAP OBJECTS.
    I want to write a simple report in terms of abap object
    Regards,
    Sowjanya

    hi,
    Here is hte sample program in se38.
    REPORT ZFGLI00003
    *-- Include for data declarations and performs
    include ZFGLI00003_f01.
    *--Include for Classes and their Implementation
    include ZFGLI00003_cl.
    *                selection-screen                                      *
    *-- Selection Values : Block1
    selection-screen begin of block b1 with frame title text-001.
    *--         Ledger
    parameters: p_rldnr  like zzprodnt-rldnr default 'NP'.
    *--         Fiscal year
    parameters: p_ryear  like zzprodnt-ryear.
    *--         Period(month)
    parameters: p_rpmax  like zzprodnt-rpmax.
    selection-screen end of block b1.
    *-- Selection Values : Block2
    selection-screen begin of block b2 with frame title text-002.
    *--              Company ID's
    select-options : s_glcomp  for ZZPRODNT-ROBUKRS .
    *--              Profit Center
    select-options : s_prctr   for ZZPRODNT-RPRCTR .
    *--              Product Assignment
    select-options : s_prasn   for ZZPRODNT-RZZWWZ01 .
    *--              Corporate Brand
    select-options : s_crpbd   for ZZPRODNT-RZZWWZ05 .
    selection-screen end of block b2.
    *-- Selection Values : Block3  Download Options
    selection-screen begin of block b3 with frame title text-003.
    parameters : p_local radiobutton group 1,
                 p_unix  radiobutton group 1,
                 p_path  like rlgrap-filename obligatory
                         default 'C:P20Z_Formatted.txt'(009).
    selection-screen end of block b3.
    *            At Selection-Selection on value-request  for file path    *
    at selection-screen on value-request for p_path.
      if p_unix <> 'X'.
    *-- Getting F4 help for output file
        perform get_filename changing p_path.
      else.
        message i999(zi) with
              'Sorry !! Function not available for UNIX file.'(i01).
      endif.
    *-- At selection screen validations
    at selection-screen on p_path.
      if p_unix <> 'X'.
    *-- Validate local file
        if p_path+1(2) <> ':'.
          message e999(zi) with 'Invalid file path'(006).
        endif.
      else.
    *-- Validate unix file
        if p_path+0(1) <> '/'.
          message e999(zi) with 'Invalid file path'(006).
        endif.
      endif.
    *                   Initialization                                    *
    initialization.
    *-- Initialize the period
      perform init_period changing p_rpmax p_ryear.
    *                    start-of-selection                               *
    start-of-selection.
      data : o_tm1_intf type ref to lcl_tm1_intf.
      create object o_tm1_intf.
    *-- Extract the data from ZZPRODNT
      call method o_tm1_intf->get_data exporting e_rldnr  = p_rldnr
                                                 e_ryear  = p_ryear
                                                 e_rpmax  = p_rpmax
                                                 e_glcomp = s_glcomp[]
                                                 e_prctr  = s_prctr[]
                                                 e_prasn  = s_prasn[]
                                                 e_crpbd  = s_crpbd[]
                                       importing i_subrc  = v_subrc.
    *   INCLUDE ZFGLI00003_CL                                              *
    *       CLASS lcl_tm1_intf IMPLEMENTATION
    class lcl_tm1_intf definition.
      public section.
    *-- Data Declaration
        data  : lv_date     type sy-datum,       "Date
                lv_time     type sy-uzeit,       "Time
                lv_count    type i,              "Count for total records
                lv_acsline  type zfgl014-acsline,"ACS line code
                lv_amt_curr type zzprodnt-kslvt, "current month amount
                lv_amt_ytd  type zzprodnt-kslvt, "YTD Amount
                lv_check,                        "check if any record is
                                                 "downloaded
                lv_msg(100),                     "message
                lv_count_s(5)  ,                 "Count for total(char)
                lv_amt_curr_s(23),               "Current month amount(char)
                lv_amt_ytd_s(23),                "YTD Amount(char)
                lv_ksl_pd(17),                   "KSLxx
                lv_period(2) type n.             "month(period)
    *-- Types Declaration
        types : ty_rldnr type zzprodnt-rldnr,    "Type for Ledger
                ty_ryear type zzprodnt-ryear,    "Type for Fiscal Year
                ty_rpmax type zzprodnt-rpmax,    "Type for Period
                ty_glcomp type range of char4,   "Type for company selection
                ty_prctr type range of char10,   "Type for profit center sel
                ty_prasn type range of char6,    "Type for prod assignmt sel
                ty_crpbd type range of char4,    "Type for Corp Brand sel
                begin of ty_file,                "Type for File
                  line(150),
                end of ty_file,
                begin of ty_ZZPRODNT,            "Type-ledger summary table
                  company       type OBUKR,      "Company
                  gl_acct       type RACCT,      "GL Account
                  cst_ctr       type KOSTL,      "Cost Center
                  prt_ctr       type PRCTR,      "Profit Center
                  rfarea        type FKBER,      "Functional Area
                  wbs_ele       type PS_POSID,   "WBS Element
                  prd_***       type RKEG_WWZ01, "Product Assignment
                  corp_bd       type RKEG_WWZ05, "Corporate Brand
                  ksl01         type KSLXX9,     "Total of transactions - 01
                  ksl02         type KSLXX9,     "Total of transactions - 02
                  ksl03         type KSLXX9,     "Total of transactions - 03
                  ksl04         type KSLXX9,     "Total of transactions - 04
                  ksl05         type KSLXX9,     "Total of transactions - 05
                  ksl06         type KSLXX9,     "Total of transactions - 06
                  ksl07         type KSLXX9,     "Total of transactions - 07
                  ksl08         type KSLXX9,     "Total of transactions - 08
                  ksl09         type KSLXX9,     "Total of transactions - 09
                  ksl10         type KSLXX9,     "Total of transactions - 10
                  ksl11         type KSLXX9,     "Total of transactions - 11
                  ksl12         type KSLXX9,     "Total of transactions - 12
                  ksl13         type KSLXX9,     "Total of transactions - 13
                  ksl14         type KSLXX9,     "Total of transactions - 14
                  ksl15         type KSLXX9,     "Total of transactions - 15
                  ksl16         type KSLXX9,     "Total of transactions - 16
                end of ty_ZZPRODNT.
    *-- Structure Declaration
    *           Structure for final file
        data  : x_file         type ty_file,
    *           Structure for Product Ledger Summary table
                x_ZZPRODNT     type ty_ZZPRODNT,
    *           Structure for Functional Area to ACS line mapping
                x_zfgl014      type zfgl014.
    *-- Internal Table Declaration
    *           Table for records of Product Ledger Summary table
        data  : it_ZZPRODNT     type table of ty_ZZPRODNT,
    *           Table for final file
                it_file         type table of ty_file,
    *           Table for Functional Area to ACS line mapping
                it_zfgl014      type table of zfgl014.
    *-- Method Declaration.
        methods : get_data      importing e_rldnr  type ty_rldnr
                                          e_ryear  type ty_ryear
                                          e_rpmax  type ty_rpmax
                                          e_glcomp type ty_glcomp
                                          e_prctr  type ty_prctr
                                          e_prasn  type ty_prasn
                                          e_crpbd  type ty_crpbd
                                exporting i_subrc type sy-subrc.
    endclass.                    "lcl_tm1_intf DEFINITION
    *       CLASS lcl_tm1_intf IMPLEMENTATION
    class lcl_tm1_intf implementation.
    *-- Method get_data selects the North American Product Ledger Summary
    *   table data and then maps the Functional Area to ACS line to get
    *   the ACS line code
      method get_data.
    *-- Local Variable
        DATA: L_ZZPRODNT TYPE TY_ZZPRODNT.
    *-- Get the data from North American Product Ledger Summary table
        select robukrs
               racct
               rcntr
               rprctr
               rfarea
               rzzwbs_el
               rzzwwz01
               rzzwwz05
               ksl01
               ksl02
               ksl03
               ksl04
               ksl05
               ksl06
               ksl07
               ksl08
               ksl09
               ksl10
               ksl11
               ksl12
               ksl13
               ksl14
               ksl15
               ksl16
          from zzprodnt
          into table it_ZZPRODNT
         where rldnr    = e_rldnr
           and ryear    = e_ryear
           and rpmax    = e_rpmax
           and ROBUKRS  in e_glcomp
           and RPRCTR   in e_prctr
           and RZZWWZ01 in e_prasn
           and RZZWWZ05 in e_crpbd.
        if sy-subrc = 0.
          loop at it_ZZPRODNT into l_zzprodnt.
            condense l_ZZPRODNT-rfarea no-gaps.
            if l_ZZPRODNT-rfarea is initial.
              delete it_ZZPRODNT.
            endif.
          endloop.
    *-- Get the Functional Area to ACS line code mapping data
          select *
            from zfgl014
            into table it_zfgl014
             for all entries in it_ZZPRODNT
           where fkber = it_ZZPRODNT-rfarea .
          if sy-subrc = 0.
          endif.
        endif.
        i_subrc = sy-subrc.
      endmethod.                    "get_data
    endclass.                    "lcl_tm1_intf IMPLEMENTATION
    *   INCLUDE ZFGLI00003_F01                                             *
    *                             Table
    tables : zzprodnt.
    *                          Data Declaration
    data : v_subrc type sy-subrc.
    *&      Form  get_filename
    *  Description : This subroutine is used for F4 Prompting
    form get_filename changing p_path like rlgrap-filename.
    *-- Local variables
      data : lv_file  like ibipparms-path, "Local file for upload/download
             lv_repid like syst-cprog,     "ABAP program, caller in external
                                           "procedures
             lv_dynnr type syst-dynnr.     "Current screen No
      lv_repid = syst-cprog.
      lv_dynnr = syst-dynnr.
    *-- Function module used for F4 help
      call function 'F4_FILENAME'
           exporting
                program_name  = lv_repid
                dynpro_number = lv_dynnr
           importing
                file_name     = lv_file.
      move lv_file to p_path.
    endform.                    " get_filename
    *&      Form  init_period
    FORM init_period changing p_rpmax p_ryear.
      if sy-datum+4(2) = 01.
        p_rpmax = 12.
        p_ryear = sy-datum+0(4) - 1.
      else.
        p_rpmax = sy-datum+4(2) - 1.
        p_ryear = sy-datum+0(4).
      endif.
    ENDFORM.                    " init_period
    Hope this helps.
    Regards,
    Richa

  • ABAP Objects and table processing (with logical databases)

    I have a report that is written right now using procedural abap and a logical database.  The report is structured follows (high level):
    start-of-selection.
    get pernr.
      perform get_it0001 using wtab.
      perform get_it0002 using wtab.
      perform get_it0003 using wtab.
      append wtab to itab.
    end-of-selection.
      call function 'reuse_alv_grid_display'
        exporting
          i_structure_name       = 'itabstructure'
        tables
          t_outtab               = itab.
    So basically I'm going through a bunch of personnel numbers, getting a few infotypes and outputting to ALV.  I don't see where ABAP Objects is going to help me for this particular program. 
    Can somebody show me where OO ABAP would make this easier?  Does it even make sense to use OO when you're processing with a logical database?  (Not just PNP, but any logical database in general).
    Thanks in advance.

    Hello Lee
    I assume that the routines GET_ITnnnn are written by yourself. For reading infotypes ABAP Objects provides us with same very helpful classes as shown below:
    * define data
      DATA:
        gif_employee      type ref to if_pt_employee,
        go_employee       type ref to cl_pt_employee,
        gt_infotypes      TYPE tim_tmw_itlist_tab,
        go_control        TYPE REF TO if_pt_td_control,
        go_data           TYPE REF TO if_pt_td_base,
        go_pnnnn          TYPE REF TO if_pt_td_itnnnn,
        gt_p0001          TYPE TIM_P0001_TAB,
        gt_p0002          TYPE TIM_P0002_TAB,
        gt_p0003          TYPE TIM_P0003_TAB.
    start-of-selection.
    GET pernr.
    <b>* Create employee instance</b>
      gif_employee = cl_pt_employee=>get_employee( pernr ).
      go_employee ?= gif_employee.
    <b>* Get master infotypes (0001, 0002)</b>
      CALL METHOD go_employee->get_master_data
        EXPORTING
          im_begda = id_fromdate
          im_endda = id_todate
        IMPORTING
    *      EX_I0000 =
          EX_I0001 = gt_p0001
          EX_I0002 = gt_p0002
    *      EX_I0007 =
    *      EX_I0008 =
    <b>* Append all other required infotypes to itab</b>
      APPEND '0003' TO gt_infotypes.
      CALL METHOD go_employee->get_infotypes
        EXPORTING
          i_itlist      = gt_infotypes
          i_fromdate    = id_fromdate  " start date
          i_todate      = id_todate    " end date
    *      I_FILTER      =
          i_noauthcheck = 'X'
        IMPORTING
          e_result      = gt_infty_request
          e_retcd       = gd_retcd.
    * Please see documentation of parameter e_retcd...
      LOOP AT gt_infty_request INTO go_control.
        go_data = go_control->data.  <b>" get data object</b>
    *   Casting
        TRY.
            go_pnnnn ?= go_data.
          CATCH cx_sy_move_cast_error.
            CONTINUE.
        ENDTRY.
    <b>*   Convert infotype (semi-transparent -> transparent)</b>
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = lo_pnnnn->prelp
          IMPORTING
            pnnnn = gs_p0003.
        APPEND gs_p0027 TO gt_p0003.
      ENDLOOP.
    The class CL_PT_EMPLOYEE provides us already with very easy access to so-called master infotypes (000, 0001, 0002, 0007 and 0008). All other infotypes can be read using method GET_INFOTYPES.
    Using these classes we have a very convenient and standardized way of accessing all kinds of infotypes.
    Regards
      Uwe

  • ABAP Program using Selection Screen in Process Chain

    Hi,
    I have included an ABAP Program in the Process Chain.
    The ABAP Program takes a selection screen value from user before execution.
    I have created a variant for both the ABAP Process (YPV_ABC) and a variant for the Selection Screen (YPV_XYZ).
    The ABAP Program executes perfectly well in SE 38.
    I get the following message when I execute the Process Chain.
    "Status Change of Process ABAP YPV_ABC.
    Save Status and Trigger Events if Appropriate "
    When I click Yes, the ABAP Process becomes red.
    These are error messages in the log
    516 -  Job started     
    550 -  Step 001 started (program RSPROCESS, variant &0000000012961, user ID ALEREMOTE)
    25 -    Could not ascertain code page     
    546 -  Job cancelled after system exception ERROR_MESSAGE     
    My questions are:
    1) Is it possible to use an  ABAP Program which has a user input screen in Process Chain?
    2) Could you please help  with the above error?

    1) Is it possible to use an ABAP Program which has a user input screen in Process Chain?
    ABAP programs, with variants established for selection screens, are possible. We use them quite extensively for setting triggers to allow Process Chain to continue after an Interrupt Process has been hit.
    2) Could you please help with the above error?
    I'm not quite sure what could be causing this. When you tested this program in SE38, did you test it with the same variant for the selection screen and did you execute it in background?

  • Trigger Process chains through ABAP program using selection screens

    Hi All
       I am loading flat files through process chains. My requirment is such that i need to create a ABAP selection screen so that user can load the flat file from his PC. when the user is loading the flat file i have to copy the file onto the application server folder and then display him the monitor errors/warnings (if any). when my data load is complete i need to archive the file with time stamp onto the application server folder.
    Please help me in this regard....
    thanks and regards
    sairam phani

    Hi sairam
    can you check this link hope this might help you out
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    Going thru your query hope i get the right   solution
    Thanks=points in SDN
    Sanjeev kumar hamsala

  • Background processing for ABAP report with selection screen

    Hi ABAP Gurus,
    I m facing a strange problem in scheduling a background job for my report with a selection screen. I have a variant for the report.
    I scheduled a job, but it seems to be not doing anything though all the system resources are available. The job overview shows "Acive" for the job. The job is neither stopping anything, it is just sitting there In SM50, the status shows "On Hold".
    Any ideas/comments on the problem and how this can be overcome?
    Qucik replies and solutions will be highly appreciated as this is a crucial part for a go-live project.
    Thanks in advance.
    Shivani.

    Yes. My report has a selection-screen which requires user input. But I have created  a variant for the report and trying to run it in background using this variant. But facing this problem.
    Strange thing is, instead of the usual SM36/SM37 option where we schedule and monitor background jobs, this option does not work for my report.
    But I tried through SE38, and from my selection screen I selected "Schedule background job" and "run immediately" option, and this works. Though I still use SM37 to monitor this background job.
    I have never faced such a situation before.
    Any hints/tips why this happens and how this can be overcome in the future?
    Thanks in advance.
    Shivani.

  • Auth infoobject both in free char and selection screen

    Hi,
    Is it possible that I define authorization on, say operating unit, in BW and then provide the operating unit in free characteristic and query selection screen?
    Are there any restrictions to the above scenario?

    Hi Narendra,
    Appreciate your best practice suggestion.
    What I would like to understand is this:
    1 - SAP provided the feature that if we choose processing by auth, it looks at values, defined in auth objects, and populates
         them on the selection screen automatically. Indeed a great feature.
    2 - SAP even gave us freedom to use user exit variables to make it dynamically chosen.
    3 - Even hierarchy based auth framework is provided. Again a great feat.
    4 - Even when user don't give anything in selection screen and just execute, the report is run only for authorized values.
    Then why can't it happen that when user drags the auth IO from free char to report, SAP looks up the authorized values and shows then against the corresponding data record just like it does when we provide values at selection screen.
    I know I might be questioning the SAP auth design and pardon me for my audacity but I just want to understand the rationale behind this restriction.
    You also mentioned about the work arounds to my problem..can you share some so that I might be able to implement them and see if users are fine with it?
    Regards
    Debanshu

  • Radio button and selection screen

    hi
    my requirement is that if the user enters some particular combination of value in the select options and clicks a particular radio button there should be an error message displayed.
    1)  I am getting the error message in the form a dialog box , but it has only option of  exit , and the user is thrown of the screen. my requirement is that after the error message the user must still be at the same screen so that he can enter new values.
    2)  the code that i have written also has one more anamoly that the displaying of error depends upon the sequence of  actions .
      if  i enter the value in the select option first and then click the radio button then the error message is displayed which is correct.
    but it doesnt work i click the radio button first and then enter the value, the program is executed and NO ERROR message is flashed.
    here is what i have written
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE  text-001.
    SELECT-OPTIONS: p_year  for  s021-spmon obligatory ,
                    p_kunag  FOR vbrk-kunag  ,
                    p_matnr  FOR vbrp-matnr  ,
                    p_augru  FOR vbrp-augru_auft modif id a1 ,
                    p_vbeln  FOR vbrk-vbeln  .
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE  text-002.
    PARAMETERS:  nrw RADIOBUTTON GROUP g1 user-command check,
                 mwd RADIOBUTTON GROUP g1 ,
                 rws RADIOBUTTON GROUP g1 ,
              edu RADIOBUTTON GROUP g1 ,
             standard RADIOBUTTON GROUP g1 default 'X' .
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    at selection-screen output.
       loop at screen.
       if nrw = 'X' and p_augru-low EQ 'MWD'.
           MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
       endloop.
    START-OF-SELECTION.
    CASE 'X'.
    WHEN nrw.
    PERFORM set_dates_nrw.
          PERFORM load_data_nrw.
          PERFORM get_cust_info_nrw.
          PERFORM set_alv_field_cat_nrw.
          PERFORM display_alv_nrw.
    endcase.

    Hi
    Change this piece of code
    at selection-screen output.
    loop at screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.
    endloop.
    by
    <b>at selection-screen.
    if nrw = 'X' and p_augru-low EQ 'MWD'.
    MESSAGE e000(oo) WITH '<Please Enter the correct Order Reason>'.
    endif.</b>
    Reward points if useful.
    Regards,
    Atish

Maybe you are looking for

  • How To Edit Text?

    I just upgraded to EportPDF. With your subscription you can: Enjoy unlimited online conversions from PDF to Word (DOCX). Make scanned text editable. Maintain page, paragraph, and font attributes. Preserve tables, images, and multi-column text. Export

  • AS3 comboBox problem.

    Ok, I have a simple ComboBox with instance name of dragonCombo A Lable with an instance name of dragonLabel Using a an AS3 called Dragon.as When the ComboBox is clicked, a picture should pull up.   The problem is, there are no errors, but The ComboBo

  • Question regarding dropped inquiries.

    recently some of my Transunion inquiries have been coming off my credit report couple of months before the 2 year mark.  which is great. transunion has jumped 20 points in the last month.  my question is equifax inquiries are still there.no of them h

  • Can I use Oracle SQL Developer to "Move" data?

    Hello, I'm new to Oracle and I'm trying to use Oracle SQL Developer to export data from one table (on server A) to another table (on sever B). I'm able to create a .ldr file but I don't know how to use the .ldr file in Oracle SQL Developer? I would a

  • SAP SRM error when debugging from Portal

    Hi, I have put an external debugging point in the backend SRM system and trying to process the Shopping cart from portal. It is giving an error message at the statement where I have put the debug point. The error message which I get in st22 is: The I