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

BDC

Former Member
0 Likes
686

Hi Gurus,

I am doing a bdc for inspection plans(QP01).

First il call transaction for QP01 and after that if sy-subrc = 0. I will call transaction QP02.If i set a break point in the code if sy-subrc = 0 ,it is working properly but if i dint set any break point the code if sy-subrc = 0 it is not calling QP02.

What is the problem.

CALL TRANSACTION 'QP01' USING bdcdata MODE 'N'

MESSAGES INTO messtab.

if sy-subrc = 0.

read table messtab with key msgnr = '063'

msgid = 'QP'.

if sy-subrc = 0.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = messtab-MSGID

LANG = 'EN'

NO = messtab-msgnr

V1 = messtab-MSGV1

V2 = messtab-MSGV2

V3 = messtab-MSGV3

V4 = messtab-MSGV4

IMPORTING

MSG = v_mess

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2 .

IF sy-subrc = 0.

l_group = messtab-msgv1.

PERFORM qp02.

ENDIF.

ENDIF.

ENDIF.

Regards ,

Ashok...

1 ACCEPTED SOLUTION
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
654

Hi

Instead of sy-subrc use wait.

After QP01 you can use

wait for n .

then call perform QP02.

It can work.

Regards,

kumar

5 REPLIES 5
Read only

Former Member
0 Likes
654

Use the UPDATE = 'S' in the call transaction.

CALL TRANSACTION 'QP01' USING bdcdata MODE 'N' <b>UPDATE = 'S'</b>

MESSAGES INTO messtab.

REgards,

Ravi

Read only

Former Member
0 Likes
654

instead of putting a breakpoint after sy-subrc = 0 put this syntax.

wait up to 5 seconds.

Now execute it & see.

Still u get the same error increase the seconds from 5 & check it.

Read only

former_member404244
Active Contributor
0 Likes
654

Hi,

use update in the call transaction......

CALL TRANSACTION 'QP01' USING bdcdata MODE 'N' update = 'S'

MESSAGES INTO messtab.

if sy-subrc = 0.

read table messtab with key msgnr = '063'

msgid = 'QP'.

if sy-subrc = 0.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = messtab-MSGID

LANG = 'EN'

NO = messtab-msgnr

V1 = messtab-MSGV1

V2 = messtab-MSGV2

V3 = messtab-MSGV3

V4 = messtab-MSGV4

IMPORTING

MSG = v_mess

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2 .

IF sy-subrc = 0.

l_group = messtab-msgv1.

ENDIF.

ENDIF.

PERFORM qp02.

ENDIF.

Regards,

Nagaraj

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
655

Hi

Instead of sy-subrc use wait.

After QP01 you can use

wait for n .

then call perform QP02.

It can work.

Regards,

kumar

Read only

Former Member
0 Likes
654

Ashok,

I have faced the same problem.What i found is When i debugged sy-subrc

became 0,though error is there.So final statement is in debugg especially under call transaction sy-subrc = 0.

Pls. reward if useful