How to CATCH error from call to standard SAP Function Module

Please, is it possible to catch the following error with the TRY CATCH ENDTRY construct?
From a custom program, am calling CS_BOM_EXPL_MAT_V2.
Several nested calls in, Form STL_DATEN_HOLEN (LCSS4F1I) calls FM CS_ALT_SELECT_MAT. 
However, that call is missing the CALL_INVALID Exception. 
CS_ALT_SELECT_MAT is raising CALL_INVALID, but since it was not included in the FM call, the RAISE_EXCEPTION runtime error is issued.
I added a TRY CATCH ENDTRY construct around the call in the custom program using CATCH cx_root, but the program is still short dumping.
All the research I have done has been misleading...some articles indicate all errors should be caught, some indicate only catchable runtime errors can be caught, others are not quite clear.
So, I would like to find out if, in this scenario, it is even possible to catch this error and avoid the short dump.
I will open a message to see about having the SAP code fixed as soon as I get authorization to do so, (as well as fix the data causing the issue in the first place), but in the meantime, I would like to handle it in my code if possible.
ECC 6.0
Thanks for any information!
Kind Regards,
Deb
Edited by: Debra Garner on Jan 26, 2012 5:19 PM

Hi Debra,
You cannot catch non class based exceptions using the TRY/ENDTRY.  You might also find no luck with help from SAP since the FM in question 'CS_BOM_EXPL_MAT_V2' is not released for customer use.  The best bet is to examine why the error is occurring and figure out what needs to be done to fix it and/or avoid it in the future.
Regards,
Ryan Crosby

