on 02-19-2008 3:32 PM
Hi To All,
In scripts i need to calculate the page totals.that means for a customer i have lot of invoices for example my line items has been displayed in three pages, then in 1st and 2nd page i need to calculate the page total.and then for 3rd page i need to calculate the total.(but i don't that for a customer how many invoices are there).very urgent........
U can check the standard form : f140_acc_stat_01
correspondence type is:sap06
For the above form i made modifications as well here i need to get the valuse for due now, due later and past due.can any one provide me the logic or field mappings.
<REMOVED BY MODERATOR>
Thanx and regards,
loki
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 11:37 AM
&PAGE(Z)& displays the pagenumber you are on
&SAPSCRIPT-FORMPAGES(C)& displays the total number of pages
no need to calculate anything sap-script does that for you
just use:
AQ Page &PAGE(Z)& of &SAPSCRIPT-FORMPAGES(C)&
while AQ is just the paragraph format
Edited by: Florian Kemmer on Feb 19, 2008 4:36 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hmmm ok, i dont aks why you need that
ok in your SAP-SCRIPT form there is a text element called "ITEM_LINE".
this is beeing called once for every ITEM you print.
in this text element make a external perform.
like:
/E ITEM_LINE
/: DEFINE &ITEM_COUNT& = ' '
/: perform calculate_item_count in program YOUR_PROGRAM
/: changing &ITEM_COUNT&
/: endperform
your external perform shoulöd then look like:
form calculate_item_count tables in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
statics: lv_count type i.
lv_count = lv_count +1.
read table out_tab
with key name = 'ITEM_COUNT'.
if sy-subrc = 0.
out_tab-value = lv_count.
modify out_tab index sy-tabix.
endif.
endform.
well the variable ITEM_COUNT you defined in your form is now accesible throughout the whole form, and can be printed, like other variables.
i hope i got you right this time
Edited by: Florian Kemmer on Feb 19, 2008 4:59 PM
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.