Need advise to calculate stock difference (Theoric values vs real values)
I know there is a transaction named MI20
This transaction is able to give me the needed info... except it gives me the info un units. Meaning, if a box of certain product has 12 SKU and we have 12 boxes, the result window shows 144 SKU.
This is not a bad thing... except for the fact that the company does not only want to see the SKU but they want to see the boxes. If there are 145 SKU of the same product in stock, they want the result window to show it like this:
Item: <ItemName>, Boxes: 12, Units: 1 (This is a rough example)
Now... I don't think it is a good idea to touch the standard code, so I decided to create a new (and simplified) transaction that asks only the parameters they want, they agreed to this and so I started... but stopped almost right away.
"Why?" you might ask. Well, I don't know the tables I sould read to determine a difference in stock between what's supposed to be and what really is.
My common sense tells me the actual stock is somehow introduced to the system with some document. But where? Which table(s)?
Also, how can I calculate the theoric values ? Initial stock (date of implementation) minus sales, plus purchases? That's what common sense tells me but... also tells me that is only going to be slower as time passes by, not to mention I don't know where to look into (again).
After the people who implemented SAP left, we were left adrift. No data dictionary, no ABAP training, no language refference manual, no nothing :s
I don't want source code to be written here... but I'm kinda desperate, I tried to understand the standard code of the MI20 but I get lost. I'm reading the RM07IDIF report and while I can see some tables there, I can't ger a grip on what's happening >___<
What would you say is a good starting point or course of action? (Don't say "Get formal ABAP trainning"... that's not going to happen, my boss haven't even pressed the buttons to get a book from the SAP store ;_;)
I know the ISEG, MARA, T!58 tables play a role in the whole movie (How, that's still a mistery I have to unveil).I I've also noticed some structures that (to my understanding) are used mostly to store partial results.
I know this question is very vague and even might look like "Do the work for me", but believe me, I'm not looking for source code to copy paste. I'm trying to understand the system and the relation between the tables in order to start coding.
Thanx in advance for your help and understanding : /
Edited by: Compiux on Feb 17, 2012 12:05 AM
Edited by: Compiux on Feb 17, 2012 12:06 AM
Edited by: Compiux on Feb 17, 2012 12:07 AM
Edited by: Compiux on Feb 17, 2012 12:07 AM
I know there is a transaction named MI20
This transaction is able to give me the needed info... except it gives me the info un units. Meaning, if a box of certain product has 12 SKU and we have 12 boxes, the result window shows 144 SKU.
This is not a bad thing... except for the fact that the company does not only want to see the SKU but they want to see the boxes. If there are 145 SKU of the same product in stock, they want the result window to show it like this:
Item: <ItemName>, Boxes: 12, Units: 1 (This is a rough example)
Now... I don't think it is a good idea to touch the standard code, so I decided to create a new (and simplified) transaction that asks only the parameters they want, they agreed to this and so I started... but stopped almost right away.
"Why?" you might ask. Well, I don't know the tables I sould read to determine a difference in stock between what's supposed to be and what really is.
My common sense tells me the actual stock is somehow introduced to the system with some document. But where? Which table(s)?
Also, how can I calculate the theoric values ? Initial stock (date of implementation) minus sales, plus purchases? That's what common sense tells me but... also tells me that is only going to be slower as time passes by, not to mention I don't know where to look into (again).
After the people who implemented SAP left, we were left adrift. No data dictionary, no ABAP training, no language refference manual, no nothing :s
I don't want source code to be written here... but I'm kinda desperate, I tried to understand the standard code of the MI20 but I get lost. I'm reading the RM07IDIF report and while I can see some tables there, I can't ger a grip on what's happening >___<
What would you say is a good starting point or course of action? (Don't say "Get formal ABAP trainning"... that's not going to happen, my boss haven't even pressed the buttons to get a book from the SAP store ;_;)
I know the ISEG, MARA, T!58 tables play a role in the whole movie (How, that's still a mistery I have to unveil).I I've also noticed some structures that (to my understanding) are used mostly to store partial results.
I know this question is very vague and even might look like "Do the work for me", but believe me, I'm not looking for source code to copy paste. I'm trying to understand the system and the relation between the tables in order to start coding.
Thanx in advance for your help and understanding : /
Edited by: Compiux on Feb 17, 2012 12:05 AM
Edited by: Compiux on Feb 17, 2012 12:06 AM
Edited by: Compiux on Feb 17, 2012 12:07 AM
Edited by: Compiux on Feb 17, 2012 12:07 AM
Similar Messages
-
Settlement value duplicate real value in IM reporting
I am using capital investment measures (investment orders real) with AuC automatically generated. When I settle them to AuC (periodic settlement), using KO88, the settled value is considered in real values in every IM reporting - duplicating the values. Could somebody help me with this situation?
Thank you in advance!Dear Felipe!
This is strange....Can You check whether or not You are
using the functionality of note #21583?
Then it would be a customizing problem.
If this does not help: which report are You using
(transaction code if SAP-standard)?
Best regards
Florian -
How to calculate the difference between values in a custom PSObject?
If I have a PSObject (created from an imported CSV) that has data like the following:
date,Total size of files uploaded
03-17-2014 09:08,1293334574547
03-17-2014 09:10,1293335326912
03-17-2014 09:13,1293336523562
03-17-2014 09:14,1293337541156
03-17-2014 09:16,1321031223511
03-17-2014 09:16,1321032156844
This CSV will have lines added to it, so the total number of lines will vary.
Is there a way that two most recently added values and calculate the difference of the "Total size of files uploaded" values?
I have the columns properly cast as datetime and
int64 already using this:
$csv = Import-Csv $csvLocation |
Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } |
Foreach-Object {
$_.datetime = $_.datetime -as [datetime]
$_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
$_ }
I tried searching thinking surely there must be someone else who has tried to do this" but I cannot find anything. I am just not sure how to approach this problem. Any help would be appreciated!Assuming all of your records are sequential with the last two being the most recent you could use this:
$csv = Import-Csv $csvLocation |
Where-Object { ![string]::IsNullOrWhiteSpace($_.datetime) } | select -last 2
Foreach-Object {
$_.datetime = $_.datetime -as [datetime]
$_."Total size of files uploaded" = $_."Total size of files uploaded" -as [int64]
$_ }
$Difference = $csv[1]."Total size of files uploaded" - $csv[0]."Total size of files uploaded"
This uses the index of the imported array and just the last two records. Note that this will give a negative value if the total is less in the later record. Hope this helps!
You could also use
| sort datetime -ascending | select -last 2
if they aren't already in order... -
How do I calculate the difference between two times?
I am so embarrassed by the fact that I can't figure this out.
Cell B2- 8:00 am
Cell C2- 10:50 am
Cell D2- (How do I get this cell to calculate the difference and say 2:50?)
I know this is probably one of the most basic operations, but for the life of me I can't figure it out. Cells B2 & C2 are formatted for 24 hour clock. But if I tell the system to just subtract the two, I get "0.118". Everything I find on the forum search goes beyond what I need. Can anyone help me?
Thank you.KOENIG Yvan wrote:
Numbers states clearly in the Help and the PDF Users Guide that it doesn't know a "duration" object but a time one which is restricted to the range 00:00:0 to 23:59:59.
When I search the U.S. language Numbers User Guide for the word "duration," it is not found.
What may be more clear: _duration is not available but time is_?
Once again your response resemble to a rant againt the Help and the User Guide.
In the Help:
+date-time Any Numbers date/time value. _While you can choose to display only date or time in a cell, all Numbers date or time values contain both the date and time._+
Which wording would be more clear and precise?
TIMEVALUE
+The TIMEVALUE function converts a date, a time, or a text string to _a decimal fraction of a 24-hour day._+
Which wording would be more clear and precise?
TIME
+The TIME function converts hours, minutes, and seconds into a time format.+
+TIME(hours, minutes, seconds)+
+hours: The number of hours _(using a 24-hour clock)._+
+minutes: The number of minutes.+
+seconds: The number of seconds.+
Notes
+You can specify hour, minute, and second values greater than 23, 59, and 59, respectively. _If the hours, minutes, and seconds add up to more than 24 hours, Numbers subtracts 24 hours repeatedly until the sum is less than 24 hours._+
Which wording would be more clear and precise?
In the User Guide:
page 190
+date-time Any Numbers date/time value. _While you can choose to display_+
+_only date or time in a cell, all Numbers date or time values contain_+
+_both the date and time._+
+TIME (page 277) Converts a time to a decimal fraction of a 24-hour day.+
+TIMEVALUE (page 278) Converts a time in a string to a decimal fraction of a 24-hour day.+
TIME
+The TIME function converts the specified time to a decimal fraction of a 24-hour day.+
+TIME(hours, minutes, seconds)+
+• hours: The number of hours _(using a 24-hour clock)_.+
+• minutes: The number of minutes.+
+• seconds: The number of seconds.+
Notes
+You can specify hour, minute, and second values greater than 23, 59, and 59,+
+respectively. _If the hours, minutes, and seconds add up to more than 24 hours,_+
+_Numbers subtracts 24 hours repeatedly until the sum is less than 24 hours._+
+You can also specify fractional values for hours, minutes, or seconds.+
TIMEVALUE
+The TIMEVALUE function converts a time in a string to a decimal fraction of a 24-hour+
day.
TIMEVALUE(date-time)
+• date-time: A date, a time, or a string in any of the Numbers date and time formats.+
As you may check, the infos are exactly the same in the Help and in the Guide.
And I really don't understand how you may find them unclear.
Yvan KOENIG (from FRANCE lundi 4 août 2008 14:57:36) -
How to calculate the difference of two totals which are of the same group?
Post Author: mingli
CA Forum: Formula
Hello,
I have an existing report which has a group defined. The group generates two set of data, at the footer of each set of data, the total is calcuated. Now I need to calculate the difference between the totals. For example:
value
set 1
item 1 100
item 2 200
item 3 300
set 1 total 600
set 2
item 1 200
item 2 20
item 3 300
item 4 40
set 2 total 560
difference 40
My question is: how can I do this? I'm thinking about create a formula. But the problem is, these two totals have the same field name. Could someone help me out?
Thanks.Post Author: deejayw
CA Forum: Formula
Hi,I have a similar type of query...my Sets only ever contain two entries but there is an unknown number of sets. value
set 1
item 1 100
item 2 200
difference (item2 - item1) = 100
set 2
item 1 200
item 2 20difference (item2 - item1) = -180
Set 3, Set 4, etc, etc I need to figure out how to calculate the "difference (item2 - item1)" total above. I am really confused by this and need assistance. Many thanks. -
Hello all Gurus,
I have a strange problem. For material 0590488025, the stock in plant 1100 is showing as 1638 PCs in MMBE transaction. But actually, physically in storage location 1101 of plant 1100, the stock available for material 0590488025 is 703. That means there is a difference of 935 PCs for this material in reality.
Hence, when I am going to reduce the stock to 703 in SAP system using physical inventory process, the system is giving me an error message saying that the valuated stock will become negative. Hence, it is not allowing me to correct the actual quantity of this material in MMBE transaction. The actual stock should be 703 in MMBE.
I tried posting the goods documents with movement types 702, 551, 562, 261, etcetc. But for every movement type, the system is showing me the same error (I have put the actual error which I am getting in my SAP system):
Valuated stock becomes negative: 232,000- -> see long text
Message no. M7 314
Diagnosis
When a goods movement or an incoming invoice is entered, the system
simulates the update of the valuation data in the material master record
The current simulation indicates that this posting would lead to a
negative stock quantity (or a negative sales value) although negative
stocks are not allowed for this material.
Hence, I am requesting you guys, what is the actual process to reduce the stock in MMBE? How can I remove the 935 PCs from MMBE? Also, in MMBE the stock is shown as 1638 PCs. But in accounting 1 view of material master record for this material, the total stock is shown as 703.
Friends, this is really an important issue. Hence, your earliest mail would be really helpful for me. I really appreciate your solutions.
Thanks and Regards,
Umakanththis sounds like an inconsistency and you may have to contact SAP.
I know some cases how such inconsistencies can be created.
E.g. if you create a new plant and forget to set the value update indicator for the material type.
then the quantity goes to stock table MARD but the value is consumed when doing a GR and table MBEW has no stock.
If you then turn on the value update in customizing, then the valuated stock remains still zero while you have inventory.
with the next receipt you add stock to both tables and reduce from both tables with a goods issue.
If you try to reduce more stock than you have in table MBEW, then you get the message you mentioned.
Best you try to find out how the 232 came unvaluated into your system . this may give you (or us) a hint how to resolve it. -
SD Process Design for Plantation industry - need advise
Hi all experts,
I am implementing for a crude palm oil plantation company, in which the general flow of the sales process from Estate to the Milling Plant is as below:
Sales Order --> Delivery Order* --> PGI --> Billing*
Sales Order: The fresh fruit bunches (FFB) is harvested and then the amount required by the Buyer is fulfilled via creation of a sales order.
Delivery Order: At this stage, it will interface with the Weighbridge system to carry out the recording of delivery quantity. Truck without the FFB is weighed once at entrance of the estate, and truck with FFB is weighed at exit at estate.
PGI: Goods Issue is carried out with the recording of the actual quantity from the weighbridge interface back to SAP.
Billing: The billing doc is created based on PGI quantity done.
This looks pretty straightforward, but there are few concerns from the above process as highlighted in the asterisk (*) section:
Issues:
1. During the Delivery portion, data of the Driver, name, person loading and weight loaded need to be recorded at the same time to carry out the incentive payment to the drivers (both internal and external drivers) with incentives calculated on per tonnage basis.
2. Secondly, during Billing process, the amount payable would be calculated based on the grading of the FFB + the which year the FFB is planted (i.e. different year would have different pricing per ton).
Need advise on how to make the above two issues work smoothly along with the process above.
Opinion, comments and feedbacks is much appreciated.
Thanks.The loader and driver data is integrated to PP and the HR master module is leveraged to maintain driver/loader data master and payment is made to driver via customized program with customised calculation of salary.
The FFB is handled using PP module for Production and material posted via MIGO in MM and increases stock take manually.
SD to handle sales of finished goods instead.. -
Calculate date differences in consecutive rows and generate a sequence
Hi Guys,
I am trying to implement one scenario where in i need to compare the date differences for consecutive rows and generate a sequence against that.
this is the table schema:
create table temp
id int identity(1,1),
emp_id int,
time datetime
insert into temp
values
(1, '2011-02-20 12:30:00.000'),
(1, '2011-02-20 12:32:34.172'),
(1, '2011-02-20 12:32:34.172'),
(1, '2011-02-20 12:43:21.004'),
(1, '2011-02-20 12:46:39.745'),
(2, '2011-02-20 12:48:06.004'),
(2, '2011-02-20 12:48:06.004'),
(2, '2011-02-20 12:53:07.733'),
(2, '2011-02-20 12:55:30.295');
now, I want to compare the first date-time with the second and so on. now if the date-time difference is same for two consecutive rows then the sequence should increment by 1 otherwise the sequence again will start from '00' for any unique date-time.
This sequence number should start from '00' from each employee.
I want the output to be like this
ID emp_id
time
sequence
1 1 2011-02-20 12:30:00.000
00
2 1 2011-02-20 12:32:34.172
00
3 1 2011-02-20 12:32:34.172
01
4 1 2011-02-20 12:32:34.172
02
5 1 2011-02-20 12:46:39.745
00
6 2
2011-02-20 12:48:06.004 00
7 2
2011-02-20 12:48:07.003 00
8 2
2011-02-20 12:48:07.003 01
9 2
2011-02-20 12:46:39.745 00
Please revert as soon as possible as this is a bit urgent.
Thank You in Advance. :)create table temp
(id int identity(1,1),
emp_id int,
time datetime
insert into temp values
(1, '20110220 12:30:00.000'),
(1, '20110220 12:32:34.172'),
(1, '20110220 12:32:34.172'),
(1, '20110220 12:43:21.004'),
(1, '20110220 12:46:39.745'),
(2, '20110220 12:48:06.004'),
(2, '20110220 12:48:06.004'),
(2, '20110220 12:53:07.733'),
(2, '20110220 12:55:30.295');
go
SELECT id, emp_id, time,
dateadd(mcs, (row_number() OVER(PARTITION BY emp_id, time ORDER BY
id) - 1) * 10,
convert(datetime2(5), time)) AS [Sequence]
FROM temp
ORDER BY id
go
DROP TABLE temp
Erland Sommarskog, SQL Server MVP, [email protected] -
Hi,
I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data:
Time Stamp Power Output
11:00:00 AM 3kW
11:00:02 AM 2.9kW
11:00:04 AM 3.2kW
11:00:06 AM 3.1kW
The above data doesn't make any sense, but it is just for the purpose of this question.
So, I have to read 11:00:00 AM and 3kW initially - 3kW is the initial request thatHello
you can simple subtract one time from the other one and so you get the difference. -> Example
Mike
Attachments:
Unbenannt 2.vi 8 KB -
Hi,
I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data:
Time Stamp Power Output
11:00:00 AM 3kW
11:00:02 AM 2.9kW
11:00:04 AM 3.2kW
11:00:06 AM 3.1kW
The above data doesn't make any sense, but it is just for the purpose of this question.
So, I have to read 11:00:00 AM and 3kW initially - 3kW is the initial request that is sent. Then I have toRepeated forum post
Please view http://forums.ni.com/ni/board/message?board.id=170&message.id=294435
Regards,
Juan Galindo
Applications Engineer
National Instruments -
Calculate the Difference Between two dates excluding weekends and Holidays
Hi,
We need to calculate the difference between the two dates by excluding the Local public holidays (It is global and varies across countries) and weekends should not be included in calculation for a business day in OBIEE.
We have two dates: Open date and close date when ever close date is null we are calculating age based on taking the current timestamp and need to exclude the weekends and Holidays when ever the close date is null.
Ex:
Col1 col2 Total
11/9/2010 2:46:38 PM Null 13
11/2/2010 8:06:26 PM 11/3/2010 5:37:03 PM 1
(In the Total we shouldn't include the weekends,holidays)
Please let me know how to calculate the difference between two dates by excluding the weekends and holidays.
Thanks
Edited by: user10441472 on Nov 22, 2010 3:14 PMYou already asked this question and I answered it...
Re: calculation of Business day in OBIEE -
Calculate Keyfigure difference
Dear SDN,
I have two keyfigures A and B in Cube.
I want C = A - B in the Cube.
Could anyone guide me how to calculate C in the Transformation.
Please give me the routine to calculate C -= difference of A and B.
Formula works or routine is required.
Regards,
RahulHi Rahul,
Just goto your Infoobject in Transformation.Right click.goto rule details-->Select rule type as Formula.Then Editor will be opened.There select A from the list displayed there then Choose the operator as '-' then choose the operand B.Save it and Click on transfer values.
Hope this helps
Regards
Karthik -
Calculate a difference in a pivot table
Hi, I'd like to create a simple pivot table that allows a user to choose two time periods, and then calculates a difference in the measures between them. I know I could do this with some tricks around having two time drop downs on a dashboard control, creating two columns in the analysis that use the "FILTER" operator to get the right value, and then actually calculating a third column as a diff between the other two - but this seems like a lot of work. Is there a simple way to do this in a pivot that doesn't require all the dashboard controls and custom built formulas?
Thanks!
ScottHi user10634835,
It's repeated one..close this SR and that method is best. it's already solved.
FYI..
Variation calculation without time series?
Thanks
Deva -
Calculate the Difference between 2 dates
Please let me know how to Calculate the Difference between 2 dates in Time Management. I have a hire date(U1) and adjusted Service Date(B2)
I need to Find out the number of Years, Days and Months between these 2 dates
Thanks a lot in AdvanceHi Rahul,
You can take a look at the standard function 'HR_HK_DIFF_BT_2_DATES' and see if it suits your need.
Regards.
Francis -
Calculate the difference between two dates
I would like to calculate the difference between two dates in PL/SQL and return the result as a number of days expressed as an integer value.
Denes,
A fair point, I should really have posted this on the SQL forum (I'm new to the forum as well as PL/SQL) but thanks for responding anyway. It does raise a question as to how to implement this in ApEx though.
I have created the function and am calling it as shown below from the source window of a form. The source type is 'PL/SQL expression or function' and the expression in the source window of the form is:
calc_date_difference (:p26_c_payment, :p26_c_rec)
The two parameters being passed are of type date but I'm not sure how to handle the ruturned number and populate the form in ApEx with this value.
Is it possible to do it this way or am I taking completely the wrong approach?
Regards
Sandy
This is not ApEx related but SQL related:
CREATE OR REPLACE FUNCTION calc_date_difference (
p_date_1 VARCHAR2,
p_date_2 VARCHAR2
RETURN NUMBER
v_difference NUMBER;
v_sql_err VARCHAR2 (4000);
BEGIN
v_difference := TRUNC (TO_DATE (p_date_1)) - TRUNC
(TO_DATE (p_date_2));
RETURN v_difference;
CEPTION
WHEN OTHERS
THEN
v_sql_err := SQLERRM || CHR (10) || CHR (10) ||
SQLCODE;
ND calc_date_difference;and
SQL> SELECT calc_date_difference ('23.01.2007',
'20.01.2007') diff
2 FROM DUAL;
DIFF
3
Denes Kubicek
Maybe you are looking for
-
Is there any way to export a desktop AIR package when desktop is not supported by an ANE?
I have a third party ANE that I need to use. The ANE has a target for Android, but when I add it in Build Path->Native Extensions an error shows up "This ANE does not support Desktop(Mac) platform". Now, my app is targeting android, but to make it ea
-
Freecorder autodeleted during FF auto-update, and was not autoupdated
I thought I read that FF new behaviour was to update automatically, frequently, BUT it will ASK YOU FIRST if it finds an existing Addon that would be incompatible & deleted IF one proceeded with the Update. I use very few Addins. Last week, FF update
-
Translation. Redirected from Apple support Communities
Would anyone know if there is a free translator tool that can be easily inserted in the Mail tool bar? imtranslator from Firefox would be ideal.
-
hi there~! I want to switch from memory stick cameras to SDHC camera... I read that SDHC is not backwards compatible, and that it has a different way of adressing the memory blah blah... so... since it says FAT32 formatted, my question is: "is this c
-
Initial error occurred during generation of the transformation
HI experts here i am loading master dat using 7 that ds is in 3.x when i do rt click on the ds it is asking for the transfer rules to be installed and after that rt click create transformations then "Initial error occurred during generation of the tr