<?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 simple question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106580#M1509219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John ,&lt;/P&gt;&lt;P&gt;  Please try using TABLES instead of CHANGING  for the subroutine.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jul 2010 08:06:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-02T08:06:57Z</dc:date>
    <item>
      <title>ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106572#M1509211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question. In my Z program I have a zprogramname_top where my variables/tables are defined and a zprogramname_f01 where i make calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in f01, i call another form where I fill a table, but when I retunr to the calling perform, that table is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Data declaration:&lt;/P&gt;&lt;P&gt;data: ti_ftpost LIKE ftpost OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F01:&lt;/P&gt;&lt;P&gt;form prepare_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_items.&lt;/P&gt;&lt;P&gt;    perform fill_table  using      it_items-pos&lt;/P&gt;&lt;P&gt;                                changing ti_ftpost&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form fill_table using p_item&lt;/P&gt;&lt;P&gt;                       changing ti_ftpost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ti_ftpost-item = p_item.&lt;/P&gt;&lt;P&gt;  append ti_ftpost.&lt;/P&gt;&lt;P&gt;  clear ti_ftpost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use more descriptive subject lines and code tags from now on.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Jul 2, 2010 2:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 20:29:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106572#M1509211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-01T20:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106573#M1509212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your table &lt;STRONG&gt;it_items&lt;/STRONG&gt; populated ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 02:02:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106573#M1509212</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-07-02T02:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106574#M1509213</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;Try these changes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: ti_ftpost LIKE ftpost OCCURS 0 WITH HEADER LINE.
types: t_post like ti_ftpost. " added


F01:
form prepare_table.

loop at it_items.
perform fill_table using it_items-pos
changing ti_ftpost[]. " changed
endloop.

endform.

form fill_table using p_item
changing ti_ftpost type t_post. " changed

data: wa_post like line of ti_ftpost. " added

wa_ftpost-item = p_item. " changed
append wa_ftpost to ti_ftpost. " changed
clear wa_ftpost. " changed

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 03:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106574#M1509213</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2010-07-02T03:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106575#M1509214</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 tried to do like you said Kris Donald, but I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;In perform fill_table the actual parameter "ti_ftpost" is incompatible with the formal parameter "ti_ftpost"&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I solve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 07:17:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106575#M1509214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T07:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106576#M1509215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Suhas Saha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my table it_items is populated. Has I said, in the form fill_table my table is filled, but when the program returns to form prepare_table the table content is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 07:19:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106576#M1509215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T07:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106577#M1509216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U need to defing in FORM changing ti_ftpost type gty_t_ftpost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where gty_t_post is declared before as:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types: gty_t_ftpost type table of ftpost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is done because in perform u r passing the table and while declaring in form u were declaring wrk area whereas it shd be table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vijetasap on Jul 2, 2010 9:21 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 07:21:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106577#M1509216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T07:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106578#M1509217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply vijetasap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still get the same error, saying that the parameter is incompatible. My code is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TOP:
data: ti_ftpost LIKE ftpost OCCURS 0 WITH HEADER LINE.

types: t_post type table of ftpost.


F01:
perform fill_table using it_items-pos
changing ti_ftpost[].

form fill_table using p_item
                      changing ti_ftpost type t_post
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 07:33:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106578#M1509217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T07:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106579#M1509218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the type of it_items-pos? Is it_items table with header line? Does the length of pos equal to 1 ? Check its type also and use same type in Form using parameter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 07:55:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106579#M1509218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T07:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106580#M1509219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John ,&lt;/P&gt;&lt;P&gt;  Please try using TABLES instead of CHANGING  for the subroutine.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 08:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106580#M1509219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T08:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106581#M1509220</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;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: ti_ftpost like ftpost occurs 0 with header line.
types: t_post type table of ftpost.

data: begin of wa_items occurs 0,
  pos type i,
  end of wa_items.
  data: it_items like wa_items OCCURS 0 WITH HEADER LINE.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  prepare_table
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form prepare_table.

  loop at it_items.
    perform fill_table using it_items-pos
    changing ti_ftpost[].
  endloop.

endform.                    

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  fill_table
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_ITEM     text
*      --&amp;gt;TI_FTPOST  text
*----------------------------------------------------------------------*
form fill_table using p_item
changing ti_ftpost type t_post.

  data: wa_post like line of ti_ftpost.

  wa_post-fnam = p_item.
  append wa_post to ti_ftpost. 
  clear wa_post. 

endform.                    "fill_table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though, I noticed that the type ftpost doesn't have a field named item.. in my ECC6 server at least&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 08:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106581#M1509220</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2010-07-02T08:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106582#M1509221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tables is obsolete now instead we should use changing with table type as type. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106582#M1509221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T11:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106583#M1509222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes tables is obsolete., but the table 'ti_ftpost' is a table with header line and in the subroutine the header is used to append data  , so i dont think changing helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106583#M1509222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T11:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106584#M1509223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John..&lt;/P&gt;&lt;P&gt;a simple solution... i think problem is with your clear staetment..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok.. obsolete thing is to be considered later.. but just to make your code work do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form fill_table using p_item
changing ti_ftpost.

data : ls_post type ftpost. "==&amp;gt;added

clear ls_post. "==&amp;gt;changed
ls_post-item = p_item. "==&amp;gt;chaned 
append ls_post to ti_ftpost. "==&amp;gt;changed

endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 11:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106584#M1509223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-02T11:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106585#M1509224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; a simple solution... i think problem is with your clear statement.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your understanding of the CLEAR statement is not correct for internal tables with header lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP says: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;If dobj is an internal table with a header line, you must specify dobj[] to delete the rows, otherwise only the header line will be deleted. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your statement is incorrect. For me the problem is not with the CLEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:40:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106585#M1509224</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-07-02T12:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP simple question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106586#M1509225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought this was an easy question, but it looks like it was not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got it working with the use of obsolete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for everyone's help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 22:51:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-simple-question/m-p/7106586#M1509225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-07T22:51:06Z</dc:date>
    </item>
  </channel>
</rss>

