Logic required for the requirement (urgent)

HI experts,
can anyone help me out regarding the following logic.
The logic will check for both complete and partial goods receipts and invoice receipts. Based on the PO line item history it will calculate the totals into following categories:
(1) Total PO Line Item value with both GR & IR
(2) Total PO Line Item value with GR but no IR
(3) Total PO Line Item value with IR but no GR
For a single PO line, it is possible to have the Total Line Item Value divided into one or more of the above three categories at the same time. For example, if for a PO line item with 100 unit at $10.00 per unit, there is a GR for 50 Units and IR for only 30 units, the three columns above will be populated as:
(1) Total PO Line Item value with both GR & IR – 30 x 10 = 300
(2) Total PO Line Item value with GR but no IR – 20 x 10 = 200
(3) Total PO Line Item value with IR but no GR – 0 x 10 = 0
Similarly, if for a PO line item with 100 units and $10.00 per unit, there is a GR for 50 units and IR for 70 units, the three columns will be populated as:
(1) Total PO Line Item value with both GR & IR – 50 x 10 = 500
(2) Total PO Line Item value with GR but no IR – 0 x 10 = 0
(3) Total PO Line Item value with IR but no GR – 20 x 10 = 200
Regards,
Nagaraj

Maybe this example will help....
report zrich_0002 .
data: iekbe type table of ekbe with header line.
data: xmbew type mbew.
data: xekpo type ekpo.
data: begin of ibuckets occurs 0,
      ebeln type ekpo-ebeln,
      ebelp type ekpo-ebelp,
      pgrir type p decimals 2,  " Total GR & IR
      pgr   type p decimals 2,  " Total GR
      pir   type p decimals 2,  " Total IR
      pgrni type p decimals 2,  "GR no IR
      pirng type p decimals 2,  "IR no GR
      end of ibuckets.
parameters: p_ebeln type ekko-ebeln,
            p_ebelp type ekpo-ebelp.
start-of-selection.
  clear iekbe.  refresh iekbe.
  select * into table iekbe from ekbe
              where ebeln = p_ebeln
                and ebelp = p_ebelp
                and vgabe in ('1','2').
  loop at iekbe.
    clear ibuckets.
    ibuckets-ebeln = iekbe-ebeln.
    ibuckets-ebelp = iekbe-ebelp.
    select single * from ekpo into xekpo
                  where ebeln = iekbe-ebeln
                    and ebelp = iekbe-ebelp.
    select single * from mbew into xmbew
                   where matnr = xekpo-matnr.
    case iekbe-vgabe.
      when  '1'.
        ibuckets-pgrir = iekbe-menge * xmbew-stprs.
        ibuckets-pgr   = iekbe-menge * xmbew-stprs.
      when '2'.
        ibuckets-pgrir = iekbe-menge * xmbew-stprs.
        ibuckets-pir   = iekbe-menge * xmbew-stprs.
    endcase.
    collect ibuckets.
  endloop.
  loop at ibuckets.
    ibuckets-pgrni = ibuckets-pgr - ibuckets-pir.
    ibuckets-pirng = ibuckets-pir - ibuckets-pgr.
    if ibuckets-pgrni < 0.
      clear ibuckets-pgrni.
    endif.
    if ibuckets-pirng < 0.
      clear ibuckets-pirng.
    endif.
    modify ibuckets.
  endloop.
  loop at ibuckets.
    write:/    ibuckets-ebeln,
               ibuckets-ebelp ,
               ibuckets-pgrir,
               ibuckets-pgr   ,
               ibuckets-pir  ,
               ibuckets-pgrni ,
               ibuckets-pirng .
  endloop.
Regards,
Rich Heilman