Similar Messages

  • How to find the Access Key of Standard SAP Function Module

    Hi Experts,
    I have to change one sap standard function module.
    so how can i know the access key for that function module.......
    Regards,
    DS

    Contact the Basis Consultant in your project.
    The access key for standard SAP objects can be obtained from service.sap.com under Keys and Requests.
    Note 86161 - Registering developers and objects

  • Exception handling for a standard SAP Function Module - the OO way

    Hello,
    I was wondering what is the correct way to call a standard SAP function module inside a method of global class.
    I want to display the error via the:
    get_text( ) and get_longtext( ) methods.
    I don't want to use the sy-subrc check. Is this possible?
    My example doesn't seem to work...
    See example bellow:
    DATA: ex_object_cx_root TYPE REF TO cx_root,
          ex_text TYPE string,
          ex_text_long TYPE string.
    TRY.
          CALL FUNCTION 'L_TO_CONFIRM'
            EXPORTING
              i_lgnum                        = i_lgnum      " Warehouse number
              i_tanum                        = i_tanum      " Transfer order number
              i_quknz                        = '1'          " '1' - confirm withdrawal only (picking )
              i_commit_work                  = 'X'          " Indicator whether COMMIT WORK in function module
            TABLES
              t_ltap_conf                    = it_ltap_conf " Table of items to be confirmed
            EXCEPTIONS
              to_confirmed                   = 1    " Transfer order already confirmed
              to_doesnt_exist                = 2
              item_confirmed                 = 3
              item_subsystem                 = 4
              to_item_split_not_allowed      = 51
              input_wrong                    = 52
              OTHERS                         = 53.
        CATCH cx_root INTO ex_object_cx_root.
          ex_text = ex_object_cx_root->get_text( ).
          ex_text_long = ex_object_cx_root->get_longtext( ).
          " Error:
          RAISE EXCEPTION TYPE zcx_transfer_order
            EXPORTING textid = zcx_transfer_order=>zcx_transfer_order
                 err_class = 'ZCL_WM_TRANSFER_ORDER'
                 err_method = 'CONFIRM_TO_2STEP_PICKING'
                 err_message_text = ex_text
                 err_message_text_long = ex_text_long.
      ENDTRY.
    Thank you very much in advance

    Hello Marko,
    If i understand correctly you've enclosed the call to the FM 'L_TO_CONFIRM' inside the TRY ... CATCH ... ENDTRY block.
    CATCH cx_root INTO ex_object_cx_root.
          ex_text = ex_object_cx_root->get_text( ).
          ex_text_long = ex_object_cx_root->get_longtext( ).
    You can't do this because the FM 'L_TO_CONFIRM' doesn't propagate OO exceptions!
    Your approach is almost correct, what you've to do is goes like this:
    CALL FUNCTION 'L_TO_CONFIRM'
      EXPORTING
        i_lgnum                        = i_lgnum      " Warehouse number
        i_tanum                        = i_tanum      " Transfer order number
        i_quknz                        = '1'          " '1' - confirm withdrawal only (picking )
        i_commit_work                  = 'X'          " Indicator whether COMMIT WORK in function module
      TABLES
        t_ltap_conf                    = it_ltap_conf " Table of items to be confirmed
      EXCEPTIONS
        to_confirmed                   = 1    " Transfer order already confirmed
        to_doesnt_exist                = 2
        item_confirmed                 = 3
        item_subsystem                 = 4
        to_item_split_not_allowed      = 51
        input_wrong                    = 52
        OTHERS                         = 53.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
              INTO ex_text. "Get the ex_text by this technique & not by CX_ROOT->GET_TEXT()
    ENDIF.
    I'll have to check how to fetch the long text of the message
    BR,
    Suhas

  • How to pass multi value selection parameter to SAP Function Module?

    Hi ,
    Anyone know how to pass CR multi value parameter - array to SAP Function module ?
    eg  multi selection of customer in CR
    and then pass to Function module
    in SAP FM,  the SQL select these customer only
    How should the import parameter / table of SAP Function module designed?
    and how should CR pass the data to SAP FM
    thx
    John

    Moved to Integration Kit forum

  • How to catch errors in calling program when using SUBMIT ... AND RETURN ?

    Hi ,
    I am calling a report using submit and return statement from a function module. The report has select-options field for a date field. If user enters a date in low, which is greater than high, getting error message "Lower limit is greater than upper limit".
    How to catch this error without endup stoping on selection screen of the report?
    In the documentation, I read :
    Programs called with SUBMIT ... AND RETURN or CALL TRANSACTION cannot propagate exceptions to the caller, because exception objects are bound to the internal mode of a program.
    Is there any way to overcome this?
    Also my aim is to write a validation on the date selection-option to have the date range not more than 20 days.
    I am not sure of how to achieve this. 
    Is there a way to do validation of select-options data before submiting to the report ?
    Is there any standard FM to achieve this task?
    Thank you,
    Surya.
    Edited by: Surya on May 24, 2009 6:08 PM

    Hi Surya ,
    In your function module's code validate the date .
    If the low value of the date less than high and date period is not more than 20 then
    call transaction and in else condition raise exception.
    In your FM write like that - -
    IF   date-low LT date-high AND
                           date_difference LE '20' .
    CALL  TRANSACTION   'transaction'.
    ELSE.
    RAISE  ...........  " Raise the invalid date exception
    ENDIF.
    Regards
    Pinaki

  • How to create Geniric data source using the SAP FUNCTION MODULE

    Hi,
    I want to create genric data source using function module
    MD_STOCK_REQUIREMENTS_LIST_API (delivered by sap)
    for this function module where I can find  Extract Structer
    or I have to create ?
    How can i use this ?
    Thanks in Advance

    Hi Shilpa,
                  Check here..........
    Using function module as the generic extractor
    Generic Delta Update using Function Module
    Document regarding R/3 extractors using function module/user exits
    Generic extractors using FM

  • Catching error in call transaction

    Hi,
    Can anyone tell me how to catch errors in call transaction method.
    Please provide step by step guide.
    Thanks,
    Shipra

    Hi Shipra...
    This is the way...
    data : It_MSG type table of BDCMSGCOLL with header line.
    DATA : V_MESSAGE TYPE STRING.
    LOOP AT ITAB.
      PERFORM MAP_BDCDATA.
      CALL Transaction 'MK01'
      USING it_bdcdata
      MODE 'N'
      Messages into IT_MSG.
      if sy-subrc ne 0.  "when the Transaction is unsuccessful
    **Display the Error messages
            LOOP AT IT_MSG WHERE MSGTYP = 'E'.
             CALL FUNCTION 'FORMAT_MESSAGE'
                 EXPORTING
                   msgtyp = it_msg-msgtyp
                   msgno = it_msg-msgnr
                   msgid = it_msg-msgid
                   msgv1 = it_msg-msgv1
                   msgv2 = it_msg-msgv2
                IMPORTING
                   MESSAGE  = V_MESSAGE.
               WRITE:/ V_MESSAGE.
            ENDLOOP.
          REFRESH : IT_BDCDATA, IT_MSG.
    ENDLOOP.
    <b>Reward if Helpful.</b>

  • Need Help in expdp for resolving ORA-39127: unexpected error from call

    Hi All,
    My Environment is -------> Oracle 11g Database Release 1 On Windows 2003 Server SP2
    Requirement is ------------> Data Pump Jobs to be completed without any error message.
    I am tryring to take export data pump of a schema
    Command Used --> expdp schemas=scott directory=data_pump_dir dumpfile=scorr.dmp version=11.1.0.6.0
    Export Log Show this details its completed with 2 error messages
    Export: Release 11.1.0.6.0 - Production on Saturday, 23 April, 2011 13:31:10
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the OLAP option
    FLASHBACK automatically enabled to preserve database integrity.
    Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** schemas=scott directory=data_pump_dir dumpfile=scorr.dmp version=11.1.0.6.0
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 192 KB
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.schema_info_exp('SCOTT',0,1,'11.01.00.06.00',newblock)
    ORA-37111: Unable to load the OLAP API sharable library: (The specified module could not be found.
    ORA-06512: at "SYS.DBMS_CUBE_EXP", line 205
    ORA-06512: at "SYS.DBMS_CUBE_EXP", line 280
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 5980Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    ORA-39127: unexpected error from call to export_string :=SYS.DBMS_CUBE_EXP.schema_info_exp('SCOTT',1,1,'11.01.00.06.00',newblock)
    ORA-37111: Unable to load the OLAP API sharable library: (The specified module could not be found.
    ORA-06512: at "SYS.DBMS_CUBE_EXP", line 205
    ORA-06512: at "SYS.DBMS_CUBE_EXP", line 280
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 5980
    . . exported "SCOTT"."DEPT" 5.945 KB 4 rows
    . . exported "SCOTT"."EMP" 8.585 KB 14 rows
    . . exported "SCOTT"."SALGRADE" 5.875 KB 5 rows
    . . exported "SCOTT"."ACCTYPE_GL_MAS" 0 KB 0 rows
    . . exported "SCOTT"."BONUS" 0 KB 0 rows
    Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
    D:\APP\ADMINISTRATOR\ADMIN\SIPDB\DPDUMP\SCORR.DMP
    Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" completed with 2 error(s) at 13:40:08
    Please help me to resolve this issue.
    Thank you,
    Shan

    Hi Shan,
    I am getting very similar to yours
    "ORA-37111: Unable to load the OLAP API sharable library: (The specified module could not be found."
    error message while creating OLAP Analytic Workspace with AWM.
    I am creating workspace for the first time, actually following some tutorial to get some knowledge about OLAP)
    I see you managed to solve you problem.
    I wonder how I can get this MOS DOC 852794.1 - is it possible to get it without going to Metalink?
    Thanks in advance for any help.
    Regards,
    SC

  • ORA-39127: unexpected error from call to export_string := SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP(12425,1,...)

    Hi all,
    I am getting this erro on a Datapump Schema export on 11.2.0.2:
    ORA-39127: unexpected error from call to export_string := SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP(12425,1,...)
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-06512: at "SYS.DBMS_RMGR_GROUP_EXPORT", line 154
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    ORA-39127: unexpected error from call to export_string := SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP(12424,1,...)
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-06512: at "SYS.DBMS_RMGR_GROUP_EXPORT", line 154
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    ORA-39127: unexpected error from call to export_string := SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP(12423,1,...)
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-06512: at "SYS.DBMS_RMGR_GROUP_EXPORT", line 154
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    ORA-39127: unexpected error from call to export_string := SYS.DBMS_SCHED_JOB_EXPORT.GRANT_EXP(2003412,1,...)
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
    ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    I believe it requires some specific privileges on DBMS_RMGR_GROUP_EXPORT.
    I have found this below explanation Kevin's Blog: SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP but I am not a DBA, so I am not sure what grant needs to be modified.
    It also complains of unsufficient privileges on DBMS_SCHED_JOB_EXPORT.GRANT_EXP, but I am not sure who needs what grant.
    Could you please advise on how to resolve the issue?
    Thanks

    Hi,
    Can anyone help if possible please?
    Thanks

  • How save new contact from call logs onMy Asha 308 ...

    How save new contact from call logs onMy Asha 308 , How change tone setting for application.
    when open downloaded games or app Java Null point error occurs

    If you tap and hold the number in the call log does it not give you options?
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Calling a Standard SAP transaction VA03 from another web dynpro application

    Hi All,
    I have a requirement wherein I need to call the standard SAP transaction VA03 whenever a sales order is selected in some other we dynpro application so that the sales order gets displayed.
    No regarding usage of OBN for the above functionality I have certain queries:
    1. In order to call VA03 do I need to create a transactional iview for it or is there any direct method.Also how to pass this sales order number as parameter to the T.Code.
    2. Can we use standard business object BUS2032 for OBN or a new Business object is created.What exactly is the purpose of these standard business objects in portal and when should they be used.
    Thanks in advance
    Aman Gupta

    Hi Aman - Do you have a portal team in your project or you have to create the IVIEWS yourself?
    I do have a portal team and I dont know how they create the IVIEWs but for example, I will go to my portal team and I will ask them to create an IVIEW for TCODE VA03, they will created and they will tell me the input parameters they entered for the IVIEW so I can call OBN and display in webdynpro.
    SAP in SRM has webdynpro e.g. for BUS2121 and they have an IVIEW already implemented in the portal context pointing to the webdynpro of BUS2121 so we can used the IVIEW by calling OBN and passing the parameters; in my case the object_type will be 'shc' and the operation will be 'display' and the paremeters itab will be the GUID of my shopping cart, that way the OBN can understand which Shopping cart open and in which operation mode.
    I also did something like your requirement, I need it to display a specific case in Records Management but SAP has a standard IVIEW for records management 'RMREGEDIT' that didn't work for my requirement so I went to SE38 created a program that displayed the case based on GUID and I created a TCODE of my custom program. Portal team created a custom IVIEW of my custom TCODE and they told me the input parameters to call the TCODE in OBN and I pass in the itab parameter the GUID of the case using the FM that I post before.
    The action to call the OBN is in the event handler ON_CLICK of my ALV and the action is getting trigger when the user actually clicks a HYPERLINK in the ALV.
    Hope this helps you!
    Please feel free to ask me more details if you need.
    Jason PV

  • How to call a Standard SAP Program in Zprogram.

    Hi,
    how to call a SAP Standard program in SAP Program?
    Do we have to use any funtion module and pass paramters?
    I want to call a Standard SAP prg in to my prgram? can anyone explain me or give the piece of code to call standard prg.
    Thanks & Regards

    Again, ABAP related questions should be asked in the ABAP forum.
    To answer you question,  if the standard program is a report program, you can use the SUBMIT statement and pass parameters using the WITH Extention.
    Submit <report>
          with p_fld = 'X'
              and return.
    Please make sure to award points for helpful answers and mark your posts as solved when solved completely.  Thanks.
    Regards,
    RIch Heilman

  • How to call Custom RFC enabled Function Module in R/3 From XI

    Hi Experts,
    I want to call custom RFC enabled Function Module by sending some input parameters from XI.
    How to do this
    Thnx
    RAMS

    Hi RAMS,
    1. Under the SWCV Go to the Imported Objects.
    2. Right click on the RFC and click on the Import of SAP object.
    3. Give the logon server name, system number the user name and pasword.
    4. Select the RFC u want to import.
    5. Execute the import and the RFC is imported under the SWCV.
    Now u can use this Imported RFC in the scenarios of that SWCV.
    Regards
    Santhosh
    Remember to set the thread to solved when you have received a solution

  • ORA-39127: unexpected error from call to export_string :=SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP

    Hi,
    I am trying to export a Schema from 11.2.0.2 and getting the below error on export
    ORA-39127: unexpected error from call to export_string :=SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP(12425,1,...)
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-06512: at "SYS.DBMS_RMGR_GROUP_EXPORT", line 154
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    ORA-39127: unexpected error from call to export_string :=
    SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP(12424,1,...)
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-06512: at "SYS.DBMS_RMGR_GROUP_EXPORT", line 154
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    ORA-39127: unexpected error from call to export_string :=SYS.DBMS_RMGR_GROUP_EXPORT.GRANT_EXP(12423,1,...)
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-06512: at "SYS.DBMS_RMGR_GROUP_EXPORT", line 154
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    ORA-39127: unexpected error from call to export_string := SYS.DBMS_SCHED_JOB_EXPORT.GRANT_EXP(2003412,1,...)
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
    ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
    ORA-06512: at line 1
    ORA-06512: at "SYS.DBMS_METADATA", line 7049
    I  have searched the forum and found similar errors, but I am struggling to understand the cause and solution.
    Forums seem to indicate it may be related to bug 4358907, Re: Datapump export/import object grants given by another user but not sure it is relevant as I can see a ORA-01031: insufficient privileges in this log.
    Can you please advise?
    Thanks

    Please show your export command  and read MOS ID: ORA-39127 using datapump exp [ID 451987.1 ]
    and check below forms discussion:
    https://forums.oracle.com/message/10237007

  • HT3939 how to save number from call

    How to save numbers from call list?

    In Phone app, tap Recents, tap the Blue arrow of the number you are interested in and tap Create New Contact.

Maybe you are looking for

  • Creating an If Statement in Flex That Produces Multiple Results

    I have created a small login window for my flex app and once the user enter's an appropriate username and password I want the username to be displayed at the top but I also want a new window to appear. To do this I require an if statement to be activ

  • Applications folder problems

    Hello, Hoping someone can help me. I installed some software updates today and after doing so decided to install some new software, when asked to drag the application into my applications folder, I did, only to get an error message telling me that I

  • VM Crash with WLS 6.1 SP2 JDK 1.3.1 on NT/MSSQL

    Has anyone seen this? If we leave the system on for overnight, WLS crashes without further message. Our setting is 128M, of course it will get out of memory error if something is asking more than that. Question is: who is asking for 400 MB in one sho

  • Ram For macbook and macbook pro?

    hello i took out the 2 gigs of ram in my old macbook pro and ungraded to 4gb. can i take those 2 667 ddr2 dims and put them in my sisters white macbook and upgrade it from 1gb to 2gb? they are both 667 ddr2 i think it should work as long as it fits.

  • After Effects 9.0.2.42 Windows 7, Not installed in 64 bit section

    How do I know if  I am utilizing the 64 bit version of After Effects. It installed in Program Files (x86). Where Photoshop installed in the (64bit) Section. I am using 12 GB Ram and want to utilize as much as I can. In Multiprocessing Under "Render M