<?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 repetitive structures in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427785#M542518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would you modify an infotype for fields with repetitive structure? Can you give me an example program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2007 10:26:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-05T10:26:40Z</dc:date>
    <item>
      <title>repetitive structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427785#M542518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would you modify an infotype for fields with repetitive structure? Can you give me an example program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 10:26:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427785#M542518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T10:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: repetitive structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427786#M542519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Imagine you have a record in infotype 0027. If you want to modify that record use Do -- VARYING statement as shown below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:    v_kbu01   type bukrs,&lt;/P&gt;&lt;P&gt;           v_kgb01   type gsber,&lt;/P&gt;&lt;P&gt;           v_kst01   type kostl,&lt;/P&gt;&lt;P&gt;           v_kpr01   type pkprz.&lt;/P&gt;&lt;P&gt;data:      wa_0027  like it_0027.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from pa0027&lt;/P&gt;&lt;P&gt;         into table it_0027.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; clear: wa_0027.&lt;/P&gt;&lt;P&gt;  read table it_0027 into wa_0027 with key pernr = it_0001-pernr&lt;/P&gt;&lt;P&gt;                                                     binary search.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: v_kbu01, v_kgb01, v_kst01, v_kpr01.&lt;/P&gt;&lt;P&gt;do 25 times&lt;/P&gt;&lt;P&gt;           varying v_kbu01  from wa_0027-kbu01 next wa_0027-kbu02&lt;/P&gt;&lt;P&gt;           varying v_kgb01  from wa_0027-kgb01 next wa_0027-kgb02&lt;/P&gt;&lt;P&gt;           varying v_kst01  from wa_0027-kst01 next wa_0027-kst02&lt;/P&gt;&lt;P&gt;           varying v_kpr01  from wa_0027-kpr01 next wa_0027-kpr02.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check whether company is initial.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if v_kbu01 is initial and v_kgb01 is initial.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;what ever modifications you want do it here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Velangini Showry Maria Kumar Bandanadham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 10:59:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427786#M542519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T10:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: repetitive structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427787#M542520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot...but i dint get the do--varying statement. What does it do actually?&lt;/P&gt;&lt;P&gt;why is this line needed???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check whether company is initial.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if v_kbu01 is initial and v_kgb01 is initial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 11:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427787#M542520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T11:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: repetitive structures</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427788#M542521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the first do loop pass the values KBU01, KGB01, KST01, KPR01 gets filled into v_kbu01, v_kgb01, v_kst01, v_kpr01 respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second Do loop pass KBU02, KGB02, KST02, KPR02 gets filled into v_kbu01, v_kgb01, v_kst01, v_kpr01 respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what ever may be the Do loop pass, first you check whether the variable v_kbu01&lt;/P&gt;&lt;P&gt;is initial. If it is initial then there is no further values exist. So you can exit from the Do loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have two repeted structure values in the infotype 0027 record and  you have no values for the fields KBU03, KGB03, KST03, KPR03. Now you can modify these fields based on sy-index. Why sy-index is now you are in Do loop pass 3 so sy-index will be 3. and check KBU03 is initial. So you can modify  KBU03, KGB03, KST03, KPR03 with your values. like this you can fill the values based on sy-index and corresponding field values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 11:30:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/repetitive-structures/m-p/2427788#M542521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T11:30:05Z</dc:date>
    </item>
  </channel>
</rss>

