<?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: problem in the code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706399#M1105740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;u have to clear the field after before the endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

LOOP AT T_MAPL INTO W_MAPL.

LOOP AT T_PLAS INTO W_PLAS WHERE PLNAL = W_MAPL-PLNAL AND PLNNR = W_MAPL-PLNNR.
W_FTAB6-PLNKN = W_PLAS-PLNKN.

LOOP AT T_PLPO INTO W_PLPO WHERE PLNNR = W_PLAS-PLNNR AND PLNKN = W_PLAS-PLNKN.
W_FTAB6-MATNR = W_MAPL-MATNR.
W_FTAB6-PLNTY = W_MAPL-PLNTY.
W_FTAB6-PLNAL = W_MAPL-PLNAL.
W_FTAB6-WERKS = W_MAPL-WERKS.

READ TABLE T_PLKO INTO W_PLKO WITH KEY PLNAL = W_MAPL-PLNAL PLNNR = W_MAPL-PLNNR.

W_FTAB6-KTEXT = W_PLKO-KTEXT.
W_FTAB6-PLNNR = W_PLPO-PLNNR.
W_FTAB6-VORNR = W_PLPO-VORNR.
W_FTAB6-LTXA1 = W_PLPO-LTXA1.
W_FTAB6-KTSCH = W_PLPO-KTSCH.
W_FTAB6-ARBID = W_PLPO-ARBID.
W_FTAB6-BMSCH = W_PLPO-BMSCH.
W_FTAB6-MEINH = W_PLPO-MEINH.
W_FTAB6-VGW04 = W_PLPO-VGW04.
W_FTAB6-VGE04 = W_PLPO-VGE04.

READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.
W_FTAB6-ARBPL = W_CRHD-ARBPL.
W_FTAB6-VERWE = W_CRHD-VERWE.
W_FTAB6-OBJTY = W_CRHD-OBJTY.
W_FTAB6-OBJID = W_CRHD-OBJID.

READ TABLE T_CRTX INTO W_CRTX WITH KEY OBJID = W_CRHD-OBJID.
W_FTAB6-KTEXT_UP = W_CRTX-KTEXT_UP.

READ TABLE T_MARC INTO W_MARC WITH KEY MATNR = W_MAPL-MATNR.
W_FTAB6-LGPRO = W_MARC-LGPRO.

APPEND W_FTAB6 TO T_FTAB6.

*"-----------------------------
CLEAR: W_PLKO,
       W_CRHD,
       W_CRTX,
       W_MARC,
       W_FTAB6.
*"-----------------------------
ENDLOOP.
ENDLOOP.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2008 04:07:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-11T04:07:40Z</dc:date>
    <item>
      <title>problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706397#M1105738</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 am working on a code and it is giving problem that where the Work center field is empty it is making the last field repeated having the Work Center . here 's d code :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_MAPL INTO W_MAPL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   LOOP AT T_PLAS INTO W_PLAS WHERE PLNAL = W_MAPL-PLNAL AND PLNNR = W_MAPL-PLNNR.&lt;/P&gt;&lt;P&gt;           W_FTAB6-PLNKN = W_PLAS-PLNKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT T_PLPO INTO W_PLPO WHERE PLNNR = W_PLAS-PLNNR AND PLNKN = W_PLAS-PLNKN.&lt;/P&gt;&lt;P&gt;         W_FTAB6-MATNR = W_MAPL-MATNR.&lt;/P&gt;&lt;P&gt;         W_FTAB6-PLNTY = W_MAPL-PLNTY.&lt;/P&gt;&lt;P&gt;         W_FTAB6-PLNAL = W_MAPL-PLNAL.&lt;/P&gt;&lt;P&gt;         W_FTAB6-WERKS = W_MAPL-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE T_PLKO INTO W_PLKO WITH KEY PLNAL = W_MAPL-PLNAL PLNNR = W_MAPL-PLNNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              W_FTAB6-KTEXT = W_PLKO-KTEXT.&lt;/P&gt;&lt;P&gt;              W_FTAB6-PLNNR = W_PLPO-PLNNR.&lt;/P&gt;&lt;P&gt;              W_FTAB6-VORNR = W_PLPO-VORNR.&lt;/P&gt;&lt;P&gt;              W_FTAB6-LTXA1 = W_PLPO-LTXA1.&lt;/P&gt;&lt;P&gt;              W_FTAB6-KTSCH = W_PLPO-KTSCH.&lt;/P&gt;&lt;P&gt;              W_FTAB6-ARBID = W_PLPO-ARBID.&lt;/P&gt;&lt;P&gt;              W_FTAB6-BMSCH = W_PLPO-BMSCH.&lt;/P&gt;&lt;P&gt;              W_FTAB6-MEINH = W_PLPO-MEINH.&lt;/P&gt;&lt;P&gt;              W_FTAB6-VGW04 = W_PLPO-VGW04.&lt;/P&gt;&lt;P&gt;              W_FTAB6-VGE04 = W_PLPO-VGE04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.&lt;/P&gt;&lt;P&gt;              W_FTAB6-ARBPL = W_CRHD-ARBPL.&lt;/P&gt;&lt;P&gt;              W_FTAB6-VERWE = W_CRHD-VERWE.&lt;/P&gt;&lt;P&gt;              W_FTAB6-OBJTY = W_CRHD-OBJTY.&lt;/P&gt;&lt;P&gt;              W_FTAB6-OBJID = W_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            READ TABLE T_CRTX INTO W_CRTX WITH KEY OBJID = W_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;              W_FTAB6-KTEXT_UP = W_CRTX-KTEXT_UP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             READ TABLE T_MARC INTO W_MARC WITH KEY MATNR = W_MAPL-MATNR.&lt;/P&gt;&lt;P&gt;               W_FTAB6-LGPRO = W_MARC-LGPRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           APPEND W_FTAB6 TO T_FTAB6.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;     ENDLOOP.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plzz provide me guidlines that how should i remove the filling of the records which does not have the Work Center. (ARBPL)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 03:59:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706397#M1105738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T03:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706398#M1105739</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 don;t know the work center field name.......&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;If the value is fetched through read statement, then check for sy-subrc.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  pass the work center value&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt; clear that field.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the value is fetched through loop statement, then at the end of every loop pass, clear that workarea field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-SatyaPriya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 04:05:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706398#M1105739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T04:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706399#M1105740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;u have to clear the field after before the endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

LOOP AT T_MAPL INTO W_MAPL.

LOOP AT T_PLAS INTO W_PLAS WHERE PLNAL = W_MAPL-PLNAL AND PLNNR = W_MAPL-PLNNR.
W_FTAB6-PLNKN = W_PLAS-PLNKN.

LOOP AT T_PLPO INTO W_PLPO WHERE PLNNR = W_PLAS-PLNNR AND PLNKN = W_PLAS-PLNKN.
W_FTAB6-MATNR = W_MAPL-MATNR.
W_FTAB6-PLNTY = W_MAPL-PLNTY.
W_FTAB6-PLNAL = W_MAPL-PLNAL.
W_FTAB6-WERKS = W_MAPL-WERKS.

READ TABLE T_PLKO INTO W_PLKO WITH KEY PLNAL = W_MAPL-PLNAL PLNNR = W_MAPL-PLNNR.

W_FTAB6-KTEXT = W_PLKO-KTEXT.
W_FTAB6-PLNNR = W_PLPO-PLNNR.
W_FTAB6-VORNR = W_PLPO-VORNR.
W_FTAB6-LTXA1 = W_PLPO-LTXA1.
W_FTAB6-KTSCH = W_PLPO-KTSCH.
W_FTAB6-ARBID = W_PLPO-ARBID.
W_FTAB6-BMSCH = W_PLPO-BMSCH.
W_FTAB6-MEINH = W_PLPO-MEINH.
W_FTAB6-VGW04 = W_PLPO-VGW04.
W_FTAB6-VGE04 = W_PLPO-VGE04.

READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.
W_FTAB6-ARBPL = W_CRHD-ARBPL.
W_FTAB6-VERWE = W_CRHD-VERWE.
W_FTAB6-OBJTY = W_CRHD-OBJTY.
W_FTAB6-OBJID = W_CRHD-OBJID.

READ TABLE T_CRTX INTO W_CRTX WITH KEY OBJID = W_CRHD-OBJID.
W_FTAB6-KTEXT_UP = W_CRTX-KTEXT_UP.

READ TABLE T_MARC INTO W_MARC WITH KEY MATNR = W_MAPL-MATNR.
W_FTAB6-LGPRO = W_MARC-LGPRO.

APPEND W_FTAB6 TO T_FTAB6.

*"-----------------------------
CLEAR: W_PLKO,
       W_CRHD,
       W_CRTX,
       W_MARC,
       W_FTAB6.
*"-----------------------------
ENDLOOP.
ENDLOOP.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 04:07:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706399#M1105740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T04:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706400#M1105741</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 am using the Refresh after the loops and it is still displaying the same data .if i use clear/refresh inside the loop it is not displaying the correct data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARBPL     "Work center&lt;/P&gt;&lt;P&gt;VERWE   "Work center cat.&lt;/P&gt;&lt;P&gt;OBJTY     "Object types of the CIM resource&lt;/P&gt;&lt;P&gt;OBJID      "Object ID of the resource&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 04:33:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706400#M1105741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T04:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706401#M1105742</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 think your problem will be solved with staypriyas solution. Check for sy-subrc after each read statement. For ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.

if sy-subrc eq 0.

W_FTAB6-ARBPL = W_CRHD-ARBPL.
W_FTAB6-VERWE = W_CRHD-VERWE.
W_FTAB6-OBJTY = W_CRHD-OBJTY.
W_FTAB6-OBJID = W_CRHD-OBJID.

endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swarna Munukoti.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Swarna Munukoti on Nov 11, 2008 5:48 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 04:48:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706401#M1105742</guid>
      <dc:creator>former_member217544</dc:creator>
      <dc:date>2008-11-11T04:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706402#M1105743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, when u read a table into a work area.. it happens that, the data is copied from a row in the table to the work area...&lt;/P&gt;&lt;P&gt;and if u do not clear this work area, this value remains through out the scope of the wa. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in ur case if u do not clear it befor the next loop pass, the old value remains...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can do one thing... use Debugger and see what is happening....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;Sukriti...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 04:49:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706402#M1105743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T04:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706403#M1105744</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;Use Below code, hope it will help u..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT T_MAPL INTO W_MAPL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    W_FTAB6-MATNR = W_MAPL-MATNR.&lt;/P&gt;&lt;P&gt;    W_FTAB6-PLNTY = W_MAPL-PLNTY.&lt;/P&gt;&lt;P&gt;    W_FTAB6-PLNAL = W_MAPL-PLNAL.&lt;/P&gt;&lt;P&gt;    W_FTAB6-WERKS = W_MAPL-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT T_PLAS INTO W_PLAS WHERE PLNAL = W_MAPL-PLNAL AND PLNNR = W_MAPL-PLNNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      W_FTAB6-PLNKN = W_PLAS-PLNKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT T_PLPO INTO W_PLPO WHERE PLNNR = W_PLAS-PLNNR AND PLNKN = W_PLAS-PLNKN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        W_FTAB6-PLNNR = W_PLPO-PLNNR.&lt;/P&gt;&lt;P&gt;        W_FTAB6-VORNR = W_PLPO-VORNR.&lt;/P&gt;&lt;P&gt;        W_FTAB6-LTXA1 = W_PLPO-LTXA1.&lt;/P&gt;&lt;P&gt;        W_FTAB6-KTSCH = W_PLPO-KTSCH.&lt;/P&gt;&lt;P&gt;        W_FTAB6-ARBID = W_PLPO-ARBID.&lt;/P&gt;&lt;P&gt;        W_FTAB6-BMSCH = W_PLPO-BMSCH.&lt;/P&gt;&lt;P&gt;        W_FTAB6-MEINH = W_PLPO-MEINH.&lt;/P&gt;&lt;P&gt;        W_FTAB6-VGW04 = W_PLPO-VGW04.&lt;/P&gt;&lt;P&gt;        W_FTAB6-VGE04 = W_PLPO-VGE04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        READ TABLE T_PLKO INTO W_PLKO WITH KEY PLNAL = W_MAPL-PLNAL PLNNR = W_MAPL-PLNNR.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;          W_FTAB6-KTEXT = W_PLKO-KTEXT.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;          W_FTAB6-ARBPL = W_CRHD-ARBPL.&lt;/P&gt;&lt;P&gt;          W_FTAB6-VERWE = W_CRHD-VERWE.&lt;/P&gt;&lt;P&gt;          W_FTAB6-OBJTY = W_CRHD-OBJTY.&lt;/P&gt;&lt;P&gt;          W_FTAB6-OBJID = W_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        READ TABLE T_CRTX INTO W_CRTX WITH KEY OBJID = W_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;          W_FTAB6-KTEXT_UP = W_CRTX-KTEXT_UP.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        READ TABLE T_MARC INTO W_MARC WITH KEY MATNR = W_MAPL-MATNR.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;          W_FTAB6-LGPRO = W_MARC-LGPRO.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        APPEND W_FTAB6 TO T_FTAB6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&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;Regards,&lt;/P&gt;&lt;P&gt;Meet Gohel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706403#M1105744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706404#M1105745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;CODE&gt;LOOP AT T_MAPL INTO W_MAPL.

