Is there any function Module available?

Hi,
Could you please tell me whether the function module is  available for the scenario below.
If we pass RFC Name to the function module it should return success or failure message for the particular target server maintained in the RFC.
We need to check with the help of RFC we just need to know whether the particular target server is running fine or not?
Please help me in this regard.
Thanks & Regards,
Swathi

Hi Swathi,
Actually there is a program available that can check an RFC destination (regardsless of what type it is). In fact within transaction SM59, behind the "Connection Test" button this report is runned and the results shown on screen.
I have made a small ABAP objects method to encapsulate this.
This method has an interface and ABAP code:
-->INTERFACE:
import: RFCDEST  TYPE RFCDEST (OPTIONAL) - Destination to test
change: REACHED  TYPE BOOLEAN            - Is destination active?
change: DETAILS  TYPE RFCSI              - RFC system info (see FM RFC_SYSTEM_INFO)
-->ABAP CODE:
METHOD reach_rfc_destination .
* Test RFC destination connection (all types)
  DATA:
    loc_rfcsi TYPE rfcsi.
* Answer is unknown at the start of the method
  CLEAR:
    loc_rfcsi,
    reached.                  " In this way it is always set to GC_FALSE
* Only if an RFC Destination is supplied
  IF  rfcdest IS SUPPLIED
  AND rfcdest NE space.
*   Clear memory area before call
*   so no details about previous RFC test calls do exist
    FREE MEMORY ID '%_rfctest'.
*   Remote test call
    SUBMIT rsrfctes
      WITH dest = rfcdest AND RETURN.                    "#EC CI_SUBMIT
*   Collect possible RFC information
    IMPORT rfcsi TO loc_rfcsi FROM MEMORY ID '%_rfctest'.
*   Reached
    IF loc_rfcsi IS INITIAL.
*     Answer is not reached
      reached = gc_false.
    ELSE.
*     Answer is reached
      reached = gc_true.
      details = loc_rfcsi.
    ENDIF.
  ENDIF.
* Housekeeping
  CLEAR:
    loc_rfcsi,
    sy-subrc.
ENDMETHOD.
This will supply you with gc_false (=constant value with space) or with gc_true (=constant value with X).
When gc_true the destination is OK and reachable.
Regards,
Rob.

