<?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: Does Anyone knows how bapi_batch_change works? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440816#M1998666</link>
    <description>&lt;P&gt;Where are you stuck, reading Excel, identifying BAPIs, mapping Excel data to BAPIs parameters?&lt;/P&gt;&lt;P&gt;Some samples&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" Change Batch
CALL FUNCTION 'BAPI_BATCH_CHANGE'
  EXPORTING
    material         = matnr
    batch            = batch
    plant            = werks
    batchattributes  = batchattrib
    batchattributesx = batchattribx
  TABLES
    return           = return.
" Get the key to update classification
CONCATENATE  matnr  batch INTO object.
CALL FUNCTION 'BAPI_OBJCL_GET_KEY_OF_OBJECT'
  EXPORTING
    objectname         = object
    objecttable        = 'MCH1'
    classtype          = clastype
    create_missing_key = 'X'
  IMPORTING
    clobjectkeyout     = cuobj
  TABLES
    return             = return.
* Change classification
CALL FUNCTION 'BAPI_OBJCL_CHANGE_KEY'
  EXPORTING
    clobjectkey         = cuobj
    classnum            = class_lot
    status_new          = '1'
    standardclass_new   = ' '
    changenumber        = ' '
    keydate             = sy-datum
  TABLES
    allocvaluesnum_new  = allocvaluesnum
    allocvalueschar_new = allocvaluescha
    allocvaluescurr_new = allocvaluescurr
    return              = return.
* Commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Read the BAPI documentation and use those in your forum/google search, there are &lt;A href="https://launchpad.support.sap.com/#/solutions/scnforums/?q=BAPI%252520batch%252520classification"&gt;many discussions already&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Sep 2021 13:14:57 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2021-09-23T13:14:57Z</dc:date>
    <item>
      <title>Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440814#M1998664</link>
      <description>&lt;P&gt;I want to update the data like length, width, country of origin etc. from excel file in the classification tab of batches.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 07:33:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440814#M1998664</guid>
      <dc:creator>rahul_1996</dc:creator>
      <dc:date>2021-09-23T07:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440815#M1998665</link>
      <description>&lt;H3&gt;Functionality&lt;/H3&gt;&lt;P&gt;You use this method to&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Change a batch master record&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
&lt;LI&gt;Create and/or change classification of a batch in the background (object characteristics only)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You use this method, for example, when distributing batches.&lt;/P&gt;&lt;P&gt;The INPUT information contains&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;the batch key; parameters &lt;EM&gt;Material&lt;/EM&gt;, &lt;EM&gt;Batch&lt;/EM&gt; and &lt;EM&gt;Plant&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
&lt;LI&gt;the batch attributes; parameter &lt;EM&gt;BatchAttributes&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
&lt;LI&gt;control parameters; parameter &lt;EM&gt;BatchControlFields&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Notes&lt;/H3&gt;&lt;P&gt;The following authorization objects with activity 01 (create) are checked:
&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;M_MATE_CHG Material master: Batches/Packaging&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
&lt;LI&gt;M_MATE_WRK Material master: Plant&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Batch Level&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If the batch level (&lt;EM&gt;BatchControlFields&lt;/EM&gt;) is on plant level, you must specify a plant in the &lt;EM&gt;Plant&lt;/EM&gt; parameter.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Classification&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If                                                                                                                               the batch is to be classified, you must specify a class in the &lt;EM&gt;BatchControlFields&lt;/EM&gt; parameter. Only single classification is  possible.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 08:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440815#M1998665</guid>
      <dc:creator>vipinsaraika</dc:creator>
      <dc:date>2021-09-23T08:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440816#M1998666</link>
      <description>&lt;P&gt;Where are you stuck, reading Excel, identifying BAPIs, mapping Excel data to BAPIs parameters?&lt;/P&gt;&lt;P&gt;Some samples&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" Change Batch
CALL FUNCTION 'BAPI_BATCH_CHANGE'
  EXPORTING
    material         = matnr
    batch            = batch
    plant            = werks
    batchattributes  = batchattrib
    batchattributesx = batchattribx
  TABLES
    return           = return.
" Get the key to update classification
CONCATENATE  matnr  batch INTO object.
CALL FUNCTION 'BAPI_OBJCL_GET_KEY_OF_OBJECT'
  EXPORTING
    objectname         = object
    objecttable        = 'MCH1'
    classtype          = clastype
    create_missing_key = 'X'
  IMPORTING
    clobjectkeyout     = cuobj
  TABLES
    return             = return.
* Change classification
CALL FUNCTION 'BAPI_OBJCL_CHANGE_KEY'
  EXPORTING
    clobjectkey         = cuobj
    classnum            = class_lot
    status_new          = '1'
    standardclass_new   = ' '
    changenumber        = ' '
    keydate             = sy-datum
  TABLES
    allocvaluesnum_new  = allocvaluesnum
    allocvalueschar_new = allocvaluescha
    allocvaluescurr_new = allocvaluescurr
    return              = return.
* Commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Read the BAPI documentation and use those in your forum/google search, there are &lt;A href="https://launchpad.support.sap.com/#/solutions/scnforums/?q=BAPI%252520batch%252520classification"&gt;many discussions already&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 13:14:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440816#M1998666</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2021-09-23T13:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440817#M1998667</link>
      <description>&lt;P&gt;Thanks Vipin it works for me program is running fine.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 13:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440817#M1998667</guid>
      <dc:creator>rahul_1996</dc:creator>
      <dc:date>2021-09-23T13:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440818#M1998668</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;rahul_1996&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The BAPI_BATCH_CHANGE function allows updating of batch master data but not batch classification. You mentioned "length, width, country of origin" Of these, only country of origin, the HERKL field is part of the batch master record and you can update it with the BAPI. The field is available in the BATCHATTRIBUTES import parameter of the BAPI. Notice that if you want to change the country of origin, you need to provide the value in BATCHATTRIBUTES-COUNTRYORI and put X value in the BATCHATTRIBUTESX-COUNTRYORI. The latter tells the system that you actually want to update the country of origin field.&lt;/P&gt;&lt;P&gt;SAP provides the BAPI_OBJCL_CHANGE_KEY function to update classification of various object, including batches. I'm not able to provide you detailed input parameters as I don't know your setup of batch classification. Nevertheless the BAPI is quite well documented so you should be able to find you way around.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Dominik Tylczynski&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 13:28:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440818#M1998668</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2021-09-23T13:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440819#M1998669</link>
      <description>&lt;P&gt;Copied straight from the FM documentation. Not cool.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 15:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440819#M1998669</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-09-23T15:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440820#M1998670</link>
      <description>&lt;P&gt;@ Matthew: When something is readily available then why should one type in own words. I believe in saving time and accurate response.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 16:02:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440820#M1998670</guid>
      <dc:creator>vipinsaraika</dc:creator>
      <dc:date>2021-09-23T16:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440821#M1998671</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;vipin_saraika&lt;/SPAN&gt; I think that what Matthew calls "not cool", is what SAP calls "Unacceptable Content":&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;Content copied and posted without the permission of the content owner (e.g., text, photos, videos).&lt;/LI&gt;&lt;LI&gt;Content copied from another Community member or copied from SAP materials, such as SAP help files or SAP training documents.&lt;/LI&gt;&lt;LI&gt;etc.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;so publishing any SAP non-public documentation is theoretically a problem, and I think even worse if you don't credit the author or the source. I sometimes do copy/paste of some parts of documents, but I always credit the source. Hopefully, I think SAP don't pursue people for so little.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 16:44:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440821#M1998671</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-09-23T16:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440822#M1998672</link>
      <description>&lt;P&gt;@ Sandra just to let you know I am copy pasting the owner content in the owners website itself, the owner has purposely released these FM documentation for knowledge sharing not for restricting to there ownselves. I have nothing else to say.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 04:37:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440822#M1998672</guid>
      <dc:creator>vipinsaraika</dc:creator>
      <dc:date>2021-09-24T04:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440823#M1998673</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;vipin_saraika&lt;/SPAN&gt; I'm sure you have nothing else to say. I do though.&lt;/P&gt;&lt;P&gt;As Sandra pointed out the site rules say:&lt;/P&gt;&lt;UL&gt; 
 
&lt;LI&gt;&lt;STRONG&gt;Content copied from another Community member or copied from SAP materials, such as SAP help files or SAP training documents.&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What you have posted may have come from SE80 or some other similar website, but it is nonetheless a SAP help file - online documentation of the BAPI.&lt;/P&gt;&lt;P&gt;Personally, I've no problem with reproducing it here &lt;STRONG&gt;so long as it is correctly attributed.&lt;/STRONG&gt; E.g. this is from website se80 or this is from the online help concerning the function.&lt;/P&gt;&lt;P&gt;In that way you give the OP a hint on how to find information for themselves. If you don't then when, as this poster did, they need help on another BAPI, they'll ask here instead. Which is not a good way to learn. Spoon feeding answers is a poor way to teach as well.&lt;/P&gt;&lt;P&gt;Oh, and it's probably true to say that sites such as se80 are technically violating SAP's copyright. Them publishing it does not give &lt;EM&gt;you&lt;/EM&gt; a right to copy paste it.&lt;/P&gt;&lt;P&gt;TL;DR Not cool.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 04:59:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440823#M1998673</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-09-24T04:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440824#M1998674</link>
      <description>&lt;P&gt;Matthew just to tell you I copied pasted from SE37 function module documentation and nowhere else. Let's close this discussion here, I  will adhere to norms of this community.&lt;/P&gt;&lt;P&gt;Thanks  &lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 05:05:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440824#M1998674</guid>
      <dc:creator>vipinsaraika</dc:creator>
      <dc:date>2021-09-24T05:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440825#M1998675</link>
      <description>&lt;P&gt;Just give the source next time.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I will adhere to norms of this community.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 07:58:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440825#M1998675</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-09-24T07:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440826#M1998676</link>
      <description>&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;actually i have to create batches with batch classification.&lt;/P&gt;&lt;P&gt;for e.g. i give the data of batch classification through excel (e.g. country of origin,import declaration number, commodity code etc.) with this data i have to create batches can you give me the solution. &lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 06:37:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440826#M1998676</guid>
      <dc:creator>rahul_1996</dc:creator>
      <dc:date>2021-09-30T06:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does Anyone knows how bapi_batch_change works?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440827#M1998677</link>
      <description>&lt;P&gt;Just replace the change BAPI with the matching create BAPI&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://launchpad.support.sap.com/#/solutions/scnforums/?q=BAPI_BATCH_CREATE"&gt;BAPI_BATCH_CREATE&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://launchpad.support.sap.com/#/solutions/scnforums/?q=BAPI_OBJCL_CREATE_KEY"&gt;BAPI_OBJCL_CREATE_KEY&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 30 Sep 2021 08:21:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/does-anyone-knows-how-bapi-batch-change-works/m-p/12440827#M1998677</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2021-09-30T08:21:43Z</dc:date>
    </item>
  </channel>
</rss>

