<?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: Passing message from one report program to another in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788396#M650271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your second program, that you are calling in SUBMIT, export the messages to memory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_message = message text.&lt;/P&gt;&lt;P&gt;EXPORT w_message TO MEMORY-ID 'MESSAGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your first program, import it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMORT FROM MEMORY-ID 'MESSAGE' FIELD w_message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Sep 2007 06:21:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-01T06:21:52Z</dc:date>
    <item>
      <title>Passing message from one report program to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788395#M650270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have  a report program which calls another report program using SUBMIT statement.The second report program will generate some messages.&lt;/P&gt;&lt;P&gt;I want to catch that in first report program .&lt;/P&gt;&lt;P&gt;I will have write statement in the first program to print that message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i schedule the first program in background i want that message to be available in spool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone knows how to solve the scenario please help.......a sample code will be more helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be rewarded.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 06:10:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788395#M650270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T06:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Passing message from one report program to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788396#M650271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your second program, that you are calling in SUBMIT, export the messages to memory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_message = message text.&lt;/P&gt;&lt;P&gt;EXPORT w_message TO MEMORY-ID 'MESSAGE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your first program, import it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMORT FROM MEMORY-ID 'MESSAGE' FIELD w_message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 06:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788396#M650271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T06:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing message from one report program to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788397#M650272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikas&lt;/P&gt;&lt;P&gt;Thanks for that quick reply.What i have posted before were only part of my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me explain my whole scenario.If you could also help on solving this scenario,it would be really helpful.&lt;/P&gt;&lt;P&gt;I will explain the scenario with  some sort  of pseudocode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;First Program .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;costing run = 'XXXX'&lt;/P&gt;&lt;P&gt;costing date = 'yyyy/mm/dd'&lt;/P&gt;&lt;P&gt;jobname = 'yyyyy'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function Job_open and pass the jobname to get the job count.&lt;/P&gt;&lt;P&gt;submit second_program with crun = costing run&lt;/P&gt;&lt;P&gt;                                    with cdate = costing date&lt;/P&gt;&lt;P&gt;                                    with jnam = jobname&lt;/P&gt;&lt;P&gt;                                    with jcnt = jobcount.&lt;/P&gt;&lt;P&gt;and return.&lt;/P&gt;&lt;P&gt;call function job_close .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Second program.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection screen.&lt;/P&gt;&lt;P&gt;parameters : crun type kalaid,&lt;/P&gt;&lt;P&gt;                   cdate type kaladat,&lt;/P&gt;&lt;P&gt;                   jnam type tbtcjob-jobanme,&lt;/P&gt;&lt;P&gt;                   jcnt  type tbtcjob-jobcount.&lt;/P&gt;&lt;P&gt;end of selction screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//comment : to get  a cfromdate by passing cdate as input to the function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call funtion determine_period&lt;/P&gt;&lt;P&gt;import : cdate&lt;/P&gt;&lt;P&gt;export : cfromdate&lt;/P&gt;&lt;P&gt;if sysubrc &amp;lt;&amp;gt;0&lt;/P&gt;&lt;P&gt;w_message //&amp;lt;b&amp;gt;it will have the error message which i want to pass to first program with export as you said.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;submit saprck23 with crun&lt;/P&gt;&lt;P&gt;                         with cdate&lt;/P&gt;&lt;P&gt;                         with cfromdate&lt;/P&gt;&lt;P&gt;                         via jnam and jcnt.&lt;/P&gt;&lt;P&gt;and return.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above pseudocode i have said like if the function module in second program fails , then the error message should be exxproted to first program and that shoud be availbale in the spool when the first program is exceuted in the background.else if the function module executes successfully ,in the spool the output of the saprck23 program should be avialble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help me in solving the problem because since i didnt know to work with jobs i am confused.when i tried it is giving me some dump erroe which i am not able to understand also&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 06:53:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788397#M650272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T06:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Passing message from one report program to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788398#M650273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to add to the above comments..after the import..use the FREE memory statement&lt;/P&gt;&lt;P&gt;Reason : If the second report doesnot have any messages and memory is not freed...chances are that the report will show messages of a condition which was previously run...pls always use FREE command if the use of that memory id is restricted to one report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_message = message text.  "OK&lt;/P&gt;&lt;P&gt;EXPORT w_message TO MEMORY-ID 'MESSAGE'. "OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your first program, import it.. "OK&lt;/P&gt;&lt;P&gt;IMORT FROM MEMORY-ID 'MESSAGE' FIELD w_message. "OK&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FREE MEMORY ID 'MESSAGE'.&amp;lt;/b&amp;gt;   "use free here &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please use a unique or different name for memory..u need to be careful not to step on someone elses toe &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;something like &amp;lt;b&amp;gt;'MESSAGEPROGNAME'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for correct syntax please refer ABAP documentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it proved useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 06:56:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788398#M650273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T06:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Passing message from one report program to another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788399#M650274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first solution i provided will work for your first case, means if the FM fails.. And for the second case regarding the spool of the called program, you will need to code something like this.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SUBMIT rm07idif WITH SELECTION-TABLE li_selection&lt;/P&gt;&lt;P&gt;       EXPORTING LIST TO MEMORY AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              listobject = li_listobject&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              not_found  = 1&lt;/P&gt;&lt;P&gt;              OTHERS     = 2.&lt;/P&gt;&lt;P&gt;    CHECK sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'WRITE_LIST'&lt;/P&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              listobject = li_listobject&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              empty_list = 1&lt;/P&gt;&lt;P&gt;              OTHERS     = 2.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 07:01:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-message-from-one-report-program-to-another/m-p/2788399#M650274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T07:01:14Z</dc:date>
    </item>
  </channel>
</rss>

