‎2007 Aug 29 10:52 AM
i want to divide quantity field (vbrp-fkimg) by no of working days as entered by user.
how can i do it .please help.
points will be rewarded thanx
‎2007 Aug 29 10:55 AM
Define a variable,
Data : qty type p decimals 2.
and move yout quantity field to above variable and divide with interger.
Ex: MOVE vbrp-fkimg TO qty.
Regards,
SaiRam
‎2007 Aug 29 10:55 AM
Define a variable,
Data : qty type p decimals 2.
and move yout quantity field to above variable and divide with interger.
Ex: MOVE vbrp-fkimg TO qty.
Regards,
SaiRam
‎2007 Aug 29 11:13 AM
but my proggram is giving dump error .i write the follwing code
data : G_CHAR(16) type c.
parameters: p_code(2) type c .
plan type c.
Write final1-fkimg to G_CHAR.
final_int-plan = G_CHAR / p_code .
buton execution proogram is giving dump
can you explain why , please?
Message was edited by:
sarabjit kaur
‎2007 Aug 29 11:17 AM
instead of using char type variable u hav to use a variable of type p.its better u use
data::g_char type vbrp-fkimg.
parameters: p_code type i .
‎2007 Aug 29 10:56 AM
parameters:zdays type i.
parameers:zvbeln type vbrp-vbeln.
select posnr from vbrp into zposnr where vbeln = zvbeln.
select fkimg from vbrp into zfkimg where vbeln = zvben and posnr = zposnr.
zsum = zfkimg + zsum.
endselect.
zsum = zsum / zdays.
plz reward points if it helps
‎2007 Aug 29 11:19 AM
try this snippet
Paramters:zvbeln type vbrp-vbeln.
select
posnr from vbrp
into zposnr
where vbeln = zvbeln.
select fkimg
from vbrp
into zfkimg
where vbeln = zvben and posnr = zposnr.
zsum = zfkimg + zsum.
endselect.
zsum = zsum / zdays.
it works
regards
Giridhar