2007 Oct 29 9:47 PM
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.
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
2007 Oct 29 10:03 PM
Hi Ben,
Try the FM's in Function Group CLBPA - in particular BAPI_OBJCL_GETDETAIL.
Hope this helps.
Pat.
2007 Oct 29 10:22 PM
2007 Oct 29 10:43 PM
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
2007 Oct 29 11:16 PM
2007 Oct 29 11:31 PM
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
2007 Oct 29 11:37 PM
What Ashish said! Was going to give some sample code but Ashish beat me to it!
2007 Oct 29 11:44 PM
Ben,
Also make sure that the Material Number has the leading zeros. Pass it through CONVERSION_EXIT_MATN1_INPUT if required.
Pat.
2007 Oct 29 10:03 PM
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
2007 Oct 30 4:01 PM
Thanx guys,
i thought abt this BAPI but i have some questions which helped with you valuable replies.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |