10-20-2008 12:50 PM
Hi Experts,
can anybody send sample code how to use below two fun modules.
BAPI_CLASS_GET_CLASSIFICATIONS
BAPI_CLASS_GET_CHARACTERISTICS
thanks in advance.
Zak.
10-20-2008 12:51 PM
Hi
Go through the documentation in SE37.. It has all the details required.
Regards,
VIshwa.
10-20-2008 12:51 PM
Hi
Go through the documentation in SE37.. It has all the details required.
Regards,
VIshwa.
10-20-2008 12:53 PM
Hi,
For the BAPI_CLASS_GET_CLASSIFICATIONS : Check the Function module documentation (SE37), SAP has itself given a sample code.
For BAPI_CLASS_GET_CHARACTERISTICS : Just pass the classnum and the class type it will return you all the characterisicts of that class.
Thanks & Regards,
Navneeth K.
10-20-2008 12:53 PM
hello khan,
we can directly call bapi fm in report program and we need pass the parameters wch are mandatory....
thk u
santhosh
Edited by: santhosh kumar on Oct 20, 2008 1:53 PM
10-20-2008 12:53 PM
DATA:
objects LIKE bapi_class_objects OCCURS 0 WITH HEADER LINE,
assigned values LIKE bapi_object_values OCCURS 0 WITH HEADER LINE,
return LIKE bapireturn1.
objects-object_key = 'TESTOBJEKT'.
APPEND objects.
CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
EXPORTING
classtype = '001'
classnum = 'TEST CLASS'
key_date = 19991231
langu_iso = 'EN'
IMPORTING
return = return
TABLES
object_classifications = assigned values
class_objects = objects
EXCEPTIONS
others = 0.
and
10-20-2008 12:56 PM
Hi Zakir,
BAPI_CLASS_GET_CLASSIFICATIONS function it reads values assigned to the objects classified in the class (not in subordinate classes). If there are value descriptions, these are returned with the value. You must enter the class type, class, and objects whose values you want to read. Note: the function module does not read values of reference characteristics.
DATA: objects LIKE bapi_class_objects OCCURS 0 WITH HEADER LINE,
assigned values LIKE bapi_object_values OCCURS 0 WITH HEADER LINE,
return LIKE bapireturn1.
objects-object_key = 'TESTOBJEKT'.
APPEND objects.
CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS' EXPORTING
classtype = '001'
classnum = 'TEST CLASS'
key_date = 19991231
langu_iso = 'EN'
IMPORTING
return = return
TABLES
object_classifications = assigned values
class_objects = objects
EXCEPTIONS
others = 0.
Function Module - BAPI_CLASS_GET_CHARACTERISTICS
reads characteristics and allowed values for a class. This includes overwritten characteristics and values.
Cheers!!
Balu
10-20-2008 1:00 PM
Sample code for the other BAPI :
data:
itab1 type standard table of BAPI_CHAR with header line,
itab2 type standard table of BAPI_CHAR_VALUES with header line.
CALL FUNCTION 'BAPI_CLASS_GET_CHARACTERISTICS'
EXPORTING
classnum = 'T_PPE'
classtype = '300'
LANGU_ISO =
LANGU_INT =
KEY_DATE = SY-DATUM
WITH_VALUES = 'X'
IMPORTING
RETURN =
tables
characteristics = itab1
char_values = itab2.
break-point.