‎2009 May 22 5:03 PM
Hi experts,
I'm looking for 2 function modules to do the following:
- search for an object with specific characteristic values of a specific class, as you can do in Txn CL30N
- (if none found) classify an object (a batch) with specific values
As far as I can tell, the BAPI_CHARACT* functions don't do these two things, or do they?
I also know of function module CLAF_OBJECTS_OF_CLASS but this function module returns all objects, and in our implementation there will soon be thousands of objects. I need to be able to specify which objects I get, using specific values.
Thanks,
Rob
‎2009 Jul 17 6:14 AM
Use the following function module
Create classification
call function 'CLVF_VB_INSERT_CLASSIFICATION' "IN UPDATE TASK
exporting
called_from_cl = c_x
object = wa_kssk-objek
table = c_table
date_of_change = wa_batch-datab
tables
ausptab = t_ausp
kssktab = t_kssk
i_mdcp = t_clmdcp.
Regards
D. Pandit
‎2009 May 22 6:35 PM
Hi,
Please check if the following FMs are useful for you.
BAPI_OBJCL_GETCLASSES
BAPI_OBJCL_CREATE
BAPI_OBJCL_CHANGE
Regards,
Ankur Parab
‎2009 May 27 2:20 PM
Thanks, I checked them out.
BAPI_OBJCL_CREATE and ~CHANGE I can use, but I still haven't found a function module that will allow me to find all objects (batches, for instance) that have specific characteristic values of a given class.
Just like I would enter class 'COATING' type '023' in transaction CL30N, and then enter (for example) viscosity 400 and density 1000, and that would find me exactly one batch for one material.
There must be a function module that does just this, without returning all other objects with different characteristic values...
I haven't found one yet, though.
‎2009 May 27 2:26 PM
Hi ,
check this function module to get the batch characteristics names and values for particlar class like CL30N ..
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
classtype = '023'
features = 'X'
language = 'E'
object = w_l_object "material number with leading zeros..
objecttable = 'MCH1' "MARA,MARC,MCH1 or any table relevent
TABLES
t_class = t_lclass "THis stores Batch class
t_objectdata = t_objectdata "This stores batch characteristics names and values for particular class.
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4.
IF sy-subrc = 0.
endif.
Regards,
Prabhudas
‎2009 May 27 2:35 PM
Sorry, for that function module I need to know the batch beforehand (since it's part of the object name).
‎2009 Jul 16 4:48 PM
‎2009 Jul 16 5:28 PM
Hi,
check in the Table..
CABN,CAWN,CAWNT..
SELECT SINGLE * FROM cabn
WHERE atnam = wa_zcxref_classes-characteristic. "Pass Batch characteristic name..
IF sy-subrc = 0.
SELECT * FROM cawn into table t_cawn "All the characteristic values available for batch characteristci is stored here
WHERE atinn = cabn-atinn
AND adzhl = cabn-adzhl.
IF sy-subrc = 0.
ENDIF.
Prabhudas
‎2009 Jul 17 6:14 AM
Use the following function module
Create classification
call function 'CLVF_VB_INSERT_CLASSIFICATION' "IN UPDATE TASK
exporting
called_from_cl = c_x
object = wa_kssk-objek
table = c_table
date_of_change = wa_batch-datab
tables
ausptab = t_ausp
kssktab = t_kssk
i_mdcp = t_clmdcp.
Regards
D. Pandit
‎2014 Sep 09 12:24 PM
Hello Rob,
- search for an object with specific characteristic values of a specific class, as you can do in Txn CL30N
The functions you are looking for are CLSD_CALL_SEARCH and CLSD_START_SELECTION. I guess better late than ever
Regards
‎2016 May 09 4:24 PM