on 02-10-2009 8:38 AM
Moved to correct forum by moderator. Please use more informative subject in future.
hi
1)one field gross_amount is not printing in the main window line items.
while total of line items corresponding to this field is coming on total window.
when i debug the script the value corresponding the gross amount field is coming as 48.00
2 nd problem--> there are 22 line items showing in first page main window corresponding to discount field and in the total window it is showing the sum of 23 line items (discount amount field)
that means it is taking the one more line item from next page(22 line items of first page + 1 line item of next page) and then showing the sum in total window as 23 line iterms sum
regards
atul
Edited by: Matt on Feb 10, 2009 9:48 AM
use &symbol(.N)& Display upto N decimal places ..to display decimal values correctly
Create a footer window to display the total for the page.
Sum the discount field in the loop inside the main window:
v_total = v_total + discount_field.
Inside the footer window display the v_total. remember to clear the variable at new page. You can store the page number in a variable. if &SFSY-PAGE& Current page number is not equal to the previous page number..clear the v_total field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
See if u have enclosed field in &XXX&.
See the dimensions of main window and total window,they might be overlapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
i am using the following code to print this gross amount field
FORM f3000_get_vat_percentage
TABLES ta_in_table STRUCTURE itcsy
ta_out_table STRUCTURE itcsy.
DATA : w_vbeln LIKE vbrk-vbeln,
w_vbelv LIKE vbfa-vbelv,
w_knumv LIKE vbak-knumv,
w_posnr LIKE vbrp-posnr,
w_discount LIKE konv-kbetr,
w_quantity(17) TYPE c,
w_unit_pr(17) TYPE c,
w_gross_amt(20) TYPE c,
w_sum(17) TYPE c.
*"Clearing Variables
CLEAR : w_vbeln,
w_posnr,
w_quantity,
w_unit_pr,
w_vat,
w_gross_amt.
UNASSIGN <fs_itcsy>.
LOOP AT ta_in_table
ASSIGNING <fs_itcsy>.
IF sy-subrc NE 0.
EXIT.
ENDIF.
CASE <fs_itcsy>-name.
WHEN 'ZVXX_OE_INV_ITEM-FKIMG'.
MOVE <fs_itcsy>-value TO w_quantity.
WHEN 'ZVXX_OE_INV_ITEM-NETWR'.
MOVE <fs_itcsy>-value TO w_unit_pr.
*"NO Processing for WHEN OTHERS
WHEN OTHERS.
ENDCASE.
*"End Of Looping Internal table i_in_table.
ENDLOOP.
w_gross_amt = w_quantity * w_unit_pr.
READ TABLE ta_out_table
ASSIGNING <fs_itcsy> INDEX 2.
IF sy-subrc EQ 0.
MOVE w_gross_amt TO w_sum.
SHIFT w_sum LEFT DELETING LEADING space.
MOVE w_sum TO <fs_itcsy>-value.
ENDIF.
endform.
Please use more informative subject in future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.