How to calculate usage value through measuring document.

Hi,
While creating Sales Order with reference to a Contract i need to update the usgae value in the Order Quantity ( RV45A-KWMENG ) field (at line item level).
Can you help me calculate usage value through measuring documents for equipment over a period of time.
Is there any function module for the same?
Thanks.

Hi,
To determine the usage value of a an equipment I had followed the following.
From table STPO, check if the material receipted belongs to a standard BOM (STLTY='S')
If yes, record the BOM (STLNR)  and the BOM item node number (STLKN)
From PLMZ table, select the task list type (PLNTY), the key for task list group (PLNNR), the group counter (PLNAL), the task list node number for operation (PLNKN),   if the record is not flagged for deletion (LOEZ)
From PLFH table, select the object type of the CIM resource (OBJTY), the object id of the resource (OBJID), the usage value (EWVGW) if the record is not flagged for deletion (LOEZ)
From CRVE_A table, select the equipment number (EQUNR)
The result of this selection will be all the tools which can be used for the production of the material receipted.
The measuring point for this or these equipment(s) will be selected from equipment number and EQUI table
The result of this selection will be all the measuring point to update.
Create new measurement document for the selected measurement point (transaction IK11)
Technically go as follows:-
MAT = material receipted
Select STLY, STLNR, STLKN from STPO table where IDNRK='MAT' and STLTY='S'
If results exist
Select STLTY, PLNNR, PLNAL, PLNKN from PLMZ where PLMZ.STLTY=STPO.STLTY and PLMZ.STLNR=STPO.STLNR and PLMZ.STLKN=STPO.STLKN
And PLMZ.LOEZ<>'X'
Select EWVGW, OBJTY, OBJID from PLFH twhere PLFH.STLTY=PLMZ.STLTY and PLFH.PLNNR=PLMZ.PLNNR and PLFH.PLNAL=PLMZ.PLNAL and PLFH.PLNKN=PLFH.PLNKN and PLFH.LOEKZ<>'X'
USAGE=PLFH.EWVGW
Select EQUNR from CRVE_A where CRVE_A.OBJTY=PLFH.OBJTY and CRVE_A.OJBID=PLFH.OBJID
All the equipment number selected at this moment will be called EQUIP in the next steps
EQUIP= Equipment number previously selected
Select OBJNR from EQUI where EQUNR=EQUIP
Select PARNR from IHPA where OBJNR=EQUI.OBJNR
If PARNR = Vend then
Select IMRC_POINT from equi where equnr=equip
All the measuring points  selected at this moment will be called MEASP  in the next steps
For each MEASP
Insert into IMRG the new increment value  (USAGExMAT) in field CDIFF
Remark: the field CDIFF is managed in floating point number, accurate to 8 bytes.
I hope this is useful for you.
Regards,
Ankur Parab

