Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

fetching characteristic value from CC03

bandal_amol
Explorer
0 Likes
6,167

Hello All ,

I want to fetch characteristic value  from CC03 t-code , after inputting Change Number screen is display after that In Menu Extra>Classification.

second screen appears , i want to fetch characteristic value from these screen , i tried for table as well as function modules also and BAPI too.

if any one know how to fetch all data. please let me know.

Regards,

Amol Bandal.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,264

Hi Amol,

Check this BAPI "BAPI_OBJCL_GETDETAIL"

OBJECTKEY                   "Change Number    500000000047

OBJECTTABLE                "Object Table Name in your case use   "AENR" Table

CLASSNUM                    "Class Name     PLM150-001

CLASSTYPE                   "Class Type     025

LANGUAGE                    "    EN

Regard's

Smruti

hello Maverick ,

i got solution , fm CLAF_CLASSIFICATION_OF_OBJECTS worked for my scnerio.

26 REPLIES 26
Read only

Former Member
0 Likes
5,264

Hi ,

for fetching character value,try  the following BAPI .

1. BAPI_CHARACT_GETDETAIL

2. 'BAPI_CHARACT_CHANGE'

and could you please  provide screen shot  for where the characteristics values are  displaying after
Menu Extra>Classification.

Kannan

Read only

0 Likes
5,264

hello kannan,

i tried this but not work. please find attached screenshot.

Read only

0 Likes
5,264

Hi Amol,

could you please check this link, it may help for you.

http://scn.sap.com/community/abap/blog/2013/05/14/create-new-batch-characteristics-with-values-check...

Regards

Kannan

Read only

0 Likes
5,264

Hello Kannan, Its not working for my scnerio. thanks for reply.

Regards,

Amol Bandal.

Read only

Former Member
0 Likes
5,265

Hi Amol,

Check this BAPI "BAPI_OBJCL_GETDETAIL"

OBJECTKEY                   "Change Number    500000000047

OBJECTTABLE                "Object Table Name in your case use   "AENR" Table

CLASSNUM                    "Class Name     PLM150-001

CLASSTYPE                   "Class Type     025

LANGUAGE                    "    EN

Regard's

Smruti

Read only

0 Likes
5,264

hello Smruti , it works but not fetching all data which i required.

Read only

0 Likes
5,264

Can you Show SAP Screen Shot with Some test value what you want's ?

Regard's

Smruti

Read only

0 Likes
5,264

screen shot file attached CC03.XMl.

Read only

0 Likes
5,264

Dear bandal amol

did u try FM ' CLAF_CLASSIFICATION_OF_OBJECTS' or  'CLAF_OBJECTS_OF_CLASS'

Regards,

Bastin.G

Read only

0 Likes
5,264

Yes i already seen your CC03.XML file , i mean to say what values are you looking which is not fetch the above BAPI .  is it date or char or alphanumeric or currency  field values ?  Can you share more information about field values  .

Note : Also Check you all Characteristic Language is what you pass in above bapi ?

Regard's

Smruti

Read only

0 Likes
5,264

hello Smruti,

fm BAPI_OBJCL_GETDETAIL work but not fetching all data. in my scnerio Enginee Type value not getting.

Read only

0 Likes
5,264

yes ..tried...

Read only

0 Likes
5,264

Dear Bandal,

just try this FM 'CLAF_CLASSIFICATION_OF_OBJECTS' hope it helps

DATA: T_CLASS  LIKE SCLASS OCCURS 0 WITH HEADER LINE.

DATA: T_CHAR   LIKE CLOBJDAT OCCURS 0 WITH HEADER LINE.

                    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

                      EXPORTING

                        CLASS                      =    ' '      " say class name

*                      CLASSTEXT                  = 'X'

                        CLASSTYPE                  =                      " say class type

*                      CLINT                      = 0

*                      FEATURES                   = 'X'

*                      LANGUAGE                   = SY-LANGU

                        OBJECT                     =

                       OBJECTTABLE                = ' '            " table like  MARA

*                      KEY_DATE                   = SY-DATUM

*                      INITIAL_CHARACT            = 'X'

*                      NO_VALUE_DESCRIPT          =

*                      CHANGE_SERVICE_CLF         = 'X'

*                      INHERITED_CHAR             = ' '

                       CHANGE_NUMBER              = ' '                 " change number you have to give

                      TABLES

                        T_CLASS                    = T_CLASS

                        T_OBJECTDATA               = T_CHAR

*                      I_SEL_CHARACTERISTIC       =

