‎2008 Nov 26 7:24 AM
Hello,
Very Good Afternoon,
I need to change the few vlaues in the t-code MSC2N.
I need to change the City of Origin and Reg Of orign for few Batch numbers
in Basic Data1 tab.
There are around 1000 batch numbers which needs this change
Is there any BAPI available to go ahead..
Any suggestions will be appreciated.
Regards,
Kittu
‎2008 Nov 26 8:16 AM
There is no BAPI Availabe for MSCxN transactions. You have to Use BDC/LSMW.
‎2008 Nov 26 8:16 AM
There is no BAPI Availabe for MSCxN transactions. You have to Use BDC/LSMW.
‎2008 Nov 27 6:54 AM
HI,
Try these Bapi's for u r transaction.
BAPI_BATCH_CREATE
BAPI_BATCH_CHANGE,
BAPI_BATCH_REPLICATE,
BAPI_BATCH_SAVE_REPLICA
Regards,
Sudhakar Reddy.A
‎2008 Nov 27 10:55 AM
Dear Kittu,
You have to use BDC for this.
There is no BAPI for the same.
Regards,
Flavya.
‎2008 Nov 27 11:03 AM
Hi
Check This BAPI
BAPI_OBJCL_CREATE Classification BAPI: Create Assignment
BAPI_OBJCL_CREATE_KEY BAPI for Classification: Create Assignment (Key)
BAPI_BATCH_CHANGE
BAPI_OBJCL_CHANGERanga
‎2008 Dec 05 6:48 AM
Hello,
I am sorry for the late resposne!
The information provided was helpful!
Thank you for your response!
Regards,
Kittu
‎2008 Dec 15 11:34 AM
Hi, You can update classification for a batch using the following code.
But first, you'll need to find out that the batch management is cross-plant or plant dependant.
If it is cross plant then plant(WERKS) is not part of the key to BAPI_OBJCL_CONCATENATEKEY.
CLEAR: objectkey, objectkeytable, objectkeytable[],
allocvaluesnumnew, allocvaluesnumnew[],
return.
objectkeytable-key_field = 'MATNR'.
objectkeytable-value_int = matnr.
APPEND objectkeytable.
objectkeytable-key_field = 'CHARG'.
objectkeytable-value_int = charg.
APPEND objectkeytable.
* Only if Batch management is Plant dependant
objectkeytable-key_field = 'WERKS'.
objectkeytable-value_int = werks.
APPEND objectkeytable.
CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
EXPORTING
objecttable = objecttable
IMPORTING
objectkey_conc = objectkey
TABLES
objectkeytable = objectkeytable
return = return.
allocvaluesnumnew-charact = "characteristic name goes here".
allocvaluesnumnew-value_from ="characteristic value goes here".
APPEND allocvaluesnumnew.
allocvaluesnumnew-charact = "characteristic name goes here".
allocvaluesnumnew-value_from = "characteristic value goes here".
APPEND allocvaluesnumnew.
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = objectkey
objecttable = objecttable
classnum = classnum
classtype = classtype
* STATUS = '1'
* STANDARDCLASS = STANDARDCLASS
* CHANGENUMBER = CHANGENUMBER
* KEYDATE = SY-DATUM
* NO_DEFAULT_VALUES = ' '
* IMPORTING
* CLASSIF_STATUS = CLASSIF_STATUS
TABLES
allocvaluesnumnew = allocvaluesnumnew
allocvaluescharnew = allocvaluescharnew
allocvaluescurrnew = allocvaluescurrnew
return = return
.
* Do not forget to commit, otherwise changes would not take effect.
commit work.
Regards,
Hashir Ahmed
‎2009 Feb 06 7:28 AM
here what is the value that we need to pass for object key.