LOOP AT T_PLAS INTO W_PLAS WHERE PLNAL = W_MAPL-PLNAL AND PLNNR = W_MAPL-PLNNR.
W_FTAB6-PLNKN = W_PLAS-PLNKN.

LOOP AT T_PLPO INTO W_PLPO WHERE PLNNR = W_PLAS-PLNNR AND PLNKN = W_PLAS-PLNKN.
W_FTAB6-MATNR = W_MAPL-MATNR.
W_FTAB6-PLNTY = W_MAPL-PLNTY.
W_FTAB6-PLNAL = W_MAPL-PLNAL.
W_FTAB6-WERKS = W_MAPL-WERKS.

READ TABLE T_PLKO INTO W_PLKO WITH KEY PLNAL = W_MAPL-PLNAL PLNNR = W_MAPL-PLNNR.

W_FTAB6-KTEXT = W_PLKO-KTEXT.
W_FTAB6-PLNNR = W_PLPO-PLNNR.
W_FTAB6-VORNR = W_PLPO-VORNR.
W_FTAB6-LTXA1 = W_PLPO-LTXA1.
W_FTAB6-KTSCH = W_PLPO-KTSCH.
W_FTAB6-ARBID = W_PLPO-ARBID.
W_FTAB6-BMSCH = W_PLPO-BMSCH.
W_FTAB6-MEINH = W_PLPO-MEINH.
W_FTAB6-VGW04 = W_PLPO-VGW04.
W_FTAB6-VGE04 = W_PLPO-VGE04.

READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.
If Sy-subrc NE 0. "if no matching record found
 Exit. "Exit loop without appending the record
Endif.
W_FTAB6-ARBPL = W_CRHD-ARBPL.
W_FTAB6-VERWE = W_CRHD-VERWE.
W_FTAB6-OBJTY = W_CRHD-OBJTY.
W_FTAB6-OBJID = W_CRHD-OBJID.

READ TABLE T_CRTX INTO W_CRTX WITH KEY OBJID = W_CRHD-OBJID.
W_FTAB6-KTEXT_UP = W_CRTX-KTEXT_UP.

READ TABLE T_MARC INTO W_MARC WITH KEY MATNR = W_MAPL-MATNR.
W_FTAB6-LGPRO = W_MARC-LGPRO.

APPEND W_FTAB6 TO T_FTAB6.
ENDLOOP.
ENDLOOP.
ENDLOOP.&lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; Plzz provide me guidlines that how should i remove the filling of the records which does not have the Work Center. (ARBPL)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will avoid appending of fields without a work center. Check this and revert back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706404#M1105745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706405#M1105746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i had done the change as u had said and now it is displaying the data only where work centers are located but i want to display the data also where work center are not located. previously it was displaying the data of last work center repeatedly in the columns where work center is not defined but after making amendment it is showing the records where work center is present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ricx .s on Nov 11, 2008 6:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:25:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706405#M1105746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706406#M1105747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the data for which work centers are not present then just delete what i have suggested. Check and revert back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your requirement is confusing, at first you told you dont want records which dont have workcenter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:39:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706406#M1105747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706407#M1105748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do the following correction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if sy-subrc = 0.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;W_FTAB6-ARBPL = W_CRHD-ARBPL.&lt;/P&gt;&lt;P&gt;W_FTAB6-VERWE = W_CRHD-VERWE.&lt;/P&gt;&lt;P&gt;W_FTAB6-OBJTY = W_CRHD-OBJTY.&lt;/P&gt;&lt;P&gt;W_FTAB6-OBJID = W_CRHD-OBJID.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;endif.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash Pandey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:45:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706407#M1105748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706408#M1105749</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;ok,i had removed the new code which you had said,i am really sorry that i got confused. Actually my requierment is :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OprID     W.C.    Item description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0010      1422    SHEARING MACHINE-01       &lt;/P&gt;&lt;P&gt;0011      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;0015      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;0020      1461    KNUCKLE JOINT PRASS -01&lt;/P&gt;&lt;P&gt;0021      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;0025      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;0030      1464    PEDESTAL GRINDER-01&lt;/P&gt;&lt;P&gt;0040      1461    KNUCKLE JOINT PRASS -01&lt;/P&gt;&lt;P&gt;0041      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;0045      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;0050      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the piece of output i am getting right now . There is WOrk center Id '1920' which is getting repeated for the values where no work center is defined and i want to display the as it is shown in the tcode CA03(Display Routing). I had checked in the debug mode that it is picking up the records where the Work Center is defined,and  then it is picking the records where no work center is defined. &lt;/P&gt;&lt;P&gt;due to append statement it is picking the last record having work center value 1920 and it is making repetition of it for the records having no work center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output which i want to display is:-&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;STRONG&gt;OprID     W.C.    Item description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0010      1422    SHEARING MACHINE-01       &lt;/P&gt;&lt;P&gt;0011      &lt;/P&gt;&lt;P&gt;0015      &lt;/P&gt;&lt;P&gt;0020      1461    KNUCKLE JOINT PRASS -01&lt;/P&gt;&lt;P&gt;0021   &lt;/P&gt;&lt;P&gt;0025   &lt;/P&gt;&lt;P&gt;0030      1464    PEDESTAL GRINDER-01&lt;/P&gt;&lt;P&gt;0040      1461    KNUCKLE JOINT PRASS -01&lt;/P&gt;&lt;P&gt;0041          &lt;/P&gt;&lt;P&gt;0045          &lt;/P&gt;&lt;P&gt;0050      1920    LATHE MACHINE N55&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz provide me guidelines how to display this type of output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 05:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706408#M1105749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T05:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706409#M1105750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT T_MAPL INTO W_MAPL.
 
