<?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: Working with workareas in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926561#M940381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below changed code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;BEGIN OF ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt; pk LIKE ztdm_sapoutput-pk,&lt;/P&gt;&lt;P&gt; fncode LIKE ztdm_sapoutput-fncode,&lt;/P&gt;&lt;P&gt;END OF ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ty_ztdm_sapoutput TYPE zse11table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sapoutputtemp TYPE STANDARD TABLE OF ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt;it_ztdm_sapoutput TYPE STANDARD TABLE OF ty_ztdm_sapoutput.&lt;/P&gt;&lt;P&gt;wa_sapoutputtemp type  ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt;wa_ztdm_sapoutput type ty_ztdm_sapoutput.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM zse11table INTO CORRESPONDING FIELDS OF TABLE sapoutputtemp&lt;/P&gt;&lt;P&gt;WHERE state = '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT sapoutputtemp INTO wa_sapoutputtemp.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-fncode = wa_sapoutputtemp-fncode.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matnr = wa_sapoutputtemp-matnr.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-maktx = wa_sapoutputtemp-maktx.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-zeinr = wa_sapoutputtemp-zeinr.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matkl = wa_sapoutputtemp-matkl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INSERT wa_ztdm_sapoutput INTO it_ztdm_sapoutput.&lt;/P&gt;&lt;P&gt;  CLEAR wa_ztdm_sapoutput.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OR.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Lock the data&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use your update statement&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Release locked data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE : / 'Ouput:'.&lt;/P&gt;&lt;P&gt;  SKIP.&lt;/P&gt;&lt;P&gt;  WRITE : / wa_ztdm_sapoutput-fncode,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matnr,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-maktx,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-zeinr,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matkl.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOck the custom table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODIFY ztdm_sapoutput FROM TABLE it_ztdm_sapoutput .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Release the lock.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopes it will help for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Boobalan Suburaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jun 2008 11:40:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-02T11:40:47Z</dc:date>
    <item>
      <title>Working with workareas</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926557#M940377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem using workareas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use a internal table as a puffer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data:
BEGIN OF SAPOUTPUTtemp occurs 50,
 PK like Zse11table-PK,
 FNCODE like Zse11table-FNCODE,
END OF SAPOUTPUTtemp.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore I define a work are like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
wa_Zse11table LIKE Zse11table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a database from se11 I read from:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM zse11table into corresponding fields of table SAPOUTPUTtemp
WHERE STATE = '0'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this code writes everything to my puffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I want to write the data from puffer to the workarea I wont get a error message but the contents of the workarea is empty:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT SAPOUTPUTtemp.
wa_Zse11table-FNCODE = SAPOUTPUTtemp-FNCODE.
wa_Zse11table-MATNR = SAPOUTPUTtemp-MATNR.

