<?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 where  can i put Loop.....  and Endloop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485054#M560328</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I'm the BW consultant...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i had written one START ROUTINE.. for the purpose of this is... it was fetching the Product codes data from another DSO .. based on Bill no's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i had create one structure..&lt;/P&gt;&lt;P&gt;after that i had create one table..&lt;/P&gt;&lt;P&gt;after that i had create one work area..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the problem is it was fetching first record from the DSO and loaded into consolidated DSO... not all the product numbers.. each bill contain several products... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this.. in start routine.. i defined gloabally.. the structure.. and select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ITAB,&lt;/P&gt;&lt;P&gt;             /BIC/RBILLNO         TYPE    /BIC/OIRBILLNO,&lt;/P&gt;&lt;P&gt;             /BIC/RPRD_CDE     TYPE    /BIC/OIRPRD_CDE,&lt;/P&gt;&lt;P&gt;             /BIC/RPRD_QTY     TYPE    /BIC/OIRPRD_QTY,&lt;/P&gt;&lt;P&gt;            /BIC/RUNT_PRI        TYPE       /BIC/OIRUNT_PRI,&lt;/P&gt;&lt;P&gt;            /BIC/RPRD_RATE    TYPE   /BIC/OIRPRD_RATE,&lt;/P&gt;&lt;P&gt;END OF ITAB,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JTAB TYPE STANDARD TABLE OF ITAB WITH NON-UNIQUE DEFAULT KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : KTAB TYPE JTAB ,&lt;/P&gt;&lt;P&gt;            KTAB_WA TYPE ITAB,&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  /BIC/RBILLNO   /BIC/RPRD_CDE  /BIC/RPRD_QTY  /BIC/RUNT_PRI&lt;/P&gt;&lt;P&gt;/BIC/RPRD_RATE      FROM /BIC/ATESTODS100  INTO TABLE KTAB FOR ALL ENTRIES IN    SOURCE_PACKAGE    WHERE /BIC/RBILLNO = SOURCE_PACKAGE-/BIC/RBILLNO.&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;And I wrote select statement... it was working fine....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and field level.. i had written the following code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR KTAB_WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE KTAB INTO KTAB_WA with key /BIC/RBILLNO = SOURCE_FIELDS-/BIC/RBILLNO BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0 .&lt;/P&gt;&lt;P&gt;RESULT = ktab_wa-/bic/rprd_cde.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, how can i put the loop for this... can you plz tell me the solution..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;BABU&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jul 2007 10:20:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-17T10:20:16Z</dc:date>
    <item>
      <title>where  can i put Loop.....  and Endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485054#M560328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I'm the BW consultant...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i had written one START ROUTINE.. for the purpose of this is... it was fetching the Product codes data from another DSO .. based on Bill no's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i had create one structure..&lt;/P&gt;&lt;P&gt;after that i had create one table..&lt;/P&gt;&lt;P&gt;after that i had create one work area..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the problem is it was fetching first record from the DSO and loaded into consolidated DSO... not all the product numbers.. each bill contain several products... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this.. in start routine.. i defined gloabally.. the structure.. and select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ITAB,&lt;/P&gt;&lt;P&gt;             /BIC/RBILLNO         TYPE    /BIC/OIRBILLNO,&lt;/P&gt;&lt;P&gt;             /BIC/RPRD_CDE     TYPE    /BIC/OIRPRD_CDE,&lt;/P&gt;&lt;P&gt;             /BIC/RPRD_QTY     TYPE    /BIC/OIRPRD_QTY,&lt;/P&gt;&lt;P&gt;            /BIC/RUNT_PRI        TYPE       /BIC/OIRUNT_PRI,&lt;/P&gt;&lt;P&gt;            /BIC/RPRD_RATE    TYPE   /BIC/OIRPRD_RATE,&lt;/P&gt;&lt;P&gt;END OF ITAB,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JTAB TYPE STANDARD TABLE OF ITAB WITH NON-UNIQUE DEFAULT KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : KTAB TYPE JTAB ,&lt;/P&gt;&lt;P&gt;            KTAB_WA TYPE ITAB,&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  /BIC/RBILLNO   /BIC/RPRD_CDE  /BIC/RPRD_QTY  /BIC/RUNT_PRI&lt;/P&gt;&lt;P&gt;/BIC/RPRD_RATE      FROM /BIC/ATESTODS100  INTO TABLE KTAB FOR ALL ENTRIES IN    SOURCE_PACKAGE    WHERE /BIC/RBILLNO = SOURCE_PACKAGE-/BIC/RBILLNO.&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;And I wrote select statement... it was working fine....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and field level.. i had written the following code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR KTAB_WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE KTAB INTO KTAB_WA with key /BIC/RBILLNO = SOURCE_FIELDS-/BIC/RBILLNO BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0 .&lt;/P&gt;&lt;P&gt;RESULT = ktab_wa-/bic/rprd_cde.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, how can i put the loop for this... can you plz tell me the solution..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;BABU&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 10:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485054#M560328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T10:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: where  can i put Loop.....  and Endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485055#M560329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;i&amp;gt;READ TABLE KTAB INTO KTAB_WA with key /BIC/RBILLNO = SOURCE_FIELDS-/BIC/RBILLNO BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc eq 0 .&lt;/P&gt;&lt;P&gt;RESULT = ktab_wa-/bic/rprd_cde.&lt;/P&gt;&lt;P&gt;ENDIF.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use loop endloop instead of READ TABLE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT KTAB INTO KTAB_WA with key /BIC/RBILLNO = SOURCE_FIELDS-/BIC/RBILLNO.&lt;/P&gt;&lt;P&gt;CHECK sy-subrc eq 0 .&lt;/P&gt;&lt;P&gt;RESULT = ktab_wa-/bic/rprd_cde.&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;Regards&lt;/P&gt;&lt;P&gt;Prax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 10:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485055#M560329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T10:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: where  can i put Loop.....  and Endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485056#M560330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE KTAB INTO KTAB_WA with key /BIC/RBILLNO = SOURCE_FIELDS-/BIC/RBILLNO BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this change&lt;/P&gt;&lt;P&gt;loop at KTAB INTO KTAB_WA where /BIC/RBILLNO = SOURCE_FIELDS-/BIC/RBILLNO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT = ktab_wa-/bic/rprd_cde.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 10:25:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485056#M560330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T10:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: where  can i put Loop.....  and Endloop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485057#M560331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ThankQ Friends..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     But still it was added only one record.. that means.. previously it was added first recrd.. but.. now after aputting the loop it was added only Last record..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; my requirement is.. i want to get  all the records.. Product numbers.. based on that bill no..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; plz help on this.. i dont know coding..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Babu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 10:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/where-can-i-put-loop-and-endloop/m-p/2485057#M560331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T10:39:35Z</dc:date>
    </item>
  </channel>
</rss>