Similar Messages

  • How to calculate acquisition value for specified day

    Hi,
    in my z program I have a problem how to calculate acquisition value for my asset for specified day.
    Example:
    I have asset created 8.7.2008 with TTYPE 104 (External asset acquisition) with value 5950.
    30.11.2008 there is another TTYPE 272 (Retirement of current-yr acquis., w/o revenue) with value 950.
    So BEFORE 30.11.2008 acquisition value is 5950. After is 5000. Is there any function module (or something else) in SAP system where I can send asset number and date a it return to me acquisition value for that day?
    Many thanks for any answer!

    Hi,
    your suggestion means that I have to compute acquisition value by myself (sum all TTYPE 1** - sum all TTYPE 2**). So SAP does't provide such functionality (LDB ADA have it, because it can compute acquisitiob value for specific day)?
    Mant thanks for answer

  • How to copy NCLOB value(Contains Word Document) into file system

    How to copy NCLOB value(Contains Word Document) into file system or display in sqlplus

    The UTL_FILE package will write it only to text file not(NCLOB Value[containts images as well as text])

  • How to calculate average not through basic formula

    Can any bodytell me how to calculate averge of 96 rows in the quey designer  not by hard coding them.
    Is there any formula for creating it through formula or through calculations .
    And also how to calculate the maximum value and minimum value of the entire 96 rows  which is picking from a Z table -ZDC_2100.
    Iam having time blocks of 96 for 24 hrs each of  15Min.

    Hi,
    You can achieve using a counter at baselevel and use exception aggregation at query level...
    Also check the below links might be useful:
    http://help.sap.com/saphelp_nw04/helpdata/en/75/21054da1392649948e5b94e4fc4bce/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/e0173f5ff48443e10000000a114084/frameset.htm
    Hope this helps.......
    Rgs,
    I.Ravikanth

  • How to pass attribute values through variables in JSP  Custom TagLib

    Hi,
    Can anybody help me how to pass values through varuables in the jsp custom tag.
    i am using JSP custom tag. I am unable to pass attribute values through variables.
    <invitation:invdetails invid="<%=invid%>"/> The value is passing as <%=invid%> ,not value of the invid.
    But i am getting throuh the fllowing
    <invitation:invdetails invid='1' />
    Please anybody suggest me how to pass value by using the variable.

    Hi,
    It sounds like you need to set the <rtexprvalue> tag to true in the TLD for your tag. If you do this the tag will read in the value you are trying to pass to it.
    dapanther...

  • How to pass form value through URL?

    I have a page set up so that pressing the submit on a form will execute a certain page. For certain reasons I also have a URL HREF link that performs a different function. I need to get the value of a radio button group (all with the same name) and pass that value through the URL if it is pressed. So if someone clicks on the second radio button in the list which has a value of 2, I need to somehow set that to a variable to pass through a URL link. Each time the user changes the radio button I need to dynamically change the variable too.
    Is there any way to do this?

    Thanks for the suggestions everyone. Here is what I have so far:
    I have a cfInput that binds to the radio buttons so the value of the cfinput changes dynamically.
    I have a CFDIV that binds to a separate .cfm page that passes the cfinput through as an argument.
    The .cfm is very basic:
    <cfoutput>
        <cfif isdefined("url.InputText") AND url.InputText NEQ "">
            <cfset FeedVar = #url.InputText#>
        <cfelse>
        </cfif>
    </cfoutput>
    This method appears to work and it sets the Feedvar variable to the appropriate value. However on my first page with the cfdiv tag when I try to pass the #FeedVar# variable through a URL it says it is not defined.
    Any clue if I am doing something wrong passing the new variable back?
    Here is the CFINPUT and CFDIV tags:
    <cfinput type="text" name="update_typeURL" bind="{update_type}" bindonload="true" />
    <cfdiv bind="URL:setURlVar.cfm?InputText={update_type}" ID="theDiv" bindonload="true"  />
    Any ideas on how to read the newly set variable?

  • How to pass row values through OpenDocument Hyperlink

    Hi all,
    I should pass through an OpenDocument hyperlink the value of a particular row of my report. No problems about the OpenDocument syntax and about the other parameters that come from prompt answers, but I don't know how to pass only the value of that particular row. This value doesn't come from a prompt.
    So for example if the column of my report was "Account number" and the 1° row of the column that comes from the query was "123456", I should pass only the account number "123456" to the linked document.
    Moreover, I have to create the hyperlink on the "Account number" column.
    Hoping having been clear...
    Thanks in advance,
    Riccardo

    Hi Stratos,
    Thanks for the reply but I have not understood very well.
    I try to explain better my issue, making an example of the problem in Open doc syntax
    http://aaaaa.bbbbb.com:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=12345&..............&lsSParam1=()&lsSParam2=()&lsSParam3=()
    The problem is in the 3° paramater. This parameter is not a user response variable, it comes from an object projected in the report. The object is a numeric type.
    The aim is to pass to the 2° report exactly the content of the cell of the 3° parameter, dinamically (I mean depending on the cell selected by the user).
    Thanks.
    Regards,
    Riccardo

  • How do I use values form different documents on numbers?

    I have two problems:  When I open an Excel worksheet that has references to other spreadsheets, Numbers automatically turns these cells into formulas with the wrong reference, giving therefore the wrong values.  How do I prevent or change this?
    I also do not know how to use data from different documents on a spreadsheet

    As it seems that you didn't understood, I repeat :
    there is no built-in feature allowing us to exchange datas between two different documents.
    So, what you get when you import an Excel document embedding external links is the designed behavior.
    Here you are speaking to end users like you. We can't change the app behaviour.
    If you need to work with linked XL documents, Numbers is not the good tool.
    Download and use the free LibreOffice.
    Yvan KOENIG (VALLAURIS, France)  jeudi 8 décembre 2011 09:34:23
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • How to calculate mean value of a matrix

    Hi... I ve one matrix of order (m*n). I need to calculate the mean value of this matrix. How to do this?
    let we consider the matrix as 4x4.(Row=Column=4) The resultant matrix i.e mean value matrix is 1x4(Row=4,Column=1). To read the row value simultaneously in order to calculte the mean value thro row.... ?  please help me out
    Example:
    Matrix A=1 2 3 4
                   5 6 7 8
                   1 3 5 7
                   2 4 6 8. 
    Mean value thro row would be:   10/4 [  (1+2+3+4)/4
                                                      26/4 [ (5+6+7+8) /4...Like this i ve to do..
    Please help me out

    Hi,
      See this attachment.....
    Thanks and regards,
    srikrishnaNF
    Attachments:
    Example_VI_BD.png ‏3 KB

  • How to calculate excise values in case of "No Bond"

    Dear All,
    For Export scenario, BED, ECESS and HrECESS  are calculated as "Statistical" condition types.
    So it will not hit the accounts.
    But in case of "No Bond" export type, Excise values should hit the accounts.
    How to do the configuration for this. Because, we already defined excise related condition types as "Statistical".
    How to manage this situation.
    Please give some suggestions.
    Regards,
    Mullairaja

    Hi
    Even if you select your export type as NO Bond and in your pricing procedure the excise related conditions are statistical even then in excise invoice will generate the accounting document.
    regards
    SAP SD

  • How to calculate the amount for cleared documents.

    Hi Experts,
    I am working on a program and here i need to display the amount for the cleared document.
    I have a scenario where there are two financial document related to a single cleared document.
    I can get the amount for financial document from BSAK by passing the BELNR value of the financial document and confirm if it is a clearing document by comparing AUGBL value of BSAK with document number of cleared document.
    Actually i am not very clear about the process flow of clearing document.
    If anyone can explain me the same.

    Hello,
    Go through this links it will help full
    http://help.sap.com/saphelp_sbo2004c/helpdata/en/fd/25f4c6d8888e40a521972d0be5d68b/content.htm
    http://help.sap.com/saphelp_45b/helpdata/en/e5/0783e84acd11d182b90000e829fbfe/frameset.htm

  • How to calculate avg value in bex

    Hi all
    I have a requirement
    I want to run a query for a particular period say 0032005.
    in the query output value will display for all prior period in different column. for perod 003
    it will display value for 001 , 002 ,003. and
    at the last column  i want calculate the avarage for this 3 period. these should be dinamic.
    if i run this query for period 0052005. query will display value for period 001 ,002 ,003,004,005 and last column will display avarage for the 5 period.
    i am able to diaplay each prior period in different column that is fine. but i am not abel to calculate the avarage column.
    example
    selection screen :
    fiscal period : 0042005
    Query output
    Char 0012005 0022005 0032005 0042005   Avg
         88        99     77       66     (889977+66)/004
    Please any one know about please help with steps.
    Thanks

    I have a requirement
    I want to run a query for a particular period say 0032005.
    in the query output value will display for all prior period in different column. for perod 003
    it will display value for 001 , 002 ,003. and
    at the last column i want calculate the avarage for this 3 period. these should be dinamic.
    if i run this query for period 0052005. query will display value for period 001 ,002 ,003,004,005 and last column will display avarage for the 5 period.
    i am able to diaplay each prior period in different column that is fine. but i am not abel to calculate the avarage column.
    example
    selection screen :
    fiscal period : 0042005
    Query output
    Char 0012005 0022005 0032005 0042005 Avg
    88 99 77 66 (889977+66)/004
    I got the resolution as bellow.
    In the Characteristic Property Set it as Suppress Result Rows-> Never. For the key figure Set Calculate Result Rows-> Average of All Values.
    yes it is working fine . but there is a small problem in the column heading for this colume is displying as overall result. but values are displying as a avg value. how can i change it.
    why i ahve to create a text variable. please explain

  • How to calculate query value on extended range of data

    Hi,
    This is my first post, so let me greet all forum users. I'm reading the forum for few weeks and I'm really impressed with the force of this community.
    My question is based on some real problems but I'll ask in general:
    In a BEx query - is it possible (and how?) in a result cell to obtain value that is calculated based on some more extended range of infoprovider records than it results from all the characteristics related to that cell?
    The question is somehow about a reverse case to the restriction in Selection. I'm asking about a kind of 'extension' of selection.
    Example for the question follows (it is somehow simple, I put it here just to picture the problem, note: the question is more general!)
    cube: ch: 0CALMONTH, 0MATERIAL, 0PLANT
          kf: 0QUANTITY (ex. of outgoing deliveries)
    What I need is to obtain in any query the SUM(0QUANTITY) over all 0PLANT (this can lead to knowing the 'activity' of the specific plant by calculating the share. that activity can be calculated at diferent level of detail).
    The 'dream' query would look like:
    rows: 0CALMONTH, 0MATERIAL, 0PLANT      
    cols: 0QUANTITY  SUM_OVER_0PLANT
    resulting in ex:
    0CALMONTH  0MATERIAL  0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    2005.01    00001      P100    10         30               1/3
    2005.01    00001      P200    20         30               2/3
    2005.01    00002      P100    30         70               3/7
    2005.01    00002      P200    40         70               4/7
    2005.02    00001      P100    50         110              5/11
    2005.02    00001      P200    60         110              6/11
    2005.02    00002      P100    70         150              7/15
    2005.02    00002      P200    80         150              8/15
    after removing drill 0MATERIAL:
    0CALMONTH  0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    2005.01    P100    40         100              4/10
    2005.01    P200    60         100              6/10
    2005.02    P100    120        260              12/26
    2005.02    P200    140        260              14/26
    after removing drill 0CALMONTH:
    0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    P100    160        360              16/36
    P200    200        360              20/36
    For this specific case I investigated several solutions:
    1) using formula & function SUMCT (Result). This has a drawback that Result for 0PLANT must be present in right place (bottom level) in the resulting query. I don't like this.
    2) SUM can be directly precalculated in the cube. Well, I'd prefer Bex only...
    Please keep in mind also following:
    1) there may be a need to refer to the data that is outside prompt/filtering/restricting range.
    2) I want to preserve all the OLAP freedom, so all the solution should be a query with some tricky formula/kf/??? to be used by user in any situation and producing right result.
    I hope I'm not demanding to much...
    (now after this long example please have a look at the question again!)
    Regards,
    Mirek

    Hi Ashwin,
    while using SUMCT I loose the freedom of OLAP. SUMCT calculates properly SUM_OVER_0PLANT only when the 0PLANT is the lowest drillin level. If this is not the case (ie. some other ch is the lowest level or 0PLANT results are suppressed) the approach won't provide right result.
    sure I will reward all helpfull posts.
    regards,
    Mirek

  • How to calculate the values

    Hi Experts,
    I have doubt, i have an internal table now i want to calculate the total for every group. How to do that?
    value          type
    5,439.01 ;    ZMP0
      509.60 ;     ZMP0
    4,749.26 ;    ZMP0
    9,053.95-    ZPNL
    732.70-      ZPNL
    66.30-       ZPNL
    18.10-        ZS03
    63.90 ;        ZS03
    According to the type i need a total for ZMPO, ZPNL, ZSO3 separately.
    how to do that?
                       5,439.01 ;    ZMP0
                         509.60 ;     ZMP0
                        4,749.26 ;    ZMP0
    ZMPO total =
                         9,053.95-    ZPNL
                          732.70-      ZPNL
                           66.30-       ZPNL
    ZPNL total =
                          18.10-        ZS03
                           63.90 ;        ZS03
    ZSO3 total =
    Like that i need, can any one help this?
    Regards,
    Mohana

    Hello,
    Use the COLLECT.
    DATA:
      wa LIKE LINE OF itab,
      itab_sum LIKE itab.
    SORT itab BY key.
    LOOP AT itab INTO wa.
      COLLECT wa INTO itab_sum.
    ENDLOOP.
    The itab_sum has the same structure like the itab where is the data to me summarized, and the wa has the line structure of the itab.
    Regards.

  • How to calculate average value?

    Hi all,
    I'm using Lumira 1.15. I'm doing some practices with the sample dataset BestRunCorp... I want to calculate the average value of gross margin which is grouped by lines so that I can use a line chart to show the difference between the gross margin value and average value.
    How can I achieve this ?
    Best regards,
    Shuang

    It looks like it calculates the average based on the dimension
    See below:
    If you take the "Best run" Excel file, sort by country, calculate the average in Excel, it matches Lumira's 4,056 (for Argentina)
    I am not sure I follow your divide by 12 logic?

