MIRO reversal split the value between GR/IR clearing and 3rd party material account
Dear Team,
We are facing the issue in MR8M for PO 4500002602; the PO has been created on 11/30/2012 in the previous fiscal year and performed the GR and IV in the 2013 fiscal year.
For one GR the accounting flow is as follows:
For the 3 GR's 5000013746, 5000013747 and 5000013748 one IV has been done 5105612646, at the time of IV the account entry is as follows
GR accounting entry:
Account
Cost center
Description
Amount
610020
3500
3rd Party Mat (SP)
1,450.41
211200
Gds Rcvd / Inv Rcvd
1,450.41-
610020
3500
3rd Party Mat (SP)
1,506.62
211200
Gds Rcvd / Inv Rcvd
1,506.62-
610020
3500
3rd Party Mat (SP)
400.35
211200
Gds Rcvd / Inv Rcvd
400.35-
IV entry:
Account
Cost center
Description
Amount
100762
AIR PRODUCTS & CHEMICALS
-4,135.98
211200
3500
Gds Rcvd / Inv Rcvd
3,357.38
651200
3500
NITROGEN SUPPLIES
778.6
750090
1100
Sales Tax
55.01
216200
Use Tax AP - State
-55.01
But for the same IV when user reversed with MR8M system split the GR/IR cost as follows:
Account
Cost center
Description
Amount
100762
AIR PRODUCTS & CHEMICALS
4,135.98
211200
3500
Gds Rcvd / Inv Rcvd
3,245.65-
610020
3500
3rd Party Mat (SP)
111.73-
651200
3500
NITROGEN SUPPLIES
778.60-
750090
1100
Sales Tax
55.01-
216200
Use Tax AP - State
55.01
One line item at the time of MIRO i.e. 3357.38 is split into two line items i.e. 3245.65 and 111.73 in reversal.
But in quality system when we create new PO, GR and IV system is working fine why in case of previous year PO system is behaving like this.
Kindly advice.
Regards,
Ravi
Dear Team,
Any update on the above issue, please let me know any of you faced this type of issue so far and please through some light on the issue.
Regards,
Ravi.
Similar Messages
-
Split the value using comma as delimiter and then pass each value to query to get the description
Hi,
As i am new to crystal reports, I need help in getting one field.
In my report i am using 2 tables:
one is like :
code_id
code_desc
1
aaa
2
bbb
3
ccc
4
ddd
and the another is :
reason_ind
1
2,3,4
2,3
1,2,3,4
3,4
In this report i have a column : Reason_desc.
Here i have to show code_desc for those values of reason_ind matches with code_id in the above table.
Ex:
reason_ind
reason_desc
1
aaa
2,3,4
bbb,ccc,ddd
2,3
bbb,ccc
Let me know if you need further clarifications.
Thanks in advance.
Regards,
Swathi.Hi Swathi,
Here's how you can do this at the report level:
1) Create a Main report pointing to the second table from that screenshot.
2) Drag and drop the Reason_ind column on the Details Section
3) Insert a Subreport pointing to the First table and place it on the Details Section
4) Right-click the Subreport > Select Change Subreport Links > Move the Reason_Ind field to the pane on the right > Uncheck the option 'Select data in Subreport based on field'
5) Get inside the Subreport and go to Report > Selection Formulas > Record and use this code:
ToText({Code_Id},0,"") IN Split({@Pm-Reason_Ind},",")
6) In the Subreport, create a Group on the Code_Desc field
7) Suppress the Report Header, Group Header, Details and Group Footer sections
8) Create a Formula with this code and place it on the Group Header 1 section:
whileprintingrecords;
stringvar s := s + {Code_Desc} + ", ";
9) Create one more formula and place this on the Report Footer section:
whileprintingrecords;
stringvar s;
Left(s,len(s)-2);
Hope this helps.
-Abhilash -
Communication between SAP e-recruitment and 3rd party website
Hi,
We are implementing e-recruitment module and would like to know how to transport a recruitment advertisement created in SAP e-Recruitment to a job website. Should we use IDOC and XI? Or is there some other way of doing it? How does SAP e-Recruitment communicate with the 3rd party website? The advertisement should be transported in a way that it can be directly displayed on the job website, with all the formatting intact.
Please let me know in detail how the functionality can be achieved.
Regards,
DKHi,
Did you have any reply on this?
regards
Justin -
How can i op out The all content include calender reminder and 3rd party on my icloud?
Help me to up out these all content on my iCloud n itunes cos i dont Know how can It works by sync
Additional information:
For iTunes on a Windows PC
For iTunes on a Mac -
In BADi , How to pass the values between two Method
Hi Experts,
We have two methods in BADis. How to pass the value between two Methods. Can you guys explain me out with one example...
Thanks & Regards,
Sivakumar SHi Sivakumar!
Create a function group.
Define global data (there is a similiar menu point to jump to the top include).
Create one or two function modules, with which you can read and write the global data.
In your BADI methods you can access the global data with help of your function modules. It will stay in memory through the whole transaction.
Regards,
Christian -
Mapping Issue: How to split the value of Lineitem
Hi All,
I have issue in Mapping .XML-> BAPI Scenario
1 line item has the one 50% Cost Centre , another 50% Cost centre data
2 line item has only 100% WBS elemnt
WBS elemnt mapping :
If A |EQUALS (Text) | WBS_ELEMNT |If without else| B(WBS value) |REmoveContexs| SplitByValue| WBS_ELEMNT(BAPI field)
But this supress second line item : WBS_ELEMNT data and uploads into1.Item .Hence PO is not getting created in SAP.
Could you please giv me a logic to actaually split the value into 2 seperate so that respective data of each line item are split properly .
Thank you ,
VaraHi I think you need an udf for this:
int total = Integer.parseInt(value[0]);
result.addValue(Integer.toString(a/2));
result.addValue(Integer.toString(a/2));
and after it you can add a splitbyvalue -
Doubt : retaining the value between the calls
hi,
Which statement would you use to declare a variable, within a Function Module/Form-routine, so as it will retain the value between the calls?"
GauravDear Gaurav,
To retain the same value outside a function module, you can define a variable with the same name as the exporting parameter in a function module. However in case of Subroutines you can pass the value by reference as any change in the formal parameters will be reflected in the actual parameters.
Check the following links for further clarification:
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db975c35c111d1829f0000e829fbfe/content.htm
Regards,
Rajesh K Soman
<b>Please reward points if found helpful.</b> -
Select just the values between min and max of an accumulated value over day
Hello Forum,
a value is accumulated over a day and over a period of time. Next day the value is reseted and starts again to be accumulated:
with sampledata as (select to_date('09.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union all
select to_date('09.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 29 val from dual union all
select to_date('09.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 30 val from dual union all
select to_date('09.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 45 val from dual union all
select to_date('09.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 60 val from dual union all
select to_date('09.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 75 val from dual union all
select to_date('09.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 95 val from dual union all
select to_date('09.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 17:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 23:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 14 val from dual union all
select to_date('10.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 34 val from dual union all
select to_date('10.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 58 val from dual union all
select to_date('10.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 70 val from dual union all
select to_date('10.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('10.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual)
select ts, val
from sampledata
order by ts asc;How should I change the select statement to skip all data sets before the first minimum and the duplicates after the maximum of a day in order to get such a result:
TS VAL
09.09.12 06:12 23
09.09.12 07:12 29
09.09.12 08:12 30
09.09.12 09:12 45
09.09.12 10:12 60
09.09.12 11:12 75
09.09.12 12:21 95
09.09.12 13:21 120
09.09.12 14:21 142
10.09.12 06:12 14
10.09.12 07:12 34
10.09.12 08:12 58
10.09.12 09:12 70
10.09.12 10:12 120
10.09.12 11:12 142
10.09.12 12:21 153Thank youThis solution works perfectly when the accumulated value has its low and its high on the same day. But I found out :( , that there is also data, which has its low yesterday and its high today. For a better understandig of the case, there is a machine, wich is working over 3 Shifts with irregular start and end time. For example Shift1 cann start at 5:50 or at 7:15. The accumulated value of the worked time is accumuated for each shift extra. This solution works for the shift 1 (approximate between 06:00-14:00) and for the shift 2(approximate between 14:00-22:00), because there is the low and the high of the accumulated value on the same day. This solution does not work for the shif 3(approximate between 22:00-06:00), because the high of the accumulated value is or can be the next day.
So the thread title should be: "Select just the values between min and max of an accumulated value over the same day(today) or over two successive days (yesterday and today)
Sampledata for shift 1 or shift 2:
{code}
with sampledata as (select to_date('09.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union all
select to_date('09.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 29 val from dual union all
select to_date('09.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 30 val from dual union all
select to_date('09.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 45 val from dual union all
select to_date('09.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 60 val from dual union all
select to_date('09.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 75 val from dual union all
select to_date('09.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 95 val from dual union all
select to_date('09.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 120 val from dual union all
select to_date('09.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 17:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('09.09.2012 23:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 143 val from dual union all
select to_date('10.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 144 val from dual union all
select to_date('10.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 145 val from dual union all
select to_date('10.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 147 val from dual union all
select to_date('10.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 148 val from dual union all
select to_date('10.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual union all
select to_date('10.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 153 val from dual)
, got_analytics AS
SELECT ts, val
, MIN (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts DESC
) AS min_val_after
, CASE
WHEN ROW_NUMBER () OVER ( PARTITION BY TRUNC (ts)
ORDER BY val
, ts
) = 1
THEN -1 -- Impossibly low val
ELSE LAG (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts
END AS prev_val
, MIN (val) OVER (PARTITION BY TRUNC (ts))
AS low_val_today
, NVL ( LAST_VALUE (val) OVER ( ORDER BY ts
RANGE BETWEEN UNBOUNDED PRECEDING
AND ts - TRUNC (ts) PRECEDING
, -1
) AS last_val_yesterday
FROM sampledata
SELECT ts
, val
FROM got_analytics
WHERE val <= min_val_after
AND val > prev_val
AND ( val > low_val_today
OR val != last_val_yesterday
ORDER BY ts
{code}
with the expected results:
{code}
1 09.09.2012 06:12:02 23
2 09.09.2012 07:12:03 29
3 09.09.2012 08:12:04 30
4 09.09.2012 09:12:11 45
5 09.09.2012 10:12:12 60
6 09.09.2012 11:12:13 75
7 09.09.2012 12:21:24 95
8 09.09.2012 13:21:26 120
9 09.09.2012 14:21:27 142
10 10.09.2012 06:12:02 143
11 10.09.2012 07:12:03 144
12 10.09.2012 08:12:04 145
13 10.09.2012 09:12:11 146
14 10.09.2012 10:12:12 147
15 10.09.2012 11:12:13 148
16 10.09.2012 12:21:24 153
{code}
And the sampledata for shift 3 is:
{code}
with sampledata as (select to_date('08.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union ALL
select to_date('08.09.2012 02:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 45 val from dual union all
select to_date('08.09.2012 05:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 78 val from dual union all
select to_date('08.09.2012 06:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 08:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 10:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 12:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 16:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 17:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 19:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 21:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 90 val from dual union all
select to_date('08.09.2012 22:00:12', 'dd.mm.yyyy hh24:mi:ss') ts, 24 val from dual union all
select to_date('08.09.2012 22:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 40 val from dual union all
select to_date('08.09.2012 23:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 68 val from dual union all
select to_date('09.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 79 val from dual union all
select to_date('09.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 124 val from dual union all
select to_date('09.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 125 val from dual union all
select to_date('09.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 126 val from dual union all
select to_date('09.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 17:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union all
select to_date('09.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 127 val from dual union ALL
select to_date('09.09.2012 22:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 5 val from dual union ALL
select to_date('09.09.2012 22:51:33', 'dd.mm.yyyy hh24:mi:ss') ts, 23 val from dual union all
select to_date('09.09.2012 23:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 40 val from dual union all
select to_date('10.09.2012 00:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 50 val from dual union all
select to_date('10.09.2012 01:03:08', 'dd.mm.yyyy hh24:mi:ss') ts, 60 val from dual union all
select to_date('10.09.2012 02:54:11', 'dd.mm.yyyy hh24:mi:ss') ts, 78 val from dual union all
select to_date('10.09.2012 03:04:08', 'dd.mm.yyyy hh24:mi:ss') ts, 142 val from dual union all
select to_date('10.09.2012 04:04:19', 'dd.mm.yyyy hh24:mi:ss') ts, 145 val from dual union all
select to_date('10.09.2012 05:04:20', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 06:12:02', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 07:12:03', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 08:12:04', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 09:12:11', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 10:12:12', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 11:12:13', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 12:21:24', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 13:21:26', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 14:21:27', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 15:21:30', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 16:21:32', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual union all
select to_date('10.09.2012 21:21:33', 'dd.mm.yyyy hh24:mi:ss') ts, 146 val from dual)
, got_analytics AS
SELECT ts, val
, MIN (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts DESC
) AS min_val_after
, CASE
WHEN ROW_NUMBER () OVER ( PARTITION BY TRUNC (ts)
ORDER BY val
, ts
) = 1
THEN -1 -- Impossibly low val
ELSE LAG (val) OVER ( PARTITION BY TRUNC (ts)
ORDER BY ts
END AS prev_val
, MIN (val) OVER (PARTITION BY TRUNC (ts))
AS low_val_today
, NVL ( LAST_VALUE (val) OVER ( ORDER BY ts
RANGE BETWEEN UNBOUNDED PRECEDING
AND ts - TRUNC (ts) PRECEDING
, -1
) AS last_val_yesterday
FROM sampledata
SELECT ts
, val
FROM got_analytics
WHERE val <= min_val_after
AND val > prev_val
AND ( val > low_val_today
OR val != last_val_yesterday
ORDER BY ts
{code}
with the unexpected results:
{code}
- ts val
1 08.09.2012 00:04:08 23
2 08.09.2012 22:12:13 40
3 08.09.2012 23:21:24 68
4 09.09.2012 22:21:33 5
5 09.09.2012 22:51:33 23
6 09.09.2012 23:21:33 40
7 10.09.2012 00:04:08 50
8 10.09.2012 01:03:08 60
9 10.09.2012 02:54:11 78
10 10.09.2012 03:04:08 142
11 10.09.2012 04:04:19 145
12 10.09.2012 05:04:20 146
{code}
The result should be:
{code}
- ts val
1 08.09.2012 00:04:08 23
2 08.09.2012 02:04:08 45
3 08.09.2012 05:03:08 78
4 08.09.2012 06:54:11 90
5 08.09.2012 22:00:12 24
6 08.09.2012 22:12:13 40
7 08.09.2012 23:21:24 68
8 09.09.2012 01:03:08 79
9 09.09.2012 02:54:11 124
10 09.09.2012 03:04:08 125
11 09.09.2012 04:04:19 126
12 09.09.2012 05:04:20 127
13 09.09.2012 22:21:33 5
14 09.09.2012 22:51:33 23
15 09.09.2012 23:21:33 40
16 10.09.2012 00:04:08 50
17 10.09.2012 01:03:08 60
18 10.09.2012 02:54:11 78
19 10.09.2012 03:04:08 142
20 10.09.2012 04:04:19 145
21 10.09.2012 05:04:20 146
{code}
Thank you for your help! -
How to get the link between mara, ausp, cawn and cawnt tables
hello ABAPERS
i have got a requiremet in that i have to get the relation .
how to get the link between mara, ausp, cawn and cawnt tables and also type how can we get link between char value and char description in cawn and cawnt tables through ausp and mara tables.
I would be very thankful for ur help in advance.
Thanks & Regards.
soniHi,
Sample report using the linkage between tables;
report batch_char no standard page heading
line-size 132
line-count 58(1)
message-id mm.
Report by Batch Characteristic *
Description : Report by Batch Characteristic *
Declaration for Tables
tables: mara, " Material Master
mard, " Storage Location Data for Material
t001w, " Plants/Branches
t001l, " Storage Locations
cabn, " Characteristics
inob. " Link between Internal Number and Object
Declaration for Constants
constants : c_klart like ausp-klart value '023', " Class Type
c_obtab like inob-obtab value 'MCH1', " Database Table
c_flag type c value 'X', " Flag
c_c23 type i value '23', " Ratio
Constants for Ratio Categories
c_13 type p decimals 2 value '13.00', " For Ratio 13
c_1499 type p decimals 2 value '14.99', " For Ratio 14.99
c_15 type p decimals 2 value '15.00', " For Ratio 15
c_1699 type p decimals 2 value '16.99', " For Ratio 16.99
c_17 type p decimals 2 value '17.00', " For Ratio 17
c_1899 type p decimals 2 value '18.99', " For Ratio 18.99
c_19 type p decimals 2 value '19.00', " For Ratio 19
c_2099 type p decimals 2 value '20.99', " For Ratio 20.99
c_21 type p decimals 2 value '21.00', " For Ratio 21
c_2299 type p decimals 2 value '22.99', " For Ratio 22.99
c_23 type p decimals 2 value '23.00', " For Ratio 23
c_g23(4) type c value '>=23', " For Ratio >=23
c_ratio(5) value 'RATIO', " For Ratio
Constants for Storing Selected item field information
c_cursor1(15) value 'I_OUTPUT1-MEINS', " For Selected Base
" Unit of Measure
c_cursor2(15) value 'I_OUTPUT1-MATNR', " For Selected Base
" Material Number
c_cursor3(15) value 'I_OUTPUT1-MAKTX', " For Selected Base
" Material Des.
c_cursor4(15) value 'I_OUTPUT1-CLABS', "For Selected Base
" Stock Value
c_cursor5(15) value 'I_OUTPUT1-ATFLV', " For Selected Base
" Char.Value (Ratio)
c_cursor6(5) value 'C_G23'.
Declaration for Global Variables
data : g_exit type c, " Flag
g_clabs1(16) type c, " Quantity
g_clabs(18) type c, " Quantity
g_cursor(15) type c, " Cursor field name
g_matnr type mara-matnr, " Material Number
g_werks type mchb-werks, " Plant
g_atinn(30) type c. " Character.
Declaration for Internal tables
Internal table to hold Batch Stock data
data : begin of i_mchb occurs 0,
matnr like mchb-matnr, " Material Number
werks like mchb-werks, " Plant
lgort like mchb-lgort, " Storage Location
charg like mchb-charg, " Batch Number
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Unit of measure
atflo like ausp-atflv, " Char.Value (Ratio)
atflv like ausp-atflv, " Char.Value (Ratio)
end of i_mchb.
Internal table to hold Secondary List data
data : begin of i_mchb1 occurs 0,
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
lgort like mchb-lgort, " Storage Location
charg like mchb-charg, " Batch Number
atinn like ausp-atinn, " Char.Value
clabs like mchb-clabs, " Stock Value
atflo like ausp-atflv, " Char.Value (Ratio)
atflv like ausp-atflv, " Char.Value (Ratio)
end of i_mchb1.
Internal table to get the Plant Name
data : begin of i_plant occurs 0,
werks like t001w-werks, " Plant
name1 like t001w-name1, " Name
end of i_plant.
Internal table to get the Material Description
data : begin of i_makt occurs 0,
matnr like makt-matnr, " Material
maktx like makt-maktx, " Description
end of i_makt.
Internal table to hold AUSP data
data : begin of i_ausp occurs 0,
objek like ausp-objek, " Object No
atinn like cabn-atinn, " Characteric value
atflv like ausp-atflv, " Characteristic Value
end of i_ausp.
Internal table to hold output data
data : begin of i_output occurs 0,
atinn like cabn-atinn, " Characteric value
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
atnam like cabn-atnam, " Characteristic
atflv like ausp-atflv, " Char.Value (Ratio)
name1 like t001w-name1, " Plant Description
maktx like makt-maktx, " Material Description
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Base Unit of Measure
end of i_output.
Internal table to hold final Output data
data : begin of i_output1 occurs 0,
atinn like cabn-atinn, " Characteric value
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
atnam like cabn-atnam, " Characteristic
atflv(32) type c, " Char.Value (Ratio)
name1 like t001w-name1, " Plant Description
maktx like makt-maktx, " Material Description
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Base Unit of Measure
end of i_output1.
Selection screen
selection-screen begin of block b1 with frame title text-001.
select-options: s_werks for t001w-werks obligatory, " Plant
s_lgort for t001l-lgort, " Stor.Location
s_matnr for mara-matnr obligatory, " Material No
s_atinn for cabn-atinn. " Character.
selection-screen end of block b1.
At selection screen
at selection-screen.
Validation of Selection Screen Fields
perform validate_screen.
Start of selection
start-of-selection.
Get the Material and Batch Stock data from MARA and MCHB Tables
perform get_mat_stock_data.
Get the Material Group Text and Plant Name from T023T and T001W Tables
perform get_plant_grp_data.
Append the data into final Output Internal Table after getting the
Characteristic Values data from INOB and AUSP Tables
perform append_final_data.
Processing if the Characteristics contain 'RATIO'
perform collect_ratio.
End-of-Page
end-of-page.
write /1(125) sy-uline.
End of selection
end-of-selection.
if g_exit <> c_flag.
Display the Report Output data
perform display_report.
endif.
Top-of-Page
top-of-page.
Write the Report and Column Headings
perform get_headings.
at line-selection
at line-selection.
if sy-lsind = 1.
perform display_batch.
endif.
Top of page during line-selection
top-of-page during line-selection.
perform heading_seclist.
Form validate_screen
Validation of Selection Screen fields
form validate_screen.
Validation of Plant
clear t001w.
if not s_werks[] is initial.
select werks
into t001w-werks
from t001w
up to 1 rows
where werks in s_werks.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Plant'(002).
endif.
endif.
Validation of Material Number
clear mara.
if not s_matnr[] is initial.
select matnr
into mara-matnr
from mara
up to 1 rows
where matnr in s_matnr.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Material'(003).
endif.
endif.
Validation of Storage Location
clear t001l.
if not s_lgort[] is initial.
select lgort
into t001l-lgort
from t001l
up to 1 rows
where lgort in s_lgort.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Storage Location'(004).
endif.
endif.
Validation of Characteristic Value
clear cabn.
if not s_atinn[] is initial.
select atinn
into cabn-atinn
from cabn
up to 1 rows
where atinn in s_atinn.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Characteristic Value'(005).
endif.
endif.
Validation of Plant, Material and Storage Location
clear mard.
select matnr werks lgort
into (mard-matnr, mard-werks, mard-lgort)
from mard
up to 1 rows
where matnr in s_matnr and
werks in s_werks and
lgort in s_lgort.
endselect.
if sy-subrc <> 0.
message e899 with 'No Data found for the Selection Criteria'(006).
endif.
endform. "validate_screen
*& Form get_headings
Write the Report and Column Headings
form get_headings.
data: l_repid type sy-repid.
l_repid = sy-repid.
call function 'Y_STANDARD_HEADING'
exporting
repid = l_repid
heading1 = sy-title.
write:/1(125) sy-uline.
format color col_heading on.
write : /1 sy-vline, 2(18) 'Material Number'(008) centered,
20 sy-vline, 21(40) 'Material Description'(011) centered,
61 sy-vline, 62(22) 'Ratio'(009) centered,
84 sy-vline, 85(18) 'Quantity'(010) centered,
103 sy-vline, 104(20) 'Base Unit of Measure'(015) centered,
125 sy-vline.
write:/1(125) sy-uline.
format color off.
endform. "get_headings
*& Form get_mat_stock_data
Get the Material and Batch Stock data from MARA and MCHB Tables
form get_mat_stock_data.
clear: i_mchb,i_output, i_output1.
refresh: i_mchb,i_output, i_output1.
select a~matnr " Material Number
b~werks " Plant
b~lgort " Storage Location
b~charg " Batch Number
b~clabs " Stock Value
a~meins " Base Unit of Measure
into table i_mchb
from mara as a inner join mchb as b
on amatnr eq bmatnr
where b~matnr in s_matnr and
b~werks in s_werks and
b~lgort in s_lgort.
if sy-subrc <> 0.
g_exit = c_flag.
message s899 with 'No Data found for the Selection Criteria'(006).
stop.
endif.
sort i_mchb by matnr werks lgort charg.
endform. " get_mat_stock_data
*& Form get_plant_grp_data
Get the Material Group Text and Plant Name from T023T and T001W
form get_plant_grp_data.
if not i_mchb[] is initial.
Get the Plant Description from t001w Table
clear i_plant.
refresh i_plant.
select werks " Plant
name1 " Name
into table i_plant
from t001w
for all entries in i_mchb
where werks = i_mchb-werks.
Get the Material Description from MAKT Table
clear i_makt.
refresh i_makt.
select matnr " Material number
maktx " Material Description
into table i_makt
from makt
for all entries in i_mchb
where matnr = i_mchb-matnr and
spras = sy-langu.
sort i_plant by werks.
delete adjacent duplicates from i_plant comparing werks.
sort i_makt by matnr.
delete adjacent duplicates from i_makt comparing matnr.
endif.
endform. "form get_plant_grp_data.
*& Form append_final_data
Append the data into final Internal Table
form append_final_data.
data : l_matbatch(28),
l_tabix like sy-tabix.
if not i_mchb[] is initial.
loop at i_mchb.
l_tabix = sy-tabix.
clear l_matbatch.
concatenate i_mchb-matnr i_mchb-charg into l_matbatch.
move-corresponding i_mchb to i_output.
Get the Plant Description from i_plant Table
read table i_plant with key werks = i_mchb-werks binary search.
if sy-subrc = 0.
i_output-name1 = i_plant-name1.
endif.
Get the Material Description from i_makt Table
read table i_makt with key matnr = i_mchb-matnr binary search.
if sy-subrc = 0.
i_output-maktx = i_makt-maktx.
endif.
Get the Characteristic Values data from INOB and AUSP Tables
clear inob.
select single cuobj from inob
into inob-cuobj
where klart = c_klart and
obtab = c_obtab and
objek = l_matbatch.
if sy-subrc = 0.
select objek
atinn
atflv
from ausp
into table i_ausp
where objek = inob-cuobj and
atinn in s_atinn and
klart = c_klart.
sort i_ausp by objek atinn.
loop at i_ausp.
clear cabn.
select single atinn atnam from cabn
into (cabn-atinn,cabn-atnam)
where atinn = i_ausp-atinn.
if sy-subrc = 0.
If the ratio value is between 13-14.99, display 13
if cabn-atnam cs c_ratio.
if i_ausp-atflv between c_13 and c_1499.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_13.
If the ratio value is between 15-16.99, display 15
elseif i_ausp-atflv between c_15 and c_1699.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_15.
If the ratio value is between 17-18.99, display 17
elseif i_ausp-atflv between c_17 and c_1899.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_17.
If the ratio value is between 19-20.99, display 19
elseif i_ausp-atflv between c_19 and c_2099.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_19.
If the ratio value is between 21-22.99, display 21
elseif i_ausp-atflv between c_21 and c_2299.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_21.
If the ratio value is greater than or equal to 23, display 23
elseif i_ausp-atflv >= c_23.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_23.
endif. " Condition for RATIO values
else. " If characteristic does contain RATIO
i_mchb-atflv = i_ausp-atflv.
endif.
i_output-atinn = cabn-atinn.
i_output-atnam = cabn-atnam.
i_output-atflv = i_ausp-atflv.
i_mchb1-matnr = i_mchb-matnr.
i_mchb1-werks = i_mchb-werks.
i_mchb1-lgort = i_mchb-lgort.
i_mchb1-charg = i_mchb-charg.
i_mchb1-clabs = i_mchb-clabs.
i_mchb1-atinn = i_ausp-atinn.
i_mchb1-atflo = i_mchb-atflv.
i_mchb1-atflv = i_ausp-atflv.
append : i_output, i_mchb1.
clear i_mchb1.
modify i_mchb index l_tabix transporting atflo atflv .
endif.
endloop.
endif.
endloop.
endif.
Checking whether the table is filled or not
if not i_output[] is initial.
sort i_output by atinn werks matnr atflv.
else.
g_exit = c_flag.
message s899 with 'No Data found for the Selection Criteria'(006).
endif.
Delete the records where RATIO is less than 13.
delete i_output where atnam cs c_ratio and atflv lt c_13.
endform. "append_final_data
*& Form display_report
Display the Report Output data
form display_report.
data: l_tabix like sy-tabix.
loop at i_output1.
l_tabix = sy-tabix.
At new Characteristic
at new atinn.
read table i_output1 index l_tabix.
format color 1 intensified on.
write: /1 sy-vline, 2(20) 'Characteristic Name:'(007),
23(40) i_output1-atnam,
125 sy-vline.
format color off.
format color 4 intensified on.
write: /1 sy-vline, 2(20) 'Plant Name :'(022),
23(4) i_output1-werks, 29(30) i_output1-name1,
125 sy-vline.
format color off.
write /1(125) sy-uline.
endat.
clear: g_clabs, g_clabs1.
format color col_normal.
write :/1 sy-vline, 2(18) i_output1-matnr,
20 sy-vline, 21(40) i_output1-maktx,
61 sy-vline.
if i_output1-atflv = c_c23.
write: 62(22) c_g23 centered.
else.
shift i_output1-atflv left deleting leading space.
write: 62(22) i_output1-atflv centered.
endif.
write: 84 sy-vline,
103 sy-vline,
110(5) i_output1-meins.
If the quantity value is negative
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
hide : i_output1.
new-line.
At end of material
at end of matnr.
sum.
move : i_output1-matnr to g_matnr.
format color 3 intensified on.
write /1(125) sy-uline.
write :/1 sy-vline, 2(25) 'Total for Material :'(012),
28(18) g_matnr.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
write: 125 sy-vline.
format color off.
write /1(125) sy-uline.
endat.
At end of plant
at end of werks.
sum.
move : i_output1-werks to g_werks.
format color 3 intensified off.
write :/1 sy-vline, 2(25) 'Total for Plant :'(013),
28(4) g_werks.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
write /1(125) sy-uline.
endat.
At end of characteristic
at end of atinn.
read table i_output1 index l_tabix.
sum.
format color 3 intensified on.
write :/1 sy-vline, 2(25) 'Total for Characteristic:'(014),
28(25) i_output1-atnam.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
write /1(125) sy-uline.
endat.
endloop.
endform. " display_report
*& Form DISPLAY_BATCH
Display the batch details for the seclected material *
form display_batch.
Get the batch details for the selected material
get cursor field g_cursor.
if g_cursor = c_cursor1 or
g_cursor = c_cursor2 or
g_cursor = c_cursor3 or
g_cursor = c_cursor4 or
g_cursor = c_cursor5 or
g_cursor = c_cursor6.
format color 3.
write: /1 sy-vline,
2(17) 'Material Number :'(020),
20(17) i_output1-matnr,
94 sy-vline.
format color off.
write /1(94) sy-uline.
loop at i_mchb1 where matnr = i_output1-matnr and
atinn = i_output1-atinn and
atflo = i_output1-atflv.
format color col_normal.
shift i_mchb1-charg left deleting leading '0'.
write :/1 sy-vline, 2(16) i_mchb1-lgort centered,
18 sy-vline, 19(17) i_mchb1-charg centered,
36 sy-vline.
if i_output1-atnam cs c_ratio.
write: 37(29) i_mchb1-atflv
exponent 0 decimals 2 centered.
else.
write : 37(29) i_mchb1-atflv
exponent 0 decimals 0 centered.
endif.
write : 66 sy-vline, 67(27) i_mchb1-clabs unit i_mchb-meins,
94 sy-vline.
format color off.
endloop.
write /1(94) sy-uline.
else.
message s899 with 'Invalid cursor position'(016).
exit.
endif.
endform. " DISPLAY_BATCH
*& Form HEADING_SECLIST
Write the Column Headings for Interactive Report
form heading_seclist.
write /1(94) sy-uline.
format color col_heading on.
write :/1 sy-vline, 2(16) 'Storage Location'(021),
18 sy-vline, 19(17) 'Batch Number'(017) centered,
36 sy-vline, 37(29) 'Characteristic Value'(018) centered,
66 sy-vline, 67(27) 'Quantity'(019) centered,
94 sy-vline.
write /1(94) sy-uline.
format color off.
endform. " HEADING_SECLIST
*& Form COLLECT_RATIO
Display the Characteristic ratio data
form collect_ratio.
loop at i_output.
clear g_atinn.
i_output1-atinn = i_output-atinn.
i_output1-atnam = i_output-atnam .
i_output1-werks = i_output-werks.
i_output1-name1 = i_output-name1.
i_output1-matnr = i_output-matnr.
i_output1-maktx = i_output-maktx.
i_output1-clabs = i_output-clabs.
i_output1-meins = i_output-meins.
call function 'CONVERSION_EXIT_ATINN_OUTPUT'
exporting
input = i_output-atinn
importing
output = g_atinn.
if g_atinn cs c_ratio.
If the ratio value is between 13-14.99, display 13
if i_output-atflv between c_13 and c_1499.
i_output1-atflv = c_13.
If the ratio value is between 15-16.99, display 15
elseif i_output-atflv between c_15 and c_1699.
i_output1-atflv = c_15.
If the ratio value is between 17-18.99, display 17
elseif i_output-atflv between c_17 and c_1899.
i_output1-atflv = c_17.
If the ratio value is between 19-20.99, display 19
elseif i_output-atflv between c_19 and c_2099.
i_output1-atflv = c_19.
If the ratio value is between 21-22.99, display 21
elseif i_output-atflv between c_21 and c_2299.
i_output1-atflv = c_21.
If the ratio value is greater than or equal to 23, display 23
elseif i_output-atflv >= c_23.
i_output1-atflv = c_23.
endif.
write i_output1-atflv to i_output1-atflv .
else.
write i_output-atflv to i_output1-atflv exponent 0 decimals 0.
endif.
collect i_output1.
clear i_output1.
endloop.
sort i_output1 by atinn werks matnr atflv.
endform. " COLLECT_RATIO
Reward if useful..
Regards,
Anji -
What is the defference between select single * from and select * from Where
What is the defference between select single * from and select * from Where
which is prefferable and best one.Hai,
*Difference Between Select Single and Select * from table UpTo One Rows:*
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
The best way to find out is through sql trace or runtime analysis.
Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set. -
In TCA, what is the difference between Item instance owner and System's own
Hi,
In TCA, what is the difference between Item instance owner and System's owner ?
thanks
siva...can i make as many iweb websites as i want? ...and as many blogs as i want? ...i have never made one before....
....although, i do have my own small business and i do have a website that i paid a guy to make and also host....(which is a waste of $$$$ in my opinion as i think i can do a better job making one myself through iweb) ....
...anyways, i know it is splitting hairs but what exactly is the diff b/w a blog and a website ....i am under the impression that a blog is just a personal newsletter sort of thing,...? -
What is the difference between generate partner profile and creat partner
What is the difference between generate partner profile and creat partner profile ?
Create Partner ProfilesAlthough partner profiles are usually created automatically, because of the unusual inbound and outbound profiles needed on the same system, the manual generation of certain profiles is required.
The following subsections describe the partner profile settings for the standard client (assumed here to be ALExxxCyyy), as well as for the corresponding dummy client (assumed to be DUMxxxCyyy). The dummy client partner profiles should have been generated by the automatic generation process completed previously. Nevertheless, these should be checked to ensure that all profiles exist.
Generation of Partner Profiles
The following messages should be added to the 4xx-ORDR model for ALExxxCyyy to DUMxxxCyyy on the reference client:
ORDERS
ORDCHG
ZINVRV
ORDRSP
INVOIC
FIDCMT
The partner profiles should first be generated using the standard auto-generation procedure on the reference client (for SYNCH messages to be created).
This model should now be distributed to the both ALExxxCyyy and DUMxxxCyyy.
The partner profiles should now be generated on the client being configured (i.e. yyy) using the auto-generation procedure defined in the standard ALE configuration procedures.
Generate partner profiles for sending system. (Can only do this if at least 1 message type exists against the sending system's LS). This automatically generates the port if the LS and RFC name are the same.
generate partner profiles tcode BD82
creating partner profiles tcode WE20
 There are two methods for maintaining the partner profile:
 Maintain partner profile manually:
To navigate to the partner profile in the sender system, choose Partner profile -> Partner type of Logical System and click on the required Target system. Under Outbound parameters, choose the Create outbound parameters icon, and enter the values for the outbound parameters according to the slide Sender: Partner Profile (outbound).
To navigate to the partner profile in the sender system, choose Partner profile -> Partner type of Logical System and click on the required Sending system. Under Inbound parameters, choose the Create inbound parameters icon and enter the values for the inbound parameters according to the slide Sender: Partner Profile (inbound).
 Generate partner profile:
Prerequisite: The current distribution model is distributed to all participating systems.
In the sender system, choose: Generate Partner Profile, then check the result in the partner profile (outbound)
In the sender system, choose: Generate Partner Profile, then check the result in the partner profile (inbound)
Regards
Vasu -
What is the difference between on new focus and do prepare out put methods
Hi,
what is the difference between on new focus and do prepare out put methods.Hi Divya,
DO_PREPARE_OUTPUT method is triggered each time the view is prepared after each event. Normally we redefine this method in order default the initial values based upon the parameter iv_first_time = 'X'. There can be certain other scenarios like putting data validations where this method can be helpful.
For details on ON_NEW_FOCUS, refer to this [thread|on_new_focus event;
Thanks
Vishal -
The difference between VGA, DVI-D and ADC?
Hi.
The difference between VGA, DVI-D and ADC and which should be used with a T244 widescreen monitor into a Quicksilver G4 with a GeForce2 MX nVIDIA (0x10de) card. What's a good upgrade card if the above is not good enough?
Thank you for your input.
WalterLook at this link http://en.wikipedia.org/wiki/DigitalVisualInterface
Cheers, Tom -
The difference between AIR-ANT5135D-R and AIR-ANT5135DB-R
Hi,
Anyone know what is the difference between AIR-ANT5135D-R and AIR-ANT5135DB-R ?
From the dynamic configuration tools for 1252 and 1242, AIR-ANT2422DB-R is inside one of the antenna option.
However, I can't find it in the "Cisco Aironet Antennas and Accessories Reference Guide"
http://www.cisco.com/en/US/prod/collateral/wireless/ps7183/ps469/product_data_sheet09186a008008883b.html
Inside the document there is only AIR-ANT5135D-R.
likewise for the 2.4 GHz, AIR-ANT2422DB-R is inside the dynamic configuration tools and not inside "Cisco Aironet Antennas and Accessories Reference Guide"
Any help would be appreciated
Thanks,
RichardFound the difference, AIR-ANT5135DB-R and AIR-ANT2422DB-R are non-articulating antennas.
Thanks!
Richard
Maybe you are looking for
-
HI, How to create folder in Menu Like In Production Menu we have productionReport.How is it possible?Using Vb.Net
-
Can't install OSX on Seagate Barracuda 1TB in Mac Pro1,1. Any ideas?
Hi all I've got a Mac Pro 1,1 and just installed a new Seagate ST1000DM003 3.5 inch 1TB Barracuda Hard Drive. I was hoping to install OSX on it but seemingly the OS won't recognise it. The drive is formatted (Mac OSX Journalled) is GUID, and boots pe
-
What is with all of the mail activity?
I am running Mavericks 10.9.1. I have a Gmail account. When I am in Mail, there is a constant incoming of messages in the "Mail Activity" section on the bottom left corner of the window. All of these messages are not going to my inbox, so I am ass
-
Question about disabling the IP cache
Hi, There is TCL command for that. Check Pg 121 of UG835 - http://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_1/ug835-vivado-tcl-commands.pdf You can use -disable_cache switch to disable the cache for that IP.
-
BT Infinity - Massive Speed Drop !
I had BT Infinity 2 installed 12 days ago and have been more than happy with the performance..... until now. The connection stats below speak for themselves. The HH5 current connection status is first, followed by a speedtest last Sunday morning and