<?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: plz check the code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534196#M850291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;P&gt;I checked the sy-subrc value.the value is 4.&lt;/P&gt;&lt;P&gt;What am i supposed to do.&lt;/P&gt;&lt;P&gt;Can u please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;rose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2008 07:40:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-13T07:40:51Z</dc:date>
    <item>
      <title>plz check the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534193#M850288</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;Can anyone please tell me why the 'matnr' field values is not getting appended into the table gt_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;points for sure.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My code :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  mblnr mjahr budat&lt;/P&gt;&lt;P&gt;          FROM mkpf&lt;/P&gt;&lt;P&gt;          INTO TABLE gt_mkpf&lt;/P&gt;&lt;P&gt;          WHERE budat IN s_budat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT gt_mkpf[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT mblnr mjahr zeile bwart matnr shkzg menge meins charg&lt;/P&gt;&lt;P&gt;           FROM mseg&lt;/P&gt;&lt;P&gt;           INTO TABLE gt_mseg&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN gt_mkpf&lt;/P&gt;&lt;P&gt;           WHERE mblnr = gt_mkpf-mblnr AND mjahr = gt_mkpf-mjahr.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT gt_mseg[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT matnr matkl&lt;/P&gt;&lt;P&gt;           FROM mara&lt;/P&gt;&lt;P&gt;           INTO TABLE gt_mara&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN gt_mseg&lt;/P&gt;&lt;P&gt;           WHERE matnr = gt_mseg-matnr AND matkl IN s_matkl.&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;&lt;/P&gt;&lt;P&gt;  LOOP AT gt_mkpf .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR gt_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT gt_mseg WHERE mblnr = gt_mkpf-mblnr AND mjahr = gt_mkpf-mjahr.&lt;/P&gt;&lt;P&gt;      gt_out-menge = gt_mseg-menge.&lt;/P&gt;&lt;P&gt;      gt_out-meins = gt_mseg-meins.&lt;/P&gt;&lt;P&gt;      gt_out-charg = gt_mseg-charg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF  gt_mseg-shkzg = 'H'.&lt;/P&gt;&lt;P&gt;        gt_out-menge = ( -1 ) * gt_out-menge.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE  gt_mara WITH KEY  matnr = gt_mseg-matnr  .&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        gt_out-matnr = gt_mara-matnr.&lt;/P&gt;&lt;P&gt;      ENDIF.&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; gt_out-budat = gt_mkpf-budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; APPEND gt_out.&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;rose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:23:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534193#M850288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: plz check the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534194#M850289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code is looking fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check in the debugging mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gt_mara WITH KEY matnr = gt_mseg-matnr .&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;gt_out-matnr = gt_mara-matnr.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you getting matching record in gt_mara for the gt_mseg.&lt;/P&gt;&lt;P&gt;Check sy-subrc. Is it 0 for any record&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:32:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534194#M850289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: plz check the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534195#M850290</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;Your values are not getting appended because..after the read statement you are not appending the values, before the ending of inner loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_mkpf .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR gt_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_mseg WHERE mblnr = gt_mkpf-mblnr AND mjahr = gt_mkpf-mjahr.&lt;/P&gt;&lt;P&gt;gt_out-menge = gt_mseg-menge.&lt;/P&gt;&lt;P&gt;gt_out-meins = gt_mseg-meins.&lt;/P&gt;&lt;P&gt;gt_out-charg = gt_mseg-charg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF gt_mseg-shkzg = 'H'.&lt;/P&gt;&lt;P&gt;gt_out-menge = ( -1 ) * gt_out-menge.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gt_mara WITH KEY matnr = gt_mseg-matnr .&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;gt_out-matnr = gt_mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Append gt_out.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&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;gt_out-budat = gt_mkpf-budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;APPEND gt_out.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Modify gt_out transporting budat.&lt;/STRONG&gt;&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;&lt;/P&gt;&lt;P&gt;hope it will help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Parul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534195#M850290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: plz check the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534196#M850291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;P&gt;I checked the sy-subrc value.the value is 4.&lt;/P&gt;&lt;P&gt;What am i supposed to do.&lt;/P&gt;&lt;P&gt;Can u please help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;rose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:40:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534196#M850291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: plz check the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534197#M850292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi rose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that means that there is not any matching record in gt_mara and gt_mseg so no matnr will come. it should match so select any material that is present in mseg and mara both for the selection condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debug the code carefully you will get what is the problem and how to solve it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 07:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534197#M850292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T07:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: plz check the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534198#M850293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Rose Preethi   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow the code of parul she is absolutely right if it still not working then remove the inner loop and follow the code:&lt;/P&gt;&lt;P&gt;sort gt_mara by matnr.&lt;/P&gt;&lt;P&gt;sort gt_mseg by mblnr mjahr.&lt;/P&gt;&lt;P&gt; LOOP AT gt_mkpf .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR gt_out.&lt;/P&gt;&lt;P&gt;&lt;U&gt;refresh gt&lt;/U&gt;out._&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table gt_mseg with key mblnr = gt_mkpf-mblnr AND mjahr = gt_mkpf-mjahr binary search.&lt;/P&gt;&lt;P&gt;gt_out-menge = gt_mseg-menge.&lt;/P&gt;&lt;P&gt;gt_out-meins = gt_mseg-meins.&lt;/P&gt;&lt;P&gt;gt_out-charg = gt_mseg-charg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF gt_mseg-shkzg = 'H'.&lt;/P&gt;&lt;P&gt;gt_out-menge = ( -1 ) * gt_out-menge.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE gt_mara WITH KEY matnr = gt_mseg-matnr binary search .&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;gt_out-matnr = gt_mara-matnr.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gt_out-budat = gt_mkpf-budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND gt_out.&lt;/P&gt;&lt;P&gt;modify gt_out.&lt;/P&gt;&lt;P&gt;clear gt_out.&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;Reaward if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 08:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/plz-check-the-code/m-p/3534198#M850293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T08:12:16Z</dc:date>
    </item>
  </channel>
</rss>

