2006 Jul 05 9:46 AM
Hi Friends,
In Transaction MSC2N,(this is for Batch Updation) Tabs Classification, I have Charateriristics like width, Length etc. I need to pass a value thro Batch Input Program like BDC or etc,
I have tried to Recording but the classification tab not enabaled.
I have tried BAPI for the same but not found.
I need ur help, how to pass a value to these characteristics or any other way to pass a value to this.
Expecting your reply ASAP.
Thanks
Shankar
2006 Jul 05 11:37 AM
You can use the BAPIs in the function group CLBPA or Report RCCLBI03 to upload classification data.
-Kiran
*Please reward useful answers
Hi Friends,
In Transaction MSC2N,(this is for Batch Updation) Tabs Classification, I have Charateriristics like width, Length etc. I need to pass a value thro Batch Input Program like BDC or etc,
I have tried to Recording but the classification tab not enabaled.
I have tried BAPI for the same but not found.
I need ur help, how to pass a value to these characteristics or any other way to pass a value to this.
Expecting your reply ASAP.
Thanks
Shankar
2006 Jul 05 11:35 AM
I you wan't to maintain characteristics you could try to use functionmodule CACL_OBJECT_VALIDATION_MAINT.
Actually we have build a BAPI around this FM and genereted a ALE interface for this "BAPI". Now we also have an IDoc that can update characteristics.
2007 Feb 27 10:43 PM
Hi friend it seems you have done batch characteristics updation.
Please tell me how to give the value of objectkey.
When i concatenate material batch and plant.
Its showing " " is too long.
Please suggest its very urgent for me.
Thanks in advance.
2006 Jul 05 11:37 AM
You can use the BAPIs in the function group CLBPA or Report RCCLBI03 to upload classification data.
-Kiran
*Please reward useful answers
2006 Jul 05 11:52 AM
Dear Kiran,
I have checked up, but there is such report or Bapi
Please give some more details
Shankar
2006 Jul 05 11:53 AM
2006 Jul 05 12:02 PM
Hi Kiran,
We ar using SAP version 5.0 .
I find the CLBPA function group but i have one doubt on this, this function group can we able to pass the characteristics values like, we have already defined class has 3 characteristics,
width
lenght,
Colour Shade.
For this i need to pass data.
Please clarify my doubt,
Also possible please give the program to Pass a value to this Function.
Thanks
Shankar
2006 Jul 05 12:07 PM
i_objtable TYPE STANDARD TABLE OF ty_objtable WITH HEADER LINE,
i_allocvaluesnum TYPE STANDARD TABLE OF ty_allocnum WITH HEADER LINE,
i_allocvalueschar TYPE STANDARD TABLE OF ty_allocchar WITH HEADER LINE,
i_allocvaluescurr TYPE STANDARD TABLE OF ty_alloccurr WITH HEADER LINE,
For C type Characteristics
i_allocvalueschar-charact = Characteristic Name
i_allocvalueschar-value_neutral = Characteristic Value
APPEND i_allocvalueschar.
For N type Characteristics
i_allocvaluesnum-charact = Characteristic Name
i_allocvaluesnum-value_from = Characteristic Value
APPEND i_allocvaluesnum.
REFRESH return.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = i_objtable-object
objecttablenew = i_objtable-objecttable
classnumnew = i_objtable-classnum
classtypenew = i_objtable-classtype
TABLES
allocvaluesnum = i_allocvaluesnum
allocvalueschar = i_allocvalueschar
allocvaluescurr = i_allocvaluescurr
return = return.
READ TABLE return WITH KEY type = 'E' BINARY SEARCH.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTIO_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF.
-Kiran
*Please reward useful answers
2006 Jul 05 12:40 PM
Dear Kiran,
1. Here in the Program, what is ty_objtable,
ty_allocnum, typ_allocchar, ty_alloccurr.
we need to give the values for Characteristic name,
characteristic value. then the function will execute.
2. Where do we pass the Material, Plant, Batch, storage loc for the Batch.
This characteristic is for particular material, plant, batch, storage loc.
Please clarify my doubt.
Thanks
Shankar
2006 Jul 05 12:50 PM
Define the below types in your program
TYPES : BEGIN OF ty_objtable.
INCLUDE STRUCTURE bapi1003_key .
TYPES : END OF ty_objtable.
TYPES : BEGIN OF ty_allocnum.
INCLUDE STRUCTURE bapi1003_alloc_values_num.
TYPES : END OF ty_allocnum.
TYPES : BEGIN OF ty_allocchar.
INCLUDE STRUCTURE bapi1003_alloc_values_char.
TYPES : END OF ty_allocchar.
TYPES : BEGIN OF ty_alloccurr.
INCLUDE STRUCTURE bapi1003_alloc_values_curr.
TYPES : END OF ty_alloccurr.
OBJTABLE should be populated as below
i_objtable-objecttable = 'MCHS'.
i_objtable-classnum = CLASS_NAME
i_objtable-classtype = '023'.
i_objtable-object = CONCATENATE MATNR WERKS CHARG.
*Matnr should have leading zeroes
-Kiran
*Please reward useful answers
2006 Jul 05 1:57 PM
Dear Kiran,
Thanks for your timely help.
I have one doubt, for the same material, plant, store loc, batch i have 3 characteristics
Width, Length, Shadow etc.
*For C type Characteristics
i_allocvalueschar-charact = characteristic NAME
i_allocvalueschar-value_neutral = characteristic VALUE
append I_ALLOCVALUESCHAR.
Here, all the 3 characteristics are char only.
so i have to add like this. eg.
i_allocvalueschar-charact = 'WIDTH'
i_allocvalueschar-value_neutral = 165
append I_ALLOCVALUESCHAR.
i_allocvalueschar-charact = 'LENGTH'
i_allocvalueschar-value_neutral = 1000
append I_ALLOCVALUESCHAR.
i_allocvalueschar-charact = 'SHADOW GROUP'
i_allocvalueschar-value_neutral = 'A'
append I_ALLOCVALUESCHAR.
then i have to call the BAPI function.
is it ok...
Please reply me.
Thanks
Shankar
2006 Jul 05 2:00 PM
Yes boss... This is what you should do in your program. Make sure to pass the characteristic names in UPPER CASE.
Call the BAPI to create classifications and if no errors occur call the COMMIT BAPI
-Kiran
*Please reward useful answers
2006 Jul 05 2:17 PM
Hi Kiran,
Sorry to disturb u again,
This BAPI is for Create. I need to do the same for Change Batch characteristics. for that i have used the BAPI, 'BAPI_OBJCL_CHANGE'
but
i_allocvaluesnumnew =
i_allocvaluescharnew =
i_allocvaluescurrnew =
is same as ty_allocnum ,
ty_allocchar ,
ty_alloccurr
Please confirm. and rest of the things will be same as Create.
Thanks
Shankar
2006 Jul 05 2:24 PM
Yes the reference remains the same. But you need to be careful while changing the classifications.
First read the charactristics using BAPI_OBJCL_GETDETAIL. Update the characteristic table with the new values and pass these tables to BAPI_OBJCL_CHANGE.
Sample Code:
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = i_objtable-object
objecttable = 'EQUI'
classnum = i_objtable-classnum
classtype = i_objtable-classtype
unvaluated_chars = 'X'
TABLES
allocvaluesnum = i_allocvaluesnum
allocvalueschar = i_allocvalueschar
allocvaluescurr = i_allocvaluescurr
return = return.
READ TABLE i_allocvaluesnum WITH KEY charact = 'PIPE_LAID_LENGTH' BINARY SEARCH.
IF sy-subrc EQ 0.
i_allocvaluesnum-value_from = wa_srep-revised_eqpt_len.
MODIFY i_allocvaluesnum INDEX sy-tabix TRANSPORTING value_from.
ELSE.
i_allocvaluesnum-charact = 'PIPE_LAID_LENGTH'.
i_allocvaluesnum-value_from = wa_srep-revised_eqpt_len.
APPEND i_allocvaluesnum.
ENDIF.
REFRESH return.
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = i_objtable-object
objecttable = 'EQUI'
classnum = i_objtable-classnum
classtype = i_objtable-classtype
TABLES
allocvaluesnumnew = i_allocvaluesnum
allocvaluescharnew = i_allocvalueschar
allocvaluescurrnew = i_allocvaluescurr
return = return.
READ TABLE return WITH KEY type = 'E' BINARY SEARCH.
IF sy-subrc EQ 0.
PERFORM add_message TABLES i_idoc_status.
ELSE.
call_made = 'X'.
ENDIF.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |