Skip to Content
author's profile photo
Former Member

BAPI call

Hi,

I have successfully created a BAPI for the first time and I am able to make a call to the function module... But how do I call it as an object. I mean :

I have a bapi 'zabc' (object type) 'zabc1' (method) listed in the BAPI Explorer.

It uses the function module 'zabc_xyz'.

I can call the function but I have no knowledge as to how to call : zabc->zabc1().

and when i use the statement :

data myref type ref to zabc.

it gives a syntax error.

thanx in advance.

best regards.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on Aug 13, 2004 at 06:41 PM

    Remember:

    SAP business objects NOT EQUAL SAP Object Oriented Programming.

    To use global classes (as your in your example ZABC). the class is defined in SE24 Class builder. This way you can declare and create the object in your program.

    Try SE24 instead for functionality code and than use the object within ABAP programs.

    Also, keep in mind you can create classes locally in programs.

    Good luck,

    Leonardo Araujo

    p.s. if you just want to use your BAPI, call it as call function... no need to create an object instance...

    Add comment
    10|10000 characters needed characters exceeded