‎2008 Apr 08 9:07 AM
Can anyone explain in detail how to correct output QUAN/CURR errors
‎2008 Apr 08 9:23 AM
Hi ,
types : begin of st_vbak,
vbeln type vbeln,
vbtyp type vbtyp,
netwr type netwr,
end of st_vbak.
data : it_vbak type standard table of st_vbak,
wa_vbak type st_vbak.
select vbeln vbtyp netwr
from vbak
into table it_vbak
where vbeln eq '0000000014'.
loop at it_vbak into wa_vbak.
write : wa_vbak-vbeln,
wa_vbak-vbtyp,
wa_vbak-netwr.
endloop.
*if u try to check EPC for the above code it wil show
output quan/curr error.so u need to define the
referrence field and also use it in write statement
with CURRENCY addtion.see the code below after correction.
types : begin of st_vbak,
vbeln type vbeln,
vbtyp type vbtyp,
netwr type netwr,
end of st_vbak.
data : it_vbak type standard table of st_vbak,
wa_vbak type st_vbak.
data : WAERK like vbak-WAERK.
select vbeln vbtyp netwr
from vbak
into table it_vbak
where vbeln eq '0000000014'.
loop at it_vbak into wa_vbak.
write : wa_vbak-vbeln,
wa_vbak-vbtyp,
wa_vbak-netwr CURRENCY WAERK.
endloop.
reward if useful
‎2008 Apr 08 9:09 AM
‎2008 Apr 08 9:23 AM
Hi ,
types : begin of st_vbak,
vbeln type vbeln,
vbtyp type vbtyp,
netwr type netwr,
end of st_vbak.
data : it_vbak type standard table of st_vbak,
wa_vbak type st_vbak.
select vbeln vbtyp netwr
from vbak
into table it_vbak
where vbeln eq '0000000014'.
loop at it_vbak into wa_vbak.
write : wa_vbak-vbeln,
wa_vbak-vbtyp,
wa_vbak-netwr.
endloop.
*if u try to check EPC for the above code it wil show
output quan/curr error.so u need to define the
referrence field and also use it in write statement
with CURRENCY addtion.see the code below after correction.
types : begin of st_vbak,
vbeln type vbeln,
vbtyp type vbtyp,
netwr type netwr,
end of st_vbak.
data : it_vbak type standard table of st_vbak,
wa_vbak type st_vbak.
data : WAERK like vbak-WAERK.
select vbeln vbtyp netwr
from vbak
into table it_vbak
where vbeln eq '0000000014'.
loop at it_vbak into wa_vbak.
write : wa_vbak-vbeln,
wa_vbak-vbtyp,
wa_vbak-netwr CURRENCY WAERK.
endloop.
reward if useful