Maybe you are looking for

  • Can't downlaod Creative Cloud app. Error 403

    Hi my name is Max, when I try to try the Flash Proffesional CC and Mobile Device Packaging It just saids: Installation failed - Learn More And when I click Learn More this comes: Download error. Unable to reach Adobe servers. Please check your intern

  • How to get the number of rows in a repeating frame ?

    Hi all, When I launch a report from forms then sometimes there are data in the report and sometimes there are no data. And the problem is that when there are no data then the frame containing the repeating frame is still displaying and a blank page d

  • Can I implement the functionality of a Schmitt trigger in LabVIEW?

    I am reading in a waveform file using the Read Waveform From File.vi.  I would like some guidance as to how to implement a Schmitt trigger using LabVIEW blocks to massage the incoming waveform into a new waveform that resembles a digital data stream.

  • Problem displaying two columns in JCombobox using EnumerationBinding

    I am using a JComboBox with an EnumerationBinding where I selected two attributes to be displayed in the combobox. But, it displays the first one only. I am using jDeveloper 9.0.3 version(latest version). The code is as follows. public void jbinit(){

  • HELP with syncing Calender application.

    I have Windows Live mail mail organizer programme on my PC and want to sync with my blackberry calender, I have desktop software 5.0.0.509 and it only gives me the option of syncing with Microsoft Outlook.  Does anyone have any advice on how to add W