<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: abap objects and selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897346#M1480827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you must put all parameters in Z_ABAPOO_SELSCR, and pass them to class and function module. You don't need to put a selection screen in the function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 May 2010 09:56:44 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2010-05-05T09:56:44Z</dc:date>
    <item>
      <title>abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897339#M1480820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am interested in your ways of implementing selection-screens in the style of ABAP Objects.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Does anybody know a solution without deleting function group? &lt;/P&gt;&lt;P&gt;What do you think is the best way of using selection-screen-commands and ABAP Objects, especially regarding running in background?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for your advise in advance.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 15:40:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897339#M1480820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-04T15:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897340#M1480821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I prefer to create an executable Report program when I have to create Selection Screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achieve the separation of concerns or MVC, I create a class for the Selection screen attribute, a MAIN class which act as the controller (as C of the MVC) along with the Report itself. I also create a DATA class  ( as M of the MVC) which contains my actual data selection and processing. If I have to generate the File (as V of the MVC), I create the class for the File Handling. If I have to generate the output as ALV, I create the class for ALV. I reference Data class, Selection class and ALV class in the MAIN class (act as Facade). I also reference the Selection screen object to DATA class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the report program, I basically instantiate facade (ref to MAIN) which in-turn instantiate all your objects. In the START-OF-SELECTION, I set all the Attributes from the selection screen to selection screen object. Based on the requirement, I get the data by calling the GET_DATA method of the Facade which calls the methods of the Data Class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 16:04:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897340#M1480821</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2010-05-04T16:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897341#M1480822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; but i see no chance to run my report in background now.. but I need to run the report in background.&lt;/P&gt;&lt;P&gt;you must still use the classic reports to run in background (but maybe there is a standard "submitter report" with program and variant in selection screen, so that you don't need to create your own submitter report)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 May 2010 16:45:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897341#M1480822</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-05-04T16:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897342#M1480823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx for explanation. I am not sure, if I understood everything in the right way.&lt;/P&gt;&lt;P&gt;Where do you write the code for building the selection-screen? (PARAMETERS, SELECT-OPTIONS etc.)&lt;/P&gt;&lt;P&gt;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... ?&lt;/P&gt;&lt;P&gt;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.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mh.. another question - have you ever combined MVC with object services?&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;I don't really see possibility to implement MVC in this project without change very much of coding and class structure... &lt;/P&gt;&lt;P&gt;In my opinion the M (data&amp;amp;business logic) are my existing global classes and my local class is kind of Controller class?! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 09:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897342#M1480823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-05T09:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897343#M1480824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still use a standard report, but with a local class. The point is, that I'm unsure about positioning the selection-screen-commands..  that's why I tried to use function groups..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; you must still use the classic reports to run in background (but maybe there is a standard "submitter report" with program and variant in selection screen, so that you don't need to create your own submitter report)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't get your idea.. what kind of "submitter report" do you mean? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;Anne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 09:15:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897343#M1480824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-05T09:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897344#M1480825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I think I must have smoken marijuana or something, as you can simply submit your main program in background &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A very simplified report could look like that:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT Z_ABAPOO_SELSCR.

parameters param1.

CLASS lcl_any DEFINITION.
public section.
class-methods processing importing param type any.
ENDCLASS.

START-OF-SELECTION.
call method lcl_any=&amp;gt;processing exporting param = param1.

CLASS lcl_any IMPLEMENTATION.
METHOD processing.
  CALL FUNCTION 'Z_ANY'
        EXPORTING param = param.
ENDMETHOD.
ENDCLASS.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 09:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897344#M1480825</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-05-05T09:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897345#M1480826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Sandra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is exactly how I implemented the approach with the function module.&lt;/P&gt;&lt;P&gt;So, in the function module I call my selection-screen with CALL SELECTION-SCREEN command, which opens the automatically generated include, where I put my selection-screen commands. &lt;/P&gt;&lt;P&gt;But if I do it like that, I won't be able to run the report in background because the variants don't belong to my ABAP report then, but to the automatically generated include part. &lt;/P&gt;&lt;P&gt;Do you know a solution for that? &lt;/P&gt;&lt;P&gt;Thx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 09:52:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897345#M1480826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-05T09:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897346#M1480827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you must put all parameters in Z_ABAPOO_SELSCR, and pass them to class and function module. You don't need to put a selection screen in the function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 09:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897346#M1480827</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-05-05T09:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897347#M1480828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Sandra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ah..sorry..my fault. I just overlooked your "parameter command"..&lt;/P&gt;&lt;P&gt;Mh, okay, but if I put selection-screen commands at the beginning of the ABAP report, I don't need the function module call anymore. Or for what purpose did you use the function module?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 10:04:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897347#M1480828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-05T10:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: abap objects and selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897348#M1480829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A selection screen used for passing parameters to a report in background can't be written using abap object. The book did only refer to real screen logic, which is not the case here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 11:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects-and-selection-screen/m-p/6897348#M1480829</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-05-05T11:29:36Z</dc:date>
    </item>
  </channel>
</rss>