LOOP AT T_PLAS INTO W_PLAS WHERE PLNAL = W_MAPL-PLNAL AND PLNNR = W_MAPL-PLNNR.
W_FTAB6-PLNKN = W_PLAS-PLNKN.
 
LOOP AT T_PLPO INTO W_PLPO WHERE PLNNR = W_PLAS-PLNNR AND PLNKN = W_PLAS-PLNKN.
W_FTAB6-MATNR = W_MAPL-MATNR.
W_FTAB6-PLNTY = W_MAPL-PLNTY.
W_FTAB6-PLNAL = W_MAPL-PLNAL.
W_FTAB6-WERKS = W_MAPL-WERKS.
 
READ TABLE T_PLKO INTO W_PLKO WITH KEY PLNAL = W_MAPL-PLNAL PLNNR = W_MAPL-PLNNR.
 
W_FTAB6-KTEXT = W_PLKO-KTEXT.
W_FTAB6-PLNNR = W_PLPO-PLNNR.
W_FTAB6-VORNR = W_PLPO-VORNR.
W_FTAB6-LTXA1 = W_PLPO-LTXA1.
W_FTAB6-KTSCH = W_PLPO-KTSCH.
W_FTAB6-ARBID = W_PLPO-ARBID.
W_FTAB6-BMSCH = W_PLPO-BMSCH.
W_FTAB6-MEINH = W_PLPO-MEINH.
W_FTAB6-VGW04 = W_PLPO-VGW04.
W_FTAB6-VGE04 = W_PLPO-VGE04.
 
READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.
If Sy-subrc EQ 0. "if a matching record found, proceed
W_FTAB6-ARBPL = W_CRHD-ARBPL.
W_FTAB6-VERWE = W_CRHD-VERWE.
W_FTAB6-OBJTY = W_CRHD-OBJTY.
W_FTAB6-OBJID = W_CRHD-OBJID.
 
READ TABLE T_CRTX INTO W_CRTX WITH KEY OBJID = W_CRHD-OBJID.
W_FTAB6-KTEXT_UP = W_CRTX-KTEXT_UP.
 
READ TABLE T_MARC INTO W_MARC WITH KEY MATNR = W_MAPL-MATNR.
W_FTAB6-LGPRO = W_MARC-LGPRO.
Endif. "if ends here
 
APPEND W_FTAB6 TO T_FTAB6.
Clear : W_PLPO, W_FTAB6, W_PLKO, W_CRHD, W_CRTX, W_MARC. "clear workareas used in this loop
ENDLOOP.
CLear W_PLAS. "clear workarea used in this loop
ENDLOOP.
Clear W_MAPL. "clear workarea used in this loop
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the corrections and check it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 06:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706409#M1105750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T06:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: problem in the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706410#M1105751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really thankful to you as the problem had been solved, i am assigning u full 10 points for it for providing me guidelines for solving this problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 06:23:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-the-code/m-p/4706410#M1105751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T06:23:53Z</dc:date>
    </item>
  </channel>
</rss>

