How to display total amount field in PO layout
Dear All,
I have a query related to Purchase Order Printing.
I copied the standard programme SAPFM06P as ZSAPFM06P. I didn't make any changes to standard program.
I copied the standard layout MEDRUCK as ZMEDRUCK.
I am able to display all the data of PO but I am facing problem in displaying <b>Total Amount</b> field (i.e sum of amount and tax value).
How can we display the Total Amount in the layout without changing the Standard program. I want to make the changes only in ZMEDRUCK for this field.
My main window details are as follows :
MatNo MatDesc Uom Quantity rate amount <b>Total amount</b>
Here I am not able to print Total amount(amount + tax value)
Please help me on this .
Thanks & Regards
Rajvinder
Hi Rajvinder,
u need not be so much against changing the program.. infact it s the best way to get the desired output if its done properly...to be completely safe,wat u can do is insert a subroutine somewhere after the values have been populated in the program n then add these inside the subroutine to get the total in a different variable..in this way ur original data s intact n u can use ur new variable in the script as total..
neways if u dont want to change ur program, then u need to keep these things in mind..
the value of total & tax shud be available at the point of calling the perform from the sapscript so that u can pass those to a new program for addition.
eg :
while writing this in script
:/ perform add in program znew using &total& &tax& changing &final&
before this command u need to make sure that total & tax values r ther to pass to the program..
then u can write a FORM in ur znew to add these two n pass to final..
in sapscript u can then print &final&
Hope it helps,
Regards,
Bikash
Similar Messages
-
How to Call Total Amount field from t.code - PC00_M40_ANN in driver program
Hi,
There is a standard Transaction for Payroll Annual display - PC00_M40_ANN. From this transaction we can see the Pension Amount month wise and in Totals as well as.
In my report, we want to call Total Amount (from T.Code PC00_M40_ANN).
For Ref., I have design a Smartform with its driver program. In driver program i required this Value...
Plz guide..Hi,
Please check the below code ....
Declare variables , structures .....
call function 'CU_READ_RGDIR'
exporting
persnr = pernr-pernr <--- pass the pernr
importing
molga = w_molga
tables
in_rgdir = itrgdir
exceptions
no_record_found = 1
others = 2.
if not w_molga is initial.
call function 'CD_READ_LAST'
exporting
begin_date = pn-begda
end_date = pn-endda
importing
out_seqnr = w_seqnr
tables
rgdir = itrgdir
exceptions
no_record_found = 1
others = 2.
endif.
if itrgdir is initial.
continue.
else.
select single relid from t500l into w_relid where molga = w_molga.
call function 'PYXX_READ_PAYROLL_RESULT'
exporting
clusterid = w_relid
employeenumber = pernr-pernr
sequencenumber = w_seqnr
read_only_international = 'X'
changing
payroll_result = itresult
exceptions
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
others = 10.
get all the earnings and deductions
loop at itresult-inter-rt into wa_rt.
case wa_rt-lgart.
to get the net pay
when '/560'.
wa_pernr-npay = wa_rt-betrg.
v_npay = wa_rt-betrg.
endcase.
endloop. -
How to display total "items" and "amount " in header.jsp in CRM ISA B2B
Hi,
I am modifying header.jsp in standard CRM ISA B2B application. Here we have summary of total number of items and total amount but it is coming in to button and for that below code is there in header.jsp and it display it as button text.
if (!ui.homActivated) { %>
!!" alt="" border="0" height="16" width="20">
</td>
<td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.minibasket.default"/>" >
<form name="basketForm" action="javascript:show_basket();">
<input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.minibasket.default"/>"/>
</form>
</td>
<% } else { %>
<!-- HOM scenario - minibasket displays collective order -->
<td class="vertical-align-middle" align="right">
!!" alt="" border="0" height="16" width="20">
</td>
<td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.collorder.default"/>">
<form name="basketForm" action="javascript:show_collective_order();">
<input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.collorder.default"/>"/>
</form>
</td>
<% } %>
Now I want to display total number of items and total amount separately in two different <td> element.
How I can get total number of items and total amount in header.jsp I tried below code but did not get any success.
Insert below line in header.jsp with respective page import statement for class or let me know which class I have to import.
<%
HeaderSalesDocument hdr =
(HeaderSalesDocument) request.getAttribute(MaintainBasketBaseAction.RK_HEADER);
ItemList items =
(ItemList) request.getAttribute(MaintainBasketBaseAction.RK_ITEMS);
%>
And then I use
<td><%= hdr.getNetValue() %></td>
<td><%= items.size() %></td>
But it is not printing any thing and header page not display at all.
Pl. tell me how to get total amount and number of items in header area. Which class or object I have to use here.
I really appreciated any help from any one.
Thanks and regards.
Ashish Patel.Hi, I tried another logic. I took value from Standard button, in which B2B application display total items and amount and I hide this field, to another text element.
Now I Am breaking that value in words and stored them in array and then trying to display that array with particular number which contains total item and amount through Java Script on Focus.
But problem here is, It is not getting updated automatically I have to click on new text files to trigger Onfocus event. How I can achieve effect like as soon as Standard button changes it's value which is now hidden filed my new text box should update automatically.
Thanks.
Ashish -
How to display total in ALV Header
How to display total in ALV Header?
Hi Venkey,
As far as your issue is concerned I would like to quote my perception.
Create a header internal table with title and number of records.
At the later part of your program you should have found the total number of records ,now assign it to the header internal table and print it.
For further clarification you can go check this link:
http://wiki.sdn.sap.com/wiki/display/ABAP/AddHeadertoALVreport
Thanks
P.Srikanth -
How to put Total Amount only on the section last page?
I have been working on oracle purchasing report. I have used <?for-each@section:G_HEADERS?>. So report is paged based on new PO number. However, I have put a total amount on footer section. If the report with one specific PO number haas more than one page, for example, total page as 3, I'd like total field shows "Continued" on page 1 and 2, only list the total number on page 3. Does anyone know how to do that? The logic will be something like:
if (currentPageNum < sectionTotalPage), then 'Continued', else <?TOTALAMT?>. However, I don't know how I can get currentPageNum and how to get sectionTotalPage.
Edited by: user638845 on Apr 20, 2010 12:38 PM
Edited by: user638845 on Apr 20, 2010 12:47 PMHello,
thank you for your reply, but the situatiation is the following:
I have a dynamic form with two tabels, both of them are included into two separated subforms. And because I do not know how many lines will have each of them I have no clue how to force Designer to display the footer (or any object) at the very buttom on the last page only. I already included the footer into separated subform before I asked the question, but the problem is, that the footer is not displayed at the very buttom of the page, but directly behind the second tabel (subform). So it can happen that the second tabel will end at the top of the last page, it can have only 5 lines on the last page and in this case the footer will be displayed at the top or in the middle of the last page, not at the very buttom. This is my problem.
Thank you once again for any suggestions.
Best regards,
Jan Zahradnicek -
DIsplaying WRBTR (AMOUNT FIELD)WITHOUT DECIMAL PLACES
Dear all,
I am facing a problem in displaying amount field in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
How can I do it in a alv report if I have only one output amount field?
thanks
Ranjan.Hi chittaramjan,
1. use this kind of funda (just copy paste in new program)
Important things
a) one extra field in internal table
declared in the same exact fashion
waers LIKE tcurc-waers,
b) Populate this field
c) REST THE System will take care
(based upon country settings)
2.
REPORT abc.
TYPE-POOLS : slis.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : BEGIN OF itab OCCURS 0,
f1 LIKE P0008-BET01,
waers LIKE tcurc-waers,
END OF itab.
START-OF-SELECTION.
itab-f1 = '-4.15'.
itab-waers = 'KRW'.
APPEND itab.
itab-f1 = '4.68'.
itab-waers = 'GBP'.
APPEND itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = alvfc
TABLES
t_outtab = itab
EXCEPTIONS
OTHERS = 2.
regards,
amit m -
How to maintain the amount field format after GUI_DOWNLOAD
Hi everyone.
I have this problem on my object.
The format of field ERFMG in table AUFM is 3.921,569.
After I SELECT it INTO an internal table it becomes like this 3921.569
I would display this internal table in ALV and its ok. Its format is 3.921,569 The format is also not changed when I download it into an excel file using LIST -> EXPORT -> LOCAL FILE -> SPREADSHEET.
However my program should automatically download to local if the user tick a checkbox in the selection-screen. It will use function module GUI_DOWNLOAD. When this is used, the format of ERFMG changes to 3921.569 again, since it is using my declared internal table.
How will I use GUI_DOWNLOAD without changing the format of amount fields like ERFMG? What are my other options to do this?
The Decimal Notation in my User Profile is already set to 1.234.567,89
Thank you in advance.Hi Cris,
To get the output in the user format for the decimals, try the following code.
data: wg_dec(7) type p decimals 2.
data: wg_dcp type usr01-dcpfm.
data: wg_dec_str(10) type c.
wg_dec = '111135.67'.
select single dcpfm from usr01
into wg_dcp
where bname = sy-uname.
move wg_dec to wg_dec_str.
if wg_dcp ne 'X'.
replace all occurrences of '.' in wg_dec_str with ',' .
endif .
write:/ wg_dec, wg_dec_str.
I dont feel there is any other option where you can change the decimals format as per the user profile.
While giving the output of decimal values in a list, the system automatically displays it in the profile set by the user.
This code will help you to set the decimal value as '.' or ',' as per the user profile.
Note: It wont add the unit separator for hundreds and thousands. Again you have to do that manually.
Hope this proves of some help to you.
Regards,
Pulkit -
How to roll up Amount field upto Input Criteria Posting period
Hi All,
I have a requirement to create a FI Budget report where the User will give the Posting Period as the input criteria, and based on the entered Posting period, 2 amount fields, "Original Budget" & "Current Month" need to get derived by looking at another amount field called actual, by rolling up the Amounts up to the entered Posting period.
For example, the user gives input as Posting period = 06, which is December because Fiscal year starts from July here. And my Cube has an amount field "Actual" which displays amount for each posting period. Therefore when posting period = 06, then the "Actual" amount value for months July (PP = 01) through December (PP = 06) should be rolled up i.e added and displayed in the "Original Budget field". The Current month should only display the amount for the input criteria month.
How can I do that, any suggestions please?
Thanks!!Hi Sam,
Is there any way i could do it without the SAP Exit? If yes, how? If no, can u specify in the document you sent, which code i could use as reference for my requirement?
Thanks -
How to display total for a column in updateble report
How can I display total on a report column?
the query is
select htmldb_item.checkbox(1,invoice_id) invoice_id,
htmldb_item.DISPLAY_AND_SAVE(2,invoice_no,15)invoice_no,
htmldb_item.DISPLAY_AND_SAVE(3,to_char(invoice_date, 'DD-MON-YYYY'),20) invoice_date,
htmldb_item.DISPLAY_AND_SAVE(4,net_amount,15) NET_AMOUNT,
htmldb_item.text(5,net_amount,null,10) amount_adj,
htmldb_item.text(6,net_amount,null,10) actual_amt
from INVOICE
where OWNER_TYPE = 'CUSTOMER'
and OWNER_ID = :P57_CUSTOMER_NAME
group by invoice_id,invoice_no, invoice_date,net_amount
In the report column attributes the sum column is checked for the sal field
When I run the report, I get a Sub-total of 0 and a Report Total of 0. What am I doing wrong?
thanksSunil,
Which column is the sal column? I canât see any numeric columns in your query. If you use htmldb_item calls in your query column, then this makes them strings and you canât build sums on string columns. If you want to build sums in an updateable report / tabular form, then donât use the htmldb_item API. Instead use the built-in display types on the report column attributes page. Using the built-in display types is the better options in most cases anyway and they do allow you to calculate sums even if the column is a text field or display and save type field.
Regards,
Marc -
Alignment required in to display the Amount field
Hi Friends,
kindly help me facing problem in to display the amount using decimal places also
nedd to display the Pretax and aftertax amount for that purpose
written below code .
it is picking amount fields but the amount is printing like this
pretax aftertax
$ 34.67 $ 0.00
$ 21.64 $ 120.90->
I need to display amount fields in order like, thens, hundreds, thousands like.
read table lt_final into ls_final with key bplan = 'PRD'.
if ls_final-pretx = 'X'.
pretax = ls_final-eecst.
write pretax to lv_pre. "#EC UOM_IN_MES
concatenate c_dollar lv_pre into lv_dollar.
shift lv_dollar right deleting trailing space.
*Pretax totals
lv_pretax = lv_pre.
read table out_pay1 with key name = 'PRETAX'.
check sy-subrc = 0.
out_pay1-value = lv_dollar.
modify out_pay1 index sy-tabix.
clear out_pay1.
else.
aftertax = ls_final-eecst.
write aftertax to lv_after.
concatenate c_dollar lv_after into lv_dollar1.
shift lv_dollar1 right deleting trailing space.
Aftertax totals.
lv_aftertax = lv_after.
read table out_pay1 with key name = 'AFTERTAX'.
check sy-subrc = 0.
out_pay1-value = lv_dollar1.
modify out_pay1 index sy-tabix.
clear out_pay1.
endif.
Thanks,
SaiHi Daya,
I would like to print two amount values with decimals.
like : like Pretax after tax
$ 0.00
$ 3.45 $ 120.67
$ 0.00 $ 0.00
I created using right justification one paragraph format with two tabs
60.00 ch Right
68.00 ch Right
But my program output is comming like this.
any one please help me.
Program output:
Pretax after tax
$ 0.00
$ 3.45 $ 120.67
$ 0.00 $ 0.00
Thanks,
Sai -
How to print total amount in last page of purchase orde using xml publisher
Hi
I customizing purchase order report using xml publisher.
i have to print total amount at last every purchse order.
how to compare carry forward amount in xml publisherI think the guys overhere :
BI Publisher
can help you a lot better -
How to display total in a block without total showing up in relevant detail block
Hi there,
I create a worksheet, including two block, one of which have detail information with multiple characts and one key figure, another block only have sumerization information takes one cell, which is summarized key figure for that detail information block.
I implement this summary cell with formula 'GETDATA', but it is only effective after I show total for detail block.
such as for detail block:
employee_no, wage type, earning_amount.
overall result total for earning_amount
for summary block:
summary of earning_amount for all employees in the detail block.
please tell me how to display summary block without pulling in overall result for detail block.
Many Thanks,Hi bo zhang,
This can be a work around
As Michael Tocik suggested
goto components tab, right click on data source and select copy
do not insert cross tab
then use the formula for DS_2 like
=SAPGetData("DS_2","earning_amount","employee_no=TOTAL")
this should work.
and if you do any drill down for DS_1, the above total will not chnage because that is dependent on DS_2
Hope it helps
Best Regards,
Subhash -
How to club the amount field for the particular customer from file
Hi ,
In my BDC i am getting the Amount field which is need to be put in the Header data . For 1 Customer there are more than 5 line in amount field in the Excel file.
For the Particular Customer , I need to club all the amount ffield and put it into the Heade data for the customer.
How to do this .
Thanksgot answer
-
How to display/create Local field in SAP query
HI All,
I'm new to abap query. I have to include a local field in the existing query. I know through SQ01->Edit->Local field we can display the Local fields, but the options under Local Fields menu option are disable even in change mode of Query.
So, later through SDN found that, I have to Switch On the short names menu option. Even the sub-options in Short Names are disabled.
Can any body please let me know how can we display the local fields to the change the formula and how can we create the new local fields in the existing qeury.
Hope I'm able to explain my issue clearly.
Thanks in advance.You can create the local fields in the "Select Field" screen. (Third screen after "Title, Format" and "Select Field Group") This option is disabled on the other screens.<br />
<br />
<i>Reference : <a class="jive-link-external" href="http://help.sap.com/saphelp_NW70EHP1/helpdata/en/d2/cb4186455611d189710000e8322d00/frameset.htm" target="_newWindow">Defining Local Fields</a> in <a class="jive-link-external" href="http://help.sap.com/saphelp_NW70EHP1/helpdata/en/d2/cb3efb455611d189710000e8322d00/frameset.htm" target="_newWindow">SAP Query</a>.</i><br />
<br />
Regards,<br />
Raymond -
How to calculate total for field for particular day. in smart forms
hi,
pls help in this problem,
how to calculate cumulative totals for the particular field in samrtformsHi ,
Either you can calculate the sum in driver program with
Loop at where Condition .
Sum the required field .
endloop .
Then pass it to smartforms
Or
Double Click on table node .
In the conditions tab give the required condition .
select calculation tab.
In operation select Total , in field name give the name of the field you want to sum
and in targer field name specify the name of the field that should contain the result .
To convert the total in to words use the function module in program lines
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
EXPORTING
amt_in_num = w_total
IMPORTING
AMT_IN_WORDS = w_total_words
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
Regards
Maybe you are looking for
-
Issue with Variable Substitution
Hi, We have a scenario where we need to use the data from Payload for further processcing of the messeges.The payload looks like the one given below. <?xml version="1.0" encoding="utf-8" ?> - <ns1:MT_NOTIFICATION xmlns:ns1="http://WM_ERRHAND" xmlns
-
Adding images to rows in a table depending on file type
Hello, Within Visual Composer we have a table which lists documents and contains information about the document type i.e. description = 'This is a Word Document', file type = 'application/msword' then I have uploaded the images (icons) for the differ
-
HI All, When I am creating DME file after payment run intermediately bank details are missing in the DME file. If I run the same for the other company code then I can see the intermediately Bank details. Both the case use same payment method. Advice
-
Want to connect sqlplus through linux
Hi Friends I am newbie to Linux . I am working as oracle DBA on 10g . Till last day I had worked on windows platform. Now my company want me to work on Linux platform . I am first time using Linux dont know A,B,C of Linux . I want to connect sqlplus
-
SVN support in JDev 9.0.5???
Hi! I was wondering if there's svn support on JDev 9.0.5.16.27? (our team has already tried cvs and didn't like it) I've been looking for some information about it, but I couldn't find anything. Could anyone help me with some urls? In case there's no