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

BAPI to retrieve class and characterstics values

Former Member
0 Likes
2,781

Hi All,

I am looking for a BAPI which can retrieve class characterstics and values for a particular material instead of querying all tables kssk,klah,ksml,ausp.

Hi All,

I am looking for a BAPI which can retrieve class characterstics and values for a particular material instead of querying all tables kssk,klah,ksml,ausp.

9 REPLIES 9
Read only

former_member221770
Contributor
0 Likes
2,239

Hi Ben,

Try the FM's in Function Group CLBPA - in particular BAPI_OBJCL_GETDETAIL.

Hope this helps.

Pat.

Read only

0 Likes
2,239

what should we have to provide for object table

Read only

0 Likes
2,239

Ben,

When I have used this FM I did the following:

objectkey = matnr

objecttable = 'MARA'

classnum = class_id

classtype = class_type

<b><REMOVED BY MODERATOR></b>

Cheers,

Pat

Message was edited by:

Alvaro Tejada Galindo

Read only

0 Likes
2,239

nope this is not working

Read only

0 Likes
2,239

Hi,

Check this sample code, if it helps. Also the BAPI is well documented. If you have any question regarding parameter, please have a look at the documentation.

DATA: begin of lt_valchar OCCURS 0.

include structure BAPI1003_ALLOC_VALUES_CHAR.

data: end of lt_valchar.

DATA: gt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,

p_matnr LIKE BAPI1003_KEY-OBJECT,

OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'

EXPORTING

objectkey = p_matnr

objecttable = 'MARA'

classnum = 'CL000099' " Give Class number

classtype = '001' " Give Class Type

keydate = sy-datum

TABLES

allocvaluesnum = lt_valnum

allocvalueschar = lt_valchar

allocvaluescurr = lt_valcurr

return = gt_return.

ashish

Read only

0 Likes
2,239

What Ashish said! Was going to give some sample code but Ashish beat me to it!

Read only

0 Likes
2,239

Ben,

Also make sure that the Material Number has the leading zeros. Pass it through CONVERSION_EXIT_MATN1_INPUT if required.

Pat.

Read only

Former Member
0 Likes
2,239

BAPI_CLASS_GETLIST BAPI: Read Classes

BAPI_CLASS_GETSTATUS Class BAPI: Status Information

BAPI_CLASS_GET_CHARACTERISTICS Import Characteristics and Allowed Values for

BAPI_CLASS_GET_CLASSIFICATIONS Read Values Assigned to Objects in Class

BAPI_CLASS_MAINT_LOCAL_DEP Class BAPI: Assign / Delete Local Dependency

BAPI_CLASS_READ BAPI: Read Class Information

BAPI_CLASS_READ_ALLOC Class BAPI: Read Dependencies

Read only

Former Member
0 Likes
2,239

Thanx guys,

i thought abt this BAPI but i have some questions which helped with you valuable replies.