Application Development 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: 

How to use BAPIs

former_member463678
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Go through the documentation in SE37.. It has all the details required.

Regards,

VIshwa.

6 REPLIES 6

Former Member
0 Kudos

Hi

Go through the documentation in SE37.. It has all the details required.

Regards,

VIshwa.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.