2023 May 02 10:00 AM
How to change value of characteristic which was defind (set as default ) in ct04 throw the code?
2023 May 02 10:19 AM
Hello shiz0frenik
You can update an existing characteristic with the BAPI_CHARACT_CHANGE function. Your questions is not very precise, so let me know if that is not what you are looking for.
Based on your comment on batch classification in MIGO, I would say that you should not change a characteristic's default value. The default value is defined on characteristic level, but in your case the value you want is dependent on material number. MIGO can be processed concurrently by several users for different materials. If you start changing the characteristic's default value from MIGO, the users will compete for that change. It is perfectly possible that one user will change the default value according to their material and that will be shown to another user. This is not the way to implement your requirement. Instead you should use Variant Configuration Object Dependencies
Also I don't think changing a characteristic default value, even locally during MIGO call with an object dependency is correct:
You can even call your own function module from within a procedure and implement any logic you need there e.g. reading a custom field from MARA.
Have a look at SAP standard characteristics for batch classification - IMG: Logistics - General -> Batch Management -> Batch Valuation -> Update Standard Characteristics (see the documentation to the node) - to learn how it is done. The standard characteristics are also described on SAP Help: Classification with Standard Characteristics
The usage of function modules in procedures is described on SAP Help: User-Defined Functions
Look at the standard procedure LOBM_UBD in CS03. The procedure calls LOBM_UBD function module:
Best regards
Dominik Tylczynski
2023 May 02 11:59 AM
in migo there is a classification button, after clicking it opens a batch-class panel. One of parametrs is value i need to change ( it defind as a default in ct04). For example: default value is 1000 and i want if matnr starts with ' K* ' put another value.
Here's the batch-class view (after click classification button in migo ). In rectangle there is a value which equals 1000 as default.
2023 May 02 2:37 PM
2023 May 04 7:01 AM
Can i give me guide of how to use procedure in ct04? And matnr was just an example. actually I've got a additonal field in mara( let;s call it zbesk ) . And if it equals 'E' i need to change value of characteristic. So i thing i need to do select. Can i still do it with procedure?
here's mine characteristic
2023 May 05 11:57 AM
shiz0frenik I guess I was not clear enough - you are still trying to change the default value of a characteristic. In my opinion this is not the way to go. Instead you should derive the value of the ZCH_BCH_BWMOD characteristic from the material number during batch classification. That can be done with procedure type object dependency. You can even call your own function module from within a procedure and implement any logic you need there e.g. reading a custom field from MARA.
Have a look at SAP standard characteristics for batch classification - IMG: Logistics - General -> Batch Management -> Batch Valuation -> Update Standard Characteristics (see the documentation to the node) - to learn how it is done. The standard characteristics are also described on SAP Help: Classification with Standard Characteristics
2023 May 12 10:54 AM
3a9e4ce873a94034b33dc62b0ce600ee, are we talking about same procedures, how can i call fm here?
2023 May 15 11:41 AM