cancel
Showing results for 
Search instead for 
Did you mean: 

Item line value printing the previous value in sales order creation

Former Member
0 Kudos

hi everyone,

while creating sales order for two items. the values are showing correctly in screens.

but in preview and while printing the form alone the previous value is printing for two items.

ex: item 1 quantity in mts-50 rate 14661.60 - wrong value (13126) is the correct value.

item 2 quantity in mts-15 rate 14661.60 - correct value

using transaction va01 while printing the script it taking previous item head value.

thanks in advance

regards

karthe

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi every one,

i have corrected my program and checked in development server its working properly but after i moved it to the production server its not working there properly.

what could be the reason.

regards

karthe

arul_murugan
Active Participant
0 Kudos

Hi,

Debug the program and check whether the logic that you coded is correct or not#

Thanks

Arul

Former Member
0 Kudos

ermm item 1 can not have a previous item.

anyway, this strongly sound like a clear problem in your driver program. why dont you just debug it?

Former Member
0 Kudos

hi floriaan,

i have debuged it. its fetching the second item value initally.

this is my document type and condition coding.

elseif auart eq 'ZIM'.

tmeng = tmeng + gmeng.

tqty = tmeng.

if date1 < '20080229' or date1 = '20080229'.

tax = '16.48%'.

elseIF date1 < '20081206' or date1 = '20081206'.

tax = '14.42%'.

elseif date1 < '20090224' or date1 = '20090224'.

tax = '10.30%'.

ELSEif date1 < '20090224' or date1 = '20090224'.

tax = '8.24%'.

cst = 'AED 4%'.

else.

tax = '10.30%'.

cst = 'AED 4%'.

t1 = n1 + n2.

price = t1.

endif.

clear: t1,n1,n2.

select kBETR from konv into n1 where knumv = gknumv and kposn = gkposn and kschl eq 'ZINP' or kschl eq 'ZASV'.

ENDSELECT.

select kBETR from konv into n2 where knumv = gknumv and kposn = gkposn and kschl eq 'ZMUP'.

ENDSELECT.

    • txt = 'STOCK TRANSFER'.*

t1 = n1 + n2.

price = t1.

thanks in advance

karthe

arul_murugan
Active Participant
0 Kudos

Hi,

select.. endselect will work like a loop statement. So once after the select statement you will have the last line item's value in variable n1 and n2. Modify the select statement to get the correct value.

Thanks

Arul