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

Similar Messages

  • Signal 4 error encountered while running a customized report

    Signal 4 error encountered while running a customized report
    We are running Oracle Applications version 11.5.10 on Oracle RDBMS 9.2.0. and IBM AIX 5.3 o production system and AIX 5.2 on test machines. We have made a new clone of production database on test machine and after installation of a clone on test-machine all customized reports terminated with signal 4 error.
    Can anybody tell the possible causes of signal 4 errors and their remidies ?

    Thank you for the link, i will read it...
    I have problemss with PDF output...
    When trying to run any concurrent request with PDF output, it completed with error and show the following message in the request log file:
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.AR8MSWIN1256
    Spawned Process 499776
    stat_low =84
    stat_high = 0
    emsg:was terminated by signal 4
    Program was terminated by signal 4
    Concurrent Manager encountered an error while running Oracle*Report for your concurrent request 20824997

  • Error while running a custom report in OIM

    Hi All,
    I have created a new custom report for OIM and written a stored procedure for that. But while running the report from Admin console, its throws the below error:
    java.sql.SQLException: ORA-00911: invalid character
    ORA-06512: at "IDM.XL_EXCEPTION", line 149
    ORA-06512: at line 1
    ERROR,19 Jun 2011 22:09:31,665,[XELLERATE.WEBAPP],Class/Method: ReportAction/displayTabularReport encounter some problems: Error executing stored procedure
    Thor.API.Exceptions.tcAPIException: Error executing stored procedure
    Line 149 : DBMS_OUTPUT.PUT_LINE('select stmt ='|| select_stmt);
    "select_stmt" is a select query based on the OIM tables.
    Please advice.

    Seems like there is a invalid character in your SQL (Report's store procedure). Could you share with me whole content of this "select_stmt" variable?
    regards,
    Thiago L Guimaraes

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

  • Error while running a customize report in oracle ebs

    Hi ..
    can anybody suggest how to solve the follwing error while running a customize report in oracle ebs?
    XXIFMS: Version : UNKNOWN
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    Current system time is 03-JUN-2011 11:09:24
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    P_DATE_FROM='2010/04/01 00:00:00'
    P_DATE_TO='2011/06/03 00:00:00'
    Forcing NLS_NUMERIC_CHARACTERS to: '.,' for XDO processing
    APPLLCSP Environment Variable set to :
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.AL32UTF8
    stat_low = 9
    stat_high = 0
    emsg:was terminated by signal 9
    ld.so.1: rwrun: fatal: librw.so: open failed: No such file or directory
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Program was terminated by signal 9
    Concurrent Manager encountered an error while running Oracle*Report for your concurrent request 1068011.
    Review your concurrent request log and/or report output file for more detailed information.
    Executing request completion options...
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 1068011 on node D0005 at 03-JUN-2011 11:09:24.
    Post-processing of request 1068011 failed at 03-JUN-2011 11:09:24 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 03-JUN-2011 11:09:24

    Please post the details of the application release, database version and OS.
    Is the issue with this specific concurrent program?
    Can you find any errors in the CM/OPP log files?
    Please see if these docs help.
    On R12.1.1/Solaris Platform While Generating Oracle Reports Files Failed With Error " ld.so.1: rwconverter: fatal: librw.so: open failed: No such file or directory [ID 1067786.1]
    Apps UPG Fail With Error Ld.So.1: Rwserver: Fatal: Librw.So [ID 961222.1]
    Thanks,
    Hussein

  • Urgent.....Error while running a jsp report from Jdeveloper

    Hi,
    I am getting following error while running a jsp report from Jdeveloper. I am using version 10.1.2.1.0. The same report is working fine when I am running it from report builder. ( Both these tools were installed using Oracle Developer Suite 10g version 10.1.2). I did search in oracle discussion forums and google, but I could not arrive at a resolution of error. Any help in resolving this issue would be grateful.
    Error details:
    Page url : http://<hostipaddress>:8988/Reports-reportproject-context-root/MyReport.jsp
    Reports Error Page
    Wed Oct 17 20:03:22 IST 2007
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
         at oracle.reports.jsp.ReportTag.doStartTag(ReportTag.java:464)
         at MyReport.jspService(MyReport.jsp:4)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Could anyone help me out in resolving this issue.
    Thanks
    Siva...

    Hi,
    I posted this message in jdeveloper forum yesterday, but there was no response. So I thought of posting it in this forum to check my luck.
    Thanks
    Siva...

  • Error while running the financial report in the workspace.

    Hi,
    Im getting the below error while running the financial report in the workspace in HTML mode.
    *"Required application module reporting.HRRunDlg is not configured. Please contact your administrator".*
    And im not able to login to the Hyperion Financial Reporting as well.. i get the below error
    *"You are not authorized to use this functionality. Contact your administrator"*
    Can someone let me know how to resolve this error.

    You don't mention the version, what app server or web server you are using, etc.. That information might be helpful, but in general, you can try the following:
    1. Make sure you have gone through the FR Web App deployment steps and verify the settings entered in the Config Tool.
    2. For version 11.1.1.x and 9.3.1.x, try opening the report in FR Studio and running it via the FR Studio Print Preview (*bold*not*bold* Web Preview.) If the report runs/processes, then the back-end FR Services are functioning and the issue is confined to the web interface. Verify the FR Web App is up and listening on the designated port (8200, by default), check the FR Web App logs and the App Server (WebLogic, WebSphere, Tomcat, OAS) logs for errors/issues.
    If the report fails to process in FR Studio Print Preview, then there is a problem with the FR Reporting Server Service. Check to make sure the service is up/functioning and check the FR Report Server logs for errors.
    3. Test access to other FR functionality in workspace (ex: Files->Preferences->Financial Reporting or Explore->Tools->Database Connection Manager?) If these don't work, then try to connect to the following URLs:
    http://workspaceServer:19000/hr/status.jsp
    http://frWebAppServer:8200/hr/status.jsp
    Note: The URLs above assume standard/default ports. You may need to adjust them for your environment.
    If the first URL fails, but the second URL works, there is a problem with the HTTP redirect settings on the Web Server (Apache, IIS, etc.) Run through the Workspace deployment and make sure the Web Server Config settings point to the right ports/servers.

  • Urgent...Error while running a jsp report in Jdeveloper

    Hi,
    I am getting following error while running a jsp report from Jdeveloper. I am using version 10.1.2.1.0. The same report is working fine when I am running it from report builder. ( Both these tools were installed using Oracle Developer Suite 10g version 10.1.2). I did search in oracle discussion forums and google, but I could not arrive at a resolution of error. Any help in resolving this issue would be grateful.
    Error details:
    Page url : http://<hostipaddress>:8988/Reports-reportproject-context-root/MyReport.jsp
    Reports Error Page
    Wed Oct 17 20:03:22 IST 2007
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
    javax.servlet.jsp.JspException: REP-51002: Bind to Reports Server myreportserver failed
    at oracle.reports.jsp.ReportTag.doStartTag(ReportTag.java:464)
    at MyReport.jspService(MyReport.jsp:4)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:534)
    Could anyone help me out in resolving this issue.
    Thanks
    Siva...

    Hi,
    I posted this message in jdeveloper forum yesterday, but there was no response. So I thought of posting it in this forum to check my luck.
    Thanks
    Siva...

  • NAV 2013 R2; How to run a customized report (206 sales invoice) in the classic client

    Hello, in preparing a newly installed NAV 2013 R2, I'm questioning the following:
    In the Development Environment I have customized report 206 Sales - Invoice in the Design menu View Layout with the space of the logo (by Microsoft SQL Server Report Builder) and
    finally saved and compiled.
    When I do run it connects to the server of what I call the classic client or the real NAV 2013 R2 and I can select a posted sales invoice to show the new layout and the result is
    fine as customized as I wanted.
    When I later ordinary print one of the posted sales invoices this customized logo layout doesn't appear on the print. I print in PDF and paper. When I make a next new sales invoice
    this new layout is not in use either.
    Another thing is run print started from the Development Environment is called Sales - Invoice in the header and not just Invoice that it the name when printing when invoicing and
    printing of posted documents.
    Additionally this form of Sales - Invoice shows our company details and good information as web, e-mail, bank account and bank name that is well demanded on a perfect invoice.
    How to get these informations out normally?
    Is the classic client having a wrong report as sales invoice?
    How to run a customized report (206 sales invoice) in the classic client NAV 2013 R2?
    It is like the customized report (206 sales invoice) is not in use yet in the classic client.
    All you wise people out there are welcomed to help me now
    Best regards
    Carsten

    Try on Dynamics Community forum: https://community.dynamics.com/nav/f/34.aspx

  • Error message:render error while running sales and reports

    r message:render error while running sales and reports.
    how do you fix it?

    Hello,
    Thanks for your post.
    I can't find any useful information based on the error message. Could you please elaborate your scenario with more detail? In addition, please help to collect detail log information regarding this issue.
    If this issue occured while view a SSRS report, please take a look at the following artice:
    How to diagnose issues when running reports in the report server?
    http://blogs.msdn.com/b/lukaszp/archive/2007/01/31/how-to-diagnose-issues-when-running-reports-in-the-report-server.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • Facing Problem while Debugging a custom report using LDB

    Hi Gurus,
    I have requirement to modify a custom report program related to FI. This program used Logical database ZDF ( Copied original DDF) for data fetching.
    when i am trying to see the data in debugging mode, its not allowing to check in start-of-selection event. only in the initialization & end-of-selection i could able to debug.
    when i put breakpoint in initialization, it is allowing to see the flow till a Get Event occurs in the code, once a Get event occur the debugger is coming out and displaying the report.
    If anybody faced this kind of problem when debugging a report using LDB, please share how you resolved it. If there are any other ways to debug a program of this kind please help me.
    Thanks,
    Nanda

    Hi Amith,
    I checked that way also, i put break point in database program of the copied LDB, but its not allowing to check the flow in that program also.
    Please suggest any other ways.
    Thanks,
    Nanda

  • Runtime Error CALL_FUNCTION_PARM_MISSING in a custom report program

    Hi All,
    I've created a custom report program to create parameters for a user in a system. I'm getting a runtime error in the code.
    The code snippet as below.
    I'm getting that error at line no 161. I'm not able to figure it out. Please help me to correct it.
    Regards
    Mandeep Shrestha

    Hi Glenn,
    I'm not creating a user. My requirement is to add a parameter
    CRM_THTMLB_IE_COMP with value 'IE8'. I've written the below set of code to achieve that. Can you please help me further.
    :i_userlist,i_return,l_errorrole,lv_rows,i_error,i_final,
      l_e,lv_rows,l_s.
      REFRESH i_bname1.
      IF u_name IS NOT INITIAL.
        SELECT bname FROM usr01 INTO TABLE
        i_bname1 WHERE bname IN u_name.
        IF sy-subrc = 0.
          LOOP AT i_bname1 INTO wa_bname1.
            wa_userlist-username = wa_bname1-bname.
            APPEND wa_userlist TO i_userlist.
            CLEAR wa_userlist.
          ENDLOOP.
          DESCRIBE TABLE i_bname1 LINES lv_rows.
        ENDIF.
      ELSE.
    ****get all the users****
        CALL FUNCTION 'BAPI_USER_GETLIST'
          EXPORTING
            max_rows        = 0
            with_username   = ' '
          IMPORTING
            ROWS            = lv_rows
          TABLES
    *       SELECTION_RANGE =
    *       SELECTION_EXP   =
            userlist        = i_userlist
            RETURN          = i_return.
      ENDIF.
    ****read the PFCG and Business Roles****
      SELECT  *   FROM crmc_ui_profile INTO TABLE i_profile .
      IF i_userlist IS INITIAL.
        WRITE:'No Users'.
        EXIT.
      ELSE.
        LOOP AT i_userlist INTO wa_userlist.
          CLEAR: i_param,i_agrgrp,i_retagr,lv_pfcg.
          "IF wa_userlist-username = 'BUILDER_B'.
          CALL FUNCTION 'BAPI_USER_GET_DETAIL'
            EXPORTING
              username       = wa_userlist-username
              cache_results  = 'X'
            TABLES
              PARAMETER      = i_param
    *         PROFILES       =
              activitygroups = i_agrgrp
              RETURN         = i_retagr
    *         PARAMETER1     =
          CLEAR :wa_agrgrp,l_errorrole,wa_retparm,v_business_unit.
          CLEAR ls_sales_org.
          CALL FUNCTION 'Z0CR_GET_USER_DETAILS'
            EXPORTING
              iv_username      = wa_userlist-username
            IMPORTING
    *         EV_USER_TYPE     =
    *         EV_BUGROUPID     =
              es_sales_org     = ls_sales_org
    *         EV_PARTNER_ID    =
              ev_business_unit = v_business_unit.
          CALL METHOD CL_CRM_ORGMAN_SERVICES=>MAP_HROBJECT_TO_R3_SALES_ORG
            EXPORTING
              HROBJECT         = ls_sales_org-SALES_ORG
    *         dbread           =
            IMPORTING
              VKORG            = L_ECC
            EXCEPTIONS
              NO_AUTHORIZATION = 1
              NOT_FOUND        = 2
              OTHERS           = 3.
    *CALL FUNCTION 'CRM_BUPA_SALES_AREA_TO_R3'
    *  EXPORTING
    *    IS_SALES_AREA            = ls_sales_org
    * IMPORTING
    *   EV_VKORG                 = L_ECC
    **   EV_VTWEG                 =
    **   EV_SPART                 =
    * EXCEPTIONS
    *   NO_MAPPING_DEFINED       = 1
    *   R3_KEY_NOT_DEFINED       = 2
    *   OTHERS                   = 3
    *IF SY-SUBRC <> 0.
    ** Implement suitable error handling here
    *ENDIF.
          IF L_ECC = 2040 OR L_ECC = 2010 OR L_ECC = 2050 OR L_ECC = 1900.
    **        loop at  i_param into wa_param  .
    *            wa_param-PARID = 'CRM_THTMLB_IE_COMP' .
    *            wa_param-PARVA = 'IE8'.
    *            wa_param-PARTXT = 'CRM BW REPORT PARAMETER'.
    *           append wa_param to i_param.
    **          ENDLOOP.
    *      endif.
            CLEAR lv_flag .
    ****checking if the  role having prime support roles then assign the CRM_THTMLB_IE_COMP as IE8
            CLEAR lt_role.
            SELECT * FROM zuser_role INTO TABLE lt_role
            FOR ALL ENTRIES IN i_agrgrp
            WHERE pfcg_role = i_agrgrp-agr_name.
            IF sy-subrc = 0.
              lv_flag  = 'X'.
            ENDIF.
            CLEAR :lv_land.
            SELECT SINGLE land1 INTO lv_land FROM hrp1028 WHERE
            otjid = ls_sales_org.
            LOOP AT i_retagr INTO wa_retagr WHERE TYPE = 'E' OR TYPE = 'A'.
              l_errorrole = 'X'.
            ENDLOOP.
    **error records
            IF l_errorrole EQ 'X'.
              l_e = l_e + 1.
              CLEAR :lv_pfcg,lv_brole.
              wa_error-user = wa_userlist-username.
              wa_error-pfcg = lv_pfcg .
              wa_error-role = lv_brole .
              wa_error-MESSAGE = wa_retparm-MESSAGE .
              APPEND wa_error TO i_error.
              CLEAR l_errorrole.
            ELSE.
              CLEAR sy-subrc.
              CLEAR :wa_param1,lv_vlaues,wa_param.
              READ TABLE i_param INTO wa_param1
              WITH KEY parid = 'CRM_THTMLB_IE_COMP'.
              IF sy-subrc <> 0.
                CLEAR wa_paramx.
                wa_paramx-parid = 'X'.
                wa_paramx-parva = 'X'.
                CLEAR :wa_paramc,i_paramc.
                wa_paramc-parid =  'CRM_THTMLB_IE_COMP'.
                wa_paramc-parva = ' '.
                APPEND wa_paramc TO i_paramc.
                CALL FUNCTION 'BAPI_USER_CREATE'
                  EXPORTING
                    USERNAME  = wa_userlist-username
                  TABLES
                    PARAMETER = i_paramc
                    RETURN    = i_retparm.
              ENDIF.
              lv_vlaues = wa_param1-parva.
              IF i_agrgrp IS INITIAL AND lv_vlaues IS NOT INITIAL.
                CLEAR wa_paramx.
                wa_paramx-parid = 'X'.
                wa_paramx-parva = 'X'.
                CLEAR :wa_paramc,i_paramc.
                wa_paramc-parid =  'CRM_THTMLB_IE_COMP'.
                wa_paramc-parva = ' '.
                APPEND wa_paramc TO i_paramc.
                CALL FUNCTION 'BAPI_USER_CHANGE'
                  EXPORTING
                    username   = wa_userlist-username
                    parameterx = wa_paramx
    *               COMPANY    =
                  TABLES
                    PARAMETER  = i_paramc
                    RETURN     = i_retparm
    *               PARAMETER1 = .
                CLEAR :wa_retparm ,l_errorrole.
                IF i_retparm IS NOT INITIAL.
                  LOOP AT i_retparm INTO wa_retparm WHERE TYPE = 'E' OR TYPE = 'A'.
                    l_errorrole = 'X'.
                  ENDLOOP.
                ENDIF.
    **error records
                IF l_errorrole EQ 'X'.
                  l_e = l_e + 1.
                  wa_error-user = wa_userlist-username.
                  wa_error-pfcg = lv_pfcg .
                  wa_error-role = lv_brole .
                  wa_error-MESSAGE = wa_retparm-MESSAGE .
                  APPEND wa_error TO i_error.
                  CLEAR l_errorrole.
                ELSE.
                  l_e = l_e + 1.
                  wa_error-user = wa_userlist-username.
                  wa_error-pfcg = lv_pfcg .
                  wa_error-role = lv_brole .
                  wa_error-MESSAGE = 'No Roles assigned to User' .
                  APPEND wa_error TO i_error.
                  CLEAR l_errorrole.
                ENDIF.
              ENDIF.
              IF i_agrgrp IS NOT INITIAL .
                CLEAR lv_count.
                LOOP AT i_agrgrp INTO wa_agrgrp WHERE agr_name CP 'L*'.
                  CLEAR wa_profile.
                  READ TABLE i_profile
                  INTO wa_profile
                  WITH KEY pfcg_role = wa_agrgrp-agr_name.
                  IF sy-subrc EQ 0 AND
                  wa_profile-profile IS NOT INITIAL.
                    lv_count = lv_count + 1.
                  ENDIF.
                ENDLOOP.
                IF lv_count EQ '1'.
                  LOOP AT i_agrgrp INTO wa_agrgrp WHERE agr_name CP 'L*'.
                    CLEAR :wa_profile,lv_brole,lv_pfcg.
                    IF wa_agrgrp-agr_name CP 'L*'.
                      lv_pfcg =  wa_agrgrp-agr_name.
                      READ TABLE i_profile
                      INTO wa_profile
                      WITH KEY
                      pfcg_role = wa_agrgrp-agr_name.
                      IF sy-subrc EQ 0.
    **              ***fill business role
                        lv_brole = wa_profile-profile.
                      ELSE.
                        l_e = l_e + 1.
                        CLEAR lv_brole.
                        wa_error-user = wa_userlist-username.
                        wa_error-pfcg = lv_pfcg .
                        wa_error-role = lv_brole .
                        wa_error-MESSAGE = 'No Business Role for PFCG' .
                        APPEND wa_error TO i_error.
                        CLEAR l_errorrole.
                        CONTINUE.
                      ENDIF.
                    ENDIF.
                    IF lv_brole IS NOT INITIAL.
                      CLEAR wa_paramx.
                      wa_paramx-parid = 'X'.
                      wa_paramx-parva = 'X'.
                      CLEAR :wa_paramc,i_paramc.
                      wa_paramc-parid =  'CRM_THTMLB_IE_COMP'.
                      IF lv_flag = 'X'.
                        lv_brole =   'IE8'.
                        wa_paramc-parva = lv_brole .
    *                  CLEAR lv_flag.
                      ELSE.
                        wa_paramc-parva = lv_brole.
                      ENDIF.
                      APPEND wa_paramc TO i_paramc.
                      CALL FUNCTION 'BAPI_USER_CHANGE'
                        EXPORTING
                          username   = wa_userlist-username
                          parameterx = wa_paramx
    *                     COMPANY    =
                        TABLES
                          PARAMETER  = i_paramc
                          RETURN     = i_retparm
    *                     PARAMETER1 = .
                      CLEAR :wa_retparm .
                      IF i_retparm IS NOT INITIAL.
                        LOOP AT i_retparm INTO wa_retparm WHERE TYPE = 'E' OR TYPE = 'A'.
                          l_errorrole = 'X'.
                        ENDLOOP.
                      ENDIF.

  • Is there any way to run signcode.exe program under background mode

    Hi everyone,
    I am finding the solutions to build the project automatically but the situation is still unchanged. When building the project i have use the signcode tool to sign my .cab files therefore the system shows me the "Enter Private Key Password" dialog and ask me to enter my password into the Password field.
    If all you guy have any ways for packing the project by the mechanism of the running signcode program under background mode. Below is my script.
    [b]signcode -spc ms.spc -v ms.pvk -n abc.cab -i URL -t http://timestamp.verisign.com/scripts/timstamp.dll abc.cab
    Thank you for your ideas and regards
    Tan

    Hi,
    you can use the tool signcode-pwd to automate the signing:
    http://www.stephan-brenner.com/blog/?page_id=9

  • Call transaction KB21N processed by a program in background mode

    Hi to all,
    I call transaction KB21N using BDCDATA in a custom program. If I process this program in foreground mode all it's OK, but if I process the program in background mode, I have a runtime error with DUMP: RAISE EXCEPTION with exception condition CNTL_ERROR. This program has to be executed in background so a bapi exist to use instead of call transaction or something else?
    Thank you very much,
    regards
    Antonio

    HI Antonio,
    The transaction you are dealing with is an SAP Enjoy transaction and for such transactions it is not recommended to do a BDC. YOu should search for  a BAPI for the same as you have already identified. Basically the enjoy transactions uses GUI controls which cannot be handled by BDC.
    BAPI_ACC_ACTIVITY_ALLOC_POST may serve your purpose.
    Regards,
    ravi
    Message was edited by:
            Ravi Kanth Talagana

  • Dump while running a stock report for one year

    hi experts,
                        i'm getting  dump error while running a stock summary report for one year
            the error is as follows:
      A RAISE statement in the program "CL_GUI_CUSTOM_CONTAINER=======CP" raised the
       exception
      condition "CNTL_ERROR".
    regards,
    andrews.

    Hi Andrew,
    Did you try running the report for a smaller period of maybe a month. Check for any authorisation related issues.
    The dump has a lot of detailed and valuable information about the error. If feasible, post the dump data for further analysis.
    Regards,
    Pranav.
    Edited by: Pranav Mandelia on Sep 6, 2011 2:07 PM

Maybe you are looking for

  • How to I program my incoming emails in descending order?

    I can't figure out how to arrange my incoming emails in descending order instead of ascending. Can anyone help me with this? Don

  • Update only a part of a project with Edge Animate CC 2014.1.1 PROBLEM

    WIN 8.1 Edge Animate CC 2014.1.1 Firefox 35.0 The Problem started after Update to Edge Animate CC 2014.1.1 I want to update text which is an Edge Animate file The original Project was programmed with Edge Animate 1.0(not CC) After I made the changes

  • FM - FM_REVERSE_CLEARING_FI used for...

    Hi.... I want to know what is the functionality for the function module FM_REVERSE_CLEARING_FI. Is it used to Reverse the document or clear the document. Thanks, Sandy

  • Mutiple Contacts In Web UI

    Hi Experts, I am trying to search contacts by the account ID for which they are maintained as contacts. I have a scenario where several contacts are mainatined for a paticular account. In WEB UI only one contact is appearing while in SAP UI all conta

  • Ship To Contact Phone in XSL style sheet

    I am trying to add ship_cont_phone in my PO XSL style sheet report. However when I run this report I don't see any Phone number added in the PO. I can see that there is a phone number existing for that particular location. But it is not showing up in