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

About create BAPI in R3 for external Java call

com_2018
Participant
0 Likes
672

Hi,

I only create one Function moudle ,namespace z_bapi_001,and set X for Remote-enabled module,I do not make other steps of bapi . But external java still can call the bapi.

Why? Could you explain for me?

Thanks and Regards,

collysun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
511

HI,

Setps to create BAPI:

1.Defining BAPI Data structures in SE11

-- This is not always required. If your BAPI has only a single IMPORT and EXPORT parameter, then you can specify directly in the BAPI.

2.Program a RFC enabled BAPI function module

-- This is the actual development. Required and you have created it.

3.Create a Business object for the BAPI in the BOR

-- This is required only if your BAPI is working on a Business Object. I think in your case it is not so.

4.Documentation the BAPI

-- This is not mandatory but only for information.

5.Generate ALE interface for asynchronous BAPIs

-- Only required for Asynchronous BAPIs

6.Generate and release

-- This would be required, if you want to execute the BAPI from java in Production. Right now it seems you have called the JAVA program from development system and the BAPI in SAP is also in SAP system. Try to pass the IP address of Production system to JAVA BAPI Call and then it would fail. You have to put your BAPI under a Transport request and release it to production. Then through JAVA logon to production system of SAP and call the BAPI.

Best regards,

Prashant

5 REPLIES 5
Read only

Former Member
0 Likes
511

Hi,

There could be several reasons :

1. Login ID,password and Client of SAP logon are incorrect

2. The IP Address is incorrect

3. Error in the program in JAVA while calling BAPI

Solutions :

1. Login with the same ID and password directly into same client of sap through logon pad to confirm whether the id and password are correct

2. Check the IP address of the system

3. Call Standard SAP BAPI viz BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK to confirm whether JAVA is able to call SAP correctly

Best regards,

Prashant

Read only

0 Likes
511

Hi Prashant,

<b>But external java still can call the bapi.</b><u></u>

Read only

Former Member
0 Likes
511

Hi,

Yes thats correct. Once you set the RFC parameter in the FM, then it becomes a RFC/BAPI. So no need to set any additional parameters. Any third party system can call the BAPI.

If JAVA is able to call the BAPI, then what is the problem ? You can pass the data through BAPI and import it in SAP if that is your requirement.

Best regards,

Prashant

Read only

0 Likes
511

Hi,

Setps of create BAPI:

<b>1.Defining BAPI Data structures in SE11

2.Program a RFC enabled BAPI function module</b>

3.Create a Business object for the BAPI in the BOR

4.Documentation the BAPI

5.Generate ALE interface for asynchronous BAPIs

6.Generate and release

I only make 1 and 2 step.

I worry about the java calling effect SAP performance.

Message was edited by: collysun

Read only

Former Member
0 Likes
512

HI,

Setps to create BAPI:

1.Defining BAPI Data structures in SE11

-- This is not always required. If your BAPI has only a single IMPORT and EXPORT parameter, then you can specify directly in the BAPI.

2.Program a RFC enabled BAPI function module

-- This is the actual development. Required and you have created it.

3.Create a Business object for the BAPI in the BOR

-- This is required only if your BAPI is working on a Business Object. I think in your case it is not so.

4.Documentation the BAPI

-- This is not mandatory but only for information.

5.Generate ALE interface for asynchronous BAPIs

-- Only required for Asynchronous BAPIs

6.Generate and release

-- This would be required, if you want to execute the BAPI from java in Production. Right now it seems you have called the JAVA program from development system and the BAPI in SAP is also in SAP system. Try to pass the IP address of Production system to JAVA BAPI Call and then it would fail. You have to put your BAPI under a Transport request and release it to production. Then through JAVA logon to production system of SAP and call the BAPI.

Best regards,

Prashant