Hi Experts, replace function module WS_QUERY to return the name of OS?

Hi Experts,
the function WS_QUERY can return your computer operating system, you can try it SE37(WS_QUERY), and only give value 'OS' to the QUERY parameter and execute the function, you can see it in RETURN parameter, but now this function is obsolete and I must replace it with another function or method, can anyone of you tell me which function can totally(the return value need to be the same, but any valuable feedback is also welcome) replace it? thanks in advance!
Kind regards
Dawson

Hi Dawson,
You can use the static method GET_PLATFORM of the class CL_GUI_FRONTEND_SERVICES.
Regards,
Jeevan

Similar Messages

  • How to return the name (or ID) of the Task FLow in Script

    Sitaution; two task flows created which can be accessed via Tools > TaskFlows within FDQM
    Task Flow "1.1 Multi Load - Import" --> Should run Batch Process Up to Import (enmBatchProcessLevel: 2)
    Task Flow "2.1 Multi Load - Import Up To Validate" --> Should run Batch Process Up to Validate (enmBatchProcessLevel: 4)
    I have developed one generic script which I would like to use for each task flow.
    Only the enmBatchProcessLevel differs between the task flows and therefore I would like to parse this enmBatchProcessLevel as a parameter my generic script.
    To be able to do this, the script needs to know on which task flow a user has clicked. So, I am looking for a function or statement which returns the name (or ID) of the task flow. Based on this name (or ID) a conditional statement can be performed in which a variable is dynamically filled. This variable can then be parsed as a parameter to my generic script.
    For instance:
    Sub GenericRoutine
         Dim strTaskFlow
         Dim intBatchProcessLevel
         '--Get the Task Flow Name
         strTaskFlow = ......<How to return the TaskFlow name or ID?>
         '--Validate the task flow and fill variable intBatchProcessLevel dynamically
         Select Case strTaskFlow
              Case "1.1 Multi Load - Import"
                   intBatchProcessLevel = 2
              Case "2.1 Multi Load - Import Up To Validate"
                   intBatchProcessLevel = 4
         End Select
         '--Execute generic script
         '--Call Batch script and parse intBatchProcessLevel as a parameter:
         Call sBatchProcess(intBatchProcessLevel)
         '--Execute generic script
    End Sub
    Sub sBatchProcess(Byval intBatchProcessLevel)
         Dim lngProcessLevel
         Dim strDelimiter
         Dim blnAutoMapCorrect
         '--Use intBatchProcessLevel to fill lngProcessLevel
         lngProcessLevel = intBatchProcessLevel
         strDelimiter = "_"
         blnAutoMapCorrect = 0
         Set BATCHENG.PcolFiles = BATCHENG.fFileCollectionCreate(CStr(strDelimiter))
         BATCHENG.mFileCollectionProcess BATCHENG.PcolFiles, CLng(lngProcessLevel), , CBool(blnAutoMapCorrect)
    End Sub
    Edited by: user13642656 on Jul 21, 2011 4:55 AM

    Hi, thanks for your reply.
    The Generic script contains 600+ records, which I would like to maintain once, when having multiple Task Flows for Import, UpToValidate, ValidateOnly, UpToExport, ExportOnly etc.
    Is there a central storage in FDQM workbench for script, like a "Module" in Excel VisualBasic environment? Thanks!

  • Replacement function modules/method for obsolete Funtion Modules in ECC 6.0

    We are working on Upgrade Project and need your help in finding the replacement Function module/ Methods for following obsolete Function Modules:
       1.   GET_FIELDTAB
       2.   WS_EXCEL
       3.  HR_DISPLAY_BASIC_LIST
       4.  LOG_SYSTEM_GET_RFC_DESTINATION
       5.  HELPSCREEN_NA_CREATE
       6. TR_RELEASE_COMM
    Thank in Advance.
    Sarita.
    Edited by: Sarita Yalamati on Mar 28, 2008 1:23 PM

    Hi sarita,
    for GET_FIELDTAB use 'DDIF_NAMETAB_GET'..here is sample code
      CALL FUNCTION 'GET_FIELDTAB'
           EXPORTING
                LANGU               = SY-LANGU
                TABNAME             = C_STRUCTURE_NAME
                WITHTEXT            = ' '
           TABLES
                FIELDTAB            = IDFIES
           EXCEPTIONS
               INTERNAL_ERROR      = 01
                NO_TEXTS_FOUND      = 02
                TABLE_HAS_NO_FIELDS = 03
                TABLE_NOT_ACTIV     = 04.
    Replacement :
    CALL FUNCTION 'DDIF_NAMETAB_GET'
      EXPORTING
        TABNAME           =  C_STRUCTURE_NAME
      ALL_TYPES         = ' '
      LFIELDNAME        = ' '
      GROUP_NAMES       = ' '
      UCLEN             =
    IMPORTING
      X030L_WA          =
      DTELINFO_WA       =
      TTYPINFO_WA       =
      DDOBJTYPE         =
      DFIES_WA          =
      LINES_DESCR       =
    TABLES
      X031L_TAB         =
       DFIES_TAB         = IDFIES
    EXCEPTIONS
       NOT_FOUND         = 1
       OTHERS            = 2
    For WS_EXCEL  use GUI_DOWNLOAD.. here is sample code
    CALL FUNCTION 'WS_EXCEL'
    EXPORTING
       FILENAME            = 'D:\FILE1.xls'
      SYNCHRON            = ' '
      TABLES
        DATA                = itab
    EXCEPTIONS
       UNKNOWN_ERROR       = 1
       OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Repalcement :
    data : l_filename type string.
    l_filename  = 'D:\FILE1.xls'.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = l_filename
      FILETYPE                        = 'ASC'
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab
      FIELDNAMES                      =
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
      EXPORTING
        DOCUMENT               = 'D:\FILE1.xls'
       APPLICATION            =
       PARAMETER              =
       DEFAULT_DIRECTORY      =
       MAXIMIZED              =
       MINIMIZED              =
       SYNCHRONOUS            =
        OPERATION              = 'OPEN'
      EXCEPTIONS
        CNTL_ERROR             = 1
        ERROR_NO_GUI           = 2
        BAD_PARAMETER          = 3
        FILE_NOT_FOUND         = 4
        PATH_NOT_FOUND         = 5
        FILE_EXTENSION_UNKNOWN = 6
        ERROR_EXECUTE_FAILED   = 7
        SYNCHRONOUS_FAILED     = 8
        NOT_SUPPORTED_BY_GUI   = 9
        others                 = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Replace Function Module 'BBP_ORGUNIT_GET_EMPLOYEES'

    Hi All,
        we are in SRM5.0 upgrade. we are not able to find a replace function module of 'BBP_ORGUNIT_GET_EMPLOYEES' this.
        if any one knows the replacement function module please and i could not find any replace function module in service market place, so is there any OSS notes available for this?
    Thanks,
    John.

    Hello John,
    On a similar upgrade, I used the function RH_STRUC_GET with input parameter ACT_WEGID (evaluation path) = 'O-S-CP'to replace 'BBP_ORGUNIT_GET_EMPLOYEES'. 
    Avaible evaluation path are defined in table T778A.
    Rgds,
    Pierre

  • Function module that will return week  details

    Anyone know Sap FM that will return Week  details(as below)for a given start and end dates (similar to the function module HR_99S_INTERVAL_BETWEEN_DATES which  returns details for a month) independent of factory calendar
    I am expecting
    Inputs
    Start Date  - 01/01/2005
    End Date   -  05/05/2006
    outputs
    WK YEAR BEGDA      ENDDA      
    02 2005 01/03/2005 01/09/2005 
    03 2005 01/10/2005 01/16/2005 
    04 2005 01/01/2005 01/23/2005
    Thank, Bill

    Hi Bill,
    FM is <b>GET_WEEK_INFO_BASED_ON_DATE</b>
    Here's a test-program for your requirement:
    REPORT zforum09 LINE-SIZE 255.
    PARAMETERS:fdate  LIKE sy-datum DEFAULT '20050103',
               tdate  LIKE sy-datum DEFAULT '20060505'.
    DATA : BEGIN OF itab OCCURS 0,
           week LIKE scal-week,
           from LIKE sy-datum,
           to LIKE sy-datum,
           END OF itab,
           next LIKE sy-datum.
    next = fdate.
    WHILE tdate > itab-to.
      CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
           EXPORTING
                date   = next
           IMPORTING
                week   = itab-week
                monday = itab-from
                sunday = itab-to.
      next = itab-from + 7.
      APPEND itab.
    ENDWHILE.
    LOOP AT itab.
      WRITE:/ itab-week+4(2),
              itab-week(4),
              itab-from,
              itab-to.
    ENDLOOP.
    Regards Andreas

  • What is the transaction to trace all the function module and its returned m

    HI ,
    What is the transaction to trace ALL the function module and its returned messages in a program/transaction execution?
    Thank you.

    You can use this function module for that purpose.
    RS_CROSSREFERENCE

  • Replacement Function modules

    Hi everybody,
    Please let me know what are the replacement function modules for the following function modules :
    1) PSCIC_CBP_CREATE
    2) PSCIC_CBP_CREATETARGET
    3) PSCIC_CBP_DETAIL
    4) PSCIC_CBP_DETAIL_CALL
    5) PSCIC_CBP_GET
    6) PSCIC_CBP_GET_PARTNER
    7) PSCIC_CBP_GET_PARTNER_SPA_GPA
    8) PSCIC_CBP_INFO
    9) PSCIC_CBP_INIT
    10) PSCIC_CBP_MAPSEARCH
    11) PSCIC_CBP_POPULATE
    12) PSCIC_CBP_PUBLISH
    13) PSCIC_CBP_SEARCH
    14) PSCM_CMACBPST_CHANGE_ST_NUMBER
    15) PPC1PP_AFFWRM_CHANGE
    16) PPC1PP_RESCO_CHECK
    17)PPC1PP_RES_HDR_CREATE
    Thank You,
    Priyanka

    Moderator message - Welcome to SCN.
    But please show that you've done some work beforehand. Please don't post a shopping list.
    Thread locked.
    Rob

  • Function Module to get all feild names in a structure

    Hello Friends,
    Is there a function module,where i give the structure name and get all the feild names within that structure.
    regards
    kaushik

    Hi,
    You can use the for run time type descriptor classes to do this :
    Here is a simple example :
    REPORT  z_assign_comp.
    TYPE-POOLS : slis.
    include <icon>.
    "&   Dynamic Programming ! Using Structure Descriptior Class.          *
    DATA: BEGIN OF line OCCURS 0,
            col1 TYPE i,
            col2(10) TYPE c,
            col3 TYPE i,
          END OF line.
    FIELD-SYMBOLS : <fs> TYPE ANY.
    FIELD-SYMBOLS : <itab_line> TYPE ANY.
    DATA : BEGIN OF t_comp OCCURS 0,
            comp(5) TYPE c,
           END OF t_comp.
    DATA : l_struc TYPE REF TO cl_abap_structdescr.
    DATA : l_typedesc TYPE REF TO cl_abap_typedescr.
    DATA : lt_comp TYPE abap_compdescr_tab,
           w_comp LIKE LINE OF lt_comp.
    line-col1 = 11.line-col2 = 'SAP'.line-col3 = 33.
    APPEND line.
    line-col1 = 44.line-col2 = 'P.I.'.line-col3 = 66.
    APPEND line.
    ASSIGN line TO <itab_line>.
    "Call the static method of the structure descriptor describe_by_data
    CALL METHOD cl_abap_structdescr=>describe_by_data
      EXPORTING
        p_data      = <itab_line>
      RECEIVING
        p_descr_ref = l_typedesc.
    "The method returns a reference of  a type descriptor class therefore we
    "need to Cast the type descriptor to a more specific class i.e
    "Structure Descriptor.
    l_struc ?= l_typedesc.
    "Use the Attribute COMPONENTS of the structure Descriptor class to get
    "the field names of the structure
    lt_comp = l_struc->components.
    LOOP AT line.
      WRITE :/ 'Row : ', sy-tabix.
      LOOP AT lt_comp INTO w_comp.
    "   Using the ASSIGN component ,assigns a data object to a field symbol.
        ASSIGN COMPONENT w_comp-name OF STRUCTURE line TO <fs>.
        WRITE :/ w_comp-name, ' ', <fs>.
      ENDLOOP.
    ENDLOOP.
    Hope this helps.
    regards,
    Advait

  • Function module which could calculate the previous month's start date.....

    hi,
    I want a function module which could calculate the previous month's start date and end date...
    Say todays date is  like 29.05.2007(start date) it should return
    01.04.2007 and 30.04.2007...
    IS there any FM for this ... or how to go about this scenario ???
    thanks in advance
    samm

    See the below Logic :
    DATA :g_date(2) TYPE n,           " Date
          g_month(2) TYPE n,          " Month
          g_year(4) TYPE n ,          " Year
          g_bill_low(10) TYPE n,       " From date
          g_bill_high(10) TYPE n,      " To date
          g_month1(2) TYPE n,         " Month
          g_year1(4) TYPE n,          " Year
          g_date1(2) TYPE n,          " Date
          g_year2(4) TYPE n,          " Year
          g_datum LIKE sy-datum.      " System date
    RANGES : r_bdate  FOR vbrk-fkdat.             " Billing date
      g_datum = p_date + 10.
      g_month = g_datum+4(2).
      g_year = g_datum+0(4).
      IF g_month = 1.
        g_year = g_year - 1.
        g_month = 12.
        g_date = 1.
      ELSE.
        g_month = g_month - 1.
        g_date = 1.
      ENDIF.
    Passing the date to billing date-low
      CONCATENATE  g_year g_month g_date  INTO g_bill_low.
      r_bdate-low = g_bill_low.
      r_bdate-sign = 'I'.
      r_bdate-option = 'BT'.
      g_month1 = g_datum+4(2).
      g_year1 = g_datum+0(4).
      IF g_month1 = 1.
        g_year1 = g_year1 - 1.
        g_month1 = 12.
      ELSE.
        g_month1 = g_month1 - 1.
      ENDIF.
      CASE g_month1.
        WHEN 1.g_date1 = '31'.
        WHEN 3.g_date1 = '31'.
        WHEN 4.g_date1 = '30'.
        WHEN 5.g_date1 =  '31'.
        WHEN 6.g_date1 = '30'.
        WHEN 7.g_date1 = '31'.
        WHEN 8.g_date1 = '31'.
        WHEN 9.g_date1 = '30'.
        WHEN 10.g_date1 = '31'.
        WHEN 11.g_date1 = '30'.
        WHEN 12.g_date1 = '31'.
      ENDCASE.
      g_year2 = g_year1.
      IF g_month1 = 2.
        g_year2 = g_year2 MOD 4 .
        IF g_year2 = 0.
          g_date1 = 29.
        ELSE.
          g_date1 = 28.
        ENDIF.
      ENDIF.
    Passing the date to billing date-high
      CONCATENATE  g_year1  g_month1  g_date1 INTO g_bill_high.
      r_bdate-high = g_bill_high.
      APPEND r_bdate.
    Reward Points if it is helpful
    Thanks
    Seshu

  • Unable to create rule Error:Function Module does not meet the workflow conv

    Hi Workflow experts,
    Could any one help me with rule creation. Below is my Function Module Interface.
    ""Local Interface:
    *"  TABLES
    *"      AC_CONTAINER STRUCTURE  SWCONT OPTIONAL
    *"      ACTOR_TAB STRUCTURE  SWHACTOR OPTIONAL
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
    The function module test is successful with all required conventions for workflow but while i try to create a rule with the funtion module i get the error "Function Module does not meet the workflow conventions"
    I Also have included the following in FM
    INCLUDE <cntn01>.
    Any suggestions would be helpful. Thanks in Advance,
    Imran

    Hi,
    I am not sure whether the rule accepts the optional flag. Remove the optional flag for the tables parameters and try again. According to the documentation you have implemented the right interface. It might be the issue with the tables parameter being optional.
    Hope this helps,
    Sudhi

  • Function Module to find out the release value in contract

    Dear All,
    I have to upload the contract with new accoutn assignment without changing the existing contract. For that i have to download all the existing contract data with value.
    In that case i have some issues regarding the value.
    For example : In the system old contract is created with value 1000 and the released value as 500.
    In that case i have to uload the new contract with all the details of existing contract with value of 500 (1000-500=500).
    How can i get the value (500) and from which table.Is there any functional module to find out the release value in contract.
    Thanks and regads,
    PM
    Edited by: PM on Jan 21, 2010 8:40 AM
    Edited by: PM on Jan 22, 2010 9:48 AM

    Hi
    You need to link the table VBFA and VBAK.
    For a contract you can check all the subsequent document (which you can filter whether you want to see Order / delivery / Billing) in VBFA and then from there pick the subsequent document no. and then from VBAK you can pick the Net value of these subsequent documents, and so you will have both the values (value of Contract and value in subsequent document) and you can determine the balance value.
    Regards
    Amitesh Anand

  • Any function module to read all the values in Tcode-PPQD?

    Hi all
    Is there any function module to read all the values in Tcode-PPQD (Display Qualifiaction Catalog).
    and any idea what tables are involved to get these values like parent and child relationship?
    Thanks in advance.
    Murali.

    Murali,
    you can use the following..
    data: w_sobid type sobid, "Qualification ID
          w_objid type objid. "Qualification Catalog
    select objid  into w_objid
                  up to 1 rows
                  from HRP1001
                 where otype = 'QK'
                   and plvar = '01'
                   and istat = 1
                   and risgn = 'B'
                   and relat = '030'
                   and endda ge sy-datum
                   and begda le sy-datum
                   and sclas = 'Q'
                   and sobid = w_sobid.
    endselect.
    if sy-subrc eq 0.
    write: / w_objid,w_sobid.
    endif.
    Regards,
    Suresh Datti

  • Is there any function module for getting distribution list name

    Hi all,
    Is there any function module for getting distribution list name when there is same description for two distribution list name.
    or
    help me how to fetch the correct distribution name when there is same description.
    In order to send mails.
    Tell me ASAP.
    thanks
    sagar.

    http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
    list of Fms

  • Function Module for calculation of the net price of a configurable material

    Hi,
    I would like to know if a function module allows to calculate the purchasing /net price of a configurable material at a vendor and at a requested delivery date before the creation of a purchasing order.
    For configurable materials, we have no PIR and no moving / standard price thus the valuation price in the PR is blank.
    I would like to fill in the field "valuation price" in the PR with the net price we can find in the PO.
    However the PR is created before the PO.
    Thanks a lot in advance for yours reply.
    regards,

    hi Pravenn,
    I don't know about these functions, but u can try anything like this:
    data:
    strdate like sy-datum value '20070901',
          enddate like sy-datum value '20070909',
          date(10),
          moddate(1).
    date = enddate - strdate + 1.
    moddate = date mod 7.
    date = date div 7.
    if moddate <> 0.
      date = date + 1.
    endif.
    write: / date.
    Regards
    Allan Cristian
    Message was edited by:
            Allan Cristian

  • Function Modules for Format Date, Month Name and Quarter value.

    Hi All,
    1. I am getting the date field from the Flatfile, so i need to format the date to YYYYMMDD. Is there any Function module for that in BW.
    2. Based on the above Formated Date i have to find out the Name of the Month like JANUARY, FEBUARY etc.
    3. Based on the same above Formated Date i need to find out the Quarter like 1, 2 etc.
    Could you please let me know if any function modules are there for the above questions in BW not in ABAP, why i mention is some Function modules are there in ABAP but not in BW.
    Thanks in advance.
    Regards,
    srinivas

    Hi ,
    1.If your input date format is MMDDYYYY then Use SDATE as conversion routine in trans strucutre to convert into YYYYMMDD.
    2.By passing year as input parameter for the following FM you would get all the months with text.Using READ statement in routine you can get month name
    MONTH_NAMES_GET
    3.For Quarters you can use the following FM:
    TSTR_PERIODS_QUARTERS
    hope it helps...
    regards,
    Raju

Maybe you are looking for

  • Dynamic Documents & Exercise

    Hi guyzzzzzz, i want the document for the following........ ·  Dynamic Documents Display ·  Structure of Program that Use Dynamic Documents ·  Classes for Dynamic Documents ·  Important Methods of DD Classes Demo/Exercise Its very urgent, plz help me

  • How can I have a user automatically login?

    I have an admin account but i want to enable the guest account. But when i start the computer i want it to login straight to the admin, but enable the guest account, so I can just log off the admin then login if i want to use the guest. Not the best

  • ITunes won't launch on Windows XP laptop.

    When I click iTunes, it asks me if I want to make the following changes to this computer and when I click yes, it is unresponsive. Can anyone help please?

  • Intermittent freezing bug with FPS games on T60p

    I have a Lenovo T60p with the latest graphics driver from the lenovo site, but this problem has been pestering me for years and I'm tired of it. So, I wondered if anyone had a similar issue and/or a solution. SO, the problem. In EVERY single FPS game

  • WLSE support of Novell LDAP server NDS

    Hi all, It seems that WLSE (tested with 2.12) generates LDAP search packets that are not compatible with Nortel LDAP server called NDS. NDS is not designed to give the Userpassword in a reply of a ldap search as it is requested by the WLSE. I did not