Skip to Content
author's profile photo
Former Member

How to call Instance Methods and set property values in BAPI?

In Project systems, for the three business objects viz.

Network, ProjectDefinition and WBS, there are two kinds of methods which are available : class methods and instance methods. We have tried calling some instance methods, for instance, BAPI_PROJECTDEF_GETDETAIL to get details pertaining to a project. While importing this BAPI, it shows two elements for mapping i.e. Current Internal Project(string) and Current External Project(string). We supplied these values for an existing project. Upon running this call through an XML client at our end, it

returned an error "Module Unknown Exception". This general message is present on every instance method thus far. Upon searching in BAPI Explorer for Project System->ProjectDefinition->GetDetail, we found that this BAPI didn't take any input parameter.

Following message was displayed in BAPI Exlorer for this BAPI:

"... Obligatory import parameters are the external and internal keys CURRENTEXTERNALPROJE and CURRENTINTERNALPROJE of the project definition.The system reads parameters contained in the structure

BAPI_PROJECT_DEFINITION_EX ..."

i) How to supply the values of Obligatory import parameters.

ii) What are the possible causes of this exception.

iii) How to call an instance method. We are using same mechanism for calling class as well as instance methods so far, we have been to call only class level methods successfully. Is there anything special that we

need to do to call instance methods.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Oct 04, 2005 at 07:24 AM

    Hi,

    what version is the SAP PS running? If WebAs or higher, create an inbound synch interface containing your two parameters in the request structure and as many as you require in your response structure. Generate an Inbound ABAP proxy, where you can plug in some code, i.e. create and instantiate an object of the required type and make the call to the BAPI.

    If SAP PS on lower than WebAs, then create a wrapper function module and make it RFC enabled. Then plug your code in here and do the same thing.

    Watch out for commits!

    Cheers,

    Mark

    Add comment
    10|10000 characters needed characters exceeded