CNTL_ERROR

Hi,
I get this error when i click on the Header Incon in the delivery:
Exception condition CNTL_ERROR raised.
at ( WHEN 2):
CALL FUNCTION 'AC_FLUSH_CALL'
        EXPORTING
             SYSTEM_FLUSH = 'X'
             CALLED_BY_SYSTEM = CALLED_BY_SYSTEM
        IMPORTING
             MESSAGE_NR   = sysubrc
             MESSAGE_TEXT = SY-MSGLI.
   sy-subrc = sysubrc.
   CASE SY-SUBRC.
     WHEN 0.
     WHEN 1.
       RAISE CNTL_SYSTEM_ERROR.         "// system_error
     WHEN 2.
       RAISE CNTL_ERROR.                "// method_call_error
     WHEN 3.
       RAISE CNTL_ERROR.                "// property_set_error
     WHEN 4.
       RAISE CNTL_ERROR.                "// property_get_error
     WHEN OTHERS.
       RAISE CNTL_ERROR.
   ENDCASE.
ENDFUNCTION.
Any ideea why?
Thank you

Ensure that GUI's latest patch updation is done. 
thanks
G. Lakshmipathi

Similar Messages

  • CNTL_ERROR while running a custom report program in background mode

    Hi,
    I am running a report in background on daily basis. I am using cl_gui_custom_container class here and calling the constructor of this class. I am getting a CNTL_ERROR exception at this point. But if i run the same report directly, it is not throwing any exception. The problem is if i schedule it to background. I am not able to sort it out.
    I've written the following code below:
    I did apply the logic that you'd mentioned.
    I've implemented the code as below.
    IF  gr_container IS INITIAL.
    *** Check whether the program is run in batch or foreground
        IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    * Run in foreground
          CREATE OBJECT gr_container
            EXPORTING
              container_name = 'WORK_AREA_CONTAINER'.
          CREATE OBJECT lv_grid
            EXPORTING I_PARENT = gr_container.
        ELSE.
    * Run in background
          CREATE OBJECT lv_grid
            EXPORTING
              I_PARENT = gr_dockcontainer.
          ENDIF.
          ENDIF.
    i_parent_control = gr_dockcontainer.
            CREATE OBJECT m_base_splitter
            EXPORTING
              parent            = i_parent_control
              ROWS              = 1
              columns           = 2
            EXCEPTIONS
              cntl_error        = 1
              cntl_system_error = 2
              OTHERS            = 3.
            CALL METHOD m_base_splitter->get_container
            EXPORTING
              row       = 1
              column    = 2
              RECEIVING
              container = m_splitter_right_part
            EXCEPTIONS
              OTHERS    = 1.
    After I've implemented the above code I'm getting the following error in the batch job:
    Category               ABAP Programming Error
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
    Except.                CX_SY_REF_IS_INITIAL
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component (variable: "M_BASE_SPLITTER").
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.
    Would you be able to help me in the above issue?
    Regards,
    Mandeep

    Hi Alexander,
    Yes I'd declared gr_dockcontainer as type ref to CL_GUI_DOCKING_CONTAINER. And I've now replaced the previous code and wwrote the below code :
    gr_container IS INITIAL.
    ***Check whether the program is run in batch or foreground
          IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    ***Run in foreground
            CREATE OBJECT gr_container
              EXPORTING
                container_name = 'WORK_AREA_CONTAINER'.
            CREATE OBJECT lv_grid
              EXPORTING
                I_PARENT = gr_container.
          ELSE.
    ***Run in background
            CREATE OBJECT gr_dockcontainer
              EXPORTING
                NAME = 'WORK_AREA_CONTAINER'.
          ENDIF.
        ENDIF.
    = gr_dockcontainer.
        CREATE OBJECT m_base_splitter
          EXPORTING
            parent            = i_parent_control
            ROWS              = 1
            columns           = 2
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3.
        CALL METHOD m_base_splitter->get_container
          EXPORTING
            row       = 1
            column    = 2
          RECEIVING
            container = m_splitter_right_part
          EXCEPTIONS
            OTHERS    = 1.
    But after implementing the above code I'm facing the same issue of CTRL ERROR- " GUI cannot be reached".
    Please guide me through this.
    Regards,
    Mandeep

  • CNTL_ERROR while running a report in background mode

    Hi,
    I am running a report in background on daily basis. I am using cl_gui_custom_container class here and calling the constructor of this class. I am getting a CNTL_ERROR exception at this point. But if i run the same report directly, it is not throwing any exception. The problem is if i schedule it to background. I am not able to sort it out. So please if any body knows, answer this.
    Thanks,
    Kumar

    Hi Nithin,
    I was facing the similar issue in a custom report program. I did apply the logic that you'd mentioned.
    I've implemented the code as below.
    IF  gr_container IS INITIAL.
    *** Check whether the program is run in batch or foreground
        IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    * Run in foreground
          CREATE OBJECT gr_container
            EXPORTING
              container_name = 'WORK_AREA_CONTAINER'.
          CREATE OBJECT lv_grid
            EXPORTING I_PARENT = gr_container.
        ELSE.
    * Run in background
          CREATE OBJECT lv_grid
            EXPORTING
              I_PARENT = gr_dockcontainer.
          ENDIF.
          ENDIF.
    i_parent_control = gr_dockcontainer.
            CREATE OBJECT m_base_splitter
            EXPORTING
              parent            = i_parent_control
              ROWS              = 1
              columns           = 2
            EXCEPTIONS
              cntl_error        = 1
              cntl_system_error = 2
              OTHERS            = 3.
            CALL METHOD m_base_splitter->get_container
            EXPORTING
              row       = 1
              column    = 2
              RECEIVING
              container = m_splitter_right_part
            EXCEPTIONS
              OTHERS    = 1.
    After I've implemented the above code I'm getting the following error in the batch job:
    Category               ABAP Programming Error
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
    Except.                CX_SY_REF_IS_INITIAL
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component (variable: "M_BASE_SPLITTER").
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.
    Would you be able to help me in the above issue?

  • CNTL_ERROR while calling a function module from Java webdynpro

    I am calling a RFC function module from javawebdynpro app
    which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
    Any help on this is highly appreciated

    Good catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
    Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
    DATA:
          SOURCEVAL TYPE  /BIC/OIINVQTY,
          SOURCEUOM TYPE  /BIC/OIUSUOM,
          USITM TYPE  /BIC/OIUSITM,
          TARGETUOM TYPE  /BIC/OIUSUOM,
          CONVERTED_COST TYPE  /BIC/OIINVQTY.
    DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
    " get the Production UOM
        SELECT SINGLE I~/BIC/USPRDUOM
          FROM /BIC/PUSITM AS I
          INTO PRODUCTION_UOM
          WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
        IF ( SY-SUBRC = 4 ). " no records found
          "RAISE PARTNO_NOT_FOUND.
          RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
        ENDIF.
    " load the parameters
        SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
        SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
        USITM = SOURCE_FIELDS-/BIC/USITM.
    " then you can call the FM
        CALL FUNCTION 'Z_CA_CONVERT_US_COST'
          EXPORTING
            PSOURCEVAL                = SOURCEVAL
            PSOURCEUOM                = SOURCEUOM
            PUSITM                    = USITM
            PTARGETUOM                = PRODUCTION_UOM
          IMPORTING
            PTARGETVAL                = CONVERTED_COST
          EXCEPTIONS
            CONVERSION_NOT_MAINTAINED = 1
            PARTNO_NOT_FOUND          = 2
            OTHERS                    = 3.
    " ... [do the rest]
    Thanks for your help,
    Dennis

  • CNTL_ERROR  in job scheduling log

    Hi experts,
                i have developed a report to upload the time event data from multiple text files into  table CC1TEV. My report is having a few standard function modules. And i have scheduled the  program using SM36. Erlier i was getting run-time error CNTL_ERROR 
    but then i uncommented  it in one of the function module now its working fine but data is not getting updated in table CC1TEV.
    please help me.
    Thanks.
    Praveen

    Hello Jery Wang,
                    i got your point.. but my requirement is to read single or multiple files from a directory which is on presentation server,that i am doing with FM 'TMP_GUI_DIRECTORY_LIST_FILES' and then i am performing loop on internal table to read the data of every file into another internal table and then updating the table 'CC1TEV' . Here all the activities have to be performed as background  job.
    But as you suggested me to go with application server. my doubt is can we write presentation server data on application server directory in background job ? If yes ... then how ?
    please guide me ...
    Thanks.
    Praveen.

  • CNTL_ERROR when calling a SAP function

    Hi,
      I've been using for some time .NET SAP Connector to create client and server proxies.
      A collegue of mine has created an RFC that is called
    Z_YODA_CREATE_PM_NOTIFICATION.
      After using the wizard to create the C# proxy I call the function and I get this exception:
    SAP.Connector.RfcSystemException: Exception condition "CNTL_ERROR" raised.
       at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
       at SAP.Connector.SAPClient.RfcInvoke(String method, Object[] methodParamsIn)
       at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
       at SAPProxyDll1.SAPProxyDll1.Z_YODA_CREATE_PM_NOTIFICATION(String CODE, String DATE, String EQUNR, String HOUR, String PC, String USER, String& ADITIONAL_PARAM)
    My collegue is able to call this function from excel using VBA and no exception is throwned, and the function runs correctly.
    Is this .NET Connector fault? Am I doing something wrong?
    Thanks in advance for any help given,
    Luis Pinho

    Hi,
    Can you please give a detailed description on what the function module does and how it does? A piece of your VBA code that works?
    Regards,
    Guangwei

  • CNTL_ERROR while calling an FM through WebDynpro

    Hi All,
    I'm using an function module for rejecting PO through BDC for Transaction - ME29N  using call transaction method. Function module works well on R/3 System , but while calling it in WebDynpro it throws an CNTL_ERROR . What could be the problem , one more thing is the CALL TRANSACTION method works well for F-63 in webdynpro which i have created , but not for ME29N . Helpful answer will be appreciated .
    Thanks & Regards,
    RameshVinay

    >
    david santi wrote:
    > Hi Thomas,
    >
    >
    > Can you please give me a few directions on how to create "enterprise service". In my WDA application I have to do some recording. As you suggested, I wont use BDC or call transaction, so wanted to implement enterprise service in my application.
    >
    > Appreciate your help.
    That question is a bit off topic for this forum and this thread.  Generally you don't create an enterprise service if you want to update standard SAP data.  You would instead call one of SAP's delivered enterprise services - the whole process is very similar to how you would use a BAPI.  In fact if you can find a BAPI for the particular data object, feel free to continue to use that.

  • ABAP short dump with "CNTL_ERROR"

    Hi,
    I am getting an ABAP short dump with "CNTL_ERROR" while using an input script. What do I do?
    Thanks,
    Sreekar.

    Hi,
    Newer versions of SAP GUI and R/3 include external controls called as ActiveX (OCXs). ABAP code internally issues some commands to flush and refresh these controls. Since, when using GuiXT and input scripting, these controls are not created, and ABAP dumps. Use keyword "Enable controls" (without quotes on a separate line) in a screen block that has an ActiveX control.
    Example:
    Screen SAPLCOIH.3000
      Enter "/Menu=4,1,5"
    Screen SAPLSP01.0100
      Enter "=No"
    Screen RIPLKO10.1000
      Enable controls
      Set F[Group] "UG"
      Enter "/8"
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Exception condition "CNTL_ERROR" raised.  in WDA :  smartform to pdf

    Hii, 
    I am using a webdynpro - abap application. I am showing  a smartform as a pdf in one on the windows.
    When the link in the main window is clicked, a secondary window. Instead of the pdf, I get following exception.Kindly help me understand, where would I be going wrong. Let me know if more details required.
    *Exception condition "CNTL_ERROR" raised. *
    Form: PBO_HTML_CONTROL of program SAPLSTXBC
    Module: HTML_CONTROL of program SAPLSTXBC
    Function: SSFCOMP_PDF_PREVIEW of program SAPLSTXBC
    Method: DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_COMPONENTCONTROLLER~DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: ONACTIONPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    The code in the DISPLAYPDF method is as follows:
    method DISPLAYPDF .
    DATA: I_RS38L_FNAM TYPE  RS38L_FNAM.
    DATA: CTRL TYPE SSFCTRLOP.
    DATA: OUT TYPE  SSFCOMPOP.
    DATA: I_SSFCRESCL TYPE SSFCRESCL.
    DATA: LT_OTFDATA TYPE TABLE OF ITCOO.
    CTRL-GETOTF = 'X'.
    CTRL-NO_DIALOG = 'X'.
    CTRL-PREVIEW = 'X'.
    OUT-TDNEWID = 'X'.
    OUT-TDDELETE = ' '.
    data: i_tsp03 type tsp03.
    clear i_tsp03.
    select single * from tsp03 into i_tsp03.
    *OUT-TDDEST = i_tsp03-PADEST.
    OUT-TDDEST = 'TEP1'.
    ********get context data
      DATA lo_nd_zwebquestionaire TYPE REF TO if_wd_context_node.
      DATA lo_el_zwebquestionaire TYPE REF TO if_wd_context_element.
      DATA ls_zwebquestionaire TYPE wd_this->element_zwebquestionaire.
    * navigate from <CONTEXT> to <ZWEBQUESTIONAIRE> via lead selection
      lo_nd_zwebquestionaire = wd_context->get_child_node( name = wd_this->wdctx_zwebquestionaire ).
    * get element via lead selection
      lo_el_zwebquestionaire = lo_nd_zwebquestionaire->get_element(  ).
    * get all declared attributes
      lo_el_zwebquestionaire->get_static_attributes(
        IMPORTING
          static_attributes = ls_zwebquestionaire ).
    ********get context data ends
    data: itab1 type TCHAR255.
    data: itab2 type TCHAR255.
    data: itab type zprint. "addition by chandani
    data fm_name type rs38l_fnam..
    clear fm_name.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME             = 'ZCPESMARTFORM'
      IMPORTING
        FM_NAME              = fm_name
      EXCEPTIONS
        NO_FORM              = 1
        NO_FUNCTION_MODULE   = 2
        OTHERS               = 3.
    CALL FUNCTION fm_name
    EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = CTRL
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
       OUTPUT_OPTIONS             = OUT
       USER_SETTINGS              = ' '
       NAME                       = 'test'
       ZWEBQUESTIONAIRE           = ls_ZWEBQUESTIONAIRE
    IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = I_SSFCRESCL
    *   JOB_OUTPUT_OPTIONS         =
    TABLES                                  "addition by chandani
      itab                         = itab   "addition by chandani
    * 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.
    REFRESH LT_OTFDATA.
    LT_OTFDATA[] = I_SSFCRESCL-OTFDATA[].
    CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
      EXPORTING
        I_OTF                          = LT_OTFDATA
    * EXCEPTIONS
    *   CONVERT_OTF_TO_PDF_ERROR       = 1
    *   CNTL_ERROR                     = 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.
    DATA: PDF_DATA TYPE XSTRING,
          PDF_SIZE TYPE I.
    DATA: L_DUMMY TYPE STANDARD TABLE OF TLINE.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
    *   MAX_LINEWIDTH               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
    *   PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = PDF_SIZE
       BIN_FILE                    = PDF_DATA
      TABLES
        OTF                         = LT_OTFDATA
        LINES                       = L_DUMMY
    * EXCEPTIONS
    *   ERR_MAX_LINEWIDTH           = 1
    *   ERR_FORMAT                  = 2
    *   ERR_CONV_NOT_POSSIBLE       = 3
    *   ERR_BAD_OTF                 = 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.
      DATA lo_nd_pdf TYPE REF TO if_wd_context_node.
      DATA lo_el_pdf TYPE REF TO if_wd_context_element.
      DATA ls_pdf TYPE wd_this->element_pdf.
      DATA lv_sources LIKE ls_pdf-sources.
    * navigate from <CONTEXT> to <PDF> via lead selection
      lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
    * get element via lead selection
      lo_el_pdf = lo_nd_pdf->get_element(  ).
    * get single attribute
      lo_el_pdf->Set_attribute(
        EXPORTING
          name =  `SOURCES`
          value = PDF_DATA ).
    endmethod.

    Hi,
    1) This error generally comes ,when your GUI version is old.Check this point & try to upgrade.
    2) Otherwise if you are running report in background,then check madhu kumar's reply in this link & try like this.
    Dump Error Raise_Exception CNTL_ERROR
    Also search OSS notes.
    Thanks
    Gourav.

  • RFC_ERROR_SYSTEM_FAILURE: Exception condition "CNTL_ERROR" raised.

    I wrote a function.This read codes from a  .txt file, create an abap program dinamically and after run it.
    I wrote a java program with jco  and i wrote an abap program for calling function .&#304;f i runned abap program not happened any problem.But i runned java program.i saw this error :
    RFC_ERROR_SYSTEM_FAILURE: Exception condition "CNTL_ERROR" raised.
    My function :
    FUNCTION Z_MS_FUNC2.
    *"*"Local Interface:
    *"  IMPORTING
    *"  EXPORTING
    *"     VALUE(RESULT) TYPE  ZMS_SONUC-SONUC
    DATA: code TYPE TABLE OF rssource-line.
    data : p_file TYPE string.
    p_file = 'C:\deneme.txt'.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename                      = p_file
            FILETYPE                      = 'ASC'
          tables
            data_tab                      = code.
    INSERT REPORT 'zms_dinamik002' FROM code.
    SUBMIT zms_dinamik002 AND RETURN.
    result = 'Successfull.'.
    ENDFUNCTION.
    this code  show error row :
    38     CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES                  
        39       EXPORTING                                                                 
        40         DIRECTORY                   = FILE                                      
        41         FILTER                      = ''                                        
        42         FILES_ONLY                  = 'X'                                       
        43 *    DIRECTORIES_ONLY            = 'X'                                          
        44       CHANGING                                                                  
        45         FILE_TABLE                  = filetab                                   
        46         COUNT                       = count                                     
        47       EXCEPTIONS                                                                
        48         CNTL_ERROR                  = 1                                         
        49         DIRECTORY_LIST_FILES_FAILED = 2                                         
        50         WRONG_PARAMETER             = 3                                         
        51         ERROR_NO_GUI                = 4                                         
        52         others                      = 5.                                        
        53                                                                               
    54     IF SY-SUBRC <> 0.                                                           
    >>>>>       RAISE CNTL_ERROR.                                                         
        56     ENDIF.
    deneme.txt
    report mehmet.
    data wa like zms0005.
    wa-jop_id = 14.
    wa-jop_name = 'UZAK4'.
    modify zms0005 from wa.

    Hi,
    wa-jop is not defined (data: wa-jop type...)!
    Try to insert the coding-lines in a new report. Than make a syntax check.
    Regards Mario
    Edited by: Mario Müller on Mar 11, 2008 6:47 AM

  • CNTL_ERROR at RFC

    Hi all,
    The issue:
    I have got an interesting short dump: " A RAISE statement in the program CL_GUI_CUSTOM_CONTAINER=======CP" raised the exception condition "CNTL_ERROR". "
    The background:
    I have two systems, "CRM"  and "B".
    In "B" I have a function module which is called by RFC from "CRM". In this FM two transactions are called with batch input and I know that this dump occurs in these transactions.
    I have tried the running of this FM on two ways.
    1: se38 - I have a report in "CRM" which calls this FM. In this case it works fine, I get the required data from system "B".
    2: This FM is called when using an application in a browser and it dumps.
    Why is not possible to create gui controllers through RFC when it is used in WEB UI?
    The functionality must not be changed in the FM, transactions must stay there, I have to do something else.
    Any idea?
    Thanks,
    Gabor

    Hi,
    what transaction do you call in your program? Because you can fin dcouple of notes related to WebUI and CNTL_ERROR and some of them are programming errors. So maybe you just need to implement some OSS notes.
    Good luck

  • Exception condition "CNTL_ERROR WD-abap Smartform to pdf

    Hii, 
    I am using a webdynpro - abap application. I am showing  a smartform as a pdf in one on the windows.
    When the link in the main window is clicked, a secondary window. Instead of the pdf, I get following exception.Kindly help me understand, where would I be going wrong. Let me know if more details required.
    **Exception condition "CNTL_ERROR" raised. **
    Form: PBO_HTML_CONTROL of program SAPLSTXBC
    Module: HTML_CONTROL of program SAPLSTXBC
    Function: SSFCOMP_PDF_PREVIEW of program SAPLSTXBC
    Method: DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_COMPONENTCONTROLLER~DISPLAYPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: ONACTIONPDF of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/2TKFRFPNZA4CZYBGEB8F==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    The code in the DISPLAYPDF method is as follows:
    method DISPLAYPDF .
    DATA: I_RS38L_FNAM TYPE  RS38L_FNAM.
    DATA: CTRL TYPE SSFCTRLOP.
    DATA: OUT TYPE  SSFCOMPOP.
    DATA: I_SSFCRESCL TYPE SSFCRESCL.
    DATA: LT_OTFDATA TYPE TABLE OF ITCOO.
    CTRL-GETOTF = 'X'.
    CTRL-NO_DIALOG = 'X'.
    CTRL-PREVIEW = 'X'.
    OUT-TDNEWID = 'X'.
    OUT-TDDELETE = ' '.
    data: i_tsp03 type tsp03.
    clear i_tsp03.
    select single * from tsp03 into i_tsp03.
    *OUT-TDDEST = i_tsp03-PADEST.
    OUT-TDDEST = 'TEP1'.
    ********get context data
      DATA lo_nd_zwebquestionaire TYPE REF TO if_wd_context_node.
      DATA lo_el_zwebquestionaire TYPE REF TO if_wd_context_element.
      DATA ls_zwebquestionaire TYPE wd_this->element_zwebquestionaire.
    * navigate from <CONTEXT> to <ZWEBQUESTIONAIRE> via lead selection
      lo_nd_zwebquestionaire = wd_context->get_child_node( name = wd_this->wdctx_zwebquestionaire ).
    * get element via lead selection
      lo_el_zwebquestionaire = lo_nd_zwebquestionaire->get_element(  ).
    * get all declared attributes
      lo_el_zwebquestionaire->get_static_attributes(
        IMPORTING
          static_attributes = ls_zwebquestionaire ).
    ********get context data ends
    data: itab1 type TCHAR255.
    data: itab2 type TCHAR255.
    data: itab type zprint. "addition by chandani
    data fm_name type rs38l_fnam..
    clear fm_name.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME             = 'ZCPESMARTFORM'
      IMPORTING
        FM_NAME              = fm_name
      EXCEPTIONS
        NO_FORM              = 1
        NO_FUNCTION_MODULE   = 2
        OTHERS               = 3.
    CALL FUNCTION fm_name
    EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = CTRL
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
       OUTPUT_OPTIONS             = OUT
       USER_SETTINGS              = ' '
       NAME                       = 'test'
       ZWEBQUESTIONAIRE           = ls_ZWEBQUESTIONAIRE
    IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = I_SSFCRESCL
    *   JOB_OUTPUT_OPTIONS         =
    TABLES                                  "addition by chandani
      itab                         = itab   "addition by chandani
    * 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.
    REFRESH LT_OTFDATA.
    LT_OTFDATA[] = I_SSFCRESCL-OTFDATA[].
    CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
      EXPORTING
        I_OTF                          = LT_OTFDATA
    * EXCEPTIONS
    *   CONVERT_OTF_TO_PDF_ERROR       = 1
    *   CNTL_ERROR                     = 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.
    DATA: PDF_DATA TYPE XSTRING,
          PDF_SIZE TYPE I.
    DATA: L_DUMMY TYPE STANDARD TABLE OF TLINE.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
    *   MAX_LINEWIDTH               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
    *   PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = PDF_SIZE
       BIN_FILE                    = PDF_DATA
      TABLES
        OTF                         = LT_OTFDATA
        LINES                       = L_DUMMY
    * EXCEPTIONS
    *   ERR_MAX_LINEWIDTH           = 1
    *   ERR_FORMAT                  = 2
    *   ERR_CONV_NOT_POSSIBLE       = 3
    *   ERR_BAD_OTF                 = 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.
      DATA lo_nd_pdf TYPE REF TO if_wd_context_node.
      DATA lo_el_pdf TYPE REF TO if_wd_context_element.
      DATA ls_pdf TYPE wd_this->element_pdf.
      DATA lv_sources LIKE ls_pdf-sources.
    * navigate from <CONTEXT> to <PDF> via lead selection
      lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
    * get element via lead selection
      lo_el_pdf = lo_nd_pdf->get_element(  ).
    * get single attribute
      lo_el_pdf->Set_attribute(
        EXPORTING
          name =  `SOURCES`
          value = PDF_DATA ).
    endmethod.

    Use -  with gui_download
    call method cl_gui_frontend_services=>environment_get_variable
    exporting
    variable = p_envir_name
    changing
    value = ls_envir_path
    exceptions
    cntl_error = 1
    error_no_gui = 2
    others = 3.
    call method cl_gui_cfw=>flush
    exceptions
    cntl_system_error = 1
    cntl_error = 2
    others = 3.
    And refer the below notes: 972762
    ITS 620 Patch 23 and SAPKB62061
    ITS 640 Kernel Patch 148 and SAPKB64019
    ITS 700 Kernel Patch 77 and SAPKB70010
    and also refer the link below to get more info
    http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15
    thanx
    suriya

  • "CNTL_ERROR" raised , when using a Function Module

    Hi All,
    I am trying to reuse an existing Function module. This function module, fetches data in an internal table and creates a popup using ALV, using the Call Screen statement. I cannot modify this function module.
    Is there any method, how I can use this Function Module in Web Dynpro Application(which would be executed from portal) , because if I use it directly, I get an error .. Exception condition " CNTL_ERROR" raised as the Custom Container object doesn't get created. As far as  I understand, we cannot use such a function module directly, but please let me know if there Is any work around apart from creating a new function module.
    Best Regards,
    Preethi Santhanam.

    Refer these threads (Ans by Thomas) :
    CNTL_ERROR while calling an FM through WebDynpro

  • CNTL_ERROR call transaction miro

    In a project I developed a z fm   that integrate a idoc that  execute a  call transaction in miro. If I execute (in we19 in background mode) the fm does not give me ningun mistake, but if the entry is by external idoc i get the  following dump "CNTL_ERROR".
    I have been looking the sap not  311440 and my question is..
    I understand that when a extrenal idoc is  integrated in R3 the FM is executed s in background ??  because if i execute the same  code in a program in background mode i get the same error.
    why if  execute it via we19 in background mode it does not give me ningun mistake?
    Can you be that the user RFC who integrates the idoc does not have permissions?
    Or that directly as says the note 311440 cannot I execute call transaction to enjoy transactions an i have to use bapi ?
    Thanks

    Hi Gonzalez,
    You must not use a call transaction in any case if you have a BAPI as a working alternative. I suggest you check functions BAPI_INCOMINGINVOICE_*. This is more true for enjoy transactions.
    There are severall reasons for it, I guess in your case the system is trying to create an unexpected foreground screen object. I don't know why it would work in WE19 in background. There might be some differences in user parameters, for instance, some default user data might not be set (like company code, that would be typical).
    If you have to continue using call transaction, I suggest you set interface user for dialog and use it at least once to access MIRO directly to see if you can make all steps in your code.
    regards,
    Edgar

  • CNTL_ERROR when calling the Frontend Services

    Hi,
    I am calling the cl_gui_frontend_services=>file_open_dialog method in a POWL screen (in the HANDLE_ACTIONS)
    When I do that - the sy-subrc value returns with 2 which implies CNTL_ERROR.
    Can anyone tell me what seems to the problem? How can I solve the issue?
    Thanks
    Kiran

    Hello Kiran,
                       You can use this Class method only from  the report .
    Thanks,
    Greetson

Maybe you are looking for