cancel
Showing results for 
Search instead for 
Did you mean: 

Calling RFC in dynpro: Issue

Former Member
0 Kudos

Hi,

With reference to the material creation blog on sdn, I'm trying to access BAPI_MATERIAL_SAVEDATA.

I have taken following fields for material creation

1. Material No.

2. Description

3. Industry sector

4. Material type

After deployment I created the required JCo connections. But on running this application, I no output is displayed. I'm also displaying the return msg.

On checking the SAP MARA table no new record is found.

In this case is it necessary to COMMIT the SAP database? Which bapi to call for database commit work?

Is it always mandatory to commit the database from dynpro by calling a bapi ?

Can anyone help me in this regard ?

Thanks, in advance,

Prasanna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

<b>BAPI_TRANSACTION_COMMIT</b> is the transaction for commit. check whether the BAPI_MATERIAL_SAVEDATA requires commit and use it. before that check whether you are sending all the mandatory fields to the BAPI.

Regards,

Gopi

Answers (1)

Answers (1)

christof_kohler
Explorer
0 Kudos

Hey,

if you are not sure whether you fill the mandatory fields right (think about leading zeros!), check and test the Bapi in your R/3 with the SE37. But Attention, the SE37 does not always behaviour the same way the BAPI does if it was called by RFC, that might sound strange, but it is like that.

You could also write a Z_BAPI on your own that encapsulates the mentioned BAPI. Program an endless loop in the first lines of ABAP. Than call the Z_BAPI per RFC. In SM50 you will find your process. Catch it with /nSM50, set the cursor at the process you want to debug, go Program/Session -> Program -> Debugging.

Now the Debugger will open with the Bapi in the endless loop. Edit the Bapi variables to stop the loop and check the interface values.

Hope that helped a little.

Christof