<?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 Create report output from dialog program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500961#M2003211</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have internal table data in a module/dialog pool that is required on a report. The report should be displayed on the screen and possibly can be printed. In an executable program, this would be done with WRITE or ALV. What to do in a module pool? I was considering passing the data into a sapscript/smartform but was wondering if there are other approaches to consider. Some processing will be required on the data as it gets outputted, i.e. "IF data = this THEN change data to display" etc.&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jan 2022 20:44:30 GMT</pubDate>
    <dc:creator>former_member788228</dc:creator>
    <dc:date>2022-01-26T20:44:30Z</dc:date>
    <item>
      <title>Create report output from dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500961#M2003211</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have internal table data in a module/dialog pool that is required on a report. The report should be displayed on the screen and possibly can be printed. In an executable program, this would be done with WRITE or ALV. What to do in a module pool? I was considering passing the data into a sapscript/smartform but was wondering if there are other approaches to consider. Some processing will be required on the data as it gets outputted, i.e. "IF data = this THEN change data to display" etc.&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 20:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500961#M2003211</guid>
      <dc:creator>former_member788228</dc:creator>
      <dc:date>2022-01-26T20:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create report output from dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500962#M2003212</link>
      <description>&lt;P&gt;If you really want to stick with the old WRITE commands then you can use the ABAP command:&lt;BR /&gt;LEAVE TO LIST-PROCESSING &lt;I&gt;[&lt;/I&gt;AND RETURN TO SCREEN dynnr&lt;I&gt;]&lt;/I&gt;. &lt;BR /&gt;Afterwards you can output your data with WRITE statements.&lt;BR /&gt;That should be a last alternative. You can probably determine what data you want to output up front, put it into an internal table and then use the ALV to display it. &lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 20:50:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500962#M2003212</guid>
      <dc:creator>emanuel_klenner</dc:creator>
      <dc:date>2022-01-26T20:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create report output from dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500963#M2003213</link>
      <description>&lt;P&gt;I want to display the data like a PDF in a popup for example, that can be displayed and/or printed off.&lt;/P&gt;&lt;P&gt;That's why I mentioned sapscripts/smartforms - it's that type of report I need to generate.&lt;/P&gt;&lt;P&gt;Imagine the module program is an ALV containing a list of orders. Then I want a button that will format the data as an invoice, for example.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 13:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500963#M2003213</guid>
      <dc:creator>former_member788228</dc:creator>
      <dc:date>2022-01-27T13:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create report output from dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500964#M2003214</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;you can generate a smartform, invoke it &lt;A href="https://blogs.sap.com/2013/03/11/how-to-easy-save-smartform-in-pdf-file/" target="_blank"&gt;to get the PDF&lt;/A&gt; and then &lt;A href="https://blogs.sap.com/2019/12/30/display-xstring-as-pdf-in-report/" target="_blank"&gt;show the PDF&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;It's something already debated and explained around.&lt;BR /&gt;About "processing the data", you can do it before calling the smartform or inside the smartform itself if it's not too complex.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 14:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500964#M2003214</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2022-01-27T14:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create report output from dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500965#M2003215</link>
      <description>&lt;P&gt;Split your module pool program into three. The module pool itself, a model class that does stuff (reads from the database, updates, gets information etc.) and a view class that is called from the module pool every time there's a user interaction (including starting and finishing the program).&lt;/P&gt;&lt;P&gt;The model class is &lt;STRONG&gt;only&lt;/STRONG&gt; called by the view class. Never from the module pool.&lt;/P&gt;&lt;P&gt;This is essentially the MVC pattern for developing UIs.&lt;/P&gt;&lt;P&gt;Once you've done that. You can now easily write your report using the method class.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(model) = NEW z_my_model_class( ).
DATA(report_data) = model-&amp;gt;get_data( ).

" Processing to output the report data&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jan 2022 17:06:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500965#M2003215</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-01-27T17:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create report output from dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500966#M2003216</link>
      <description>&lt;P&gt;The program is already written in MVC structure. That's not the question though.&lt;/P&gt;&lt;P&gt;The question is what functionality should be used to generate the report.&lt;/P&gt;&lt;P&gt;Example: imagine the module program is an ALV containing a list of orders. Then I want a button that will format the data as an invoice. How should the invoice be generated is the question - sapscript, smartform, adobe form, WRITE, etc. etc.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 19:00:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500966#M2003216</guid>
      <dc:creator>former_member788228</dc:creator>
      <dc:date>2022-01-27T19:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create report output from dialog program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500967#M2003217</link>
      <description>&lt;P&gt;Thanks, yes it's something I've done many times before, however never from a module pool.&lt;/P&gt;&lt;P&gt;I wanted to hear other people's experiences of generating this type of output from an ALV/dialog program.&lt;/P&gt;&lt;P&gt;Since sapscripts &amp;amp; smartforms are no longer supported by SAP, I should use Adobe Forms.&lt;/P&gt;&lt;P&gt;But anyway if no one has other suggestions, I'll assume this is the de facto best approach! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 19:00:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-report-output-from-dialog-program/m-p/12500967#M2003217</guid>
      <dc:creator>former_member788228</dc:creator>
      <dc:date>2022-01-27T19:00:28Z</dc:date>
    </item>
  </channel>
</rss>

