<?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 Batch Classification in MSC3N in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700622#M2018362</link>
    <description>&lt;P&gt;Hi Expert,&lt;/P&gt;
  &lt;P&gt;I have one requirement that in TCODE MSC3N after entering material and batch details in classification tab DRF number is coming and that DRF number I need to print in a program.&lt;/P&gt;
  &lt;P&gt;How I can achieve this requirement can anyone please help me in details? &lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2023 16:50:11 GMT</pubDate>
    <dc:creator>former_member852009</dc:creator>
    <dc:date>2023-05-03T16:50:11Z</dc:date>
    <item>
      <title>Batch Classification in MSC3N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700622#M2018362</link>
      <description>&lt;P&gt;Hi Expert,&lt;/P&gt;
  &lt;P&gt;I have one requirement that in TCODE MSC3N after entering material and batch details in classification tab DRF number is coming and that DRF number I need to print in a program.&lt;/P&gt;
  &lt;P&gt;How I can achieve this requirement can anyone please help me in details? &lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 16:50:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700622#M2018362</guid>
      <dc:creator>former_member852009</dc:creator>
      <dc:date>2023-05-03T16:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Classification in MSC3N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700623#M2018363</link>
      <description>&lt;P&gt;You can achieve this requirement using the BAPI "BAPI_CLASSIFICATION_CREATE" which is used to create classification data for a specific object. &lt;/P&gt;&lt;P&gt;1. Firstly, you need to call the BAPI "BAPI_MATERIAL_EXISTENCECHECK" to check whether the material and batch details exist or not. &lt;/P&gt;&lt;P&gt;2. If the material and batch details exist, then you need to call the BAPI "BAPI_CLASSIFICATION_CREATE" to create classification data for the object. &lt;/P&gt;&lt;P&gt;3. In the input parameters of the BAPI "BAPI_CLASSIFICATION_CREATE", you need to pass the material and batch details along with the classification data. &lt;/P&gt;&lt;P&gt;4. After the successful creation of classification data, the BAPI will return the DRF number which you can store in a variable and print it as per your requirement&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;DATA: ls_mat_exist TYPE BAPI_MBEW_EXISTENCE_CHECK,&lt;/P&gt;&lt;P&gt;      lt_classif_data TYPE STANDARD TABLE OF BAPICLASSEX,&lt;/P&gt;&lt;P&gt;      ls_classif_data TYPE BAPICLASSEX,&lt;/P&gt;&lt;P&gt;      lt_return TYPE STANDARD TABLE OF BAPIRET2,&lt;/P&gt;&lt;P&gt;      ls_return TYPE BAPIRET2.&lt;/P&gt;&lt;P&gt;* Check material and batch existence&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_MATERIAL_EXISTENCECHECK'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    material = 'MATERIAL_NUMBER'&lt;/P&gt;&lt;P&gt;    plant    = 'PLANT'&lt;/P&gt;&lt;P&gt;    batch    = 'BATCH_NUMBER'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    return   = ls_mat_exist.&lt;/P&gt;&lt;P&gt;IF ls_mat_exist-existing = 'X'.&lt;/P&gt;&lt;P&gt;* Create classification data&lt;/P&gt;&lt;P&gt;  ls_classif_data-objtype = 'MATERIAL'.&lt;/P&gt;&lt;P&gt;  ls_classif_data-objkey  = 'MATERIAL_NUMBER'.&lt;/P&gt;&lt;P&gt;  ls_classif_data-objvers = '00'.&lt;/P&gt;&lt;P&gt;  ls_classif_data-class   = 'CLASS_TYPE'.&lt;/P&gt;&lt;P&gt;  ls_classif_data-classtype = '001'.&lt;/P&gt;&lt;P&gt;  ls_classif_data-status = '10'.&lt;/P&gt;&lt;P&gt;  ls_classif_data-tabnumber = '000'.&lt;/P&gt;&lt;P&gt;  ls_classif_data-changenum = '00000000000000000000'.&lt;/P&gt;&lt;P&gt;  APPEND ls_classif_data TO lt_classif_data.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_CLASSIFICATION_CREATE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      classnum = 'CLASS_TYPE'&lt;/P&gt;&lt;P&gt;      classtype = '001'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      objectclassex = lt_classif_data&lt;/P&gt;&lt;P&gt;      return = lt_return.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    READ TABLE lt_return INTO ls_return WITH KEY type = 'S'.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      WRITE: 'DRF number is', ls_return-message.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Please check, if this is what you are looking for.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 17:48:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700623#M2018363</guid>
      <dc:creator>Harish_Vatsa</dc:creator>
      <dc:date>2023-05-03T17:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Classification in MSC3N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700624#M2018364</link>
      <description>&lt;P&gt;Are you looking for a BAdI executed in MSC1N/MSC2N during creation change (such as BAdI BATCH_MASTER)&lt;/P&gt;&lt;P&gt;Or just trying to read classification data from another process with a BAPI such as BAPI_OBJCL_GETDETAIL&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 10:16:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700624#M2018364</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2023-05-04T10:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Classification in MSC3N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700625#M2018365</link>
      <description>&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2162848-image.png" /&gt;&lt;/P&gt;&lt;P&gt;I just want to get this DRF number in my program logic.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 11:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700625#M2018365</guid>
      <dc:creator>former_member852009</dc:creator>
      <dc:date>2023-05-04T11:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Classification in MSC3N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700626#M2018366</link>
      <description>&lt;UL&gt;