Similar Messages

  • Is a currency dimension required for the Allocation engine to work?

    Hello All,
    Currently working on an application with no currency dimension, and I can't get the allocation script to work.  Just wondering if the allocation engine will work without a currency dimension.
    Thanks,
    Hutch
    Edited by: hutchinsm on Jul 29, 2011 4:24 PM

    Just found my mistake in my allocation logic.  It works now, so the answer is No, the currency dimension is not required for the allocation engine to work.

  • On installation of Firefox 4 beta, it tells me that it won't run on my Mac. When I go to system requirements, it takes me to a page for Firefox3.6 requirements. Where can I find the requirements for the beta?

    The link to system requirements for Firefox 4 beta takes you to a page that gives you the requirements for Firefox 3.6 instead. I assume that the requirements for the beta are different as I can't seem to install the beta on my Macs. Where can I find the beta system requirements?

    I never expected Mozilla to neglect the users of Apple's PowerPC (PPC) computers, while still supporting much older operating environments such as Windows XP. So, I should just throw away a $6,000 system, which is still fast and functional, and contribute masses of heavy metals to land-fills because…?
    I'm hurt and confused after supporting Firefox for many years — installing and using it not only on my own computers but on most of my customers' computers. Now I have to tell my customers with PPC Macs they can't have a secure cross-platform browsing experience from Mozilla. They'll have to learn to use some other browser, or buy a new computer.
    If one doesn't buy a new computer every year, one doesn't deserve Firefox 4. This is sort of sounding more like a Microsoft™© doctrine. (But wait, I can still have Firefox 4 on a ''SERIOUSLY CRAPPY WINDBLOWS XP pile of rubbish?!'') Please open your eyes Mozilla. This just doesn't make sense.

  • Downloaded the latest itunes and when i go to install it i get a message saying there is a problem with this windows installer package a program required for the install to complete could not be run, contact your support personnal or package vendor

    When `ve downloaded the latest itunes and then i go to install it i get a message saying there is a problem with this windows installer package a program required for the install to complete could not be run, contact your support personnal or package vendor any ideas anyone ? thanks

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • What are the ports required for the Audio, Video and A/V conferencing when the following end points are enabled for QoS in Lync 2013 server?

    Hi All,
    What are the ports required for the Audio, Video and A/V conferencing when the following clients are enabled for QoS in Lync 2013 server?
    Client Type
    Port range  and Protocol required for Audio
    Port range and Protocol required for
    Video
    Port range and Protocol required for
    A/Vconferencing
    Windows Desktop   Client
    Windows mobile App
    Iphone
    Ipad
    Andriod phone
    Andriod Tablet
    MAC desktop client
    Please advise. Many Thanks.

    Out of the box, 1024-65535 for all of the client ports.  :) 
    https://technet.microsoft.com/en-us/library/gg398833.aspx
    You'll want to tune your client ports a bit
    https://technet.microsoft.com/en-us/library/jj204760.aspx as seen here, and then the client ports would use those ranges which is easier to set QoS markings.  I'm not sure the mobile clients respect that setting.
    Elan's got the best writeup for Windows clients here:
    http://www.shudnow.net/2013/02/16/enabling-qos-for-lync-server-2013-and-various-clients-part-1/
    However, the marking of the packets is the tricky part.  Windows can do it via Group Policy, but for the other clients you'll need to have the network specifically prioritize ports regardless of DSCP markings.  You have to do it based on ports
    as the traffic could be peer to peer.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications
    This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • I want to upgrade my 2008 Mac pro to the latest one, will it meet the requirement for the future Software that's coming out for the next four years?

    I want to upgrade my 2008 Mac pro to the latest one, will it meet the requirement for the future Software that's coming out for the next four years?.

    I'd wait. What can't you do that you need? You mean you want to buy a new model, then why not wait for an actual new one, not the two year old 5,1, when you need to and have outgrown.
    Yours will run Mountain Lion. yours is 4 yrs old and still supported and has life left.

  • I am trying to download a free trial of photoshop for my macbook pro and it says there is an error and that the requirements for the new version is not supported for the mac I have. I have looked at the list of requirements but have no idea how to tell wh

    I am trying to download a free trial of photoshop for my macbook pro and it says there is an error and that the requirements for the new version is not supported for the mac I have. I have looked at the list of requirements but have no idea how to tell what I do and do not have?

    Apple Menu --> About this Mac.
    Mylenium

  • I'm trying to download the trial version of Adobe Illustrator. An error message says that the OS does not meet the minimum system requirements for the installer. 10.6.0 is the minimum required for installation. How do I get my mac to be a 10.6.0 ?

    I'm trying to download the trial version of Adobe Illustrator. An error message says that the OS does not meet the minimum system requirements for the installer. 10.6.0 is the minimum required for installation. How do I get my mac to be a 10.6.0 ? Right now I have a 10.5.8 is there a way to upgrade or something?

    Buy the Snow Leopard retail installer (http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA).
    That will take you to 10.6.3.
    If required you can then use the combo updater to get to the latest version, 10.6.8 (http://support.apple.com/kb/DL1399)
    SL system reqmts;

  • Error - The software required for the ipod is not installed correctly.  Please reinstall itunes to install the required sotware

    When trying to load music from ITunes to my ipod I receive the error "The software required for the ipod is not installed correctly.  Please reinstall itunes to install the required sotware"
    What should I do to correct the error? 

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies. The notes below the box include tips on removing troublesome components.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there also links to backup and recovery advice should it be needed.
    tt2

  • Requirements for the Interactive Graph -- Process Monitoring in WLI

    Hi,
    In my WLI console I m not able to bring the Graphical View for the Process Monitoring. My server is running on HP-UX -11, however I am able to view the graph from the workshop (windows desktop). Is there any server side requirement for the Graphical view?

    You have to run xvfb (X Window virtual frame buffer) on the HP-UX box. You have to download that from HP's website. Run it using root user only. Set the DISPLAY of your admin server to the xvfb and then you will be able to see the graphical view.

  • How to search in BI 7.1 query designer for the required key figures & chars

    Hi All,
         Can anyone plz tell me how to search in BI 7.1 query designer for the required key figures & characteristics. I have the query being built on a multiprovider which has many cubes.
    So, i have a huge list of key figures and characteristics. I am not able to search for the required one by the name or the technical name.
    How can we search and pick the required object from the enormous list of the Mutliprovider in the Bex Query Designer??
    Thanks
    Phani

    There is not a search feature available. You have to do an educated guess under what dimension your infoobject could be and select.

  • QC51:No certificate is required for the purchase order item

    Dear all.
    I want to create an certificate Receipt In the T-CODE QC51.After input the purchase order and item and press return,the SAP show an error message:
    No certificate is required for the purchase order item.
    Message no. QC508
    My question was where to control the purchase order item to require certificate or not?
    Regard
    Yoda

    Hi
    For this you have to maintain Certificate req in Material master.
    MM01>Enter your material->Quality view-->Tick on QM procurement->Certificate require-Mension kind of certificate req.
    like
    E21     Cert. of conformity "2.1"  EN 10204
    E22     Test certif. "2.2"         EN 10204
    E23     Works test certif. "2.3"   EN 10204
    E31A     Insp. certificate "3.1.A"  EN 10204
    E31B     Insp. certificate "3.1.B"  EN 10204
    E31C     Insp. certificate "3.1.C"  EN 10204
    E32     Inspection report "3.2"    EN 10204
    Q001     Conformance Report
    Q002     Plating Certificate
    Q003     Test Report
    Q004     Certificate through Web
    Q005     Chemical / Physical Test report + QC
    etc.....
    Customizing for this can be done in
    SPRO->Quality Management->QM in Logistics--->Define Keys for Certificate Processing.
    This will ask you during MIGO or during UD/confirmation possible thro' QC21
    Regards
    Sujit S Gujar

  • Javascript is required for the Electronic Delivery system.

    I use VPN to access the remote server, and the software will downloaded in the remote server, but when I go to the Oracle e-delivery, and press continue, I got a message: Javascript is required for the Electronic Delivery system. What's wrong with me?

    Sounds like your browser settings are stopping you using the website.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • I have a requirement for the Standard report like QA33

    Hi All
    I have a requirement for the Standard report like QA33. The requirement is that, in the output of QA33,
    The Requisitioner, Purchasing group and Tracking Number should be displayed
    Please give me suggestions to do this
    I searched for User Exits and I found QEVA0004, QEVA0005, QEVA0006, QEVA0007, QEVA0008, QEVA0009, QEVA0010, QLCO0001, QSS10001.
    In the Above which exits I can use and how to implement them
    Pls reply
    Thnx in Advance
    Regards
    P KAMAL

    When changing or deleting one or more lines of the internal table
      "\PROGRAM=ZRQEEAL10\DATA=SELECT_FIELDS" or when inserting in the table
       "\PROGRAM=ZRQEEAL10\DATA=SELECT_FIELDS", 0 was used as
      the line index. An index less than or equal to zero is not
      allowed.
      The error can occur when using the following options:
      1. "INDEX idx" for specifying the line number in the table
       "\PROGRAM=ZRQEEAL10\DATA=SELECT_FIELDS"
         where you want to change, insert or delete.
      2. "FROM idx" for specifying the start index when deleting a line
         area from or inserting a line area into the table
       "\PROGRAM=ZRQEEAL10\DATA=SELECT_FIELDS".
      3. "TO idx" for specifying the end index when deleting a line
         area from or inserting a line area into the table
       "\PROGRAM=ZRQEEAL10\DATA=SELECT_FIELDS".
      At the time of the termination, the table contained 2 lines.
    This is the error
    I went to se80 and copied the whole program - > but getting this error

  • Pre-requisites required for the local configuration of the Weblogic portal

    Hi All,
    I have got the code from the client. It is appenntly came to know that Code has been developed in Weblogic workshop.
    When we build teh application we are getting the following web services related Errors:
    ERROR: DESCRIPTION:An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.NullPointerException:null
    WARNING: SUGGESTION:An unexpected error occurred. Please contact [email protected] for further assistance.
    ERROR: ERROR
    ERROR: DESCRIPTION:An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.NullPointerException:null
    WARNING: SUGGESTION:An unexpected error occurred. Please contact [email protected] for further assistance.
    ERROR: ERROR
    ERROR: DESCRIPTION:An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.NullPointerException:null
    WARNING: SUGGESTION:An unexpected error occurred. Please contact [email protected] for further assistance.
    ERROR: ERROR
    ERROR: DESCRIPTION:An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.NullPointerException:null
    WARNING: SUGGESTION:An unexpected error occurred. Please contact [email protected] for further assistance.
    ERROR: ERROR
    ERROR: DESCRIPTION:An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.NullPointerException:null
    WARNING: SUGGESTION:An unexpected error occurred. Please contact [email protected] for further assistance.
    ERROR: ERROR
    ERROR: DESCRIPTION:An unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.lang.NullPointerException:null
    WARNING: SUGGESTION:An unexpected error occurred. Please contact [email protected] for further assistance.
    PortaleWebApp: Created control beans for 19 controls in 12703 milliseconds
    BUILD FAILED
    ERROR: Build failed with 15 error(s).
    When we deploy in the Portal weblogic server, Application is deploying with out any errors. But it is not showing any login page when I start the PTLoginMain.portal file.
    As I am completly new to this Weblogic Portal server, Please let me know, Do i need to configure the any setting before starting the application. I mean to ask you that Pre-requisites required for the local configuration of the Weblogic portal Server.
    Any Help would be much appriciated.
    Regards & thanks,
    Nirmala Vijaay Sekhar Varre

    and your server address can be resolved or not?
    Are you accessing the server from Windows or Linux?
    - On Linux try editing the /etc/hosts file and add something like: 10.241.110.105 server1.etcetera
    - On Windows try editing the C:\WINDOWS\system32\drivers\etc\hosts file and add something like: 10.241.110.105 server1.etcetera
    When this works, contact your system administrator and ask him or her to map an ip to your hostname in DNS and DHCP
    such that the servername automatically resolves the ip-address

Maybe you are looking for