*                      T_NO_AUTH_CHARACT          =

*                    EXCEPTIONS

*                      NO_CLASSIFICATION          = 1

*                      NO_CLASSTYPES              = 2

*                      INVALID_CLASS_TYPE         = 3

*                      OTHERS                     = 4

                              .

                    IF SY-SUBRC <> 0.

* Implement suitable error handling here

                    ENDIF.

Regards,

Bastin.G

Read only

0 Likes
5,264

Check these Notes :

Note 1083986 - BAPIs for classification - Overview

Note 1083983 - BAPI_OBJCL_GETDETAIL: Instructions  Sample code given by SAP

Regard's

Smruti

Read only

0 Likes
5,264

Hi,

what data type you set for Engine type value?

If it is having character values, then only you get the output in allocvalueschar table,

If it has numerical value or date then your o/p will be in allocvaluesnum table.

Read only

0 Likes
5,264

Dear bandal amol ,

Type your characteristic name in CT04 and check which kind of data format ?

maybe engine type value different data kind format in CT04 thats why its not populating

mostly all the internal tables which mentioned in bapi_objcl_detail (ALLOCVALUESNUM,ALLOCVALUESCHAR,ALLOCVALUESCURR) will cover your internal tables values

else use fm 'CLAF_CLASSIFICATION_OF_OBJECTS'v it will list out all the characteristics with the values.

Regards,

Bastin.G

Read only

former_member420878
Active Participant
0 Likes
5,264

Hi,

Try FM :

*       get all codes which need to be updated


         CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
           EXPORTING
             objectkey        = lv_objectkey     """ your CHANGE NO
             objecttable      = 'AENR'
             classnum        = check Class name with FC
             classtype        = "check with FC
             keydate          = sy-datum
           TABLES
             allocvaluesnum  = lt_allocvaluesnum
             allocvalueschar  = lt_allocvalueschar
             allocvaluescurr   = lt_allocvaluescurr
             return                = lt_return.

In table 'lt_allocvalueschar' you will get output in CHARACT field.

If you want to update any thing in characteristic then try FM :


change and insert records in table lt_allocvalueschar and pass to the below FM

*       update or insert codes
         CALL FUNCTION 'BAPI_OBJCL_CHANGE'
           EXPORTING
             objectkey          = lv_objectkey
             objecttable        = 'AENR'
             classnum           = check Class name with FC
             classtype          = "check with FC
             status               = '1'
             keydate            = sy-datum
           TABLES
             allocvaluesnumnew  = lt_allocvaluesnumnew
             allocvaluescharnew = lt_allocvalueschar
             allocvaluescurrnew  = lt_allocvaluescurrnew
             return                     = lt_return.

Thanks


Read only

0 Likes
5,264

This message was moderated.

Read only

bandal_amol
Explorer
0 Likes
5,264

Hello All,

I tried using BAPI_OBJCL_GETDETAIL fm.

all value display ok....In table  ALLOCVALUESNUM values are display in format

VALUE_FROM             VALUE_TO

1,101100000000000E+04  0,000000000000000E+00

1,105100000000000E+04  0,000000000000000E+00

1,129500000000000E+04  0,000000000000000E+00

Actual output for this should be R6V22/30 , 6L52/55 , 12V48/60DF like this. but in fm it display in value_from and value_to format.

Will you please tell me is there any fm for convert 1,101100000000000E+04  0,000000000000000E+00 into R6V22/30.

Read only

0 Likes
5,264

happy to see finally you got solution

-well done Amol

Read only

0 Likes
5,264

check the data type of that characteristics . is it Char or  " ?" .

Regard's

Smruti

Read only

0 Likes
5,264

Hi,

Try FM UNIT_CONVERSION_SIMPLE.

Regards,

Maria João Rocha

Read only

0 Likes
5,264

hello MArio thanks for reply....it works

Read only

former_member193464
Contributor
0 Likes
5,264

Hi,

If you dont wish to use the BAPI
then here's the link  with tables to get the desired values.

KSSK – stores the object nuber
pass object number + class type

KLAH- pass the internal class number  fetched from KSSK

KSML – pass the internal number, item number

Will get the characteristic

AUSP – pass object number class type get the value for characteristic...

Read only

0 Likes
5,264

hello Maverick ,

i got solution , fm CLAF_CLASSIFICATION_OF_OBJECTS worked for my scnerio.

Read only

Former Member
0 Likes
5,264

Hi bandal amol.

Use this fm 'VC_I_GET_CONFIGURATION'