‎2007 Feb 27 9:29 AM
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...
‎2007 Feb 27 9:35 AM
Hi
Instead of sy-subrc use wait.
After QP01 you can use
wait for n .
then call perform QP02.
It can work.
Regards,
kumar
‎2007 Feb 27 9:30 AM
Use the UPDATE = 'S' in the call transaction.
CALL TRANSACTION 'QP01' USING bdcdata MODE 'N' <b>UPDATE = 'S'</b>
MESSAGES INTO messtab.
REgards,
Ravi
‎2007 Feb 27 9:32 AM
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.
‎2007 Feb 27 9:34 AM
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
‎2007 Feb 27 9:35 AM
Hi
Instead of sy-subrc use wait.
After QP01 you can use
wait for n .
then call perform QP02.
It can work.
Regards,
kumar
‎2007 Feb 27 9:42 AM
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