<?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 CSAP_BOM_ITEM_MAINTAIN - Problems while clearing custom fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843135#M1473387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I try to modify some bom items, it works fine so far, but I get into trouble when trying to update previosly filled fields with empty ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I check my structure and insert a 'delete field character' into initial fields:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT fieldcat INTO wa_fieldcat.
        IF wa_fieldcat-fieldname EQ 'FLDELETE'.
          CONTINUE.
        ENDIF.
        ASSIGN COMPONENT wa_fieldcat-fieldname OF STRUCTURE bomline TO &amp;lt;field&amp;gt;.
        IF sy-subrc IS INITIAL.
          IF &amp;lt;field&amp;gt; IS INITIAL OR &amp;lt;field&amp;gt; EQ space.
            &amp;lt;field&amp;gt; = '!'.
          ENDIF.
        ELSE.
          MESSAGE 'Error while looping thru bomline structure to update fields' TYPE 'E'.
        ENDIF.
     ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I use CSAP_BOM_ITEM_MAINTAIN to update bom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CSAP_BOM_ITEM_MAINTAIN'
    EXPORTING
      i_stpo                   = bomline
*         FL_DEP_ALE_CONFORM       = ' '
    IMPORTING
      o_stpo                   = bomline_out
      fl_warning               = warning
*       TABLES
*         T_DEP_DATA               =
*         T_DEP_DESCR              =
*         T_DEP_ORDER              =
*         T_DEP_SOURCE             =
*         T_DEP_DOC                =
    EXCEPTIONS
      error                    = 1
      OTHERS                   = 2
      .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, this works out fine, but not for my custom fields in the stpo_api02's .INCLUDE structure. While the standard fields are deleted when I fill them with '!', the custom ones just contain '!' afterwards.&lt;/P&gt;&lt;P&gt;When I dont put '!' into my custom fields and make them initial prior invoking CSAP_BOM_ITEM_MAINTAIN, their contents stay untouched. &lt;/P&gt;&lt;P&gt;However, real updates, where field contents are changed to some value but initial work flawlessly, on both, the stock and my custom fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Mar 2010 09:52:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-29T09:52:26Z</dc:date>
    <item>
      <title>CSAP_BOM_ITEM_MAINTAIN - Problems while clearing custom fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843135#M1473387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I try to modify some bom items, it works fine so far, but I get into trouble when trying to update previosly filled fields with empty ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I check my structure and insert a 'delete field character' into initial fields:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT fieldcat INTO wa_fieldcat.
        IF wa_fieldcat-fieldname EQ 'FLDELETE'.
          CONTINUE.
        ENDIF.
        ASSIGN COMPONENT wa_fieldcat-fieldname OF STRUCTURE bomline TO &amp;lt;field&amp;gt;.
        IF sy-subrc IS INITIAL.
          IF &amp;lt;field&amp;gt; IS INITIAL OR &amp;lt;field&amp;gt; EQ space.
            &amp;lt;field&amp;gt; = '!'.
          ENDIF.
        ELSE.
          MESSAGE 'Error while looping thru bomline structure to update fields' TYPE 'E'.
        ENDIF.
     ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I use CSAP_BOM_ITEM_MAINTAIN to update bom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CSAP_BOM_ITEM_MAINTAIN'
    EXPORTING
      i_stpo                   = bomline
*         FL_DEP_ALE_CONFORM       = ' '
    IMPORTING
      o_stpo                   = bomline_out
      fl_warning               = warning
*       TABLES
*         T_DEP_DATA               =
*         T_DEP_DESCR              =
*         T_DEP_ORDER              =
*         T_DEP_SOURCE             =
*         T_DEP_DOC                =
    EXCEPTIONS
      error                    = 1
      OTHERS                   = 2
      .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, this works out fine, but not for my custom fields in the stpo_api02's .INCLUDE structure. While the standard fields are deleted when I fill them with '!', the custom ones just contain '!' afterwards.&lt;/P&gt;&lt;P&gt;When I dont put '!' into my custom fields and make them initial prior invoking CSAP_BOM_ITEM_MAINTAIN, their contents stay untouched. &lt;/P&gt;&lt;P&gt;However, real updates, where field contents are changed to some value but initial work flawlessly, on both, the stock and my custom fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea on this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Mar 2010 09:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843135#M1473387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-29T09:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: CSAP_BOM_ITEM_MAINTAIN - Problems while clearing custom fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843136#M1473388</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 you try to read the BOM items before changes and use the same structure in change BAPI by modifying the structure with only the changes. I guess this will support the clearing of the custom fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Rajesh V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 06:21:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843136#M1473388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-30T06:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: CSAP_BOM_ITEM_MAINTAIN - Problems while clearing custom fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843137#M1473389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact, I already read the bom before trying to change it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I invoke CSAP_MAT_BOM_OPEN first, that opens and reads materials bom, &lt;/P&gt;&lt;P&gt;set alle values to be changed, then fire CSAP_BOM_ITEM_MAINTAIN followed by CSAP_MAT_BOM_CLOSE, which shoud commit all changes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 09:11:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843137#M1473389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-30T09:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: CSAP_BOM_ITEM_MAINTAIN - Problems while clearing custom fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843138#M1473390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See Note 1229874.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Özgen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ASELSAN IT Dept. on Apr 18, 2011 3:36 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2011 13:35:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843138#M1473390</guid>
      <dc:creator>former_member246728</dc:creator>
      <dc:date>2011-04-18T13:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: CSAP_BOM_ITEM_MAINTAIN - Problems while clearing custom fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843139#M1473391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Apr 2015 15:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csap-bom-item-maintain-problems-while-clearing-custom-fields/m-p/6843139#M1473391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-18T15:55:37Z</dc:date>
    </item>
  </channel>
</rss>

