Application Development and Automation 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: 
Read only

BAPI Error

Former Member
0 Likes
1,754

hi

I am trying to create one BAPI but when i try to release it it gives me information message that no default attribute is set for object type. and then it says BAPI could not be generated.

Can you please help me in solving this problem.

Thanks

Kamesh Bathla

4 REPLIES 4
Read only

christian_wohlfahrt
Active Contributor
0 Likes
772

Hi!

You don't need to release function modules. That's something for SAP, released FM should have a documentation and have better (or one at all) support by SAP.

But for custom FM a release just has no meaning - activation (generation) is all you need.

Regards,

Christian

Read only

0 Likes
772

without releasing my BOR Method how can i generate the object.

Read only

0 Likes
772

Hi,

I am not clear of the problem.

Can you let us know what you want to release?

Release a BUSINESS OBJECT?

Release a Business Object Method?

The warning does come when your BO doesnt have any KEY FIELDS. And coming to Error, can you let us know more info about the error.

Regards,

<i><b>Raja Sekhar</b></i>

Read only

Former Member
0 Likes
772

HI Kamlesh

plz go through the following proceedure if you are still not bale to solve it please let me know.

FYI: if your problem gets a solution plz do give the points.

BAPI

The BAPI (business Application Programming Interface) is a precisely defined interface providing

access Process and data in business Application systems such as SAP/R3..

Benefits of BAPI.

Can be used in diverse languages/Development environments.

Can be called from divers platforms.

Reduced development costs.

HOW TO CREATE BAPI

Step by Step Procedure.

Step1: Define structure of BAPI.

Step2 Write Function Module

Step3: Create the API method using BAPI Wizard.

Step4: Final Steps.

Step1: Define structure of BAPI.

In this step structures for the parameters and tables of the Function module used for the BAPI are defined:

Use T code SE11 -> Data Types-> structures ( create your structure according to your requirements).

Important note:You will have to define a structure for every parameter in the BAPI. You cannot use the same structures used in existing applications because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them.

Step2: Write Function Module

1. Each BAPI must have its own function group.

2. Under the attributes tab remember to select Processing Type Remote Enabled module, otherwise the function module cannot be invoked via RFC and used as BAPI.

3. Import/Export parameters can only be BY VALUE for an RFC enabled Function module.

Note: when we create a function module for BAPI we never fill any data in tabs of Exception and changing. In Export tab we generally write ZBAPI like Returnbapi.

Save the Function module & release it using (ctr+F10).

Step 3: Create the API Method Using The BAPI WIZARD

1. BAPI wizard is used to expose the remote function module as a BAPI .

2. Wizard will generate some additional code, so the function module is a valid method of the BOR.

This allows the BAPI to be called as a work flow method in addition to be called by an outside

program.

3. Each function module corresponds to a method in the BOR

Go to the Business Object Builder SWO1.

You can either create the new Object type as a subtype of an existing business object or create new business object from scratch..

After doing all these steps then Generate the BAPI.