2010 Jul 23 3:39 PM
Hi all.
My BDC will created and update the vendor. code is
Check the vendor existance using BAPI_VENDOR_EXISTENCECHECK.
IF VENDOR exist.
Update the VENDOR.
ELSE.
Create VENDOR.
ENDIF.
But the problem is, in case of update record come very next one of the creation of same record.
For the first record BAPI giving vendor doesn't exist and creating, it is fine but
For second one BAPI is giving vendor doesn't exist but the same is exist.
data
(1000091098 ''''''''' 1st record'
1000091098 ''''''''''') 2nd record
I can't use the select statement instead of BAPI.
Why the BAPI is getting fails to do. i am using commit work after BDC also.
Regards,
Sri
Hi all.
My BDC will created and update the vendor. code is
Check the vendor existance using BAPI_VENDOR_EXISTENCECHECK.
IF VENDOR exist.
Update the VENDOR.
ELSE.
Create VENDOR.
ENDIF.
But the problem is, in case of update record come very next one of the creation of same record.
For the first record BAPI giving vendor doesn't exist and creating, it is fine but
For second one BAPI is giving vendor doesn't exist but the same is exist.
data
(1000091098 ''''''''' 1st record'
1000091098 ''''''''''') 2nd record
I can't use the select statement instead of BAPI.
Why the BAPI is getting fails to do. i am using commit work after BDC also.
Regards,
Sri
2010 Jul 24 12:53 PM
Hi,
there is nothing wrong with BAPI. There are two ways to solve this,
1) Put wait after vendor creation
2) Call BAPI & creation of vendor only one time.Why we need to check the same vendor again
2010 Jul 27 8:03 AM
I got it.
The BAPI is getting from the data and keeping in buffer.so at next time it is checking against buffer values.
I copied BAPI into ZBAPI and passing buffer as X.
Regards,
Sri
2010 Jul 27 10:04 PM
I know it's solved (thank you for the feedback), but...
> The BAPI is getting from the data and keeping in buffer.so at next time it is checking against buffer values.
> I copied BAPI into ZBAPI and passing buffer as X.
As you are talking about a buffer, I thought you might be interested by this [wiki which explains why you MUST use BAPI_TRANSACTION_COMMIT instead of COMMIT WORK|http://wiki.sdn.sap.com/wiki/display/ABAP/BAPI_TRANSACTION_COMMITversusCOMMIT+WORK] when you use BAPIs, and what is this buffer about.
> i am using commit work after BDC also
Executing COMMIT WORK after a CALL TRANSACTION will have no effect on what is done inside the CALL TRANSACTION because it's done in a different LUW (see [sap library|http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbae4135c111d1829f0000e829fbfe/frameset.htm]).
2010 Jul 28 10:31 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |