Summing of all Items in PO
Moved to correct forum by moderator
Hi Experts,
I want to sum all the Item price in script. How can i do that.
Regards,
Ramana
Edited by: Matt on Nov 7, 2008 1:10 PM
Inside a subroutine, Just Sum field NETWR from table EKPO with the current PO Number.
But this is exclusive of taxes.
Select sum( netwr ) from ekpo into lv_netwr where ebeln = 'PO Number'.
Regards
Karthik D
Similar Messages
-
Header tax conditions....sum of all item level condition
Dear Gurus,
I do get item level conditions using KONV.
Now as per my requirement, I need all these item wise taxes summed up at header level.
i.e total tax per condition per item.
Please help me.
Regards,
Roshan Lilaram.Dear Anil,
I will get these details item wise.
I need all these together.
If i have three items then at the header level i get the total of all these three items.
I hope i am making my issue clear.
Regards,
Roshan Lilaram. -
Scripts:totaling of all items
hi
i am facing a small problem
actually i used the below code for summing of all items coming into g_dmshb and g_mhngf.
but am not able to get get overall total am able to get only for last two items
can u suggest me whether the above code is correct or not
thank u
LOOP AT INTAB WHERE NAME = 'F150D-MHNGF' .
IF SY-SUBRC = 0.
MOVE INTAB-VALUE TO G_MHNGF1.
G_MHNGF1 = INTAB-VALUE .
ENDIF.
ENDLOOP.
G_TOT2 = G_DMSHB + G_MHNGF1.
DATA G_TOT3(15).
CLEAR OUTTAB.
READ TABLE OUTTAB WITH KEY NAME = 'G_TOT2'.
IF SY-SUBRC = 0.
WRITE G_TOT2 TO G_TOT3 CURRENCY 'GBP'.
OUTTAB-VALUE = G_TOT3.
CONDENSE OUTTAB-VALUE NO-GAPS.
MODIFY OUTTAB INDEX 1 TRANSPORTING VALUE.
ENDIF.Hi,
There is an error in your logic see my comments at the side of your code.
LOOP AT INTAB WHERE NAME = 'MHND-DMSHB' .
if sy-subrc = 0.
replace ',' in intab-value with '' .
condense intab-value no-gaps.
Here the value of intab-value is moved to g_dmshb
move intab-value to g_dmshb.
endif.
*g_tot1 = g_dmshb + intab-value.
g_tot2 = g_tot1 + intab-value.
reAD TABLE INTAB WITH KEY NAME = 'F150D-MHNGF'.
IF SY-SUBRC = 0.
MOVE INTAB-VALUE TO G_MHNGF1.
*G_MHNGF1 = INTAB-VALUE .
ENDIF.
Now here you add it to g_tot2
g_tot2 = g_dmshb + g_mhngf1.
endloop.
In accumulating a value the logic shoud be like
Loop
a = a + b.
endloop.
So your code should look something like this
LOOP AT INTAB WHERE NAME = 'MHND-DMSHB' .
if sy-subrc = 0.
replace ',' in intab-value with '' .
condense intab-value no-gaps.
move intab-value to g_dmshb.
Here you add g_dmshb to g_tot2
add g_dmshb to g_tot2.
endif.
reAD TABLE INTAB WITH KEY NAME = 'F150D-MHNGF'.
IF SY-SUBRC = 0.
MOVE INTAB-VALUE TO G_MHNGF1.
ENDIF.
Here you add g_mhngf1 to g_tot2 so you have the sum of
both for entries with name = MHND-DMSHB and F150D-MHNGF
g_tot2 = g_tot2 + g_mhngf1. "<- should be like this
endloop.
If you want an optimized code try this one below.
LOOP AT INTAB WHERE NAME = 'MHND-DMSHB' .
IF sy-subrc = 0.
REPLACE ',' IN intab-value WITH '' .
CONDENSE intab-value no-gaps.
MOVE intab-value TO g_dmshb.
ENDIF.
READ TABLE INTAB WITH KEY NAME = 'F150D-MHNGF'.
IF SY-SUBRC = 0.
MOVE intab-value TO g_mhngf1.
ENDIF.
Here you add g_mhngf1 to g_tot2 so you have the sum of
both for entries with name = MHND-DMSHB and F150D-MHNGF
code should be like this:
g_tot2 = g_tot2 + g_dmshb + g_mhngf1.
ENDLOOP. -
Sum of all line items and display at the bottom of the page
Hi ABAPers,
I am displaying line items in the main window based on PO number ....and I've a coloumn Total amount.
My requirement is after the line items , the grand total which is the sum of all line items has to be displayed.
Is this possible. If so, can anybosy help me in that.
thanks in advanceHi ,
It is possible.
For that u have to do following
take one variable of same type on which you want to calculate total ... declare in global variable
double click in the table goto the calculation tab in that give the variable on which u want to calculate total
print in the total in the footer of the table ..
Hope you resolve your problem
Let me know any concerns...... -
How to sum all items in a list in applescript?
Hey guys,
I wanted to sum all items of a list full of numbers and divide the number by the count all items of a list, is there a easy way to do this?
Thank you so much in advanceYou didn't say which is the source of the list.
Assuming that the list isn't extractyed from a Numbers table Niel's answer is OK.
If you installed the free OSAX Satimage
http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html
you may study its arrays functions.
For this tool, a list is a simple array so you may apply the function statsrecord
Yvan KOENIG (VALLAURIS, France) samedi 4 février 2012
iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
My Box account is : http://www.box.com/s/00qnssoyeq2xvc22ra4k -
Printing only one line record with total of all items through alv
hi experts,
i am facing a problem while printing a list through alv.
requirement is, suppose i have 3 line items under one document no.
i have to print only one record with total amount of all items.more clearly...
1001 10 1000/-
1001 20 234/-
1001 30 540/- these records in internal table then i am passing it to reuse_alv_grid_display.
i need to display only 1001 1774/-(means sum of all the items)
please tell me how to do this.
thanks in advance,
manasihi ansari,
contains in itab
3000000004 02.11.2000 5550 27.95 27.95 0
3000000004 02.11.2000 5550 10.95 10.95 0
3000000005 02.11.2000 5550 27.95 27.95 0
3000000005 02.11.2000 5550 10.95 10.95 0
3000000006 02.11.2000 3020 52.99 52.99 0
3000000006 02.11.2000 3020 64.99 64.99 0
3000000006 02.11.2000 3020 49.5 49.5 0
3000000007 02.11.2000 3730 2,228.00 2,228.00 0
3000000007 02.11.2000 3730 1,698.00 1,698.00 0
3000000007 02.11.2000 3730 532 532 0
now please tell me how to print the data
output will be
3000000004 02.11.2000 5550 38.90 38.90 0
3000000005 02.11.2000 5550 38.90 38.90 0
3000000006 02.11.2000 3020 117.19 117.19 0
like that
please help me out
manasi -
Need help in query to have all items in sap with PO data on order, date
Hello Everyone,
I need some help in writing a query to show all items in sap db to have itemcode, itemname, onhand, sellable(onhand-committed), on order, and the delivery date when that time should be received. I need to know what items are regular items, which ones are master and components. For the master I need to have the deliver date of the PO for the component.
I have written this.
SELECT DISTINCT TOP (100) PERCENT T1.ItemCode, SUM(T1.Sellable) AS Sellable, T1.OnOrder, MAX(T1.Docduedate) AS DeliveryDate, T1.WhsCode
FROM (SELECT ItemCode, Sellable, OnOrder, '1/1/1900' AS Docduedate, WhsCode
FROM dbo.V_RAZ_StoreInv
UNION ALL
SELECT TOP (100) PERCENT ItemCode, '0' AS Sellable, Quantity AS Onorder, DocDueDate, WhsCode
FROM dbo.V_RAZ_OPENPOSDATA
ORDER BY ItemCode) AS T1 LEFT OUTER JOIN
dbo.V_RAZ_ItemInfo ON T1.ItemCode = dbo.V_RAZ_ItemInfo.ItemCode
GROUP BY T1.ItemCode, T1.OnOrder, T1.WhsCode, dbo.V_RAZ_ItemInfo.OnHold
HAVING (dbo.V_RAZ_ItemInfo.OnHold = 'n')
ORDER BY T1.ItemCode, T1.WhsCode
and for the v_raz_openposdata I have the following query
SELECT dbo.OPOR.DocNum, dbo.OPOR.DocStatus, dbo.POR1.WhsCode, dbo.POR1.ItemCode, dbo.POR1.Dscription, dbo.POR1.Quantity, dbo.POR1.OpenQty,
dbo.POR1.LineStatus, dbo.OPOR.DocDueDate
FROM dbo.OPOR LEFT OUTER JOIN
dbo.POR1 ON dbo.OPOR.DocEntry = dbo.POR1.DocEntry
WHERE (dbo.OPOR.DocStatus = 'O')
Any help is greatly appreciated.
Right now I do get the delivery date for regular items and components but the master sku for the component all of them have 1/1/1900.
Thank youThank you for replying Gordon. I did not remember I had asked this before. I no longer have access to the other account.
What I need on the query is that I want a list of items with the on order quantity and when we are expecting this order to be received. The receiving date is based on the PO delivery date. The trick here is that I need to Master sku to show the delivery date of the component sku. In my scenario all components have the same delivery date for the Master sku. If there are mulitple delivery dates because each warehouse is getting them on a different date then I want to get the delivery date for that warehouse.
Let me know if this is possible and if yes please guide towards a query for it.
Thank you. -
Heading showing as SUM on aggregate items
Hi All,
In some of the HR analysis folders, items in folders such as "Length of Work Analysis" have a default aggregate of sum and no heading specified in the properties if the item in the EUL. When used in a report the heading defaults to "SUM". In this particular folder I can get over this by adding a heading to the item properties and this is then picked up in the report. However, for another folder (Age Analysis) where the same problem occurs, the exact same fix does not make any difference to the heading displayed. i.e. the Heading still shows "SUM". All other properties of the item are the same as the item for which the fix worked (e.g. datatype, format mask, default position etc)
Any ideas?
Is it something to do with the way the different view are written, as this is the only variable I can see
Thanks,
EmilyIf the songs have been changed then it will be the rights-holder/content provider that have changed them - unless they are a number of years old. But I wouldn't expect them to show as being available for download if you still have them in your library, you usually have to delete the previous download (or not having the version that was downloaded e.g. having converted it to MP3) for it show as available for download
There is nothing else that looks different between the tracks, all their other properties are the same ? -
I have a dynamic table that calculates the sum of all rows, no issue. I'm struggling with pulling out a subtotal though. I would like to have a check box in each row that flags those rows and gives the sum of their total. Any help would be greatly appreciated.
Here's something I threw together rq. The script is in the change event for the checkbox in the table. (Of course, you'll have to modify it to suit the names of your fields.)
var rows = xfa.resolveNodes("tblAmounts.Row1[*]");
var subtotal=0;
for (i=0; i<rows.length; i++) if (rows.item(i).cbAdd.rawValue == 1) subtotal = subtotal + rows.item(i).nfAmount.rawValue;
nfSubtotal.rawVlaue=subtotal; -
Hi,
I am having a list which has item and corresponding price.I wanted to do sum of all the prices in the list object.how can i do that?
Thanks in advance
rkI am having a list which has item and corresponding
price.I wanted to do sum of all the prices in the
list object.how can i do that?and what have you tried so far?....
In case you haven't figured out yet, here we try to nudge you to do as much for yourself as possible... even to figure out the solution on your own. To do so will make the solution your own forever. -
Sum child list items and update parent total using javascript
I have a SharePoint 2010 Parent/Child list setup using a lookup field to join both the lists, this is working well.
The Parent list contains requisition requests and the child list contains related item details. Each of the related child list items has a 'Line Item Total' field. I need to aggregate the Line Item Totals in the child list and place the result in a 'Requisition
Total' in the parent. So for any given parent record the sum of it's related child 'Line Item Totals' is reflected in the 'Requisition' total in the parent row.
I am struggling with the JavaScript code below. I am trying to aggregate Line Item Totals for a given Requisition#? Could someone please review and advise?
<script language="javascript" src="/Purchasing/Documents/jquery-1.8.2.js" type="text/javascript"></script>
<script language="javascript" src="/Purchasing/Documents/jquery.SPServices-2014.01.min.js" type="text/javascript"></script>
<script>
$(document).ready(function()
$('select[title=Requisition#]').children().attr('disabled',true);
$("input[title='Old Amount']").attr("readonly","true").css('background-color','#F6F6F6');
// Retrieve the name of the selected parent item.
var strParent=$("select[title$='Requisition#'] :selected").text();
splist li = web.lists["ReqDetails"]; // This is the child list
spquery q = new spquery();
q.Query= "<Where>" +
"<And>" +
"<Neq>" +
"<FieldRef Name='ID'/><Value Type='Number'>0</Value>" +
"</Neq>" +
"<eq>" +
"<FieldRef Name='LinkID'/><Value Type='Number'>ReqID</Value>" +
"</eq>" +
"<And>" +
"</Where>" +
"<OrderBy>" +
"<FieldRef Name='LineItemTotal'/>" +
"</OrderBy>"
q.ViewFields = string.Concat("<FieldRef Name='LineItemTotal' />");
q.ViewFieldsOnly = true; // Fetch only the data that we need
splistitemcollection items = li.getitems(q);
foreach(SPListItem item in items)
sum += parseInt(item["LineItemTotal"], 10);
alert(sum)
</script>
Rick RofeI do something similar for a PO Header/PO Detail set of lists. I use SPServices to pull the data.
I put this code in the child edit page - so any time any child is edited, the parent is updated. I get all children records and total them up (except for the item I'm displaying at the current time. I add that value in directly from the form itself.
<script type="text/javascript" src="/Javascript/JQuery/JQueryMin-1.11.1.js"></script>
<script src="/Javascript/JQuery/jquery.SPServices-2014.01.min.js"></script>
<script>var poNumber = '';
var poDetailID = '';
$(document).ready(function() { var queryStringVals = $().SPServices.SPGetQueryString();
poNumber = queryStringVals["PO"];
poDetailID = queryStringVals["ID"];
function PreSaveAction() {
// update the PO header with the total of all items + shipping + adjustments
var query = "<Query><Where><And><Eq><FieldRef Name='Title' /><Value Type='Text'>" + poNumber + "</Value></Eq><Neq><FieldRef Name='ID' /><Value Type='Counter'>" + poDetailID + "</Value></Neq></And></Where></Query>";
var viewFields = '<ViewFields><FieldRef Name="Total" />';
viewFields += '</ViewFields>';
var poTotal = 0.00;
$().SPServices({
operation: "GetListItems",
async: false,
listName: "PO Details",
webURL: "/po",
CAMLViewFields: viewFields,
CAMLQuery: query,
completefunc: function (xData, Status) {
//alert(xData.responseText);
$(xData.responseXML).SPFilterNode('z:row').each(function() {
if($(this).attr("ows_Total")) {
//alert($(this).attr("ows_Total"));
poTotal += Number(parseFloat($(this).attr("ows_Total").split(";#")[1],2).toFixed(2));
// add in this changed line (we skipped it above)
var qty = $('input[title="Quantity Ordered"]').val();
var price = $('input[title="Price"]').val().replace(',','');
var extend = Number(qty)*Number(price);
poTotal += extend;
//alert(poTotal);
// update the PO Header
$().SPServices({
operation: "UpdateListItems",
async: false,
listName: "Purchase Orders",
webURL: "/po",
ID: poID,
valuepairs: [["Total", poTotal]],
completefunc: function (xData, Status) {
//alert(xData.responseText);
$(xData.responseXML).SPFilterNode('z:row').each(function() {
return true;
Robin -
Sum of the items issued and items received
Sir,
if i want to get all the sum of the items issued and items received wrt mblnr and matnr, what shd i do??
thanks
ArunHi
Look at this code .It retrieves the sum of LABST field for all line lineitems for a given material No in MARD table.
TYPES : BEGIN OF Type_Mard,
W_MATNR TYPE MARD-MATNR,
W_LABST TYPE MARD-LABST,
END OF Type_MARD.
data : ITAB_MARD TYPE TABLE OF Type_MARD,
wa_MARD TYPE Type_MARD.
SELECT MATNR
SUM( LABST) INTO TABLE ITAB_MARD
FROM MARD WHERE MATNR = p_MATNR " parameters
AND WERKS = P_RESWK .
Hope youll get an idea
Thanks
Viquar Iqbal -
How to get all items under a parent item in a tree control
Hello,
I have 2 questions regarding a tree control:
1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
Any ideas?
Attachments:
Tree example.vi 6 KBMentos wrote:
1) Is there any way to specify a parent item tag and get an array of ALL its sub item tags? For example, in the attached vi, specify the Parent#2 parent tag and get an array containing Item#P21 and Item#P22
Did you try a search? There's no direct way of doing this. You have to navigate the tree and build up an array. You can find an example here: http://forums.ni.com/t5/LabVIEW/get-all-children-of-a-parent-in-tree/td-p/729548
2) Is there a way to specify a range to the ActiveCell property. For example, all items from line#1 to line number#3
No. (It's called ActiveCell, not ActiveCells) Presumably you are trying to perform an operation on multiple items. Unfortunately, you need to use a loop. You should defer panel updates if you're doing this a lot. -
I cannot secure delete items from trash: 180 items (pictures, files, folders) remain even if I check "remove all items". Macbook Pro, 10.6.8
Maybe the items are locked.
Mac OS X 10.6 Help: Shortcuts for working with items in the Finder
Shortcuts for working with items in the Finder Command (⌘)-Shift-DeleteEmpty the Trash without any warning or when it contains locked filesCommand (⌘)-Shift-Option-Delete
http://docs.info.apple.com/article.html?path=Mac/10.6/en/cdb_cpmvfky.html -
PURCHASE ORDER STATUS :When Deleting ALL ITEMS.
Hi experts,
I need to make purchase order status stay " Release Compleated " when deleting all items.
Anyone Know How to do it?
Or anyone Know how to use BAPI_PO_CHANGE in BAdI : ME_PROCESS_PO_CUST
In my project , I use Release Strategy of purchase orders, and there is a case of deleting all items.
In this situation, purchase order status returns to "Active " and release strategy tab disappears.
This is our problem.
I need to make purchase order status stay " Release Compleated " and prevent release strategy tab disappearing.
I tried to update the fields EREKZ(final invoice) and ELIKZ(delivery completed) in
BAdI : ME_PROCESS_PO_CUST Method : PROCESS_ITEM using BAPI_PO_CHANGE according to SAP Note 456691.
But BAPI_PO_CHANGE couldn't update EREKZ because of our customize , and I couldn't find how to use
BAPI_PO_CHANGE in the BAdI.
Anyone know solutions to solve this problem?
Thanks a lot.
Regards,
TKDHi,
please review the following information in SAP Note No. 456691 as
copied below:
18. Question:
When are the header conditions updated if a purchase order item is
deleted?
Answer:
If a purchase order item is deleted, the item is marked as 'statistical'
(field EKPO-STAPO = X) and the change is reflected in the header
conditions.
However, if for the item the final invoice indicator(EKPO-EREKZ) or the
inward delivery completed indicator (EKPO-ELIKZ) is set, the item is not
marked as 'statistical' (EKPO-STAPO is not set) and thus the header
conditions are not updated.
I hope this helps you
BR
Nadia Orlandi
Maybe you are looking for
-
Select Vendor Email Address when creating PO
Hi Guys; When I create PO for send by email, the system get Email Address from Vendor. But some vendors got two or more email address. For example; 001 [email protected] Standard 002 [email protected] 003 [email protected] In the PO Header dat
-
LDAP accept query (space within email) got pass
Version: 5.1.2-005 ldap accept query is very effective here and have been using since day-1. Recently, we discover some backend mta log that rejecting invalid address. We haven't change ironport or the backend ldap software for a while. So it is not
-
SSL Errors - Sec_error_unknown_issuer
I've got this error message on a site that I KNOW has a valid SSL and CA Certficate however ONLY FF has this issue with the website. The SSL is from GeoTrust, valid until 10.21.15. It's difficult enough to get to this sticking support page, FF needs
-
Hi, I am curious to know if one JDK spawning multiple JVM's cause any memory/performance issues. The reason being, my company is planning to have number of applications running in one Weblogic Server instance with Multiple JVM's spawning out of same
-
How to sign up for MAC OS 10.9 software beta?
How do I sign up for beta for MAC OS 10.9?