2021 Sep 23 8:33 AM
I want to update the data like length, width, country of origin etc. from excel file in the classification tab of batches.
2021 Sep 23 9:45 AM
You use this method to
You use this method, for example, when distributing batches.
The INPUT information contains
The following authorization objects with activity 01 (create) are checked:
Batch Level
If the batch level (BatchControlFields) is on plant level, you must specify a plant in the Plant parameter.
Classification
If the batch is to be classified, you must specify a class in the BatchControlFields parameter. Only single classification is possible.
I want to update the data like length, width, country of origin etc. from excel file in the classification tab of batches.
2021 Sep 23 9:45 AM
You use this method to
You use this method, for example, when distributing batches.
The INPUT information contains
The following authorization objects with activity 01 (create) are checked:
Batch Level
If the batch level (BatchControlFields) is on plant level, you must specify a plant in the Plant parameter.
Classification
If the batch is to be classified, you must specify a class in the BatchControlFields parameter. Only single classification is possible.
2021 Sep 23 2:15 PM
2021 Sep 23 4:31 PM
2021 Sep 23 5:02 PM
@ Matthew: When something is readily available then why should one type in own words. I believe in saving time and accurate response.
Thanks
2021 Sep 23 5:44 PM
vipin_saraika I think that what Matthew calls "not cool", is what SAP calls "Unacceptable Content":
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.
2021 Sep 24 5:37 AM
@ 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.
2021 Sep 24 5:59 AM
vipin_saraika I'm sure you have nothing else to say. I do though.
As Sandra pointed out the site rules say:
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.
Personally, I've no problem with reproducing it here so long as it is correctly attributed. E.g. this is from website se80 or this is from the online help concerning the function.
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.
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 you a right to copy paste it.
TL;DR Not cool.
2021 Sep 24 6:05 AM
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.
Thanks
2021 Sep 24 8:58 AM
Just give the source next time.
I will adhere to norms of this community.
Thank you.
2021 Sep 23 2:14 PM
Where are you stuck, reading Excel, identifying BAPIs, mapping Excel data to BAPIs parameters?
Some samples
" 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'.Read the BAPI documentation and use those in your forum/google search, there are many discussions already.
2021 Sep 30 7:37 AM
Hi Raymond,
actually i have to create batches with batch classification.
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.
2021 Sep 30 9:21 AM
2021 Sep 23 2:28 PM
Hello rahul_1996
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.
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.
Best regards
Dominik Tylczynski
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |