BAPI_OBJCL_CHANGE
Hi all,
I am using BAPI_OBJCL_CHANGE to update the characteristics value for the material
In case of error handling if the 1first characteristics and 5th charcteristics of material is invalid, then the return structure gives the message only for 1st characteristics.
It does not gives the error in 5th characteristics.
whereas inmy case i want all error to be populated at once..
Is this possible?
Is there any other bapi which populates all error?
Regards,
Amruta
Hi
try using BAPI_XBP_JOB_ABAP_STEP_MODIFY
Similar Messages
-
BAPI_OBJCL_CHANGE error: valuated with object dependencies
Hi expert,
having programmed an extension for a customer for automatic maintenance of characteristic values of technical object, we have come across an error.
When using BAPI_OBJCL_CHANGE to change a characteristic followed by BAPI_TRANSACTION_COMMIT (without wait) we have two scenarios:
1. if the technical object has no value in the characteristic before calling BAPI_OBJCL_CHANGE the characteristic will be set.
2. if there is already a value set there is an error stating
Characteristic 'XYZ' valuated with object dependencies (old value '00')
However, I can't find a dependency definition in CT04. do you know what's wrong here,or what is a usual cause of that?
thanks
StefanHi,
Please see the given link, It may help you.
Re: BAPI_OBJCL_CHANGE and BAPI_TRANSACTION_COMMIT
Regards,
Shamma -
BAPI_OBJCL_CHANGE error C1 821
I am using BAPI_OBJCL_CHANGE to modify the classification view of batches. When I want to overrite a classification characteristic value with a blank value, the following error is returned.
Message Class C1 821 Inconsistent characteristic value assignment
This started happening after the upgrade to ECC 6.0. Prior to that the function was working smoothly. I have been searching for OSS notes but have not found any. It seems that this error message is triggered from function module CLAP_DDB_UPDATE_CLASSIFICATION. Does any one have an idea how to resolve this? I would like to be able to use this fm to clear characteristic values of batches.
Thank you.Hi,
I have your same issue. Could you tell me please how you solved it?
Thanks.
G.B. -
Problem in BAPI_OBJCL_CHANGE / BAPI_OBJCL_CREATE FM
Hi,
My requirement is to Create a Batch Recod by using BAPI_BATCH_CREATE and BAPI_OBJCL_CREATE to create data for classification if an entry doesnot exist in MCHA table.
If the entry exits in MCHA i need to change the classification for which i am using BAPI_OBJCL_CHANGE.
Now as per my understanding and by going through various forums the conclusion that i got is, there should an entry in INOB table which is created by BAPI_GOODSMVT_CREATE.
I tried creating a classification record directly by MSC2N and it worked.
Since i am uploading the Master data for MCHA table, it should not mandatory to do the goods movement.
Please let me know how can we create or change the classification of a batch without doing Goods movement.
Thanks
HarpreetNiraj,
I need small information on BAPI_OBJCL_CHANGE, i am trying to update characterstics of material. With the following params
OBJECTKEY 00000000272000100150250000000063
OBJECTTABLE MCHA
CLASSNUM Z_RM_022
CLASSTYPE 022
I am passing only ALLOCVALUESCHARNEW table.
CHARACT VALUE_CHAR
Z_BATCH_NI 21,0000000
But this is not getting saved, i check in the T-code MSC2n.
Can you please provide me some info about the params i am passing.
Thanks in Advance.
Venkat. -
BAPI_OBJCL_CHANGE - Not updating in database
Hi,
I am using BAPI_OBJCL_CHANGE and BAPI_TRANSACTION_COMMIT to update the characteristics data but it is not getting updated but gives a success message.
I used BAPI_OBJCL_CONCATENATEKEY to generate a object key passing OBJECTTABLE as MARA and in OBJECTKEYTABLE values for matnr, and werks.
I am changing CHAR type characteristics and i gave the characteristics name in CHARAT and the new characteristics value in VALUE_NEUTRAL.
Any help regarding,
1. Populating the ALLOCVALUESNUMNEW, ALLOCVALUESCHARNEW,
ALLOCVALUESCURRNEW tables,
2. Creating a object key for a material.
Thanks in Advance,
Kathir~>
Krzysztof Konitz wrote:
> Hi,
>
> I used this FM to change class characteristics for batches without problems.
> I used call:
> CALL FUNCTION 'BAPI_OBJCL_CHANGE'
> EXPORTING
> OBJECTKEY = OBJECTNAME
> OBJECTTABLE = 'MCHA'
> CLASSNUM = CLASS
> CLASSTYPE = '022'
> TABLES
> ALLOCVALUESNUMNEW = ALLOCVALUESNUM
> ALLOCVALUESCHARNEW = ALLOCVALUESCHAR
> ALLOCVALUESCURRNEW = ALLOCVALUESCURR
> RETURN = RETURN.
> variable OBJECTNAME contains concatenation of matnr, plant and batch, CLASS contains class name.
>
> I think that if you are using 'MARA' you should only use matnr in key without werks.
>
> Krzys
how to create object key from (matnr, plant and batch)? -
Problem in using the F.M. 'BAPI_OBJCL_CHANGE'
Hi Experts ,
I want to use the function module 'BAPI_OBJCL_CHANGE' to make some change in a batch characteristic created by 'MSC1n' . But I can't use it, because I can't understand from where I can get the parameters ' OBJECTKEY ' , 'OBJECTTABLE' , 'CLASSNUM', 'CLASSTYPE' .and Tables 'ALLOCVALUESNUMNEW','ALLOCVALUESCHARNEW' , 'ALLOCVALUESCURRNEW' ,'RETURN ' . So please tell me how can I know these values and how I can use this function module ? .
DEB
Edited by: DEB. ABAP on Aug 29, 2011 12:09 PM
Edited by: DEB. ABAP on Aug 29, 2011 12:10 PMHi ,
Check table INOB you need to pass Matnr as objek
SELECTING OBJECT KEY FOR THE MATERIAL BATCH.
SELECT SINGLE * FROM inob WHERE objek = it_tab1-objek
AND obtab = 'MCH1'.
EXTRACTING OLD CHARACTERISTICS VALUES FOR MATERIAL BATCH
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL_KEY'
EXPORTING
clobjectkey = inob-cuobj
classnum = 'DIEPARAMETERS'
regards
Deepak. -
Pointers needed on Mapping Parameters - BAPI_OBJCL_CHANGE
Hi Gurus,
I am unable to pass correct mapping paramters to BAPI_OBJCL_CHANGE.
I need to update Characteristics in AUSP table
The paramters being passed:
Import parameters
OBJECTKEY - what should be the value for Object key ?
Should i concatenate Material num and Batch to build Object Key ?
OBJECTTABLE - AUSP
CLASSNUM - what is Class Num?
CLASSTYPE - 023
STATUS - '1'
STANDARDCLASS -
CHANGENUMBER -
KEYDATE -
NO_DEFAULT_VALUES -
Tables
ALLOCVALUESNUMNEW
ALLOCVALUESCHARNEW
What should be populated in the above tables.
Please giude me with some pointers to use the above BAPI.
Please help me out in this one, its very critical.
Many Thanks,
Madandata: numc_values type table of bapi1003_alloc_values_num with header line,
alph_values type table of bapi1003_alloc_values_char with header line,
curr_values type table of bapi1003_alloc_values_curr with header line,
return type table of bapiret2 with header line,
material type bapi1003_key-object.
if not data_record-sp_ind is initial.
move 'spare-part-indicator' to alph_values-charact.
move data_record-sp_ind to alph_values-value_char.
append alph_values.
endif.
call function 'BAPI_OBJCL_CHANGE'
exporting
objectkey = material
objecttable = 'MARA'
classnum = 'SPARES'
classtype = '001'
tables
allocvaluesnumnew = numc_values
allocvaluescharnew = alph_values
allocvaluescurrnew = curr_values
return = return.
the above is a code snippet from a program we use to maintain chracteristics of a class on material masters.
The object key is indeed the object that is being classified. in this case, the material number. you must first move it to the work field to make sure there is no typing issues with the BAPI. The object table is the table which stores the OBJECT (not the classification table AUSP). The classnum is actuall the NAME of the class, and the class type is the class type (for materials, this is '001' for example.
the internal tables store the values for the characteristics, and each characteristic goes into one of the three tables, depending on its data type. in the snippet is an example of loading a "character" characteristic.
actually create a classification manually, and then check it in AUSP, and you will see how the data is stored, and this might also help you. ausp is one of about a dozen or so tables used in classification.
this comes from a working, active program, but of course, you use this at your own risk (end of disclaimer)
i hope this helps. we do a lot of classification, so if you need any further help, just ask. -
How to use BAPI_OBJCL_CHANGE
Hi Friends,
For a Batch Number, I need to change the Characteristic value in MSC2N.
I have MATNR,WERKS,CHARG, AND I am also passing BATCH_CLASS as Class CLASSNUM, 022 as class type.
and In tables paramerter I am exporting the values to the parameter ALLOCVALUESCHARNEW.( Z_STD_BARRIER_MAT,test( value to be updated),STAND / BARRIER & GEL A/B as character description).
but I am getting the error while testing the function module as Enter the Batch Number.
I am concatenating material number,plant and Batch number and passing to OBJECTKEY.
Kindly, let me know if anybody has already used the function-module BAPI_OBJCL_CHANGE,if anyother function module for the same purpose.
Regards,
xavier.PHI,
Chk the code below.
data: git_bapi1003 type table of bapi1003_alloc_values_num,
git_values_char type table of bapi1003_alloc_values_char,
git_values_curr type table of bapi1003_alloc_values_curr,
git_bapiret2 type table of bapiret2,
ls_bapiret2 type bapiret2.
data: gs_bapi1003 type bapi1003_alloc_values_num,
gs_values_char type bapi1003_alloc_values_char,
gs_values_curr type bapi1003_alloc_values_char,
gc_flag_x(1) type c value 'X'.
gs_values_char-charact = 'VIEWS_ID'. "Characteristics
gs_values_char-value_char = '012'. "characteristics value
append gs_values_char to git_values_char.
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = '1100000028' "Customer
objecttable = 'KNA1'
classnum = 'CATALOG_VIEW_CUST' "Class Number
classtype = '011' "Class Type
* STATUS = '1'
* STANDARDCLASS =
* CHANGENUMBER =
* KEYDATE = SY-DATUM
* NO_DEFAULT_VALUES = ' '
* IMPORTING
* CLASSIF_STATUS =
tables
allocvaluesnumnew = git_bapi1003
allocvaluescharnew = git_values_char
allocvaluescurrnew = git_values_curr
return = git_bapiret2
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = ls_bapiret2
Hope this helps.
Thnaks,
Harini -
How to use BAPI_OBJCL_CREATE / BAPI_OBJCL_CHANGE
After deleting the assignment of class in im12 transaction ( Change inv. prog. positions), I executed the BAPI, BAPI_OBJCL_CREATE. It shows error, 'Assignment already exists and is valid'. whereas assignment does not exist.
Similarly, there is a problem with BAPI_OBJCL_CHANGE.
When an assignment is already created, I used BAPI_OBJCL_GETDATA and accordingly entered values directly in BAPI_OBJCL_CHANGE. But it gives the error ' Characterstic not found or is not valid'. I have checked the data types of the variables passed and I did not find any mismatch.
These errors are shown even if the BAPIs are executed directly from SE37. Please suggest what the problem might be.Hi all !
I have found the solution for this problem, I found that I was trying to use the wrong functions for my case, so, to solve my needs here, I will use BAPI_OBJCL_CREATE to set the classification data for Functional Locations and Equipments, and I can use BAPI_OBJCL_GETCLASSES to list all classes assigned for a Technical Object, and BAPI_OBJCL_GETDETAIL to get all characteristics assigned to a Technical Object for a specific class.
Thank you all for your attention !
Wilson -
Changing DATE as a Characteristic value of batch with BAPI_OBJCL_CHANGE
Hello,
Could you give advice for using BAPI_OBJCL_CHANGE?
I decided to use BAPI_OBJCL_CHANGE to update Batch characteristic value.
I could update CHAR field but could not DATE.
I set like below :
- Characteristic name (e.g. Z10001) to CHARACT of ALLOCVALUESNUMNEW(Tables)
- DATE(e.g. 20081211) to VALUE_FROM of ALLOCVALUESNUMNEW(Tables).
But it does not work.
Of course, I executed BAPI_TRANSACTION_COMMIT after the FM done.
I found the value of VALUE_FROM is missing when debugging.
Thanks in advance.
Takeru MiyagawaHello,
you said :
- DATE(e.g. 20081211) to VALUE_FROM of ALLOCVALUESNUMNEW(Tables).
Data type of field VALUE_FROM is FLTP. How do you fill this field ? by MOVE ?
You should not use MOVE, you should use :
DATA:
wlv_date TYPE d,
wls_ALLOCVALUESNUMNEW TYPE BAPI1003_ALLOC_VALUES_NUM.
CALL FUNCTION 'CTCV_CONVERT_DATE_TO_FLOAT'
EXPORTING date = wlv_date
IMPORTING float = wls_ALLOCVALUESNUMNEW-VALUE_FROM.
- I found the value of VALUE_FROM is missing when debugging.
Can you show us your code ?
Cordialement,
Chaouki. -
BAPI_OBJCL_CHANGE to change characteristic
Hello All,
I am writing a program to collect materials for a specified criteria and for those materials change the characteristic values for a class. I would like to change the characteristic for the class using the following code. but this is not setting the characteristic BATCH_DELETION_INDICATOR.
On the contrary when you check the box Batch Deletion Indicator in the BasicData1 tab. Characteristic is automatically getting changed to YES. My requirement is not to check Batch deletion indicator in BasicData1 tab(MCHA-LVORM = X) rather directly change the characteristic value.
Any suggestions on this one please...
it_werks-werks = p_werks.
APPEND it_werks.
CALL FUNCTION 'VB_BATCH_DEFINITION'
IMPORTING
kzdch = g_kzdch
klart = g_klart
obtab = g_obtab
TABLES
werke = it_werks.
To get the object key.
wa_objecttab-key_field = 'MATNR'.
wa_objecttab-value_int = it_mchb-matnr.
APPEND wa_objecttab TO i_objecttab.
wa_objecttab-key_field = 'CHARG'.
wa_objecttab-value_int = it_mchb-charg.
APPEND wa_objecttab TO i_objecttab.
CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
EXPORTING
objecttable = g_obtab
IMPORTING
objectkey_conc = v_object
TABLES
objectkeytable = i_objecttab
return = i_bapiret2.
Read Characteristics details
******v_object is 0000000000084977041 where 1 is the batch, also tried with material, batch and plant ******combination.
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = v_object " 0000000000084977041
objecttable = g_obtab " MCH1
classnum = g_class " FG_BATCH_CLASS
classtype = g_klart " 023
KEYDATE = SY-DATUM
unvaluated_chars = 'X'
unvaluated_chars = ''
LANGUAGE = SY-LANGU
IMPORTING
STATUS =
STANDARDCLASS =
TABLES
allocvaluesnum = i_charnum
allocvalueschar = i_charchar
allocvaluescurr = i_charcurr
return = i_bapiret2
READ TABLE i_charchar INTO wa_charchar WITH KEY
charact = 'BATCH_DELETION_INDICATOR'.
IF sy-subrc EQ 0.
wa_charchar-value_char = 'X'.
wa_charchar-value_char = 'Yes'.
MODIFY i_charchar FROM wa_charchar INDEX sy-tabix.
ENDIF.
DELETE i_charnum WHERE value_from IS initial..
REFRESH i_charcurr.
REFRESH i_bapiret2.
Change batch characteristics
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = v_object
objecttable = g_obtab
classnum = g_class
classtype = g_klart
STATUS = '1'
STANDARDCLASS =
CHANGENUMBER =
KEYDATE = SY-DATUM
NO_DEFAULT_VALUES = ' '
IMPORTING
CLASSIF_STATUS =
TABLES
allocvaluesnumnew = i_charnum
allocvaluescharnew = i_charchar
allocvaluescurrnew = i_charcurr
return = i_bapiret2
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
EXCEPTIONS
OTHERS = 0.Any suggestions pls..
-
BAPI_OBJCL_CHANGE Lock Error !
Hi Friends,
Iam using BAPI_OBJCL_CHANGE to update the characteristics for equipment.
The code is somthing like:
call Function BAPI_OBJCL_CHANGE
|
|
Read it_return - for any error messages.
|
|
Bapi_commit.
The problem here is, when run on Batch Mode sometimes this Bapi gives out the error 'Equipment is locked by user.'
There is no other parallel job running at this time. But also we get this error. Sometimes able to replicate and sometimes not.
I searched in SDN and found few others also faced the same problem with this FM BAPI_OBJCL_CHANGE.
The thread i viewed for your ref:
"BAPI_OBJCL_CHANGE " is locking customers
Which lock should I use for material batch characteristics?
BAPI_OBJCL_CHANGE and BAPI_TRANSACTION_COMMIT
Record Locking when using BAPI
Kindly suggest me the suitable solution.
Should locking and unlocking the equipment using FM enqueue/dequeue before calling this bapi will help?
or
Should this Bapi be called in Update task?
Kindly suggest me.
thanks,
PadmaHi,
Please try this
CALL FUNCTION function IN UPDATE TASK
COMMIT WORK
Regards
Hiren K.Chitalia -
BAPI_OBJCL_CHANGE error
Hi,
I am getting an error using the BAPI which I am not able to analyse. I am trying to change the value(7 to 6) assigned to the characteristics(assigned to class and linked to functional location) NBU_PCM_PMI_CLASS.
BAPI_OBJCL_CHANGE is run with below data
OBJECTKEY = S1115-11ESS AC OUT
OBJECTTABLE = IFLOT
CLASSNUM = NHC_TECH_DATA
CLASSTYPE = 003
Table ALLOCVALUESCHAR is maintained with characteristics and new value(6)
error message in return table is shown as 'assignment not changed NBU_ARC_BUS_VOLTAGE: Value "0 V" not found' (which is beyond my logical reasoning as I am not passing this characteristic and value and the data that is passed is correct).
There are data for which this BAPI is working fine and updating values if BAPI is passed with correct data.
Please suggest.
Regards
SubhroHi Shubro ,
How have you solved the above problem ?
If you have a particular issue, open your own thread with your specific details.
-Paul
Moderator
Edited by: Paul Meehan on Aug 10, 2011 5:52 PM -
ERROR in the FM "BAPI_OBJCL_CHANGE"
Hi All,
I am using FM u201CBAPI_OBJCL_CHANGEu201D and passing parameters
OBJECTKEY :- (MATNR + BATCH NUMBER)
OBJECTTABLE:- MCHA
CLASSNUM:- Z_KOR_B_MASTER
CLASSTYPE:- 023
STATUS:- 1
STANDARDCLAS:-
CHANGENUMBER:-
KEYDATE:- 11.11.2010
NO_DEFAULT_VALUES:-
Getting the Error message:-
u201DClass type 023, object type MCHA, object 0000000000001001011000001537
Object 0000000000001001011000001537 does not exist
Assignment was not createdu201D
Any body can help how to use the FM "BAPI_OBJCL_CHANGE" or where is my mistake.
But I am getting the clacification details diplaying in the FM " ME_VAR_GET_CLACIFICATION".
Thanking you.
SubashChange MCHA into MCH1.
edit.
I assume batch is not on plant level. -
Error using BAPI_OBJCL_CHANGE
I'm trying to change a characteristic within mm02 through a program(batch job). I am using the FM BAPI_OBJCL_CHANGE and I'm getting the error message of CL535 that it cannot find FM object_check_ausp. The field in which I'm trying to change is within the ausp table and no the FM object_check_ausp does not exist within my environment. I had read a previous blog to create the FM, but a customer cannot create a FM named object_check_ausp. Anyone run into this or have any idea where to get this FM? I've looked at the notes, but did not find any help there.
Regards,
KimHi Welcome to SCN
Search in forum for how to use the FM, I doubt if the error you are getting is correct.... It could be some other error leading you to this...[Click here for more info>>>|https://forums.sdn.sap.com/search.jspa?q=BAPI_OBJCL_CHANGE&dateRange=last90days&searchID=24050142&rankBy=10001&start=0]
Maybe you are looking for
-
How can to connect 3 displays with resolution 2560x1600 to MAC Pro?
How can I connect 3 Dell U3014 displays (resolution 2560x1600) to MAC Pro?
-
Where Does Mountain Lion Download To?
I'm in the process of downloading ML so taht I can create a second bootable drive. Where does the ML download go to? I' ve looked several times throguh my downloads folder but I don't see it in there. Thanks!
-
JSF 1.1 Tabset validation
Hi! I have a simple page with a tabset and 2 tabs on it (JSF 1.1 Netbeans 6 vwp). I have a save button also. The two tabs have components that have required property true. I can save the page without getting a validation error if the unvisible tab is
-
OnChange function in a TextField
Hi, Whenever a value is entered in a text field, we can use onChange function to make perform desired operations. When different values are entered, the function is called. But, what if a same value is entered again and again ? this does not call onC
-
Desktop application distribution on windows
Hi everybody. My app configuration files are formed by: - all-users configuration xml files (modifiable by admin) - user specific configuration (modifiable by each user) If I should install it on windows, is there some automated software/script to sa