<?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 BOM_UPDATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570277#M257475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on BAdI BOM_UPDATE ( method Change_at_save)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to populate the sort string field (sortf) at the commponent level at BOM save (CS01 and CS02) with Material Group value + Component Item number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is working fine for concatenation.&lt;/P&gt;&lt;P&gt;If the item doesnt have a material group I should not populate the sort string&lt;/P&gt;&lt;P&gt;But if the sort string field is already populated and the item doesnt have the material group value, I need to clear  the sort string(sortf).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I see in the debug mode sort string is getting cleared for the materials which doesnt have material group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I bo back and check the tranasaction after change sort string field is not blank (not getting cleared)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one tell me whats wrong with my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code&lt;/P&gt;&lt;P&gt;DATA: l_matkl type mara-matkl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: stpob TYPE stpob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FIELD_NAME(30) VALUE '(SAPLCSBT)O1-STPOB[]'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;TABLE&amp;gt; TYPE TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (FIELD_NAME) TO &amp;lt;TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;TABLE&amp;gt; INTO STPOB.&lt;/P&gt;&lt;P&gt;clear l_matkl&lt;/P&gt;&lt;P&gt;clear stpob-sortf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matkl&lt;/P&gt;&lt;P&gt;from MARA&lt;/P&gt;&lt;P&gt;into l_matkl&lt;/P&gt;&lt;P&gt;where matnr = stpob-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not l_matkl is initial.&lt;/P&gt;&lt;P&gt;  concatenate l_matkl(3) '.' stpob-posnr(3) into-sortf.&lt;/P&gt;&lt;P&gt;  modify &amp;lt;table&amp;gt; from stpob.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   modify &amp;lt;table&amp;gt; from stpob.&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;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bhasker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Sep 2006 23:22:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-25T23:22:30Z</dc:date>
    <item>
      <title>BOM_UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570277#M257475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on BAdI BOM_UPDATE ( method Change_at_save)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to populate the sort string field (sortf) at the commponent level at BOM save (CS01 and CS02) with Material Group value + Component Item number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is working fine for concatenation.&lt;/P&gt;&lt;P&gt;If the item doesnt have a material group I should not populate the sort string&lt;/P&gt;&lt;P&gt;But if the sort string field is already populated and the item doesnt have the material group value, I need to clear  the sort string(sortf).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I see in the debug mode sort string is getting cleared for the materials which doesnt have material group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I bo back and check the tranasaction after change sort string field is not blank (not getting cleared)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one tell me whats wrong with my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code&lt;/P&gt;&lt;P&gt;DATA: l_matkl type mara-matkl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: stpob TYPE stpob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FIELD_NAME(30) VALUE '(SAPLCSBT)O1-STPOB[]'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;TABLE&amp;gt; TYPE TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (FIELD_NAME) TO &amp;lt;TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;TABLE&amp;gt; INTO STPOB.&lt;/P&gt;&lt;P&gt;clear l_matkl&lt;/P&gt;&lt;P&gt;clear stpob-sortf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matkl&lt;/P&gt;&lt;P&gt;from MARA&lt;/P&gt;&lt;P&gt;into l_matkl&lt;/P&gt;&lt;P&gt;where matnr = stpob-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not l_matkl is initial.&lt;/P&gt;&lt;P&gt;  concatenate l_matkl(3) '.' stpob-posnr(3) into-sortf.&lt;/P&gt;&lt;P&gt;  modify &amp;lt;table&amp;gt; from stpob.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   modify &amp;lt;table&amp;gt; from stpob.&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;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bhasker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 23:22:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570277#M257475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T23:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: BOM_UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570278#M257476</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;Please check the modified code. i have included the Sy-subcr check after selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;TABLE&amp;gt; INTO STPOB.&lt;/P&gt;&lt;P&gt;clear l_matkl&lt;/P&gt;&lt;P&gt;clear stpob-sortf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matkl&lt;/P&gt;&lt;P&gt;from MARA&lt;/P&gt;&lt;P&gt;into l_matkl&lt;/P&gt;&lt;P&gt;where matnr = stpob-idnrk.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-subrc is initial.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if not l_matkl is initial.&lt;/P&gt;&lt;P&gt;concatenate l_matkl(3) '.' stpob-posnr(3) into-sortf.&lt;/P&gt;&lt;P&gt;modify &amp;lt;table&amp;gt; from stpob.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;modify &amp;lt;table&amp;gt; from stpob.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;endif.&amp;lt;/b&amp;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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 00:55:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570278#M257476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T00:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: BOM_UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570279#M257477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaffer,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I have already tried with your modifications&lt;/P&gt;&lt;P&gt;still same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bhasker.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 01:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570279#M257477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T01:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: BOM_UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570280#M257478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhasker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_matkl type mara-matkl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: stpob TYPE stpob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FIELD_NAME(30) VALUE '(SAPLCSBT)O1-STPOB[]'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;TABLE&amp;gt; TYPE TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (FIELD_NAME) TO &amp;lt;TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;TABLE&amp;gt; INTO STPOB.&lt;/P&gt;&lt;P&gt;clear l_matkl&lt;/P&gt;&lt;P&gt;clear stpob-sortf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matkl&lt;/P&gt;&lt;P&gt;from MARA&lt;/P&gt;&lt;P&gt;into l_matkl&lt;/P&gt;&lt;P&gt;where matnr = stpob-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-subrc eq 0.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;concatenate l_matkl(3) '.' stpob-posnr(3) into sortf.&lt;/P&gt;&lt;P&gt;modify &amp;lt;table&amp;gt; from stpob.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*else.&lt;/P&gt;&lt;P&gt;*modify &amp;lt;table&amp;gt; from stpob.&amp;lt;/b&amp;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;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : Please reward all helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 01:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570280#M257478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T01:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: BOM_UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570281#M257479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashanth,&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually problem is in the debug mode I can see that record is getting modified in the table &amp;lt;TABLE&amp;gt; from STPOB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I go back and check the transaction the item record is not getting updated ie value in SORTF field is not getting updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bhasker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 04:19:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570281#M257479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T04:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: BOM_UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570282#M257480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhasker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_matkl type mara-matkl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: stpob TYPE stpob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FIELD_NAME(30) VALUE '(SAPLCSBT)O1-STPOB[]'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;TABLE&amp;gt; TYPE TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN (FIELD_NAME) TO &amp;lt;TABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;TABLE&amp;gt; INTO STPOB.&lt;/P&gt;&lt;P&gt;clear l_matkl&lt;/P&gt;&lt;P&gt;clear stpob-sortf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matkl&lt;/P&gt;&lt;P&gt;from MARA&lt;/P&gt;&lt;P&gt;into l_matkl&lt;/P&gt;&lt;P&gt;where matnr = stpob-idnrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;concatenate l_matkl(3) '.' stpob-posnr(3) into sortf.&lt;/P&gt;&lt;P&gt;modify &amp;lt;table&amp;gt; from stpob.&lt;/P&gt;&lt;P&gt;*else.&lt;/P&gt;&lt;P&gt;*modify &amp;lt;table&amp;gt; from stpob.&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;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;COMMIT WORK and WAIT.&amp;lt;/b&amp;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;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : Please reward all helpful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Prashant Patil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 04:39:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570282#M257480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T04:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: BOM_UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570283#M257481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Commit work is also not working out for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 04:50:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bom-update/m-p/1570283#M257481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T04:50:26Z</dc:date>
    </item>
  </channel>
</rss>

