Logic to get the highest number

Hi,
I have a report request where i have Supplier, spend type and spend.
Spend type can be Direct or Indirect. Each supplier can have Direct and Indirect Spend, in that case i need to get the highest spend to show up on the report.
i need to write a logic to get this data ...
Any help is appreciated.
Thank You.

use max() function

Similar Messages

  • HT4812 I recently fixed my computer and need to reinstall logic pro 9 but I can't find the booklet with my serial number, is there any other way I can get the serial number for logic pro 9 (box)?

    I recently fixed my computer and need to reinstall logic pro 9 but I can't find the booklet with my serial number, is there any other way I can get the serial number for logic pro 9 (box)?

    If you still have the receipt or other proof of purchase, you can ask Apple to send you the serial. Otherwise, bad luck mate.. Good news is, you can now buy Logic Pro 9 from App Store for just 199 USD

  • Logic to get the view in MM02

    Hi,
    I would just like to ask if there is an easier way to get the selection views in MM02. There are different views per material and I need to insert the logic in getting the view to a custom program. The custom program will be used for performing a BDC transaction that's why I need to get the logic for the views.

    Hi
    Try using the function module SELECTION_VIEWS_FIND
    * Material views ....................................................
      data:  l_vpsta like t130m-pstat.
      select single vpsta
             into   l_vpsta
             from   mara
             where  matnr = p_matnr.
    * Get View sequence .................................................
      data: l_bild  like t133a-bilds,
            lt_bild like mbildtab occurs 0 with header line.
    * Screen Sequence for Standard Industry tab pages in material master
      l_bild = '21'.
    * Get screen sequence
      call function 'SELECTION_VIEWS_FIND'
        exporting
          bildsequenz     = l_bild
          pflegestatus    = l_vpsta
        tables
          bildtab         = lt_bild
        exceptions
          call_wrong      = 1
          empty_selection = 2
          others          = 3.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    Shiva

  • Hwo to get the spool number from report output

    Hi,
    I am displaying some output in the report using write statements and within my program I need to collect the output written by write statements and send it as an email.So for that I need to generate the spool number and I am using the below code to do that
    CONSTANTS:
        l_linsz TYPE sy-linsz VALUE 201, " Line size
        l_paart TYPE sy-paart VALUE 'X_65_132'.  " Paper Format
      l_uname = sy-uname .
      l_repid = sy-repid .
    *-- Setup the Print Parmaters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          copies                 = '1'
          cover_page             = space
          data_set               = space
          department             = space
          destination            = space
          expiration             = '1'
          immediately            = space
          new_list_id            = k_x
          no_dialog              = k_x
          user                   = l_uname
        IMPORTING
          out_parameters         = l_mstr_print_parms
          valid                  = l_mc_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
      IF l_mstr_print_parms-pdest = space.
        l_mstr_print_parms-pdest = k_lp01.
      ENDIF.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      l_mstr_print_parms-linsz = l_linsz.
      l_mstr_print_parms-paart = l_paart.
      l_variante = sy-slset.
    * submitting the spool request
      *SUBMIT (l_repid) TO SAP-SPOOL*
                       *SPOOL PARAMETERS l_mstr_print_parms*
                       *WITHOUT SPOOL DYNPRO*
                       *AND RETURN.*
    *Calculating the lenth of report name
      lv_len = STRLEN( l_repid ) .
    *consutrucing the database variable  rq2name to search the spool
    *request
      IF lv_len >= 9 .
        CONCATENATE l_repid+0(9)
                    l_uname+0(3) INTO lc_rq2name .
      ELSE.
        lv_len = 9 - lv_len .
        DO lv_len TIMES .
          CONCATENATE lv_temp '_' INTO lv_temp .
        ENDDO.
        CONCATENATE l_repid lv_temp
                    l_uname INTO lc_rq2name .
      ENDIF.
    *selecting the spool request using the above consructed varibale
      SELECT   * FROM tsp01 INTO TABLE lt_tsp01
              WHERE rq2name = lc_rq2name .
    *sorting the interbla table
      SORT  lt_tsp01 BY rqcretime DESCENDING .
    *reading the first spool request
      READ TABLE lt_tsp01 INTO ls_tsp01 INDEX 1.
    but the problem with the above code is I am using variants to execute the report but when the above piece of code is getting executed it is clearing all the variant values on the selection screen and it is defaulting the values on the selection screen.
    Is there any way i can execute the above code without any problem in the selection screen.
    Thanks
    Bala Duvvuri

    Hello Bala,
    I wouldn't SUBMIT the same program to get the Spool number. You can achieve the same by [NEW-PAGE PRINT ON|http://help.sap.com/abapdocu_702/en/abapnew-page_print.htm#!ABAP_ADDITION_1@1@] command.
    Check the code snippet i've provided below:
    DATA: spfli_wa         TYPE spfli,
          print_parameters TYPE pri_params,
          valid_flag       TYPE c LENGTH 1.
    START-OF-SELECTION.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          no_dialog            = 'X'
        IMPORTING
          out_parameters       = print_parameters
          valid                = valid_flag
        EXCEPTIONS
          invalid_print_params = 2
          OTHERS               = 4.
      IF valid_flag = 'X' AND sy-subrc = 0.
    *   1. Write the output to the output list(no spool is generated)
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
    *   2. Write the output to SAP spool(no list is displayed)
        NEW-PAGE PRINT ON PARAMETERS print_parameters NO DIALOG.
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
        NEW-PAGE PRINT OFF.
        MESSAGE i000(zibi027) WITH 'Spool' sy-spono 'is generated!!!'.
        "You can use the spool number (SY-SPONO) to email the list output
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • I have lost my iphone, how can i get the IMEI number?

    i have lost my iphone, how can i get the IMEI number?

    If you need the IMEI for an insurance or police report:
    how to find IMEI, etc
    http://support.apple.com/kb/HT4061?viewlocale=en_US&locale=en_US
    But as Carolyn Samit said above, you cannot track the iPhone by IMEI.

  • HT204204 I need help talking to a person. My phone is not working so I can't call and i can't get the serial number to get ahold of anyone. what do i do

    How do i get ahold of a real person? My phone is only showing a black screen so I can't get on it to get the serial number or call anyone. please help

    http://www.apple.com/support/iphone/contact/

  • How to get the total number of pages printed in a report?

    Hi All,
    I have a requirement where I need to print a frame of fields only in the last page. Unfortunately I cannot use the 'Print Object On' property as it doesnt work in my case. So, I am planning to write a format trigger on the frame to return TRUE if the page is the last physical page. Now, I need to know how to get the total number of physical pages that will get printed in the report so that I can use this to manipulate the frame. I was planning to use the 'Total Physical Pages' built-in, but it seems like I can just use it to print in a field and I can't use this field's value anywhere in the plsql code (formula column function/format trigger) in the report. Is there anyway to get the total number of pages printed in the report which can be used in the report plsql code?
    Thanks,
    Srini.

    i found the solution, thanks

  • HT1349 My Ipod was stolen how do i get the serial number?

    My IPOD was stolen how do I get the serial number?

    The easiest way to find your serial number is this Open Itunes...click help... run diagnostics.....(tick or untick as necessary) so that you just have ticked the last two,  device connectivity and device sync.  run these tests. it will say no ipod/ipad found but will give results of test....scroll down to bottom of results... here you will find the serial number of your last attached devices.

  • How can you get the serial number of your ipod touch when it has been lost?

    My daughter took her ipod touch to a friends house and it is now missing...can anyone tell me how to get the serial number so that we can report the missing device?  Thanks to anyone who can help.....

    On the syncing computer go to iTunes>Preferences>Device and hover the mouse pointer over the iPod backup and the SN will show in a box.  Also see:
    iPod: How to find the serial number

  • My iPod touch was stolen. Can you tell me how I can get the serial number from my iTunes account?, My iPod touch was stolen. Can you tell me how I can get the serial number from my iTunes account?

    My iPod touch was stolen. Can I get the serial number from my iTunes account?

    See the end of:
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                                                
    Reporting a lost or stolen Apple product                                        
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • HT1349 My Ipad was stolen, How can I get the serial Number from Apple. It was registered with them

    I had  2 Ipads, a mac book pro and a Mac Air stolen 2 weeks ago
    I am trying to locate one of the serial numbers, but cant find the last box.  Can I get the serial number from Apple. It was registered and now it is not showing up as one of my products.
    Thanks

    The easiest way to find your serial number is this Open Itunes...click help... run diagnostics.....(tick or untick as necessary) so that you just have ticked the last two,  device connectivity and device sync.  run these tests. it will say no ipod/ipad found but will give results of test....scroll down to bottom of results... here you will find the serial number of your last attached devices.

  • I recently subscribed to Acrobat XI after the trial expired but when I went to activate it I was asked for the serial number. I only have the order number on the invoice. How do I get the serial number for the trial software that is on my computer?

    I recently subscribed to Acrobat XI after the trial expired but when I went to activate it I was asked for the serial number. I only have the order number on the invoice. How do I get the serial number for the trial software that is on my computer?

    Please do not try to send attachments in mail responses to forum messages. Please return to the forum and click Reply. You can then use the CAMERA icon to add your pictures. Looking forward to seeing what is wrong with your license screens - the general advice is simply to sign in, and everything is done. Make sure you use the SAME Adobe ID that you used to purchase, and check your account details to be sure the subscription is active.

  • How to get the page number in the break section?

    Hi expert,
    The user wants the page number came right after the Break group name if the break section contains more than 1 page. E.g.
    ABC Compnay
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 1
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 2
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    CDE Company
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    How to get the page number in section break level?

    Hi Wes
    * Create a Field on the margin.
    * Set its "Source" to "Page Number"/"Physical Page Number".
    * Click "Page Numbering" button.
    * In "Reset At" list box, choose the Repeating frame that surrounds your detail group in the layout.
    This should cause Reports to increment the page number until the "Company" repeating frame resets.
    Regards
    Sripathy

  • HT201210 I keep getting unknown error 3 when trying to restore my Iphone.  On line and chat support won't accept my request as I can't open my phone to get the serial number

    this evening has been torturous My phone said I needed to restore thru Itunes/support
    I tried and keep getting UNKNOWN Error 3
    I tried to get support but I can't open my phone to get the serial number.
    Now WHAT????

    I was doing some research on this problem for a friend and came across your post and thought I should share this:
    https://discussions.apple.com/thread/5372052?start=30&tstart=0
    Hopefully it helps, good luck.

  • Using iPhone 5c as an ipod, has been used on our itunes account, is there a way to get the serial number?

    Using iphone 5c as an ipod (not hooked up for phone service) has been hooked up to our computer and used on our itunes account.
    Does anyone know how I can get the serial number?  It has been stolen.

    The following has information: iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

Maybe you are looking for

  • Converting Oracle XML Query Result in Java String by using XSU

    Hi, I have a problem by converting Oracle XML Query Result in Java String by using XSU. I use XSU for Java. For example: String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from preise ps where match='"+args[0]+"'"); String datum1=datum; I bec

  • Concatenate in WHERE clause

    Im trying to Concatenate the name columns and used them in a WHERE clause, but its not liking it. select * from my_table where Title+' '+CFirstName+' '+CSurname = 'Mr James Khan' Thus returning the following error message. Implicit conversion of varc

  • Class path

    hello friend, when I compiled a program I got error: package not found in import,package doesnot exist. Plz help to do that

  • Is it possible to add counter in table maintenance (automatically)?

    sap ver. 4.7 is it possible to generate counter in table maintenance (automatically)? i mean without building dialog screen  / table control  . exmple  : the user insert ..... name name name name i add as key (automatically) 1 2 3 4

  • Is there a file manager app that does NOT connect to the cloud?

    I need a file manager that will allow people to open, read and save files from various traditional sofrware such as PDF, .DOC, .XLS, etc.  It CANNOT have cloud capabilities but only be local on their personal ipad.  Does anyone know of such an app (t