Function module to get the file path in the system for TEMP folder

Hi All,
Is there any function module that I can use to get the file path in the system for TEMP folder.
I mean, i am supposed to give only TEMP as the input for that function module and I need to get the path of that in the system as the output.
I am unsing 4.0 version.
Please advice.
Regards
Ramesh

In Higher versions, we can use the below code:
call method CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE
    exporting
      VARIABLE   = 'TEMP'
    importing
      VALUE      = LV_TMP
    exceptions
      CNTL_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.
  call method CL_GUI_CFW=>FLUSH
    exceptions
      CNTL_SYSTEM_ERROR = 1
      CNTL_ERROR        = 2
      others            = 3.
  if SY-SUBRC <> 0.
Error handling
  endif.
  concatenate lv_tmp '\' into folder_path.
But need to know in the lower versions like 3.1h and 4.0,

Similar Messages

  • Function Module to get the Screen

    Hello All,
    Can anybody provide me a Function Module to get the Screen by giving Program Name and Screen Number.
    Thanks,

    Hello
      check FM  RS_IMPORT_DYNPRO
       CALL FUNCTION 'RS_IMPORT_DYNPRO'
          EXPORTING
            dylang = pmlang
            dyname = programname
            dynumb = screen
          IMPORTING
            header = header
          TABLES
            ftab   = ifields
            pltab  = iflowlogic.
    or you have to create join b/w table reposrc and tadir .
    Thanks
    Anirudh

  • Is there any function module to get the variables used in a query?

    Hi experts
    Please, do you know if is there any function module to get the variables used in a query?
    Thanks and regards
    Luis

    Hi Srini
    Yes, I have checked the tables but I need a function module
    Thanks anyway!
    Luis

  • Function Module to get the TIMESTAMP

    Hi,
    Is there any function module to get the TIMESTAMP as Outout , if i give input Time and Date.
    Or,
    If I go for the concatenate statement.. Do I need to concate the commas in to the target field?
    Because,
    I am not getting the proper result with this concatenate statement where I concatenated the YYYYMMDDHHMMSS in to the DECIMAL 15 Variable.
    Thanks,
    Naveen Inuganti.

    Hi use
    IB_CONVERT_INTO_TIMESTAMP' or IB_CONVERT_FROM_TIMESTAMP'
    Example:
    * Declaring the work variables.......................
    DATA :
      timestamp like TZONREF-TSTAMPS,
      time      like sy-uzeit,
      date      like sy-datum.
    * The following function module is used to convert the
    * time and date into GMT timestamp
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
      EXPORTING
        i_datlo           = sy-datum
        i_timlo           = sy-uzeit
        I_TZONE           = 'INDIA'
    IMPORTING
       E_TIMESTAMP       = timestamp.
    * The following function module is used to convert the
    * above obtained timestamp to PST time zone date and time.
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
      EXPORTING
        i_timestamp       = timestamp
        I_TZONE           = 'PST'
    IMPORTING
        E_DATLO           = date
        E_TIMLO           = time.
    write :/ 'Date and Time at PST zone is ',date, time.

  • Function module to get the sequence numbers based on PERNR & payroll period

    Hi,
        Right now i am using the function module 'CU_READ_RGDIR' to get the sequence number based on the PERNR. Once i get the data i am filtering based on payroll periods (begin date and end date). Is there any function module to get the sequence number directly based on PERNR and payroll period dates? if so could you let me know.
    Thanks
    Satya

    I think thats the only way
    CALL FUNCTION 'CU_READ_RGDIR'
        EXPORTING
          persnr          = p0001-pernr
        TABLES
          in_rgdir        = it_rgdir
        EXCEPTIONS
          no_record_found = 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.
    check whether "Pay date for payroll result" with in Start Date and
                  End date, and "Reason for Off-Cycle Payroll" is initial
      LOOP AT it_rgdir WHERE paydt >= v_begda
                             AND paydt <= v_endda AND
                             void IS INITIAL
                             AND ocrsn IS INITIAL
                             AND srtza = 'A'.
        v_seqnr = it_rgdir-seqnr.
    ENDLOOP.
    Hope this helps.
    Thanks
    Kiran

  • Function module to get the posting period based on date

    Hi to all,
    Is there any function module to get the posting period based on date?
    Regards,
    Nagesh

    hi,
    CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
          EXPORTING
            I_GJAHR        = GV_GJHAR
            I_PERIV        = GC_24
            I_POPER        = GV_POPER
          IMPORTING
            E_DATE         = S_FKDAT-LOW
          EXCEPTIONS
            INPUT_FALSE    = 1
            T009_NOTFOUND  = 2
            T009B_NOTFOUND = 3
            OTHERS         = 4.
        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 FUNCTION 'LAST_DAY_IN_PERIOD_GET'
          EXPORTING
            I_GJAHR        = GV_GJHAR
            I_PERIV        = GC_24
            I_POPER        = GV_POPER
          IMPORTING
            E_DATE         = S_FKDAT-HIGH
          EXCEPTIONS
            INPUT_FALSE    = 1
            T009_NOTFOUND  = 2
            T009B_NOTFOUND = 3
            OTHERS         = 4.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ags.

  • Function module to get the dates from the year and the period

    Is there a function Module to get the dates from the year and the period

    Check with :
    To get last day of period use .
    LAST_DAY_IN_PERIOD_GET.
    To get last of month Use :
    RE_LAST_DAY_OF_MONTH
    HRVE_LAST_DAY_OF_MONTH
    LAST_DAY_OF_MONTHS
    ISB_PREVIOUS_PERIOD_DATE_GET
    Thanks
    Seshu

  • Function module to get the wbs element by entering Assignment No.

    Is there any Function module to get the wbs element by entering Assignment No.???????
    Thanks and regards
    Manish Thakur

    hi Manish,
    Just look at this function module.
    function wbs_assignment_check.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(I_COMPONENT) LIKE  RESBDGET STRUCTURE  RESBDGET
    *"     REFERENCE(I_PSPEL) LIKE  RESB-PSPEL
    *"     REFERENCE(I_RFPNT) LIKE  AFVC-RFPNT
    *"  EXPORTING
    *"     REFERENCE(E_PSPEL) LIKE  RESB-PSPEL
      e_pspel = i_pspel.
    endfunction.
    hope this helps u
    REWARD IF USEFUL
    thanks and regards
    suma sailaja

  • Function module to get the configuration of Individual objects

    Hi all,
    Is there is any std function module to get the data of individual object configuration.
    In table COM_TA_R3_ID, I can able to get the PRODUCT_GUID (for material and serial number) and I dont know how to get the configuration of the product by using the PRODUCT_GUID.
    Pl  through some light on this.
    Regards
    A.Sureshbabu.

    Hi,
    You can get the item configuration using FM CRM_CONFIG_READ_OW.
    This is used to read the product configurations for IPC calls.
    Just pass the configured item guid and it will return the configuration data.
    Use FM CRM_PRODUCT_I_READ_OW to get the product configurations but this FM checks whether any item has this product guid.
    Regards,
    Arun Kumar
    Edited by: Arun Kumar on May 12, 2010 10:20 AM

  • Function module to get the difference of dates ..

    Hi ,
    Can somebody pls help me with the function module to get the difference between two dates?
    I need to find the difference value and delete records if >1.
    Thanks in advance.
    Regds,
    Leeza.

    Leeza,
       When I tested the FM in my Program, it is <b>working</b>!!!!!
       Note that the Two Input Dates are to be in the format of <b>DATS</b> type (Eg: <b>vimimv-dmibeg</b>).
      U can want the Day which u have specified in the parameter I_DATUM_BIS (eg: 20050101) to be included for
    the calculation , then put X in the parameter I_KZ_INCL_BIS.
    Sample Code :
    report zkam01.
    data:           
    <b>sav_nlaufz like rf60v-nlaufz, 
    date1 type vimimv-dmibeg,
    date2 type vimimv-dmiend.</b>
    date1 = '20050101'.
    date2 = '20051001'.
    call function 'MONTHS_BETWEEN_TWO_DATES'
         exporting
             i_datum_von   = date1
             i_datum_bis   = date2
             i_kz_incl_bis = 'X'
         importing
             e_monate      = sav_nlaufz.
    write:
    date1,
    / date2,
    / sav_nlaufz.
    Please allot points if the problem is solved.
    Thanks
    Kam
    Message was edited by: Kam

  • Function module to get the BOM details for a material-plant combination

    hi
    Is there any function module to get the BOM details such as
            BOM Usage       -STLAN
            Alternative BOM -STLAL
            Items                -POSNR
            Required Quantity-EMENG
            Resulting Quantity-MENGE
            Unit of measure    -BMEIN
            Base unit of measure-MEINS
    for a given material-plant combination
    if so please suggest me some FMs.................
    Awaiting for ur reply..............

    try the below fm it may be useful for you
    DATA : BEGIN OF I_BOM OCCURS 0.
            INCLUDE STRUCTURE STPOX.
    DATA : END OF I_BOM.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          DATUV                 = SY-DATUM
          MEHRS                 = 'X'
          MTNRV                 = P_MATNR
          WERKS                 = P_WERKS
        TABLES
          STB                   = I_BOM
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          CONVERSION_ERROR      = 8
          OTHERS                = 9.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    just befor use it check your application area.for my case it is PP01. you can find it in CS12 when you are exploding the bom the value you are giving in BOM application that is the value for CAPID.
    Just go to se37 and checkout the fm it has lot of options here I am using the minimum things.
    regards
    shiba dutta

  • I need a Functional module to get the header material from the component .

    Dear Guru's
    Please help me .
    I need a name of the Functional module to get the header material from the component .
    As in if I put the Component in the Input I should get ALL the Main header materials using this Component.
    Regards,
    Roshan Lilaram Wadhwani.

    This was not answered

  • Function Module to get the Direct manager to an employee in a period?

    Function Module to get the Direct manager to an employee in a period of time?

    Hi,
    try these FM
    /MRSS/SQP_EMP_PROF_GET_API
    /MRSS/SQP_EMP_PROF_GET_HISTORY
    Thanks
    Viquar Iqbal

  • Function module to determine the date for the nth weekday of the mth month

    Hey folks,
    Is there a function module which determines the date for the mth weekday of the nth month in the pth year.
    For instance, if I input 2nd thursday of the 4th month in 2008, it should return me, 04/10/2008  (MM/DD/YYYY).
    Thanks and Best Regards,
    Puja.

    Hi Ravi,
    Hadn't been able to work on this lately...You solution was quite close, but did not work for a few scenarios....I tweaked the logic a bit to take care of them as well...
    So here goes the code:
    ================================================
      DATA first_day_of_month TYPE datum.
      DATA day TYPE p.
      CONCATENATE year month '01' INTO first_day_of_month.
      CALL FUNCTION 'DAY_IN_WEEK'
        EXPORTING
          datum = first_day_of_month
        IMPORTING
          wotnr = day.
      DATA day_number TYPE numc2.
      IF day = weekday.
        IF recur = 1.
          DATA ls_date(10) TYPE c.
          CONCATENATE month '/01/' year INTO ls_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external                  = ls_date
           IMPORTING
             date_internal                  = date.
        ELSE.
          day_number =  ( ( recur - 1 ) * 7 )  + 1.
        ENDIF.
      ELSEIF day < weekday.
        day_number = ( ( recur - 1 ) * 7 ) + ( weekday - day ) + 1.
      ELSE.
        day_number = ( ( recur - 1 ) * 7 ) + ( 7 - day ) + weekday + 1.
      ENDIF.
      IF date IS INITIAL.
        CONCATENATE year month day_number INTO date.
      ENDIF.
    ====================================
    There still could be some loopholes in this....am not sure....but it sure did seem to work for a couple of random checks that I performed.
    Brownie points to you for giving me a direction.
    Thanks,
    Puja.

  • Is there any function module to Change the System Status

    Dear ABAPers,
             I am working in the Customer Service Module.I want to change the System status.
    Is there any function module to change the System Status.
    Thanks & Regards,
    Ashok.

    Hi Ashok
    Service Order status update function module ?
    How to set the system status
    Check above threads,
    Regards,
    Syf

Maybe you are looking for