<?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: Updating Z fields using BAPI_MATERIAL_SAVEDATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742122#M2021156</link>
    <description>&lt;P&gt;Make sure to just use CHAR fields in your extension (this is recommended by SAP).&lt;BR /&gt;I once had major issues when using numeric values.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jun 2023 12:57:57 GMT</pubDate>
    <dc:creator>thkolz</dc:creator>
    <dc:date>2023-06-15T12:57:57Z</dc:date>
    <item>
      <title>Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742119#M2021153</link>
      <description>&lt;P&gt;I am having 6 Custom fields from MARC table to update in Material master if I use the structure BAPIPAREX I can fill only 4 custom fields as it is containing STRUCTURE, VALUEPART1, VALUEPART2, VALUEPART1,VALUEPART4.&lt;/P&gt;
  &lt;P&gt;And in OMSR also 6custom fields are maintained from MARC table.&lt;/P&gt;
  &lt;P&gt;How we can add more than 4 custom fields to the material master.&lt;/P&gt;
  &lt;P&gt;Please suggest any other way of adding more than custom fields.&lt;/P&gt;
  &lt;P&gt;Please help me with this issue ASAP.&lt;/P&gt;
  &lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 12:13:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742119#M2021153</guid>
      <dc:creator>former_member814501</dc:creator>
      <dc:date>2023-06-15T12:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742120#M2021154</link>
      <description>&lt;P&gt;Don't use the VALUEPARTn with only one field, you must append your fields in structures BAPI_TE_MARC (actual character fields) and BAPI_TE_MARCX (update flags) and move those structures in EXTENSIONIN, for example &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ls_extensionin-structure = 'BAPI_TE_MARC'.
cl_abap_container_utilities=&amp;gt;fill_container_c(
  EXPORTING
    im_value               = ls_bapi_te_marc " structure of type bapi_te_marc
  IMPORTING
    ex_container           = ls_extensionin+30 " values 1-4
  EXCEPTIONS
    illegal_parameter_type = 1
    OTHERS                 = 2 ).
&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In case of problem check &lt;A href="https://answers.sap.com/answers/140364/view.html"&gt;my answer to this other post&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 12:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742120#M2021154</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2023-06-15T12:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742121#M2021155</link>
      <description>&lt;P&gt;I have an abstract method for this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  METHOD fill_extension.

    DATA:
      r_type_desc TYPE REF TO cl_abap_typedescr,
      s_value     TYPE REF TO data,
      s_extension TYPE bapiparex,
      v_value     TYPE c LENGTH 960,
      v_type      TYPE string.

    FIELD-SYMBOLS:
      &amp;lt;fs_any&amp;gt;              TYPE any.


*   Create output structure
    IF i_value IS SUPPLIED.
*     Structure
      r_type_desc = cl_abap_typedescr=&amp;gt;describe_by_data( i_value ).
    ELSEIF it_value IS SUPPLIED.
*     Table
      CREATE DATA s_value LIKE LINE OF it_value.

      ASSIGN s_value-&amp;gt;* TO FIELD-SYMBOL(&amp;lt;fs_value&amp;gt;).
      CHECK sy-subrc IS INITIAL.
      r_type_desc = cl_abap_typedescr=&amp;gt;describe_by_data( &amp;lt;fs_value&amp;gt; ).
    ENDIF.

*   Get type
    CHECK r_type_desc IS BOUND.
    v_type = r_type_desc-&amp;gt;absolute_name.
    REPLACE '\TYPE=' IN v_type WITH space.

    s_extension-structure = v_type.

    IF i_value IS NOT INITIAL.
      CLASS cl_abap_container_utilities DEFINITION LOAD.

      CALL METHOD cl_abap_container_utilities=&amp;gt;fill_container_c
        EXPORTING
          im_value               = i_value
        IMPORTING
          ex_container           = v_value
        EXCEPTIONS
          illegal_parameter_type = 1
          OTHERS                 = 2.

      s_extension-valuepart1 = v_value(240).
      s_extension-valuepart2 = v_value+240(240).
      s_extension-valuepart3 = v_value+480(240).
      s_extension-valuepart4 = v_value+720(240).
      APPEND s_extension TO et_extension.
    ELSE.
