<?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: mb1b transfer posting in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229864#M139079</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;so you you should check the material code before updating MARD:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY it_mard TRANSPORTING labst WHERE matnr(3) = wa_mb1b-matnr(3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway are you sure you can directly update std table MARD?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Apr 2006 08:47:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-18T08:47:31Z</dc:date>
    <item>
      <title>mb1b transfer posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229861#M139076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In mb1b second screen, they are entering second line item which is called scrap(eg: M03-SCRAP).This is updated in MARD table as the scrap materials doesn't belong to any batch. &lt;/P&gt;&lt;P&gt;So, they are entering matnr and labst (quantity in second line item).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to identify this particular scrap material from mard table.&lt;/P&gt;&lt;P&gt;I m writing query like this:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr labst FROM mard&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE it_mard&lt;/P&gt;&lt;P&gt;                       WHERE matnr = 'M03-SCRAP'&lt;/P&gt;&lt;P&gt;                       AND   werks = plant&lt;/P&gt;&lt;P&gt;                       AND   lgort = '2200'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get this material number without hardcoding bcoz this ll be vary for different material numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 07:55:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229861#M139076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T07:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: mb1b transfer posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229862#M139077</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;You can use LIKE option in your select if you know how it should be the material code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_MATNR TYPE MATNR VALUE '%SCRAP%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr labst FROM mard&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_mard&lt;/P&gt;&lt;P&gt;WHERE matnr like v_matnr&lt;/P&gt;&lt;P&gt;AND werks = plant&lt;/P&gt;&lt;P&gt;AND lgort = '2200'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way it can bw extracted all records where material code has the string SCRAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think you can do something only if there's a rule to find that kind of material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 08:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229862#M139077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T08:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: mb1b transfer posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229863#M139078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;scrap field they enter like "M03-SCRAP".&lt;/P&gt;&lt;P&gt;They said that if first 3 letters of scrap = first 3 letters of receiving material.&lt;/P&gt;&lt;P&gt;then data has to pick from mard-labst and to be added to the first line item of material and mard should be updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please luk into my coding(function module):- &lt;/P&gt;&lt;P&gt;  DATA : ls_quan2 TYPE p DECIMALS 3,&lt;/P&gt;&lt;P&gt;         ls_quan3 TYPE p DECIMALS 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : it_mard LIKE mard OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gmhead-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;  gmhead-doc_date   = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gmcode-gm_code    = '04'.       "Transfer Posting (MB1B)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT matnr clabs FROM mchb&lt;/P&gt;&lt;P&gt;                       INTO TABLE it_mb1b&lt;/P&gt;&lt;P&gt;                       WHERE werks = plant&lt;/P&gt;&lt;P&gt;                       AND   lgort = send_stloc&lt;/P&gt;&lt;P&gt;                       AND   charg = batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT matnr labst FROM mard&lt;/P&gt;&lt;P&gt;                       INTO CORRESPONDING FIELDS OF TABLE it_mard&lt;/P&gt;&lt;P&gt;                       WHERE matnr like '%SCRAP'&lt;/P&gt;&lt;P&gt;                       AND   werks = plant&lt;/P&gt;&lt;P&gt;                       AND   lgort = '2200'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_mb1b INTO wa_mb1b.&lt;/P&gt;&lt;P&gt;    it_gmitem-move_type    = move_type.&lt;/P&gt;&lt;P&gt;    it_gmitem-plant        = plant.&lt;/P&gt;&lt;P&gt;    it_gmitem-stge_loc     = send_stloc.&lt;/P&gt;&lt;P&gt;    it_gmitem-move_plant   = move_plant.&lt;/P&gt;&lt;P&gt;    it_gmitem-move_stloc   = recv_stloc.&lt;/P&gt;&lt;P&gt;    it_gmitem-batch        = batch.&lt;/P&gt;&lt;P&gt;    it_gmitem-material     = wa_mb1b-matnr.&lt;/P&gt;&lt;P&gt;    ls_quan2 = quan_measure - wa_mb1b-clabs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF ls_quan2 LE 0.&lt;/P&gt;&lt;P&gt;      ls_quan3 = wa_mb1b-clabs.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      ls_quan3 = wa_mb1b-clabs + ls_quan2.&lt;/P&gt;&lt;P&gt;      it_mard-labst = it_mard-labst - ls_quan2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; MODIFY table it_mard TRANSPORTING labst.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    &amp;lt;b&amp;gt;MODIFY it_mard TRANSPORTING labst WHERE matnr = 'M03-SCRAP'.&amp;lt;/b&amp;gt;    MODIFY mard. " FROM TABLE it_mard.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;" Here how we know that matnr only update in mard.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;    it_gmitem-entry_qnt    = ls_quan3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND it_gmitem.&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;  CLEAR return.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_GOODSMVT_CREATE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      goodsmvt_header             = gmhead&lt;/P&gt;&lt;P&gt;      goodsmvt_code               = gmcode&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TESTRUN                     = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GOODSMVT_HEADRET            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     materialdocument            = mat_doc&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MATDOCUMENTYEAR             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      goodsmvt_item               = it_gmitem&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GOODSMVT_SERIALNUMBER       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      return                      = return&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  wait          = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RETURN        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 08:30:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229863#M139078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T08:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: mb1b transfer posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229864#M139079</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;so you you should check the material code before updating MARD:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY it_mard TRANSPORTING labst WHERE matnr(3) = wa_mb1b-matnr(3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway are you sure you can directly update std table MARD?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 08:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229864#M139079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T08:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: mb1b transfer posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229865#M139080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can't we directly update standard tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we should not do directly.. how to do this?&lt;/P&gt;&lt;P&gt;bcoz..all this code i am writing in BAPI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 08:53:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229865#M139080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T08:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: mb1b transfer posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229866#M139081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the BAPI BAPI_MATERIAL_SAVEDATA to update material master data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 08:59:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mb1b-transfer-posting/m-p/1229866#M139081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T08:59:23Z</dc:date>
    </item>
  </channel>
</rss>