Write : / 'Ouput:'.
skip.
write : / wa_Zse11table-FNCODE,
wa_Zse11table-MATNR,
wa_Zse11table-MAKTX,
wa_Zse11table-ZEINR,
wa_Zse11table-MATKL.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said the output is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the background understanding: I want use the workarea to UPDATE the se11 table afterwards. Therefore I copy all the dataset beside the one column I want to change. This one will get the new vallue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I say:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;UPDATE Zse11table FROM wa_Zse11table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;What is wrong with the work area?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 11:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926557#M940377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T11:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Working with workareas</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926558#M940378</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;The internal table and work area declaration is different and hence u get errors..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have declared ur internal table with only two fields-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;BEGIN OF SAPOUTPUTtemp occurs 50,&lt;/P&gt;&lt;P&gt; PK like Zse11table-PK,&lt;/P&gt;&lt;P&gt; FNCODE like Zse11table-FNCODE,&lt;/P&gt;&lt;P&gt;END OF SAPOUTPUTtemp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereas, the work area declaration has all the fields from the structure "Zse11table".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correction:&lt;/P&gt;&lt;P&gt;Declare internal table like this:&lt;/P&gt;&lt;P&gt;DATA: SAPOUTPUTtemp like Zse11table occurs 50 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve ur problem!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shakir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Award points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 11:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926558#M940378</guid>
      <dc:creator>abdulazeez12</dc:creator>
      <dc:date>2008-06-02T11:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Working with workareas</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926559#M940379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;  i think insted of writing AS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOOP AT SAPOUTPUTtemp.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT SAPOUTPUTtemp into wa_Zse11table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it shoud work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE : here u r internal table and Work Area must have the same  &lt;/P&gt;&lt;P&gt;            structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note 2 .  : if u r using Work Area then u not required to define Internal Table with Header Line .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 11:33:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926559#M940379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T11:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Working with workareas</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926560#M940380</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;declare the internal table with header line........&lt;/P&gt;&lt;P&gt;You have  internal table with  2 attributes and in the select statement&lt;/P&gt;&lt;P&gt;only 2 field get fetched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so only....&lt;/P&gt;&lt;P&gt;wa_Zse11table-FNCODE,&lt;/P&gt;&lt;P&gt;wa_Zse11table-MATNR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should come....but not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_Zse11table-MAKTX,&lt;/P&gt;&lt;P&gt;wa_Zse11table-ZEINR,&lt;/P&gt;&lt;P&gt;wa_Zse11table-MATKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also check out the update........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is updating the dbtab with blank fields :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_Zse11table-MAKTX,&lt;/P&gt;&lt;P&gt;wa_Zse11table-ZEINR,&lt;/P&gt;&lt;P&gt;wa_Zse11table-MATKL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 11:38:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926560#M940380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T11:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Working with workareas</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926561#M940381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below changed code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;BEGIN OF ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt; pk LIKE ztdm_sapoutput-pk,&lt;/P&gt;&lt;P&gt; fncode LIKE ztdm_sapoutput-fncode,&lt;/P&gt;&lt;P&gt;END OF ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ty_ztdm_sapoutput TYPE zse11table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sapoutputtemp TYPE STANDARD TABLE OF ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt;it_ztdm_sapoutput TYPE STANDARD TABLE OF ty_ztdm_sapoutput.&lt;/P&gt;&lt;P&gt;wa_sapoutputtemp type  ty_sapoutputtemp,&lt;/P&gt;&lt;P&gt;wa_ztdm_sapoutput type ty_ztdm_sapoutput.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM zse11table INTO CORRESPONDING FIELDS OF TABLE sapoutputtemp&lt;/P&gt;&lt;P&gt;WHERE state = '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT sapoutputtemp INTO wa_sapoutputtemp.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-fncode = wa_sapoutputtemp-fncode.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matnr = wa_sapoutputtemp-matnr.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-maktx = wa_sapoutputtemp-maktx.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-zeinr = wa_sapoutputtemp-zeinr.&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matkl = wa_sapoutputtemp-matkl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INSERT wa_ztdm_sapoutput INTO it_ztdm_sapoutput.&lt;/P&gt;&lt;P&gt;  CLEAR wa_ztdm_sapoutput.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OR.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Lock the data&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Use your update statement&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Release locked data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE : / 'Ouput:'.&lt;/P&gt;&lt;P&gt;  SKIP.&lt;/P&gt;&lt;P&gt;  WRITE : / wa_ztdm_sapoutput-fncode,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matnr,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-maktx,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-zeinr,&lt;/P&gt;&lt;P&gt;  wa_ztdm_sapoutput-matkl.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOck the custom table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODIFY ztdm_sapoutput FROM TABLE it_ztdm_sapoutput .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Release the lock.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopes it will help for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Boobalan Suburaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 11:40:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926561#M940381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T11:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Working with workareas</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926562#M940382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks sachin, that was the problem.&lt;/P&gt;&lt;P&gt;@ the others: sorry I forgot to mention that I posted only parts of the code in this thread so it doesn't get too unclear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;I was too fast. That wasn't the point the values from the temp table a walk through are still empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the problem another way that is not so performant but I don't find a better solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Daniel Gerne on Jun 2, 2008 2:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 11:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/working-with-workareas/m-p/3926562#M940382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T11:42:13Z</dc:date>
    </item>
  </channel>
</rss>