*     Add all values to the extension table
      LOOP AT it_value ASSIGNING &amp;lt;fs_any&amp;gt;.
        CALL METHOD cl_abap_container_utilities=&amp;gt;fill_container_c
          EXPORTING
            im_value               = &amp;lt;fs_any&amp;gt;
          IMPORTING
            ex_container           = v_value
          EXCEPTIONS
            illegal_parameter_type = 1
            OTHERS                 = 2.

        DESCRIBE FIELD v_value LENGTH DATA(lv_length) IN CHARACTER MODE.

        IF lv_length LE 240.
          s_extension-valuepart1 = v_value+0(lv_length).
        ENDIF.

        IF lv_length GT 240 AND lv_length LE 480.
          s_extension-valuepart1 = v_value+0(240).
          DATA(lv_max) = lv_length - 240.
          s_extension-valuepart2 = v_value+240(lv_max).
        ENDIF.

        IF lv_length GT 480 AND lv_length LE 720.
          s_extension-valuepart1 = v_value+0(240).
          s_extension-valuepart2 = v_value+240(240).
          lv_max = lv_length - 480.
          s_extension-valuepart3 = v_value+480(lv_max).
        ENDIF.

        IF lv_length GT 720 AND lv_length LE 960.
          s_extension-valuepart1 = v_value+0(240).
          s_extension-valuepart2 = v_value+240(240).
          s_extension-valuepart3 = v_value+480(240).
          lv_max = lv_length - 720.
          s_extension-valuepart4 = v_value+720(lv_max).

        ELSEIF lv_length GT 960.

          s_extension-valuepart1 = v_value+0(240).
          s_extension-valuepart2 = v_value+240(240).
          s_extension-valuepart3 = v_value+480(240).
          s_extension-valuepart4 = v_value+720(240).
        ENDIF.
        APPEND s_extension TO et_extension.
      ENDLOOP.
    ENDIF.
  ENDMETHOD.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This can be passed like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    DATA:
       t_extension    TYPE bapiparex_tab.

    zcl_bc_util=&amp;gt;fill_extension(
      EXPORTING
*       i_structure  = 'BAPI_TE_AUFK'
        i_value      = s_bapi_te_aufk
      IMPORTING
        et_extension = t_extension
    ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jun 2023 12:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742121#M2021155</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-06-15T12:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742122#M2021156</link>
      <description>&lt;P&gt;Make sure to just use CHAR fields in your extension (this is recommended by SAP).&lt;BR /&gt;I once had major issues when using numeric values.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 12:57:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742122#M2021156</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-06-15T12:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742123#M2021157</link>
      <description>&lt;P&gt;We we need to maintain the new Z fields in the BAPI Structures &lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742123#M2021157</guid>
      <dc:creator>former_member814501</dc:creator>
      <dc:date>2023-06-15T13:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742124#M2021158</link>
      <description>&lt;P&gt;Can you pls explain me end to end process of adding zfilds to the material master&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742124#M2021158</guid>
      <dc:creator>former_member814501</dc:creator>
      <dc:date>2023-06-15T13:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742125#M2021159</link>
      <description>&lt;P&gt;Yes &lt;A href="https://help.sap.com/docs/search?q=append%20structure"&gt;append&lt;/A&gt; your fields in structures BAPI_TE_MARC and BAPI_TE_MARCX (and read documentation of EXTENSIONI parameter)&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:23:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742125#M2021159</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2023-06-15T13:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742126#M2021160</link>
      <description>&lt;P&gt;The signature of the method is missing.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 17:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742126#M2021160</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-06-15T17:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Z fields using BAPI_MATERIAL_SAVEDATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742127#M2021161</link>
      <description>&lt;P&gt;Sorry, saw your comment just now...&lt;/P&gt;&lt;P&gt;Here's the signature:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    CLASS-METHODS fill_extension&lt;BR /&gt;      IMPORTING&lt;BR /&gt;        i_value      TYPE any OPTIONAL&lt;BR /&gt;        it_value     TYPE table OPTIONAL&lt;BR /&gt;      EXPORTING&lt;BR /&gt;        et_extension TYPE bapiparex_t .&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2023 14:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-z-fields-using-bapi-material-savedata/m-p/12742127#M2021161</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-07-12T14:14:42Z</dc:date>
    </item>
  </channel>
</rss>

