Suppressing Messages Generated by Function Modules

Hello,
Is there a way to suppress a message generated from within a function module even though the function module doesn't raise an exception to be handled?
I am calling L_TO_CREATE_MULTIPLE and it calls another function module that doesn't raise an exception, it just generates a message. I'd like to be able to handle the message rather than have it displayed to the user.
Thanks for any help anyone could provide.
Best Regards,
Brett

Brett,
When I tried it in a normal function module (not RFC), I am not able to suppress the "Information" messages. I have a BDC inside the fn module.
Do you have any idea?
Thanks for your help,
Bala

Similar Messages

  • Message handling in function module

    Dear All,
    I created a function module to create equipment master. but i want to know how to handle message for this function module.
    Like if i create an equipment which is already been created then the message should shoe that equipment already exist.
    <removed by moderator>
    this is my query. so pls kindly tell me how to handle message for this query
    Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve formatting.
    Edited by: Thomas Zloch on Apr 14, 2011 10:00 AM

    Hi Prakrita,
    Try building below code within the RFC after you have added return structure in your RFC parameters.
      IF sy-subrc NE 0.
        CLEAR message.
        message-msgty = 'E'.
        message-msgid = 'ZMI'.
        message-msgno = '001'.
        message-msgv1 =  ID.
      PERFORM return_message USING message
                                   CHANGING return.
      Endif.
      form return_message USING    VALUE(P_MESSAGE)   LIKE MESSAGE
                                   CHANGING P_RETURN  LIKE BAPIRETURN.
      CHECK NOT MESSAGE IS INITIAL.
      CALL FUNCTION 'BALW_BAPIRETURN_GET'
           EXPORTING
                TYPE       = P_MESSAGE-MSGTY
                CL         = P_MESSAGE-MSGID
                NUMBER     = P_MESSAGE-MSGNO
                PAR1       = P_MESSAGE-MSGV1
                PAR2       = P_MESSAGE-MSGV2
                PAR3       = P_MESSAGE-MSGV3
                PAR4       = P_MESSAGE-MSGV4
           IMPORTING
                BAPIRETURN = P_RETURN
           EXCEPTIONS
                OTHERS     = 1.
    endform.

  • Is it possible to circumvent error message within a function module?

    Hello friends,
    Is it possible to circumvent error message generation from within a function module? My program calls a FM (namely FKK_S_CADOCUMENT_WRITEOFF) to do some updates. However, in certain cases this FM throws error messages and terminates the whole process. I cannot control the aftermath because it never gets back to the calling program.It stops at the FM level and not at my program level.
    In essence, what I would like to do is to let the FM do its thing, generate some kind of exception (but no error message), come back to the calling program, and then I can capture the status in my program and do what is necessary from then on.
    Your help is greatly appreciated

    Hi,
    Do not use Excerption Tab.
    Instead declare a variable or Structure at export parameter.
    Which will return you error Description or Status of the FM.
    For Example.
    Goto Se37 ---> key in FM name of yours.
    Go to Table tab
    At Parameter Name Column key in RETURN, Type as LIKE and Associate type as BAPIRET2.
    ThankS & regards,
    ShreeMohan
    Edited by: ShreeMohan Pugalia on Aug 10, 2009 12:31 PM

  • Regarding Include which is generated during function module

    hi ,
    IN quality   there is include  LCFBTT12 which is  standard include generated during creation of function module  "CF_BT_CO_FHM_READ_FROM_DB".
    but in production we are not able to find  this include  ,whereas there is  function module  .
    but now in program where it is used is giving error  that include report not found LCFBTT12  .
    i want to know how this include is deleted  from system  .
    is there any option  to know this  ?.
    regards
    Deepak.

    Hi all,
    I know this is an old thread, but just wanted to add we had this issue as well, with the LCFBTT12 include during the SPUMG "additional preparation steps." We are running 4.7 and SAP_BASIS level 620, Level 68.
    We did not have this problem in any of our testing systems, so it only happened during production, and caused alot of short dumps. This thread was alot of help in quickly identifying the problem.
    One other note that was relevant to this issue: 1457258
    SAP support was able to resolve the issue, and here were their instructions. (Moderators feel free to remove this if it is not appropriate to post message information here):
    Include "LCFBTT12" belongs to old generated test frame for a function
    module in function group CFBT. This old generated test report is not
    used anymore and can be deleted.
    Please run report RS_TESTREPORT_DELETE_ONLINE and after that report
    RS_TEST_REPORT_GENERATE_JOB as described in note 931824. This should
    solve the problem.

  • SM21 Messages stored in function modules or database tables.

    Hi Everyone,
    Can anyone please inform me where the messages from SM21 are stored, i.e in which function modules or through which data base tables. And how can I retrieve those messages in my ABAP program for a specific error.
    Please respond the earlier the better.
    Thanks,
    Prashant.

    Check with the table.
    T100 Messages
    Regards,
    Maha

  • Error message when using function module HRIQ_TESTRESULTS_CREATE

    Hi,
    I need your help, I'm trying to use function module HRIQ_TESTRESULTS_CREATE to create external test results, I've used this function before without subscores, now I need to create subscores, but I get the message: "Grading scale UBID applies".
    The test type EXAM_UB_ING has assigned the UBID academic scale, which has a range from 1 to 677. Test type EXAM_UB_ING has 3 subtests (grammar, listening and reading) which also have the UBID academic scale assigned.
    I think this isn't a customizing problem because I can create test results with subscores using the PIQST00 transaction, the error message happens just when using the function module.
    I'm using this import parameters:
    STUDENT:
    PL:           01
    OT:          ST
    OBJID:     Student ID
    TESTRESULTS_HEADER:
    ISSUEDATE                      08.02.2010
    VALIDDATE                      30.04.2010
    TEST_GUID
    TESTEO                         50000269
    TRANSEO                        00000000
    TESTTYPE                       EXAM_UB_ING
    SESSIONID                      T1
    SESSIONYEAR                    2010
    ENTRYDATE                      08.02.2010
    TESTPASSFAIL
    TESTTOTRES                     458
    TESTSCALE_ID
    TOTALPERCENT1                   0,00
    TOTALPERCENT2                   0,00
    ENTRYMODE
    SUBTY
    Table TESTRESULTS_SUBSCORES:
    SUBTESTID            GRAMMAR
    SUBTESTTRES      GRAMMAR
    SUBT                     203
    SUBTESTID            READING
    SUBTESTTRES      READING
    SUBT                     120
    Does anybody know which could be the error? Or any other function module which I can use? (with HRIQ_TESTRESULTS_PROCESS_DATA I get the same error message).
    Thanks in advance!
    Araceli

    Araceli,
      I just noticed. You are populating SUBTESTSCALE_ID in subtest result structure.That's the reason it's throwing this error. it is trying to match Scale ID from test with value in sub test result scale ID.
    Prabhat Singh

  • Handling 2 messages in a function module

    Hi ,
    I have a requirement where I need to trigger 2 messages if sy-subrc fails in a Function Module.
         Function module                              GET_JOB_RUNTIME_INFO
         IMPORTING
         JOB名(JOBNAME)=          P_WK_JOBNM
         Error(SY-SUBRC <> 0)
         Result message output
         (EN) Total : &1, Success : &2, Error : &3
         Type: u2019Su2019
         &1:u20190u2019      &2:u20190u2019     &3:u20190u2019
         Perform error handling(->Error Handling:030)
    Error Handling 30:  Error Handling as ABEND
    Show message (message type u2018Eu2019)
    (EN)Error was found in function module. Function module: &1 Returned value: &2 &3
    &1:'GET_JOB_RUNTIME_INFO'
    &2: Exception No
    I have written the code in the following way.
    CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
    IMPORTING
      EVENTID                       =
      EVENTPARM                     =
      EXTERNAL_PROGRAM_ACTIVE       =
      JOBCOUNT                      =
       JOBNAME                       = l_job_name
      STEPCOUNT                     =
    EXCEPTIONS
       NO_RUNTIME_INFO               = 1
       OTHERS                        = 2
    IF sy-subrc <> 0.
    message s010(zmm)  with c_zero c_zero c_zero.
    message e001(zmm) display like 'A'.
    ENDIF.
    But the above code is not working fine.  Only the second message ie [message e001(zmm) display like 'A' ] is being displayed.
    In debugging mode the cursor is passing to the first message but still it is not being displayed.
    Can any one help me in solving this problem
    Thanks in advance,
    Indira

    check this sample code
    here gt_return is of type bapiret2_t
        MOVE <fs_bank_details>-bankkey TO gv_msg_par1.
        MOVE <fs_bank_details>-bankname TO gv_msg_par2.
        PERFORM fm_format_message USING gc_msgno083
                                        gc_e.
    FORM fm_format_message  USING    pv_msgno TYPE sy-msgno
                                     pv_type TYPE bapi_mtype.
      DATA:ls_return TYPE bapiret2.
      CLEAR: ls_return.
      CALL FUNCTION 'BALW_BAPIRETURN_GET2'
        EXPORTING
          type   = pv_type   "Message type
          cl     = gc_bp     "Message class
          number = pv_msgno  "Message No
          par1   = gv_msg_par1 "value for place holder1
          par2   = gv_msg_par2 "value for place holder2
        IMPORTING
          return = ls_return.
      IF ls_return IS NOT INITIAL.
        APPEND ls_return TO gt_return.
      ENDIF.
    ENDFORM.                    " FM_FORMAT_MESSAGE

  • Get Message ID in Function Module Endpoint

    Hi,
    I need to retrieve the message ID of an incoming web service call that has a remote function module as its endpoint.  This is a direct call to the web service and does not come via PI.  I have tried the following code with no success:
      data:  lo_server_context type ref to if_ws_server_context,
             lo_msgid_protocol type ref to if_wsprotocol_message_id,
             lv_message_id     type sxmsmguid.
      try.
          lo_server_context   = cl_proxy_access=>get_server_context( ).
          lo_msgid_protocol ?=
               lo_server_context->get_protocol( if_wsprotocol=>message_id ).
          lv_message_id = lo_msgid_protocol->get_message_id( ).
        catch cx_ai_system_fault into lo_cx_ai_system_fault.
      endtry.
    The message ID is always initial.
    Any ideas?
    Regards,
    Dion

    Yes, check fields system structure SY with fields like  SY-MSGV[1-4], SY-MSGID and so on.
    Cheers

  • How to capture error message from standard function module

    Dear friends
    when i  execute standard function module in finance , i am getting error message , pls check the below screen shot,
    how to capture the below error message so that i have display in my webdynpro component
    Thanks
    Vijaya

    Hello Vijaya,
    Incase of BAPI's they have a return table parameter T_RETURN. Just read that return table to get the error message.
    Incase of normal function modules, there will be exceptions raised for the message used inside the function module. Just read the sy-subrc after the FM and based on the sy-subrc value find the respective exception raised.
    May be you can try like this, whenever the message is raised it will be stored in the system variable.
    CALL FM.
    check for the system variables.
    sy-msgid = Message ID of the latest message raised.
    sy-msgno = message number of the latest message raised.
    sy-msgty = message type of the latest message raised.
    sy-msgv1 = variable1 of the latest message raised.
    sy-msgv2 = variable2 of the latest message raised.
    sy-msgv3 = variable3 of the latest message raised.
    sy-msgv4 = variable4 of the latest message raised.
    Regards,
    TP

  • Connection closed message by RFC function module.

    Hi experts,
    I have an RFC function module where I have no own exception defined. I use 'standard' ones.
    EXCEPTIONS
      communication_failure = 1 MESSAGE ls_proto-message
      system_failure        = 2 MESSAGE ls_proto-message
    Inside this FM I do update of database table using MODIFY dbtab statement.
    In some cases I get exception 'Conection closed' as a message.
    Does anybody know what this message means?
    Could it be temporary connection failure or timeout by table update?
    Thanks a lot.

    HI,
    then it is a temporary failure ..when u get this message ..what u can do is GOTO SM59->try to do a test connection with the destination logical system(Other Sap system)..see if u r able to login...If u r able to login then the RFC connection is fine otherwise we need to check in detail in which cases we are getting the error..
    Regards,
    Nagaraj

  • Document number generated from function module K_COSTS_PLAN_INTERFACE_TOTAL

    Dear friends,
      I am using function module K_COSTS_PLAN_INTERFACE_TOTAL to upload the Planning costs, After this function module call I need the document number generated for that item, but there is no return parameter from this function module which would give me the document number generated. Please let me know how to get the document number after this function module call.

    Hi...
    Try this function module..
    CALL FUNCTION 'BAPI_DOCUMENT_GETLATEST2' "
      EXPORTING
        documenttype =              " bapi_doc_aux-doctype  Document type
        documentnumber =            " bapi_doc_aux-docnumber  Document number
        documentpart =              " bapi_doc_aux-docpart  Documentation - text lines
        documentversion =           " bapi_doc_aux-docversion  Document version
        multilevelexplosion = 'X'   " bapi_doc_aux-flag  Document management indicator
    *   docbomchangenumber = SPACE  " bapi_doc_draw2-ecnumber  Change number
    *   docbomvalidfrom = SY-DATUM  " bapi_doc_draw2-validfromdate  Valid-From Date
    *   docbomrevisionlevel = SPACE  " bapi_doc_draw2-revlevel  Revision level
    *   loadlatest = 'X'            " bapi_doc_aux-flag  Document management indicator
    *   loadlatestreleased = 'X'    " bapi_doc_aux-flag  Document management indicator
    *   search_new_maindoc = SPACE  " bapi_doc_aux-flag  Document management indicator
    *   getdocdata = SPACE          " bapi_doc_aux-flag  Document management indicator
    *   getobjectlinks = SPACE      " bapi_doc_aux-flag  Document management indicator
    *   getdocdescriptions = SPACE  " bapi_doc_aux-flag  Document management indicator
    *   getlongtexts = SPACE        " bapi_doc_aux-flag  Document management indicator
    *   getstatuslog = SPACE        " bapi_doc_aux-flag  Document management indicator
    *   getdocfiles = SPACE         " bapi_doc_aux-flag  Document management indicator
    *   getcomponents = SPACE       " bapi_doc_aux-flag  Document management indicator
    *   getclassification =         " bapi_doc_aux-flag  Document Management Indicator
    *   getstructures =             " bapi_doc_aux-flag  Document Management Indicator
    *   getwhereused =              " bapi_doc_aux-flag  Document Management Indicator
    *   sortf_exclude = SPACE       " stpox-sortf   Sort string
    *   sortf_stop_expl = SPACE     " stpox-sortf   Sort string
    *   expl_docs_only_once = 'X'   " bapi_doc_aux-flag  Document management indicator
    *   stop_on_first_error = SPACE  " bapi_doc_aux-flag  Document Management Indicator
      IMPORTING
        return =                    " bapiret2      Return parameter
        newversion =                " bapi_doc_aux-docversion  Document version
      TABLES
        docstructure =              " stpox         BOM Items (Extended for List Displays)
    *   changedversions =           " tchg_vers     Table for Transferring Changed Document Versions
    *   statuslist =                " tstate_order  Sequence of Status Check
    *   documentdata =              " bapi_doc_draw2  BAPIS DMS: document data
    *   objectlinks =               " bapi_doc_drad_keys  BAPIS DMS: document data
    *   documentdescriptions =      " bapi_doc_drat_keys  BAPIS DMS: document data
    *   longtexts =                 " bapi_doc_text_keys  BAPIS DMS: document data
    *   statuslog =                 " bapi_doc_drap_keys  BAPIS DMS: document data
    *   documentfiles =             " bapi_doc_files2_keys  BAPIS DMS: document data
    *   components =                " bapi_doc_comp_keys  BAPIS DMS: document data
    *   all_returns =               " bapiret2      Return Parameters
    *   characteristicvalues =      " bapi_char_values_keys  BAPI Structure for Characteristic Value Assignment (Docs)
    *   classallocations =          " bapi_class_allocation_keys  BAPI Structure for the Assignment of Classes to Several Objects
    *   documentstructures =        " bapi_doc_structure_keys  BAPIs DMS: Structure Data for Several Documents
    *   whereusedlists =            " bapi_doc_structure_keys  BAPIs DMS: Structure Data for Several Documents
        .  "  BAPI_DOCUMENT_GETLATEST2
    And also check this link..
    Send original document from DMS as mail attachment
    Hope this will help you..
    Regards,
    Jhings

  • Catching error message from standard function module to internal table.

    Hi,
    i am calling a FM in my custom prog.
    After execution of the FM some auto generated errors is getting displayed.
    I want to pass this error to an internal table.
    Please tell me how to do this?
        CALL FUNCTION 'FORMAT_CHECK'
          EXPORTING
            i_checkrule   = t005-prbkn
            i_checkfield  = it_ven-bankn
            i_checklength = t005-lnbkn
            i_checkmask   = space
            i_fname       = fname
          EXCEPTIONS
            not_valid     = 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.
    I want to catch this particular error message in the itab.
    Thanks,
    SAM.

    Even we can create an internal table  nad move the messages to it.
    DATA : BEGIN OF L_ERR OCCURS 0,
            SNO LIKE SY-tabix,                                  "serial no
            MSGTY LIKE SY-MSGTY,                         "message type
            MSGNO LIKE SY-MSGNO,                        "message no
            ERR_TEXT LIKE T100-TEXT,                     "message text
           END OF L_ERR. 
       IF SY-SUBRC <> 0.
              L_ERR-SNO      = SY-TABIX.
              L_ERR-MSGTY    = SY-MSGTY.
              L_ERR-MSGNO    = SY-MSGNO.
              L_ERR-ERR_TEXT = TEXT-015.                        "Problem encounterd in uploading data.
              APPEND L_ERR.
              clear L_ERR.
         ENDIF.

  • How to change the name of function module ,generated by SMARTFORMS

    Dear All,
    As you all know, SMARTFORMS generates one function module.
    The default name is somewhat like    /1BCDWB/SF00000099
    instead of, i want to give some specific user defined name.
    how to do???

    Hi,
    I think its not possible to give it a user defined name, but you can assign it to a variable and use that variable name instead.
    Please see the code below
    Data: V_FMNAME type RS38L_FNAM.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
                 EXPORTING
                   formname                 = 'ZSMARTFORM'
                  VARIANT                  = ' '
                  DIRECT_CALL              = ' '
                IMPORTING
                  FM_NAME                  =  V_FMNAME
                EXCEPTIONS
                  NO_FORM                  = 1
                  NO_FUNCTION_MODULE       = 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.
              CALL FUNCTION V_FMNAME
               EXPORTING
                ARCHIVE_INDEX              =
                ARCHIVE_INDEX_TAB          =
                ARCHIVE_PARAMETERS         =
                CONTROL_PARAMETERS         =
                MAIL_APPL_OBJ              =
                MAIL_RECIPIENT             =
                MAIL_SENDER                =
                OUTPUT_OPTIONS             =
                USER_SETTINGS              = 'X'
                  wa_itab1                   = wa_itab1
                  wa_itab2                   = wa_itab2
                  wa_itab3                   = wa_itab3
                  wa_itab4                   = wa_itab4
                IMPORTING
                DOCUMENT_OUTPUT_INFO       =
                JOB_OUTPUT_INFO            =
                JOB_OUTPUT_OPTIONS         =
                TABLES
                  i_itab1                    =  i_itab1
                  i_itab2                    =  i_itab2
                  i_itab4                    =  i_itab4
                  i_itab3                    =  i_itab3
              EXCEPTIONS
                FORMATTING_ERROR           = 1
                INTERNAL_ERROR             = 2
                SEND_ERROR                 = 3
                USER_CANCELED              = 4
                OTHERS                     = 5
              IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF.
    Regards,
    Manish

  • Call Function not Generating Function Module for Smartform

    Hi Gurus,
    We have a work copy print program use to print deliveries (smartforms). This program works fine in Production but right now we are doing some testing and I found out that when we run this program in QUALITY environtment, it shortdumps with error saying "Function Module Not Found"
    Basically when it gets to the Function Module "SSF_FUNCTION_MODULE_NAME", it could not generate any function module for the form it Sy-Subrc = 2 Exception meaning NO_FUNCTION_MODULE.
    The problem is this only happens in our QUALITY environment.I compare the function module in the 2 systems, there was not diff as this is a Standard SAP module. I passed diff smartforms we have in QUALITY through the FM and it will not generating any FM for any of them. So this is not an error from the smartforms, bcos all the same smartforms generates FM in Prod.
    So what I did next is to Debug the FM "SSF_FUNCTION_MODULE_NAME" in the 2 systems to see where the diff is coming from. I noticed 2 views that the FM is using, they are STXFADM and D010SINF . So on the Production system, STXFADM-LASTDATE and D010SINF-UDAT fields are the same value, so it generates the FM. On the QUALITY systems, the values are different hence it skips the code to generate the FM.
    Thanks Guys.
    Points will greatly be awarded for this.

    Please guys, help me look into this, I really need a solution fast.
    Thanks

  • ABAP Function Module generator

    Hi,
    I wonder if there is a ABAP Function Module generator for inbound and outbound adapter data. Can I generate a function module in XI to trigger a adapter.
    regards,
    Richard

    Hi,
    There is no tool to "generate" RFCs.  You will have to use SE37 to create the RFCs as always.
    For outbound RFC, you will need only to define the interfaces, e.g. IMPORT, EXPORT, TABLES.  No ABAP code is required.  Then, just populate the parameters and send to XI.
    For inbound RFC, you can develop the RFC to do whatever it needs to do in ABAP.
    In the IR of XI, you can import the RFC's meta data.
    Regards,
    Bill

