Function module that can give the last value or the highest value of a key

hi,
Is there any function module that can give the last value or the highest value of a key feild in a z table.
regards,
johnson

Hi ,
We have  aggregate functions in SQL. Some of the functions are as follows.
MAX(col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
AVG(  col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
COUNT( col ) Determines the number of different values in the column col in the resulting set or in the current group.
For further details , type the function name name and press F1 for further help.
Eg: select count(mantr) from mara into workarea where condition.
Reward points if helpful.
Thanks and Regards.

Similar Messages

  • Function module that can give balances by segment?

    Hi SAPs,
    I need help to get standard SAP function module that can give me GL balances by segment, period and fiscal year. I tried the existing function module for GL balances - BAPI_GET_ACCBALANCES - but it does not support segment. Please let me know if you found any. I need to use it for group reporting requirement.
    Thanks

    Hi ,
    We have  aggregate functions in SQL. Some of the functions are as follows.
    MAX(col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
    MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
    AVG(  col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    COUNT( col ) Determines the number of different values in the column col in the resulting set or in the current group.
    For further details , type the function name name and press F1 for further help.
    Eg: select count(mantr) from mara into workarea where condition.
    Reward points if helpful.
    Thanks and Regards.

  • Function module that can give GL balances by segment?

    Hi SAPs,
    I really need help to get standard SAP function module that can give me GL balances by segment, period and fiscal year. I tried the existing function module for GL balances - BAPI_GET_ACCBALANCES - but it does not support segment. Please let me know if you found any. I need to use it for group reporting requirement.

    Hi ,
    We have  aggregate functions in SQL. Some of the functions are as follows.
    MAX(col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
    MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
    AVG(  col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    COUNT( col ) Determines the number of different values in the column col in the resulting set or in the current group.
    For further details , type the function name name and press F1 for further help.
    Eg: select count(mantr) from mara into workarea where condition.
    Reward points if helpful.
    Thanks and Regards.

  • The Function Modules that can assign a Package & transport request no...

    Dear All,
                   I am creating a Program that will automatically create  Data Elements & Domains in SAP & assign the same to a Package & Transport request No...Well I have been able to create & activate the data elements & domains using Standard SAP Function Modules, but I am looking for the Function Modules that can assign a Package & transport request no. to these data elements & domains....Can anyone tell how to achieve this requirement...

    Hi,
    may be you have to use a classified task, we used
    FORM tr_request_choice  CHANGING pv_trkorr TYPE trkorr.
      TYPE-POOLS:
        trwbo.
      DATA:
        ls_request                            TYPE trwbo_request_header.
      CALL FUNCTION 'TR_REQUEST_CHOICE'
        EXPORTING
    *   IV_SUPPRESS_DIALOG                    = ' '
    *   IV_REQUEST_TYPES                      =
    *   IV_CLI_DEP                            = ' '
    *   IV_REQUEST                            = ' '
    *   IT_E071                               =
    *   IT_E071K                              =
    *   IV_LOCK_OBJECTS                       = ' '
          iv_title                            = 'Choose request, Task will be found'
    *   IV_START_COLUMN                       = 3
    *   IV_START_ROW                          = 7
    *   IV_WITH_ERROR_LOG                     = 'X'
    *   IV_NO_OWNER_CHECK                     = ' '
        IMPORTING
          es_request                          = ls_request
        EXCEPTIONS
          invalid_request                     = 1
          invalid_request_type                = 2
          user_not_owner                      = 3
          no_objects_appended                 = 4
          enqueue_error                       = 5
          cancelled_by_user                   = 6
          recursive_call                      = 7
          OTHERS                              = 8
      IF sy-subrc                             = 0.
        SELECT trkorr
          INTO pv_trkorr UP TO 1 ROWS
          FROM e070
          WHERE trfunction = 'S'
            AND trstatus = 'D'
            AND as4user = sy-uname
            AND strkorr = ls_request-trkorr.
          EXIT.
        ENDSELECT."rkorr into pv_trkorr
      ENDIF.
    ENDFORM.                    " TR_REQUEST_CHOICE
    Regards,
    Clemens
    Edited by: Clemens Li on Dec 15, 2010 2:36 PM

  • Is there a Bapi/Fm that can give me Tcode:SM04 data?

    i want to read logged in users information using a BAPI/FM.
    Also another question..Is there a way to create SAP LOGIN ID (SU01) along with Password using a BAPI?
    pls advice.
    Thanks
    Edited by: Hruser on Apr 25, 2008 9:56 AM

    funnily found thru google search with search string "sap function module that will give logged in users information"
    then got this useful link
    string:http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html

  • Function Module that gives the names of the file in the Application Server.

    Hi Experts,
       Please give me a Function Module that gives the names of the file in the Application Server.
    Thanks,
    Debi.

    Hi,
    see these links
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    http://abaplovers.blogspot.com/2008/05/function-module-sap-logged-in-users-to.html
    http://www.saptechies.com/abap-function-modules/
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/function-module-to-get-data-and-time-of-file-576751
    thanks
    karthik

  • CRM : I want a function module which would give me the Sales Org Short

    I have to fetch Sales Organisation Short from the Data base to check whether it is updated or not and i also need the old value in CRMD_ORDER. I need a function module that would get me the Sales Ogansiation Short for the Old Sales Organisation i have. Urgent Please....

    this kind of an authentication is not possible with the linksys SOHO products...it could be possible with the enterprise level products..
    however, you can set up a wireless security on the wireless access point and this requires every user to enter the passcode to connect to the network...here , one problem could be that once connected to the network , the password will be saved on the user's computer...they need not enter the password again...
    the set up you can have is like
    modem -> a wired router -> WAP54GPE 
    the next WAP54GPE will be configured in wireless repeater mode...the number of WAPs will depend on the kinda range you want...the range of a WAP54GPE is around 300 fts....

  • Reg: Function Module thats used to check the status of JOBS and mail it

    Hi Experts,
    Is there any Standard Function module thats going to find the status of the jobs and mail this status to specied email ID in .xls format. While checking status function module should give whether job is - Aborted, Successful, Running, Waiting, Locked, Error, Warning, Starting Date, Ending Date of the Job.
    Please help me,

    Hello Nagaraj,
    You can find out the status of a job with the SHOW_JOBSTATE function module. You provide this function module with a job name and job number. It returns one of the six possible statuses of the job:
    ABORTED TYPE C,
    FINISHED TYPE C,
    PRELIMINARY TYPE C,
    READY TYPE C,
    RUNNING TYPE C,
    SCHEDULED TYPE C.
    Following is the link for the same:
    http://help.sap.com/saphelp_sm32/helpdata/en/fa/096e10543b11d1898e0000e8322d00/content.htm
    Warm Regards,
    Riki Dash

  • What is the Function MOdule that returns the fields in database table order

    Hello Folks
      I have a dynamic internal table with fields ( which are not in order). I want to display them in the order of which they are present in the database table? Is there any function module that returns the fields in database order?
    FAQ. Please search before posting your question.
    Edited by: Suhas Saha on Oct 10, 2011 10:19 PM

    Hi,
    You can use this BAPI.
    <b>BAPI_SALESORDER_GETLIST</b>
    Reward if useful.
    Regards,
    Vimal

  • We have two users that have been using Creative Cloud for almost a year. Recently, sometime in the last 4ish weeks, the users can no longer run Creative Cloud apps. (Yes, our subscription is paid.) Error simply says administrator access is required

    We have two users that have been using Creative Cloud for almost a year. Recently, sometime in the last 4ish weeks, the users can no longer run Creative Cloud apps. (Yes, our subscription is paid.) Error simply says administrator access is required to install. The apps have already been installed. The users cannot run them unless they are in the local admin group.Using "Run as admin" does not work. It gives the same error.
    I have opened a case with adobe support and was basically told to suck it up and put the users in the admin group. Actually, what was said was that it is "mandated that the users have administrative rights". 
    There are a couple of things wrong with this. It was working for both users until recently - a recent required creative cloud update. The users have never been local admins yet the apps were working (poorly, but working).
    We are in an enterprise environment and users simply do not have administrative rights on the computers.
    I have changed permissions on all adobe folders, granting users or authenticated users modify or full control rights, did the same in whatever Adobe registry HKLM keys I could find. Nothing has allowed the users to run the apps - unless they are put in the local admin group.
    Someone has to have a fix for this. Adobe apps have proved to have far too many vunerabilities to even entertain the idea of elevating user rights. I can't imagine that enterprise environments are allowing this.
    Any help or suggestions are greatly appreciated.

    Jeff,
    Thank you for your response. The users in question are "standard" domain users. We do not reduce users permissions below the standard level.
    The apps do not load with their current standard user permissions.
    The thing that makes this odd, is that up until recently they did this issue with cloud apps. The only way I can make it work for them now is to put them in the local administrator group on their pc's - which is not going to happen.
    This is what they now see. As I said before, this was not a problem up until recently they would see all their available apps. If I put them in the local admin group the apps are listed without having to install. Everything is there, just not accessible to the user.

  • Function Module that will retrieve the Field Catalogs of a Display Variant

    Hello Experts,
    Are there any function modules that I can use to retrieve the field catalogs (fields to be displayed in ALV report) by passing the display variant name?
    An RFC needs to apply this to determine which field(data) to be passed to XI (calling system) depending on user login.
    Thanks in advance!

    These are the various FM available for Variants (field Layout)
    REUSE_ALV_VARIANT_ALL_MAINTAIN Maintain all display variants for one object
    REUSE_ALV_VARIANT_DEFAULT_GET  Read default display variant (description only, w/o field catalog)
    REUSE_ALV_VARIANT_EXISTENCE    Checks whether a display variant exists
    REUSE_ALV_VARIANT_F4           Display variant selection dialog box
    REUSE_ALV_VARIANT_MAINTAIN     Definition of a display variant outside the list context
    REUSE_ALV_VARIANT_SAVE         Save a display variant
    REUSE_ALV_VARIANT_SELECT       Read a display variant
    Regards,
    Amit

  • Function Module that will retrieve the parameters for a given function Modu

    Hi
    We have a requirement where we will be calling Function Module that will be maintained in a table entry. How we will determine what is the parameters that is required by this function module. Is there a FM that will suffice the requirement.
    Thanks in advance
    arghadip

    Hi,
    You have to write a custom code for that. Use the table FUPARAREF to retrieve the parameters for a function module. Give function module name as input.
    Pls reward points if solved your issue.
    Regards,
    Renjith Michael.

  • Trying to install/format an INTERNAL hard drive using Disk Utility gives me "Error: -69760: Unable to write to the last block of the device".   Is that a hardware problem and what could be done about it?

    *** PLEASE NOTE*** - This is a query about an INTERNAL HDD not an external one. Thanks.
    My Mac is a late 2009 model and the current hard drive recently failed. So I bought a new one, exactly the same, albeit 750gb instead of 500gb. The HDD is a Seagate Momentus 7200. Before the my current drive failed I made a time machine back up to an external USB HDD. I've inserted the HDD into the bottom of my Mac, plugged in the USB and started my machine pressing the 'Option' ([ALT]) key. I go into Disk Utility to try and format the new HDD by creating a new partition but I keep getting the messages,
    "Error: -69760: Unable to write to the last block of the device"
    or
    "POSIX: could not allocate memory"
    This is actaully the third HDD I've tried. The first was another Seagate Momentus 7200 500gb, but this time it was a newer model (model number ended in 423AS instead of 420AS - the new one I am trying ends with 420AS, which is the same as the current HDD). I then tried a Western Digital drive but that one didn't even show up in DU. Forums and tech support are suggesting it's faults with the HDDs but surely not three in a row?
    Could this be an issue with another part of my Mac?
    Is there anything else I can do to format the HDD, have I missed a crucial step?

    Did you ever get a resolution to this issue?
    I am having that exact error with a new 512GB SSD from Crucial, in a 15" MBP mid-2010.
    I really wonder now if the stupid SATA cable could be bad - causing the initial SSD fail.  I am replacing it with the EXACT same drive, and getting that "last block" error when i partition in the GUI or from command-line.
    thanks!

  • Hi... I would like to purchase a Tablet Sony Xperia Z 2 10.1 (the last one of the Z series) and I was told that Adobe does not support Sony anymore.... I need to be able to open and read Adobe PDF files and I would like to know if this tablet can still us

    Hi... I would like to purchase a Tablet Sony Xperia Z 2 10.1 (the last one of the Z series) and I was told that Adobe does not support Sony anymore.... I need to be able to open and read Adobe PDF files and I would like to know if this tablet can still use Flash Player...
    Is there anyo who can help me with this? I asked in the shop and I was told "yes of course" , but when I contacted Sony directly I was advised to check with Adobe as apparently in the recent months Adobe and Sony haven't been getting along anymore...

    You may be mixing up two entirely different Adobe products.
    1. Adobe Flash Player. Needed to view web pages designed with Flash. Not needed to view PDF files. Not available for Android (not just Sony).
    2. Adobe Reader. Reads PDF files. However, the Android can also read most PDF files without needing Adobe Reader.

  • The box indicating that this domain controller is the last controller for the domain is unchecked. However, no other Active Directory domain controllers for that domain can be contacted

    I have 2 domain controllers running 2003 server, server1 and server2. I ran dcpromo on server1 and removed AD and removed him from the domain and disconnected from network. I then added a 2012 server
    with the same name and IP address server1 with no problem. Replication from sites and services work fine on both controllers.
    The new 2012 server1 is GC. I transferred all FSMO roles to server1. Again no problem and replicating using sites and services. AD on server1 is populated correctly.
    Now what I had intended on doing was a dcpromo to remove server2 from the domain so I can then add another 2012 server. That is when I get the: "The box indicating that this domain controller is the last controller for the domain
     is unchecked. However, no other Active Directory domain controllers for that domain can be contacted.
    I have DNS installed on both servers and both look good with replicating there. Strange thing is when on the 2012 server within DNS if I right click and connect to another DNS server I can add server2 just fine but from server2 adding server1 it tells me it
    is not available.
    Help please!

    Hi,
    As there is server 2012 DC (SERVER1) DC is operational in a domain then "This domain controller is the last controller for the domain" should be remain unchecked when you demote SERVER2 DC. 
    If you are getting error "Active Directory domain controllers for that domain can be contacted" while demoting SERVER2 DC then check the DNS pointing on both as per below article, disable windows firewall on all DC, less possiblities but worth to check if both
    are different site then check the ports are open on firewall. 
    http://abhijitw.wordpress.com/2012/03/03/best-practices-for-dns-client-settings-on-domain-controller/
    http://technet.microsoft.com/en-us/library/cc766337(v=ws.10).aspx
    http://social.technet.microsoft.com/wiki/contents/articles/584.active-directory-replication-over-firewalls.aspx
    run “ipconfig /flushdns & ipconfig /registerdns“, restart DNS server and NETLOGON service on each DC and try to demote server2 DC.
    If issue reoccurs, post dcdiag /q result.
    NOTE: If initial replication was completed between both DC (new 2012 and old DC) then you may remove the server2 DC from Active Directory forcefully (DCPROMO /FORCEREMOVAL) and perform metadata cleanup.
    Active Directory Metadata Cleanup
    http://abhijitw.wordpress.com/2012/03/03/active-directory-metadata-cleanup/
    Best regards,
    Abhijit Waikar.
    MCSA | MCSA:Messaging | MCITP:SA | MCC:2012
    Blog: http://abhijitw.wordpress.com
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees and confers no rights.

Maybe you are looking for