&lt;LI&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE matnr charg FROM mchb INTO CORRESPONDING FIELDS OF ls_mchb WHERE matnr = p_matnr AND charg = p_charg.
IF  sy-subrc IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = p_matnr
 IMPORTING
   output        = lf_matnr
          .&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = p_charg
 IMPORTING
   output        = lf_charg
          .&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;PRE&gt;&lt;CODE&gt;ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;PRE&gt;&lt;CODE&gt;CONCATENATE lf_matnr lf_charg INTO lf_objkey.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_OBJCL_CHANGE'

  EXPORTING

   objectkey                = lf_objkey

    objecttable              = 'MCHB'

    classnum                 = 'BATCH_FP_PHARMA'

    classtype                = '023'

   status                   = '1'

*   STANDARDCLASS            =

*   CHANGENUMBER             =

   keydate                  = sy-datum

*   NO_DEFAULT_VALUES        = ' '

*   KEEP_SAME_DEFAULTS       = ' '

*   OBJECTKEY_LONG           =

* IMPORTING

*   CLASSIF_STATUS           =

  TABLES

    allocvaluesnumnew        = lt_allocvaluesnumnew

    allocvaluescharnew       = lt_allocvaluescharnew

    allocvaluescurrnew       = lt_allocvaluescurrnew

    return                   = lt_return

          .&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 04 May 2023 11:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700626#M2018366</guid>
      <dc:creator>former_member852009</dc:creator>
      <dc:date>2023-05-04T11:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Classification in MSC3N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700627#M2018367</link>
      <description>&lt;P&gt;This is my code and lt_return I am getting the error message class type is not defined for object&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 11:22:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700627#M2018367</guid>
      <dc:creator>former_member852009</dc:creator>
      <dc:date>2023-05-04T11:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Classification in MSC3N</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700628#M2018368</link>
      <description>&lt;P&gt;So use BAPI_OBJCL_GETDETAIL&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;objectkey - concatenate (internal format) matnr and charg&lt;/LI&gt;&lt;LI&gt;obnjecttable - should be constant MCHA&lt;/LI&gt;&lt;LI&gt;classnum &amp;amp; classtype - check your Customizing (or browse table KLAH)&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 04 May 2023 12:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-classification-in-msc3n/m-p/12700628#M2018368</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2023-05-04T12:10:17Z</dc:date>
    </item>
  </channel>
</rss>