Similar Messages

  • Is there any Function module available for GR IR for purchase order

    Hi
    Is there any function module available in SAP to get the list of Goods Received and Invoice Reciept for a purchase order.
    One way to create a custom fuction to fetch the details from MSEG and BKPF.
    Can somebody suggest a better solution.
    Thanks in advance.
    Ruhi Hira

    Which table in BAPI_PO_GETDETAILS exactly has these information ?
    PO_HEADER_TEXTS
    PO_ITEMS
    PO_ITEM_ACCOUNT_ASSIGNMENT
    PO_ITEM_SCHEDULES
    PO_ITEM_CONFIRMATIONS
    PO_ITEM_TEXTS
    PO_ITEM_HISTORY
    PO_ITEM_HISTORY_TOTALS
    PO_ITEM_LIMITS
    PO_ITEM_CONTRACT_LIMITS
    PO_ITEM_SERVICES
    PO_ITEM_SRV_ACCASS_VALUES
    RETURN
    PO_SERVICES_TEXTS
    EXTENSIONOUT
    NFMETALLITMS
    Regards
    Ruhi Hira

  • Is there any function module for converting text to hyperlink?

    Hello all,
              I am designing an application in BSP wherein the user can enter hypertext values for some
              of the data enteries in the database table. Is there any function module available for converting
              text into hypertext. Eg. if the user enters 'www.mypersonalwp.com' then it should convert this
              text value into a hyperlink.
    Thanks in advance.
    Gurmahima.

    Hi,
    Refer the given below link
    http://help.sap.com/saphelp_erp2004/helpdata/EN/85/ce25c2d7ae11d3b56d006094192fe3/content.htm
    Hope it helps you
    Thanks
    Arun Kayal

  • Is there any function modules or BAPI's

    Is there any function modules or BAPI's that would delete the original partner and then add a new partner.Iam using BAP
    bapi_alm_notif_data_modify
    But iam not able to change partner in notification header
    Please give your input for sovling it

    Dear Rama,
                           In the bapi_alm_notif_data_modify, there are 2 structure
    NOTIFPARTNR STRUCTURE  BAPI2080_NOTPARTNRI OPTIONAL
    NOTIFPARTNR_X STRUCTURE  BAPI2080_NOTPARTNRI_X OPTIONAL
    Pass yr partner value in NOTIFPARTNR, and against the value make it "X" in the NOTIFPARTNR_X  , then u can change the partner value.
    Give point if helpfull
    Thanks

  • 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

  • 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

  • Is there any function module to give absolute value of a number?

    Hi,
    Is there any function module to give absolute value of a number?
    That has similar functionality to the Built in Function ABS.
    Please let me know.
    Thanks,
    cs

    hi,
    why are you looking for any function module.
    You can easily get it by mathematical function ABS .
    Syntax : <Turget Variable> = ABS <Source Variable>
    \[removed by moderator\]
    Anirban Bhattacharjee
    Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM

  • Is there any function module to convert the date format

    Dear ABAPers,
    Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
           I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
    Thanks & Regards,
    Ashok.

    hi,
    create custom function module or copy the below code in the report ..and use it
    the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
    FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
    ""Local interface:
    *"       IMPORTING
    *"             VALUE(DATE) LIKE  SY-DATUM
    *"       EXPORTING
    *"             VALUE(FORMATTED_DATE)
    *"       EXCEPTIONS
    *"              INVALID_DATE
    TABLES: TTDTG.
    DATA: BEGIN OF T_DATE,
            YYYY(4) TYPE C,
            MM(2) TYPE C,
            DD(2) TYPE C,
          END OF T_DATE.
    DATA: DAY(3) TYPE N.
    DATA: VARNAME LIKE TTDTG-VARNAME.
    IF DATE IS INITIAL.
      CLEAR FORMATTED_DATE.
      EXIT.
    ENDIF.
    check document date format
    CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
      EXPORTING
        DATE = DATE
      EXCEPTIONS
        PLAUSIBILITY_CHECK_FAILED = 1.
    IF SY-SUBRC NE 0.
      RAISE INVALID_DATE.
    ENDIF.
    MOVE DATE TO T_DATE.
    CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
    SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
    WRITE T_DATE-DD TO DAY.
    CONCATENATE DAY ',' INTO DAY.
    CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
      SEPARATED BY SPACE.
    ENDFUNCTION.
    the output is :--Convert a DATE field into a full format date eg. March 23, 2000
    Regards,
    Prabhudas

  • Is there any function module to convert date format?

    Is there any function module to convert date format from mm/dd/yyyy to dd.mm.yyyy or sy-datum?

    Hi,
    wirte statement converts any date fomat in system date fromat
        WRITE w_DateTO w_date_sys.
    Regards,
    Sriram

  • QM : is there any function module to find inspection lot characterstics

    Hi All,
            is there any function module to find all characterstics for an inspection lot.
    i need exact data which qe51n transaction is fetching .
    thanks in adv ,
    Varma

    Hi uvs,
    1. we can use the fm BAPI_INSPOPER_GETCHAR.
    regards,
    amit m.

  • Is there any function module? Fiscal week no problem

    Hi friends,
    I want how to get physical week for given date.
    Ie for 01-04-2009 week no is 1.
    Is there any function module?
    Pls suggest
    Regards
    Moosa

    Hi,
    Use the below code.
    DATA: v_ersda TYPE sy-datum VALUE '20090618'.
    DATA: v_month(2) TYPE c,
          v_week(2) TYPE c,
          v_full_week LIKE scal-week.
    MOVE v_ersda+4(2) TO v_month.
    CALL FUNCTION 'DATE_GET_WEEK'
      EXPORTING
        date         = v_ersda
      IMPORTING
        week         = v_full_week
      EXCEPTIONS
        date_invalid = 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.
    MOVE v_full_week+4(2) TO v_week.
    WRITE:/5 'Month = ', v_month.
    WRITE:/5 'Week = ', v_week.
    Regards,
    Kumar Bandanadham

  • Is there any function module that brings out profile planner

    Hello experts,
    Is there any function module that brings out profile planner (I want to set planner profile as u201CSAP800u201D. I am using 7KE1 transaction.
    Example: I know, the FM - K_KOKRS_SET_BATCHINPUT will set the controlling area to 'CTIC' for the entire batch input process.
    Thanks in advance.

    look at these fms..
    CACS_PROFILE_PARTNER_READ
    CACS_PROFILE_SHOW

  • Is there any function module which will upload storage locations for a mat

    Hi gurus,
      Is there any function module or BAPI to extend the storage locations of material which is done through <b>MMSC</b> transaction. I need to write a program to upload new storage locations for some materials.Please advise.
    Thanks ,
    Sam.

    You can do this using the BAPI_MATERIAL_SAVEDATA
    Regards,
    Rich Heilman

  • Is there any function module getting the cpu type?

    Is there any function module getting the cpu type?

    I guess the database server...
    I would like to get the SAP system cpu type as done in transaction st06 under system information.
    Thanks.

  • Any function module available for...

    hi all,
    i need a function module to do a goods receipt for the PO using
    movement type 161,
    movement ind B,
    goodsmvt code '01'.
    i couldnt able to post using BAPI_GOODSMVT_CREATE as iam getting
    'NO GOODS RECEIPT POSSIBLE FOR PO XXXXXXXX XXXXX'.
    So is there any function module other than bapi to do a goodsmvt with my requirements.
    Thanks in advance,
    Prem.

    hi,
    the code i use is,
    loop at gt_final into gs_wa_final.
            gt_item-move_type     = '161'.
            gt_item-entry_uom     = gs_wa_final-meins.
            gt_item-stge_loc        = gs_wa_final-lgort.
            gt_item-entry_qnt      = gs_wa_final-menge.
            gt_item-entry_uom_iso = gs_wa_final-meins.
            gt_header-ref_doc_no                   = gs_wa_final-submi.
            gt_item-base_uom = gs_wa_final-meins.
            gt_header-doc_date                      = gv_last_date.
            gt_header-pstng_date                   = sy-datum.       
            gt_item-ind_propose_quanx           = 'X'.
            gt_item-serialno_auto_numberassignment = 'X'.
            gt_item-material                           = gs_wa_final-matnr.
            gt_item-plant                               = gs_wa_final-werks.
            gt_item-po_number                      = gs_wa_final-ebeln.
            gt_item-po_item                          = gs_wa_final-ebelp.
            gt_item-mvt_ind                          = 'B'.
          append gt_item.
          clear gt_item.
    *call bapi goodsmvt create to do the gr
        set update task local.
        call function 'BAPI_GOODSMVT_CREATE'
          exporting
            goodsmvt_header       = gt_header
            goodsmvt_code         = gt_bapigm_code
          importing
            goodsmvt_headret      = gs_headret
          tables
            goodsmvt_item         = gt_item
            goodsmvt_serialnumber = gt_serialno
            return                = gt_return.
    call bapi_transaction_commit to commit if success
        if gt_return-type <> 'E'.
          call function 'BAPI_TRANSACTION_COMMIT'
            exporting
              wait = 'X'.
        else.
          call function 'BAPI_TRANSACTION_ROLLBACK'.
        endif.
    After executing iam getting an error mess in gt_return[]
    'NO GOODS RECEIPT POSSIBLE FOR PO XXXXXXXXXX XXXXX'
    i cant understand y the function module is returning this error message,
    can any one help me in this issue,
    Thanks in adavance,
    Prem.

Maybe you are looking for

  • Project management software?

    I am looking for a package that works well, adheres to the Mac look and feel and otherwise helps to plan a project. Gannt charts and other graphical representations are the key. I want to represent the different work streams so everyone can 'see' the

  • ##BUG## Jdev/ADF/UIX/SCM

    I'm developing an UIX application with jdev 9.0.5.1, adf and SCM to versioning. And i've been lost half day to catch an problem, that i think, was a scm bug. Explaining : I've create a uix page and, drag and drop a VO from data control to create inpu

  • Embedding cam feed in web page

    There have been a number of postings on this topic but here is a new thread. Users (me included) have noted that it is possible to embed a feed as shown here: http://fentyler.pwp.blueyonder.co.uk/mike-cam.htm This technique does however require Windo

  • Why does a comma appear in the port field of the network settings

    Ever since upgrading to Mountain Lion I have had issues collecting mail through 2 different Gmail iMap accounts using Mail.app.  It works fine on my home network.  However the network location I have set up for work has a port number, 3128, for the p

  • Report for Gross margin,Net Margin

    Hi Experts,         I Want to know is there is any report 1) where i can get the Planned Cost, Planned Revenue, Contribution Margin,Gross amrgin & Net Margin. 2) Can i get the Customer code which assigned to the Project at a time for all the projects