‎2011 Apr 14 7:47 AM
Hi all,
Iam passing one value through select statement into a variable " v_knumv ".
In debugging mode, the variable getting the value updated.
But when I run the program normally (without debug mode), the value not getting updated, it is showing empty value.
What might be the problem.
SELECT SINGLE knumv FROM vbak INTO v_knumv
WHERE vbeln = salesdocument.
Please look into this
Thanks
Murali
‎2011 Apr 14 8:17 AM
Are you sure?
Use return codes to check if it found a record (sy-subrc)
Also maybe it did find the record but the field was empty .
Kind regards, Rob Dielemans
‎2011 Apr 14 9:29 AM
Hi Rob,
Thanks for the reply.
Checked the sy-subrc value. it is initial only.
But after the select query, I have used commit work .
Now my problem is resolved.
I think, while debugging, the select query is taking some time to update from database. that s why after commiting, it is getting the value.
Thanks,
Murali
‎2011 Apr 14 8:21 AM
Hi,
Please check the below code. working fine.
data v_knumv like vbak-knumv.
PARAMETERS docnum like vbak-vbeln.
SELECT SINGLE knumv FROM vbak INTO v_knumv
WHERE vbeln = docnum.
write: v_knumv.
‎2011 Apr 14 8:56 AM
Hi,
Check if the field is being cleared later on in the code.
Regards,
Ernesto.