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
Harpreet
Niraj,
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.
Similar Messages
-
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 -
Query on classification material characteristic values update/insert
Hi,
I have a requirement to change classification characteristic values of a material via Txn MM02.
The function modules tried are as follows which did not serve the purpose:
1.UPDATE_MATERIAL_CLASSIFICATION
2.CLVF_VB_INSERT_CLASSIFICATION
3.CLVF_INSERT_AUSP
4.CLVF_UPDATE_AUSP
The characteristic values are not getting updated in the table AUSP(Where the values must have been updated) . So the updating of material classification characteristic values via txn MM02 is failing.
Please can anybody help on any function modules or alternate solutions that will help to update the classification char. values of the materials.
Also,for info please let know of the tables that maybe related for this updation other than AUSP.
Any input at the earliest would be of great help.
Thanks in advance.
Regards,
Leeza Roy V.
EAS-SAP Practice,
Wipro Technologies,
Bangalore.
Mob : 9886676986.
Extn : 1152Leeza,
There are quite a few standard BAPI function modules that can be used exactly for this. Look into the BAPI transaction under the CROSS APPLICATION SYSTEM --> CLASSIFICATION .
BAPI_OBJCL_CHANGE
BAPI_OBJCL_CREATE
BAPI_OBJCL_DELETE
BAPI_OBJCL_GETCLASSES
BAPI_OBJCL_GETDETAIL
These can be used to modify / create any classification data for the materials.
Regards,
Ravi
Note : Please mark the helpful answers. -
Saving charachteristic values. How to? Any FM?
Hello everybody,
How to save a classification value?
We have defined a class ´LOSFRUIT´ via CL01 and defined characteristic 'GEWICHTSCONTROLE' and it stores the weight for every charge. This weight can be retrieved using VB_BATCH_GET_DETAIL but now I want to save/store the weight. How to do that?
I have tried FM VB_CHANGE_BATCH followed by commit work and/or FM CLAP_DDB_SAVE_CLASSIFICATION, but no result.
Best regards,
Tim van SteenbergenNot a lot of respons but we keep on trying.
Meanwhile I have cracked this problem. BAPI_OBJCL_CHANGE did the trick and an example on sapfans
http://www.sapfans.com/forums/viewtopic.php?t=125320
put things together.
Best regards, Tim van Steenbergen -
Problem with BAPI_OBJCL_CREATE
Hello,
I try to create material caracteristics with bapi BAPI_OBJCL_CREATE. I don't know why it doesn't work, it tells me that the class is not found.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = w_object_key
objecttablenew = w_object_table
classnumnew = w_class_num
classtypenew = w_class_type
TABLES
allocvaluesnum = t_alloc_values_num
allocvalueschar = t_alloc_values_char
allocvaluescurr = t_alloc_values_curr
return = t_return.
W_object_key is my material
w_object_table = 'MARA'
w_class_num is rhe class (0000000873)
w_class_type = '001'
Please help me...
Edited by: Louis-Arnaud Bouquin on Jan 24, 2008 4:21 PMhi Swathi,
As u r telling , u r passsing quality Notification Number + line item to BAPI1003_KEY-OBJECT i.e.,,, object key
Can i know what parameter are u passing for OBJECTTABLENEW, i mean table name .
just a hint : u have to pass either QMEL or QMFE
after bapi_objcl_create , use transaction commit bapi.
try & let me know
Thanks,
Manjunath MS
"Reward Points if it is useful" -
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. -
Use of BAPI_OBJCL_CHANGE for Table VBAP
Hi All,
We are trying to update/create the charateristic LOBM_RLZ on change/create on Additional Data screen data ( VBKD).
For this purpose we are using BAPI_OBJCL_GETDETAIL and changing the charateristic value at run time, and further using the BAPI BAPI_OBJCL_CHANGE to update the value.
We are changing the LOBM_RLZ value from 30 days to 50 days. On executing this we are getting the error message "C1- 801" - LOBM_RLZ: Value "> 0 d" not found .
Can someone kindly advise if we have missed something?
In the below code we are fetching the pit_allocvaluesnum, pit_allocvalueschar, pit_allocvaluescurr table values from BAPI_OBJCL_GETDETAIL.
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = l_objek
objecttable = 'VBAP'
classnum = pi_wa_classinfo-class
classtype = pi_wa_classinfo-classtype
status = pc_status
keydate = sy-datum
TABLES
allocvaluesnumnew = pit_allocvaluesnum
allocvaluescharnew = pit_allocvalueschar
allocvaluescurrnew = pit_allocvaluescurr
return = pit_return.Hi bossi_007 ,
The cause for the problem is conversion of the the Chararteistic values from BAPI format to CACL format due to ISO code maintenance in the Unit of measure "Days".
Since the BAPI 'BAPI_OBJCL_CHANGE' internally calls 'BAPI_OBJCL_GETDETAIL' to get the Old assignment values and converts them too, we get the error despite forcing the ISO code value to initial value in the table pit_allocvaluesnum before calling BAPI.
To resolve this problem we have decided to use 'BAPI_OBJCL_CREATE' for new Assignment creation and the Function module LVF_UPDATE_AUSP to update AUSP value for changed charateristic.
Regards
Prasuna -
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)? -
BAPI_OBJCL_CREATE returns error in ECC and not in 4.7 system.
Hi all,
In a custom program, BAPI_OBJCL_CREATE has been used. the program is working fine in SAP 4.7 system.
After the upgradation to ECC, the BAPI_OBJCL_CREATE is returning error.
But, when we debug in ECC, it is not returning error and results are fine ! So it is not possible to trace the error. If values are passed manually to execute only the BAPI, it does not return error.
If we execute the custom program without debugging, it is returning error.
It is surprising issue and unable to fix.
Could anybody know the probably solution/ reason for this in ECC.Please help me.
I have tried to search for this problem for OSS notes, but could not find any.Hi,
The BAPI is returning message of type "E".
Based on this, custom program is rasing user defined error message.
When we debug, no error is returned and transaction is successful. So could not find the error in detail.
Even if we try to run the BAPI using SE37, returns success message.
code is as follows.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = gv_objectkeynew "value is 1000409757
objecttablenew = c_iflot "value is IFLOT
classnumnew = c_carac "value is CARAC_PCE_DISCO
classtypenew = c_003 "value is 003
TABLES
return = gt_return. .
LOOP AT gt_return WHERE type CA 'AE'. "means error / abort
EXIT.
ENDLOOP.
IF sy-subrc = 0.
PERFORM f004_write_message_log USING c_error 174 c_class '' '' '' '' gv_concat_e.
MOVE : c_flag TO gv_error.
RETURN.
ENDIF. -
Hi to All,
I've the following problem:
during the material creation (via /SAPMP/BAPI_MATERIAL_SAVEDATA) I cannot ale to add Configurable Material (MRP3 view in MM02 Transaction).
I Use the FM BAPI_OBJCL_CREATE to create new classifications.
How can I create a configurable material during the material creation proocess?
Note: the fields that should be updated are MARC-STDPD (equal to configurable material) and MARA-KZKFG (equal to X).
Best Regards,
Umberto Panico e Giovanna Di BertN/A
-
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 -
Problem while using Alphanumeric Material No for BAPI_OBJCL_CONCATENATEKEY
Hi Sap gurus,
I am struck up with the Bapi while working. Could any one help me out with the below logic.I have tried to use the below Bapi 'BAPI_OBJCL_CONCATENATEKEY' passing the Concatenated Object key to BAPI_OBJCL_CHANGE.
Here when i having a material number as numeric number the Bapi is working fine but when i am having the material number as Alpha numeric number I am getting problem . The Bapi is not proving the fields by concatenation. Can any one help me how could I get for Alplhanumeric Material Numbers.
it_object-key_field = 'MATNR'.
it_object-value_int = p_matnr.
APPEND it_object.
it_object-key_field = 'WERKS'.
it_object-value_int = p_werks.
APPEND it_object.
it_object-key_field = 'CHARG'.
it_object-value_int = p_charg.
APPEND it_object.
CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
EXPORTING
objecttable = 'MCHA'
IMPORTING
objectkey_conc = w_object
TABLES
objectkeytable = it_object
return = rettab.
Thanks
Satish RajuHi Nagaraj,
I donot have a material with out leading Zero's. I have a material ZF126 (with out leading zero's and Charg--B48. When i use BAPI_OBJCL_CONCATENATEKEY it is giving me OBJECTKEY_CONC --ZF126 B60 in an inproper way of concatenation.
This is my problem.
The solution of Using BAPI_BATCH_SAVE_REPLICA is not updating data base with the data provided. I need to update Batch Master Classification data Manufacturing Site /Plant, Country of Origin, Date of Manufacture.
By Using this Save BAPI I can update Country of Origin and Date of Manufacture but for Manufacturing Plant I need to use the Tables section in Save Bapi.
My target is to update three fields Manufacturing Site /Plant, Country of Origin, Date of Manufacture.
This save BAPI is helping me to update 2 fields but not Manufacturing Plant. Could you please help me.
Thanks
Satish Raju -
How to delete lock entries generated by the function module "BAPI_OBJCL_CHANGE"
Hi experts,
I'm now trying to make an add-on program
which updates material master information by the background job.
To update the "Classification" view of material master,
the program calls the function module "BAPI_OBJCL_CHANGE".
If the "RETURN" information is valid,
then the program calls "BAPI_TRANSACTION_COMMIT" (with the "wait" parameter 'X').
Contrary to my intention,
lock entries generated by the function module "BAPI_OBJCL_CHANGE" remains after "BAPI_TRANSACTION_COMMIT".
As a result, the material updated remains locked until the add-on processing ends.
To shoot this trouble, I read some SCN discussions below:
<<lock unlock record>>
⇒ As I wrote above, I checked the parameter for "BAPI_TRANSACTION_COMMIT".
<<BAPI_OBJCL_CHANGE Lock Error !>>
⇒ I cannot call the function module "BAPI_OBJCL_CHANGE" with "IN UPDATE TASK" option
because of "BAPI_OBJCL_CHANGE" attributes.
("BAPI_OBJCL_CHANGE" is not a "Update Module".)
How can I delete lock entries generated by the function module "BAPI_OBJCL_CHANGE" ?
Thanks in advance.
TomI quess/hope you want to remove locks in you caller program and not locks required by the update task processing to insure database consistencies...
Did you use the WAIT option in the commit FM, else if there are no other locks in your called program a call of FM DEQUEUE_ALL could solve your problem.
Regards,
Raymond -
BAPI_OBJCL_CREATE inconsistent classification data error
I am using BAPI_OBJCL_CREATE to create a new classification for batch. Prior to this I am using BAPI_OBJCL_DELETE to delete the old classification data. But everytime I try to open the batch using MSC3N, I always get a termination error stating inconsistent classification data. Does any one know of a way around this?
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
Maybe you are looking for
-
how can i get a password for wi fi network BELL675
-
Had problems with os and now can not open firefox unless I run as admin. Error appears - Could not initialise the application's security component. The most probable cause is problems with files in your browser's profile directory. Please check that
-
I am unable to download the new version of Adobe since I do not recall my password. I was prompted to click on the question mark in the password field but there was none. How do I resolve this issue?
-
Iphone 5c time and date not working right
hi guys I would really appreciate your help if you have any information or similarities on this. I have an iPhone 5c and the date and time are both lacking, I don't know what is wrong and can I fix it? its also messing with my 3g and wifi thanks, gem
-
Any program for calling bapi from ABAP step by step
any program for calling bapi from ABAP step by step points will be rewarded, thank you, Jagrut BharatKumar Shukla