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

Similar Messages

  • 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.

  • 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.

  • Crystal Reports Based on SAP Function Module and Transperant Tables

    Hi,
    I need to develop reports based on SAP trasperant tables and to filter the records I require to use one of the function module in SAP.
    I have created parameters in Crystal reports that are required for the function to execute and are included in the where clause of the query. This helped the fuction to get those parameters and execute it.
    The thing is that the fuction works fine with one set of parameters and gives accurate results both in SAP and Crystal Reports.
    But fails for other set of parameters.
    It works fine when we directly execute function in SAP produces a record set. But, when we pass those parameters from Crystal Reports it fetches no data.
    Can anybody tell me the exact procedure to use function module and transperent tables together in Crystal Reports ?
    Thanks in Advance.
    Niwas Joshi

    Hi,
    This is going to be hard to explain, however you need to recognize that the function has input and possibly output (export) parameters.  Crystal Reports is able to work with these parameters.  However it is up to you to figure out how these parameters are used effectively to give you the correct results when joining the function with other data sources such as transparent tables.
    If you're using transparent tables and functions in a Crystal Report, then you need to link these objects in such a way so that a left outer join for example is using the function's output parameters to join to the transparent table equivalent fields.  However if the table is the starting point then the joins from the table should join the Input parameters of your function.
    you can set these joins in the Database menu | Database Expert | Links of Crystal Reports.

  • How to find the function module for standard tables.

    Hi
    Could any one please tell me how to find the standard function module to update the standard tables
    Thanks & Regards
    Sowmya

    Hi sowmya,
    To find the function modules for standard tables you go for a where used list of that particular table and check only function module interfaces checkbox...
    and more over you can go for DB_UPDATE_TABLE will be the function module for updating database table..
    Hope this information would help you
    Regards
    Narin Nandivada

  • Function module to get table description

    Is there any function module to get table description on passing table name

    Hi,
    We need to use : 'G_RW_TABLE_DESCRIPTION_GET' function module.
    we pass the table name and the language.
    call function 'G_RW_TABLE_DESCRIPTION_GET'
        exporting
          rw_table = p_table
          langu    = sy-langu
        importing
          tab_text = l_tabtext
        exceptions
          others   = 1.
    thanx.

  • Attach function module to a table field

    Hi guys,
            I need to add a function module to a table field as a F4 help.
    The function module i like to attach is K_GROUP_SELECT.
    Like it works in the transaction KS13
    Function module-->   ‘K_GROUP_SELECT’
    Please reply urgent will be rewarded with full points.

    Use the TCode SE11  & create a <b>search help</b> for the Table field in question.
    ~Suresh

  • How to create ENQUEUE function module for s567 table

    Hi Experts,
    Anyone Plz tell the steps how to create a ENQUEUE function module for the table s567.
    Its somewht urgent, plz help me.
    <REMOVED BY MODERATOR>
    Mohana
    Edited by: Alvaro Tejada Galindo on Mar 10, 2008 4:21 PM

    Hi,
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    Hope this will give a basic idea.
    Regards
    Sudheer

  • 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

  • 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

  • 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

  • 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

Maybe you are looking for