Maybe you are looking for

  • HT204053 I have one apple ID and 2 iCloud accounts...is there a way to consolidate these accounts?

    I have one apple ID , but two icloud accounts....not even sure why i have 2 now....might have happened when i got my iPad last year. Is there a way to consolidate the two icloud accounts without losing my contacts or other info?

  • Excel Documents "save as" / Shared Documents

    If you create a shared folder, MCM create a folder with MCM user as suffix - like "[user]. In Excel is "[" not an allowed character. If you save an Excel Document directly with "save as" in a MCM shared Folder, so appears an error from Excel. How can

  • A friend's eMac was working fine until the name of the administrator was changed incorrectly in Systems Accounts

    I am trying to fix a friend's eMac. It was working fine until the name of the administrator was changed incorrectly in Systems Accounts. Upon restart the computer failed to mount. I tried to reinstall Tiger and could not. The destination to do this i

  • XML Doubt  - please help

    Hi, I'm having a xml doc like the following <EmployeeDetails> <employee> <id>1001</id> <name>Ranjith.M</name> <age>26</age> </employee> <employee> <id>1002</id> <name>Unni.D</name> <age>29</age> </employee> <employee> <id>1003</id> <name>Anil.G</name

  • Sleeping in a confined space

    Personally, I don't like sleeping in a confined space; I'd much rather sleep on a queen or king sized bed. :P But what about my MBP? Will it overheat or messup if I sleep it and then put it in its case for long periods of time? Does the MBP generate