2009 Oct 27 11:26 AM
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.P
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.P
2009 Oct 27 11:28 AM
hai,
check the links
http://wiki.sdn.sap.com/wiki/display/Snippets/BAPI_OBJCL_CHANGEformodifyingcharacteristicsvalues
Edited by: kpsgoutam on Oct 27, 2009 12:31 PM
2009 Oct 27 11:34 AM
Hi Gautham,
I have seen the Posting. I have tried to pass batch number as Object key and MCHA as Object table.
but I am getting the error as Enter the batch Number.
2009 Oct 27 11:33 AM
First obtain all the details through BAPI_OBJCL_GETDETAIL and then perform the change.
Pass the object number,
INOB-OBTAB,KLAH-CLASS,KLAH-KLART as the input.
2009 Oct 27 11:35 AM
Hi
DATA : OBJECTKEY type BAPI1003_KEY-OBJECT.
BAPI1003_KEY-OBJECT this is structure having some fields. just double click you will find.
OBJECTKEY-OBJECT = Matnr -->You need to Use the Conversion Exits if required. --> double click on Matnr Domain here you can find the Conversion Routines.
OBJECTKEY-OBJECTTABLE = MCHA --> This is the Table you need to update.
For More Clarity click on the Where Used List of FM
For More info Please go through the FM documentation
Cheers
Ram
2009 Oct 27 11:50 AM
HI,
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_bapiret2Hope this helps.
Thnaks,
Harini
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |