<?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 Create/Update classification data for the existing Material in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-update-classification-data-for-the-existing-material/m-p/3114981#M739647</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;Can any one worked on the below requirement.&lt;/P&gt;&lt;P&gt;how to Create/Update the Classification after creating a material? &lt;/P&gt;&lt;P&gt;BAPI_MATERIAL_SAVEDATA is used to create a material but cannot Create/Update the classification data.&lt;/P&gt;&lt;P&gt;I have looked into the following BAPIs.&lt;/P&gt;&lt;P&gt;BAPI_CHARACT_CREATE or BAPI_CHARACT_CHANGE. But these are not giving the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be of great help.&lt;/P&gt;&lt;P&gt;Thanks, Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Nov 2007 19:24:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-21T19:24:08Z</dc:date>
    <item>
      <title>Create/Update classification data for the existing Material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-update-classification-data-for-the-existing-material/m-p/3114981#M739647</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;Can any one worked on the below requirement.&lt;/P&gt;&lt;P&gt;how to Create/Update the Classification after creating a material? &lt;/P&gt;&lt;P&gt;BAPI_MATERIAL_SAVEDATA is used to create a material but cannot Create/Update the classification data.&lt;/P&gt;&lt;P&gt;I have looked into the following BAPIs.&lt;/P&gt;&lt;P&gt;BAPI_CHARACT_CREATE or BAPI_CHARACT_CHANGE. But these are not giving the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be of great help.&lt;/P&gt;&lt;P&gt;Thanks, Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 19:24:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-update-classification-data-for-the-existing-material/m-p/3114981#M739647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T19:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create/Update classification data for the existing Material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-update-classification-data-for-the-existing-material/m-p/3114982#M739648</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 try BAPI BAPI_OBJCL_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The object key should be material number and object table should be MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 19:26:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-update-classification-data-for-the-existing-material/m-p/3114982#M739648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T19:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create/Update classification data for the existing Material</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-update-classification-data-for-the-existing-material/m-p/3114983#M739649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;see the sample code for the same and do accordingly&lt;/P&gt;&lt;P&gt;  DATA : gf_objkey    TYPE bapi1003_key-object,&lt;/P&gt;&lt;P&gt;         gf_classnum  TYPE bapi1003_key-classnum,&lt;/P&gt;&lt;P&gt;         lw_return    TYPE bapiret2,&lt;/P&gt;&lt;P&gt;         gt_return    TYPE STANDARD TABLE OF bapiret2,&lt;/P&gt;&lt;P&gt;         gf_classtype TYPE bapi1003_key-classtype,&lt;/P&gt;&lt;P&gt;         gt_charval   TYPE STANDARD TABLE OF bapi1003_alloc_values_char,&lt;/P&gt;&lt;P&gt;         lw_charval   TYPE bapi1003_alloc_values_char,&lt;/P&gt;&lt;P&gt;         gt_numval    TYPE STANDARD TABLE OF bapi1003_alloc_values_num,&lt;/P&gt;&lt;P&gt;         lw_numval    TYPE bapi1003_alloc_values_num,&lt;/P&gt;&lt;P&gt;         gt_currval   TYPE STANDARD TABLE OF bapi1003_alloc_values_curr,&lt;/P&gt;&lt;P&gt;         lw_z1edkclsf TYPE z1edkclsf,&lt;/P&gt;&lt;P&gt;         lw_chardetail       TYPE bapicharactdetail,&lt;/P&gt;&lt;P&gt;         gf_date_source      TYPE i,&lt;/P&gt;&lt;P&gt;         gf_error            TYPE c,&lt;/P&gt;&lt;P&gt;         gf_matnr            TYPE matnr,                    "#EC NEEDED&lt;/P&gt;&lt;P&gt;         gf_error_in_logging TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR: gf_objkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      input  = if_matnr&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      output = gf_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gf_objkey = gf_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Unlock the Object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD unlock_object&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      if_matnr = if_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT mt_z1edkclsf INTO lw_z1edkclsf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR gt_return[].&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Class type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    gf_classtype = lw_z1edkclsf-klart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Class&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    gf_classnum  = lw_z1edkclsf-class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    lw_charval-charact = lw_z1edkclsf-atnam.&lt;/P&gt;&lt;P&gt;    lw_charval-value_char = lw_z1edkclsf-atwrt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Data type of Characteristic&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_CHARACT_GETDETAIL'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        charactname   = lw_charval-charact&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        charactdetail = lw_chardetail&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        return        = gt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR : gf_date_source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = co_msgty_error.&lt;/P&gt;&lt;P&gt;    CHECK sy-subrc NE 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the characteristic is Date type then pass the value to NUM structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF lw_chardetail-data_type EQ 'DATE'.&lt;/P&gt;&lt;P&gt;      gf_date_source = lw_z1edkclsf-atwrt.&lt;/P&gt;&lt;P&gt;      lw_numval-value_from = gf_date_source.&lt;/P&gt;&lt;P&gt;      lw_numval-charact = lw_z1edkclsf-atnam.&lt;/P&gt;&lt;P&gt;      APPEND lw_numval TO gt_numval.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the characteristic is CHAR type then pass the value to char structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ELSEIF lw_chardetail-data_type EQ 'CHAR'.&lt;/P&gt;&lt;P&gt;      MOVE lw_z1edkclsf-atwrt TO lw_charval-value_char.&lt;/P&gt;&lt;P&gt;      APPEND lw_charval TO gt_charval.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT END OF class.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Post the data for all characteristics belonging to the Class&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR gt_return[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_OBJCL_CHANGE'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          objectkey          = gf_objkey&lt;/P&gt;&lt;P&gt;          objecttable        = 'MARA'&lt;/P&gt;&lt;P&gt;          classnum           = gf_classnum&lt;/P&gt;&lt;P&gt;          classtype          = gf_classtype&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          allocvaluesnumnew  = gt_numval&lt;/P&gt;&lt;P&gt;          allocvaluescharnew = gt_charval&lt;/P&gt;&lt;P&gt;          allocvaluescurrnew = gt_currval&lt;/P&gt;&lt;P&gt;          return             = gt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLEAR: gt_charval[],&lt;/P&gt;&lt;P&gt;             gt_numval[],&lt;/P&gt;&lt;P&gt;             gt_currval[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND LINES OF gt_return TO et_messages.&lt;/P&gt;&lt;P&gt;      READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = co_msgty_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;        gf_error = co_x.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            wait = co_x.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 21:14:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-update-classification-data-for-the-existing-material/m-p/3114983#M739649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T21:14:35Z</dc:date>
    </item>
  </channel>
</rss>

