Application Development 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: 

Problem in three BDC s running in succession and database updates.

Former Member
0 Kudos

Hi All,

I am facing a problem in a program having three BDCs(using CALL TRANSACTION method).

First BDC for transaction MIRO runs, then BDC for transaction F-02 and finally BDC for transaction F-44.

It is observed that when run in debugging mode, the three BDCs run perfectly fine.

But when executed online, only first BDC runs perfectly and rest two fail. The scenario is developed for intercompany invoice posting and handling accounting documents accordingly.

It seems after the fist BDC runs, it is required some time to happen database updates and failing which second and thirds BDCs fail being interdependent in sequence. After first BDC is run, there are select queries which are responsible for fetching appropriate data from database and build second BDC and same in case of third. That is after second BDC is run , there is again a select query which fetches data to build third BDC.

When executed in debugging mode, because it takes sufficient time gap, the second and hence third BDC runs perfectly fine.

Please guide me to tackle this problem.

Thanks,

Ameet

Problem in three BDC s running in succession and database updates.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

UPDMODE IS UPDATE..

[CALL Transaction|http://help.sap.com/saphelp_sm32/helpdata/EN/fa/09715a543b11d1898e0000e8322d00/content.htm]

Was your issue resolved,

If not use WAIT.

Regards,

Gurpreet

5 REPLIES 5

Former Member
0 Kudos

Hi,

Use UPDMODE = 'S'.    " Synchoronus Update

Call transaction 'XX' UPDATE 'S'.

Call transaction update mode is Asyncronus always.

So that the reason the if there is a time gap the records are suvessfully updated.

So always use Synchronous database updates.

This will resolve the issue.

Regards,

Gurpreet

0 Kudos

Hi GP,

I have used statement,

CALL TRANSACTION 'XYZ' USING i_bdcdata MODE 'E' UPDATE 'S'

MESSAGES INTO it_bdcmsgcoll .

Is it something different than that specified by you as 'UPMODE'?

Thanks,

Ameet

Former Member
0 Kudos

Hi,

In between 2 BDC's wait for a while in order to ensure that database has been updated. This can be achieved by using:

CALL FUNCTION 'ENQUE_SLEEP'

EXPORTING

SECONDS = 10

  • EXCEPTIONS

  • SYSTEM_FAILURE = 1

  • OTHERS = 2

I hope this helps,

Regrads

Raju Chitale

Former Member
0 Kudos

hi,

In the program just before the second CALL TRANSACTION 'XXXX', use 'WAIT' statement inorder to delay the execution for particular amount of time.

Thanks

Sharath

Former Member
0 Kudos

Hi,

UPDMODE IS UPDATE..

[CALL Transaction|http://help.sap.com/saphelp_sm32/helpdata/EN/fa/09715a543b11d1898e0000e8322d00/content.htm]

Was your issue resolved,

If not use WAIT.

Regards,

Gurpreet