2007 Feb 20 7:52 PM
Hi,
I am using .NET connector to connect legacy system built on .NET platform to SAP. The SAP system uses a BAPI to pull data from legacy. The BAPI is called in Legacy system. After doing all the plausibility check in R/3, the BAPI returns data in BAPIRET2 table.
If the BAPIRET2 table does not contain any errors, I want the transactional data created in legacy to be committed in R/3. How can this be achived because the BAPI do commit iniside itself (following the standard SAP practice).
There are two options I have thought of:
1) The .NET developer will check the error table returned by BAPI and if non of the errors are there in the return structure then .NET code will call BAPI_Transaction_Commit for committing the data to database.
2) If the BAPIRET2 parameter of initial BAPI does not contain any errors, then some commit status on/off data flag is passed through the custom function module to R/3. Based on the commit status flag, the commit statement is excuted in R/3.
Please tell me which one is better solution. Any other smarter ideas are also appreciated. Any pros and cons ?
Thanks.
Rajesh.
2007 Feb 20 7:56 PM
Hi Rajesh,
Most BAPIs doesn't do a commit by themselves. And some other BAPIs have a flag which would let the system commit or not. Check if your BAPI has a parameter which flags the commit statement. Which BAPI are you referring to?
Regards,
Ravi
Hi,
I am using .NET connector to connect legacy system built on .NET platform to SAP. The SAP system uses a BAPI to pull data from legacy. The BAPI is called in Legacy system. After doing all the plausibility check in R/3, the BAPI returns data in BAPIRET2 table.
If the BAPIRET2 table does not contain any errors, I want the transactional data created in legacy to be committed in R/3. How can this be achived because the BAPI do commit iniside itself (following the standard SAP practice).
There are two options I have thought of:
1) The .NET developer will check the error table returned by BAPI and if non of the errors are there in the return structure then .NET code will call BAPI_Transaction_Commit for committing the data to database.
2) If the BAPIRET2 parameter of initial BAPI does not contain any errors, then some commit status on/off data flag is passed through the custom function module to R/3. Based on the commit status flag, the commit statement is excuted in R/3.
Please tell me which one is better solution. Any other smarter ideas are also appreciated. Any pros and cons ?
Thanks.
Rajesh.
2007 Feb 20 7:56 PM
Hi Rajesh,
Most BAPIs doesn't do a commit by themselves. And some other BAPIs have a flag which would let the system commit or not. Check if your BAPI has a parameter which flags the commit statement. Which BAPI are you referring to?
Regards,
Ravi
2007 Feb 20 8:02 PM
I am using a Standard BAPI used for insurance module. By the way, I meant BAPI <b>do not do</b> commit in itself (following standard SAP practice)
2007 Feb 20 8:07 PM
Hi Rajesh,
I think the first Option is the way to go, as it involves no Custom Coding.
If the BAPI was provided with no commit options, that itself indicates the necessity of making use of the bapi_transaction _commit or Rollbacl based on the success or failure of the BAPI.
Regards,
Ravi