<?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: Write statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320070#M509211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 15 'sy-datum' , 25 'sy-datum + 1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write :/0 'Forecast', 15 itab-xx, 25 itab-yy.&lt;/P&gt;&lt;P&gt;write :/0 'Deman', 15 itab-x1, 25 itab-y1.&lt;/P&gt;&lt;P&gt;write :/0 'Total Demand', 15 itab-x2, 25 itab-y2.&lt;/P&gt;&lt;P&gt;write :/0 'Net Requirement', 15 itab-x3, 25 itab-y3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2007 05:13:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-30T05:13:35Z</dc:date>
    <item>
      <title>Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320068#M509209</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;I need to display the output of report in the following format...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ................................. sy-datum.......sy-datum+1 &lt;/P&gt;&lt;P&gt;forcast:............................ XX..............YY&lt;/P&gt;&lt;P&gt;demand: .......................... X1............. Y1&lt;/P&gt;&lt;P&gt;total demand: ..................  X2..............Y2&lt;/P&gt;&lt;P&gt;net requirement: ............... X3...............Y3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having an internal table which contain (XX,X1..X3 and YY,..Y3) values along with dates (i.e sy-datum ,sy-datum+1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created above layout but was not able to populate values(XX,X1..X3 and YY,..Y3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any tell me how can i populate these XX,X1..X3 and YY,..Y3 values ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shilpa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 04:54:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320068#M509209</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T04:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320069#M509210</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;&lt;/P&gt;&lt;P&gt;check this simple code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:itab like mara occurs 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;select * from mara into table itab up to 10 rows.&lt;/P&gt;&lt;P&gt;write:/10  'material',20 'created by'.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  write:/ itab-matnr under 'material',itab-ernam under 'created by'.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:09:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320069#M509210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T05:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320070#M509211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 15 'sy-datum' , 25 'sy-datum + 1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write :/0 'Forecast', 15 itab-xx, 25 itab-yy.&lt;/P&gt;&lt;P&gt;write :/0 'Deman', 15 itab-x1, 25 itab-y1.&lt;/P&gt;&lt;P&gt;write :/0 'Total Demand', 15 itab-x2, 25 itab-y2.&lt;/P&gt;&lt;P&gt;write :/0 'Net Requirement', 15 itab-x3, 25 itab-y3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320070#M509211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T05:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320071#M509212</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; Do Like This........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: Begin Of Itab Occurs 0,&lt;/P&gt;&lt;P&gt;         c(10) (u didnt mention the field)&lt;/P&gt;&lt;P&gt;        date1 type sy-datum,&lt;/P&gt;&lt;P&gt;        date2 type sy-datum,&lt;/P&gt;&lt;P&gt;        end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  f1 f2 f3 from desired table to itab where&amp;lt;cond&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top-of-page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write:/1 heading, &lt;/P&gt;&lt;P&gt;          15 sy-datum,&lt;/P&gt;&lt;P&gt;          25 sy-datum1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;write:/ 1 heading,&lt;/P&gt;&lt;P&gt;          15 sy-datum,&lt;/P&gt;&lt;P&gt;          25 sy-datum1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chane the code according to the fields..Get back if still you are getting error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward ALL helpfull Answers.......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320071#M509212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T05:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320072#M509213</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;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 15 'sy-datum' , 25 'sy-datum + 1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write :/0 'Forecast', 15 itab-xx, 25 itab-yy.&lt;/P&gt;&lt;P&gt;write :/0 'Deman', 15 itab-x1, 25 itab-y1.&lt;/P&gt;&lt;P&gt;write :/0 'Total Demand', 15 itab-x2, 25 itab-y2.&lt;/P&gt;&lt;P&gt;write :/0 'Net Requirement', 15 itab-x3, 25 itab-y3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;suresh babu aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320072#M509213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T05:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320073#M509214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First of all, are XX, X1..X3, YY, Y1..Y3 of type DATS? If both sy-daum and xx...x3 are in the same column ensure that there are of the same data type. If they are different, then change the date field to C or N type and try to fill the data in the internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320073#M509214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T05:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320074#M509215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shilpa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your requirement, what I understood is there is an internal table and you want to display the values from this table in output using WRITE statement. The kind of output you want to display is as follows - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;................................. sy-datum.......sy-datum+1 &lt;/P&gt;&lt;P&gt;forcast:............................ XX..............YY&lt;/P&gt;&lt;P&gt;demand: .......................... X1............. Y1&lt;/P&gt;&lt;P&gt;total demand: .................. X2..............Y2&lt;/P&gt;&lt;P&gt;net requirement: ............... X3...............Y3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If above is the requirement then there are different options of output display -&lt;/P&gt;&lt;P&gt;1. Verify there is some data in the internal table for output display.&lt;/P&gt;&lt;P&gt;2. Generally the output display contains only column heading and values below it. This is very well possible and very easy using WRITE statement.&lt;/P&gt;&lt;P&gt;But If the layout is fixed as you have asked for then there will be repetitive, labels display in the output. Also there has to be some unique value against which the other columns will be displayed like either the combination of XX &amp;amp; YY is unique for each row in you table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the following code to get the output result -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WRITE /10(100) SY-ULINE.
LOOP AT IT_TAB INTO WA_TAB.
WRITE: /60 'SY-DATUM',  90'SY-DATUM+1'.
WRITE: /10 'FORCAST:', 60 WA-XX, 90 WA-YY.
WRITE: /10 'DEMAND:' ,60 WA-X1, 90 WA-Y1.
WRITE: /10 'TOTAL DEMAND:',60 WA-X2, 90 WA-Y2.
WRITE: /10 'NET REQU:' ,60 WA-X3, 90 WA-Y3.
WRITE /10(100) SY-ULINE.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS If the answer solves your query, plz close the thread by rewarding each reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:26:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320074#M509215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-30T05:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320075#M509216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shilpa,&lt;/P&gt;&lt;P&gt;This is how you can populate internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not your case send me your code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-xx = sy-datum'.&lt;/P&gt;&lt;P&gt;itab-yy = sy-datum + 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Append itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2007 05:33:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320075#M509216</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-05-30T05:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Write statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320076#M509217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this 1....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose the name of your internal table is "itab" havin itab-xx and itab-yy which contains values ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 15 'sy-datum' , 25 'sy-datum + 1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :begin of another_itab occurs 4 with header line,&lt;/P&gt;&lt;P&gt;	c(16),&lt;/P&gt;&lt;P&gt;	xx type n,&lt;/P&gt;&lt;P&gt;	yy type n,&lt;/P&gt;&lt;P&gt;	end of another_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another_itab-c = 'forcast:'.append another_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another_itab-c = 'demand:'. append another_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another_itab-c = 'total demand:'. append another_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another_itab-c = 'net requirement: '. append another_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from itab into corresponding fields of another_itab.&lt;/P&gt;&lt;P&gt;          append another_itab.&lt;/P&gt;&lt;P&gt;          endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at another_itab.&lt;/P&gt;&lt;P&gt;   write:/ another_itab-c , 15 another_itab-xx , 25 another_itab-yy.&lt;/P&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Noman Hussain on Jan 10, 2008 8:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 09:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-statement/m-p/2320076#M509217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T09:21:05Z</dc:date>
    </item>
  </channel>
</rss>

