HI all,
My issues is as follows. I am backflushing a Serial Number & Material.
I'm giving the sceudo code to explain the issue more clearly.
Call funtion 'RM_BACKFLUSH_GO'
importing
parameter = lv_mat_doc
if sy-subrc = 0.
commit work and wait.
information message to user
do 3 times
select tbnum from mseg into lv_tbnum where mblnr = lv_mat_doc
if sy-subrc = 0.
exit.
else
wait up to 2 seconds.
endif.
enddo.
do 3 times.
select tanum from ltbp where tbnum = lv_tbnum
if sy-subrc = 0.
exit.
else.
wait up to 2 seconds.
endif.
enddo.
do 3 times.
select nlenr from ltap where lanum = lv_tanum
if sy-subrc = 0.
exit
else.
if sy-index = 3.
error message.
endif.
wait up to 2 seconds.
endif.
enddo.
endif.
The select statement in bold letters(3rd) is failing in normal program execution. but the same select is working fine when i am running the program in debugging mode or give an information message(striked above) to the user. I think the problem is I'm accessing LTAP table before an entry is made by the system(thru function module above). User don't want the information message to be displayed and i increase the time lag even up to 30 seconds by do 15 times its not working. So, I'm stuck.
Can anybody please let me know, how can I fix this problem.
Thanks n Regards
Maruthi