‎2008 Dec 05 10:33 AM
hi,
iam working on va02 bapi upload data from excelsheet into sap.
but when iam executing it iam getting an error:
Error :
SD document 4970 is not in the database or has been archived
for VBELN: 4970
for any sales orderno its giving the same error.
thanks
Edited by: Julius Bussche on Dec 5, 2008 12:23 PM
‎2008 Dec 05 10:40 AM
hi,
First check the existing orders in your system from va03 or vbak,vbap tables and then
try to use the bapi.
‎2008 Dec 05 10:44 AM
>
> hi,
>
> iam working on va02 bapi upload data from excelsheet into sap.
> but when iam executing it iam getting an error:
>
> Error :
> SD document 4970 is not in the database or has been archived
> for VBELN: 4970
> for any sales orderno its giving the same error.
> thanks
Hi
That is because of the leading zeroes, If you see in the database table..the value 4970 will be stored like this:000004970. So, as there is mismatch between your excel value and the one in database..it is giving that error.
So, Use Conversion FM like this before passing the number to BAPI:
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = vbeln "variable or internal table field which holds the excel values.
IMPORTING
OUTPUT = vbeln
.Regards,
Vishwa.
‎2008 Dec 05 10:51 AM
hii
this error comes because value you are entering is wrong.here you have two optios to remove this error.first you need to enter same length value like '0000004970' like this in excel sheet.second solution is to use following FM.
data:
w_vbeln LIKE vbak-vbeln.
w_vbeln = ls_data-vbeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_vbeln
IMPORTING
output = w_vbeln.
ls_data-vbeln = w_vbeln.regards
twinkal