<?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: Populating Additional data in Material master record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-populating-additional-data-in-material-master-record/m-p/8485371#M1652715</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;I am creating material master record using BAPI_MATERIAL_SAVE_DATA. I am using the below function modules to populate date in Additional Data Tab. I am getting the existing material details from BAPI_MATERIAL_GET_ALL and passing it to &lt;/P&gt;&lt;P&gt;BAPI_MATERIAL_SAVE_DATA variables. I can create material successfully, but  "PROPORTION/PRODUCT UNIT"   TAB in Additional Data Tab is not populating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program populates this data  for some materials and for some materials not.  For example,  when I try to create a new  material by copying  existing details from 1234 , New material will be created   with 12345(say), but "PROPORTION/PRODUCT UNIT"   TAB in Additional Data Tab is not populating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now If I put a break point, to find out what could be the issue , and then press f6 ,  and re-execute program for the same material 1234, then my custom program can populates data.  I know its sound wiered, but I am not able to solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'VBWS_UOM_READ_WITH_MATNR'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_matnr         = it_mara-matnr&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        e_meinh         = gt_meinh&lt;/P&gt;&lt;P&gt;        e_meinh_ws      = gt_meinh_ws&lt;/P&gt;&lt;P&gt;        e_meinh_ws_upd  = gt_meinh_ws_upd&lt;/P&gt;&lt;P&gt;        e_meinh_ws_updx = gt_meinh_ws_updx&lt;/P&gt;&lt;P&gt;        e_message       = gt_message&lt;/P&gt;&lt;P&gt;        e_return        = gt_return&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error           = 1&lt;/P&gt;&lt;P&gt;        OTHERS          = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    FREE: gt_message, gt_return.&lt;/P&gt;&lt;P&gt;    CLEAR : gt_meinh_ws_upd, gt_meinh_ws_updx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'VBWS_UOM_MAINTAIN_DARK'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_matnr               = lv_matnr&lt;/P&gt;&lt;P&gt;        i_kzwsm               = it_mara-kzwsm&lt;/P&gt;&lt;P&gt;        i_kzwsmx              = 'X'&lt;/P&gt;&lt;P&gt;        i_exit_by_first_error = 'X'&lt;/P&gt;&lt;P&gt;        i_user                = sy-uname&lt;/P&gt;&lt;P&gt;        i_buffer_refresh      = 'X'&lt;/P&gt;&lt;P&gt;        i_no_update           = ' '&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        i_meinh_ws_upd        = gt_meinh_ws_upd[]&lt;/P&gt;&lt;P&gt;        i_meinh_ws_updx       = gt_meinh_ws_updx[]&lt;/P&gt;&lt;P&gt;        e_message             = gt_message&lt;/P&gt;&lt;P&gt;        e_return              = gt_return&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error                 = 1&lt;/P&gt;&lt;P&gt;        OTHERS                = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT gt_return WHERE type = 'S'.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2012 23:12:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-17T23:12:26Z</dc:date>
    <item>
      <title>Re: Populating Additional data in Material master record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-populating-additional-data-in-material-master-record/m-p/8485371#M1652715</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;I am creating material master record using BAPI_MATERIAL_SAVE_DATA. I am using the below function modules to populate date in Additional Data Tab. I am getting the existing material details from BAPI_MATERIAL_GET_ALL and passing it to &lt;/P&gt;&lt;P&gt;BAPI_MATERIAL_SAVE_DATA variables. I can create material successfully, but  "PROPORTION/PRODUCT UNIT"   TAB in Additional Data Tab is not populating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program populates this data  for some materials and for some materials not.  For example,  when I try to create a new  material by copying  existing details from 1234 , New material will be created   with 12345(say), but "PROPORTION/PRODUCT UNIT"   TAB in Additional Data Tab is not populating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now If I put a break point, to find out what could be the issue , and then press f6 ,  and re-execute program for the same material 1234, then my custom program can populates data.  I know its sound wiered, but I am not able to solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'VBWS_UOM_READ_WITH_MATNR'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_matnr         = it_mara-matnr&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        e_meinh         = gt_meinh&lt;/P&gt;&lt;P&gt;        e_meinh_ws      = gt_meinh_ws&lt;/P&gt;&lt;P&gt;        e_meinh_ws_upd  = gt_meinh_ws_upd&lt;/P&gt;&lt;P&gt;        e_meinh_ws_updx = gt_meinh_ws_updx&lt;/P&gt;&lt;P&gt;        e_message       = gt_message&lt;/P&gt;&lt;P&gt;        e_return        = gt_return&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error           = 1&lt;/P&gt;&lt;P&gt;        OTHERS          = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    FREE: gt_message, gt_return.&lt;/P&gt;&lt;P&gt;    CLEAR : gt_meinh_ws_upd, gt_meinh_ws_updx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'VBWS_UOM_MAINTAIN_DARK'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        i_matnr               = lv_matnr&lt;/P&gt;&lt;P&gt;        i_kzwsm               = it_mara-kzwsm&lt;/P&gt;&lt;P&gt;        i_kzwsmx              = 'X'&lt;/P&gt;&lt;P&gt;        i_exit_by_first_error = 'X'&lt;/P&gt;&lt;P&gt;        i_user                = sy-uname&lt;/P&gt;&lt;P&gt;        i_buffer_refresh      = 'X'&lt;/P&gt;&lt;P&gt;        i_no_update           = ' '&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        i_meinh_ws_upd        = gt_meinh_ws_upd[]&lt;/P&gt;&lt;P&gt;        i_meinh_ws_updx       = gt_meinh_ws_updx[]&lt;/P&gt;&lt;P&gt;        e_message             = gt_message&lt;/P&gt;&lt;P&gt;        e_return              = gt_return&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error                 = 1&lt;/P&gt;&lt;P&gt;        OTHERS                = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT gt_return WHERE type = 'S'.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 23:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-populating-additional-data-in-material-master-record/m-p/8485371#M1652715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-17T23:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Populating Additional data in Material master record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-populating-additional-data-in-material-master-record/m-p/8485372#M1652716</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;I have come across such a situation while updating a record. I fixed it by calling the fm twice passing same data and committing after each function call. In simple words, Do your job twice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this also solves ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karthik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 07:03:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-populating-additional-data-in-material-master-record/m-p/8485372#M1652716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-18T07:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Populating Additional data in Material master record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-populating-additional-data-in-material-master-record/m-p/8485373#M1652717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. It worked. But now I am facing strange issue. As you see my code above, i am using VBWS_UOM_MAINTAIN_DARK to update Addition data tab. however, the values of internaltable gt_meinh_ws_upd was not updated correctly inside the material master.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I am filling gt_meinh_ws_upd table with the below values &lt;/P&gt;&lt;P&gt;gt_meinh_ws_upd-wsm = 'OZT'&lt;/P&gt;&lt;P&gt;gt_meinh_ws_upd-atnam ' ZABCDE'&lt;/P&gt;&lt;P&gt;gt_meinh_ws_upd-atwrt = 0.0023&lt;/P&gt;&lt;P&gt;append gt_meinh_ws_upd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when i see in material master,   gt_meinh_ws_upd-atwrt = 0.0023 is updated with 23, instead of 0.023. I debugged th func. module many times, I didnot come acroos the code what making it to 23. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea karthik...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 22:02:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-populating-additional-data-in-material-master-record/m-p/8485373#M1652717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-30T22:02:17Z</dc:date>
    </item>
  </channel>
</rss>

