Detaul Error handling page

Ok I had my cfm server hacked last week. They used a sql
injection. The think that is driving me nuts is I can not set up a
"Detaul Error handling page" in my cfm server. my other older
version 5 works fine. Why have they never fixed this bug.
I looked up the issue and found a fix it did not worked. Does
anyone hae a sugggestion on how I can fix this so an intruder can
not ready ever bit of code on the error page to help fine tune
there attacks.

user3935812 wrote:
I have the same question.No kidding, seeing as you are the exact same user...
This is all Myfaces specific. The best you can do in a standard web environment is to use the error handling built into the server, which basically means catching specific HTTP error codes. Here is an example:
http://www.java2s.com/Tutorial/Java/0400__Servlet/ServletErrorPage.htm

Similar Messages

  • Receiving a DNS Solution Yahoo Error Handler Page and some pages won't display

    I recently downloaded the Stuffit Expander and ever since then Firefox hasn't been the same. I receive a DNS Solution Yahoo Error Handler page when I do a search sometimes. And now some pages won't even display for me when they should. How do I get rid of this Yahoo thing (In simple terms please)? Thanks!

    Thank you jscher2000! This seems to have fixed it! I appreciate it :)

  • I keep getting a Yahoo DNS error handler page, and can't even access the add-ons page to disable it because it redirects me to the Yahoo DNS page immediately

    I have already seen some suggested solutions to the problem of this extremely annoying Yahoo DNS error solutions page, but they involve going to the add-ons page of firefox and disabling various add-ons. The issue is that even when I try to go to the add-ons page I get immediately redirected to the Yahoo DNS solutions page again.
    I have cleared my browser history and cache, hoping it would help, but nothing. Extremely annoying as I never installed anything - it simply started after a Firefox upgrade.
    Any help much appreciated.

    Open the Help menu and choose Restart Firefox with Add-ons Disabled. Remove any offending extensions. For details, see the "Uninstall from Firefox Safe Mode" section of the following article.
    * [[Cannot uninstall an add-on]]

  • Error Handling subtab missing in APEX 4.2 during update page.

    Does anyone know if error handling page is replaced by something else in APEX 4.2. I can’t see error handling sub tab when I go for update of any existing page. It used be below page attribute at the upper right corner in earlier version.

    Hi,
    I just checked this on apex.oracle.com and can see both the 'Error Handling' 'sub tab' and the relevant region on the page with attributes for 'In-Line Error Notification Text' and 'Error Handling Function'. This is on the 'Edit Page' page in the builder (4000:4301). Is this the page you are on and are you still not able to see this?
    Regards,
    Anthony

  • Error Handling - displaying Error on ALL error events

    I am trying to set up a global error handling page error.cfm so that whenever any error at all occurs I can display my error.cfm page.
    At first I tried the following in the application.cfm page, and then ran a page that tried to output a variable that did not exist, and it seemed to work:
    <cferror type = "EXCEPTION" exception = "any" template = "error.cfm">
    But then it just decided not to work, so I added these
    <cferror type = "REQUEST" template = "error.cfm">
    <cferror type = "VALIDATION" template = "error.cfm">
    Is there a way to make sure that all errors are handled? Am I right in putting all 3 of these in the application.cfm or do I need more (or less?)
    Thanks
    Mark

    It just didn't react to the error, by going to error.cfm, it just threw out the usual CF error as if I had not added CFERROR
    With those 3 statements in there is seems to work, but I wanted to make sure that no matter what error occurs it's going to hit the error.cfm

  • Site-Wide Error Handler Filepath

    My error handler page is located at C:\Inetpub\wwwroot\portal\error_handler.cfm but cfadmin (for CF 8) wants a relative path.  I've tried:
    C:\Inetpub\wwwroot\portal\error_handler.cfm
    Inetpub\wwwroot\portal\error_handler.cfm
    wwwroot\portal\error_handler.cfm
    portal\error_handler.cfm
    error_handler.cfm
    and http://www.hostname.com/portal/error_handler.cfm
    Each time is says the specified file does not exist.
    What should the filepath be relative to?
    Thanks!

    It has to be relative to a ColdFusion mapping OR the ColdFusion web root.  The latter has always been the most reliable for me.
    It is a little known feature of ColdFusion that it often has two web roots for which it will search for cfml templates.  The web root defined for the web server such as c:\inetpub\wwwroot\ that you apparently have.  But before searching the web server web root it will search the ColdFusion web root, that on my multi-home flavor of ColdFusion is c:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\.  It is this latter directory that I put my site wide error and missing template handler fiels.  Then I just place the file names in the appropiate fields in the administrator.
    If you have a default backslash (\) mapping to your web root defined in the ColdFusion administrator, you should be able to input something like "\portal\error_handler.cfm" but I have always had difficulty getting this way to work.

  • Application scope inside error handler

    Hi,
    I am not using the onError method. I am instead using the "Site-wide Error Handler" setting in the CF administrator to direct errors to an error.cfm page. Everything is working well but it appears that I do not have access to the application scope in that error.cfm error handling page.
    How can I get access to the application scope in that error handling page?
    Thanks,
    Andre

    without seeing the code its nearly impossible to help.
    But here are a few questions - you're using application.cfm
    so are you checking if the application is already initialised on
    the second page request rather than reinitialising it all over
    again?
    If you're getting an application scope timeout then it would
    maybe suggest you're using a CFLOCK with a timeout that is too
    short for the code execution in between the lock. If there error is
    present 9 times out of 10 it won't go away just by clicking
    refresh

  • Page Error handling question..

    Using APEX 4.1.1.. Hosted instance.. I am testing various error handling functions (Oracle's standard one from documentation and others). I have a page with a standard report, I have defined the page to have an associated error handling function. On the report I have a calculated column that should error out due to a division by 0 error..
    Now what I had thought was, the page would handle the error more gracefully than previous version, in that it would show the custom error message I define in the constraints table...
    Is there a section of the documentation I am missing that shows at what point the error handling function kicks in and where we need to invoke it otherwise?
    Thank you,
    Tony Miller
    Dallas, TX

    Interesting. Had never considered this aspect.
    Just did a couple of tests - so it must only come into play from the PL/SQL engine.
    Created an sql report:
    select floor(dbms_random.value(1,10))/0 num
    from dual
    connect by level <= 10But the error function never gets hit.
    begin
    for i in (select floor(dbms_random.value(1,10))/0 num
    from dual
    connect by level <= 10) loop
    htp.p(i.num);
    end loop;
    end;Function gets hit.
    Just looking at the docs, there doesn't appear to be any indication of processing point.
    But from Patrick's blog:
    This includes errors raised by validation, process, … and all errors raised by the Application Express engine itself.http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    I guess an SQL report isn't considered as an 'all errors raised by the apex engine'.

  • Error Handler and Page Bindings

    Hi,
    I have a task flow with an error-handler defined. Any action-binding method calls which throw exceptions from the business layer are handled nicely by the error handler. The same doesn't happen though when the binding is in the page, tied to a button (as created when you drag a method from the data control palette onto the page). The exception is instead displayed in the calling page. What am I missing here?
    Thanks,
    Barry.

    Hi,
    the ADF Controller catches excptions occuring while it processes an activity. If JSF catches the exception then this does not involve navigation and therefore the message displays on the page
    Frank

  • Error handling, error-page

    http://wiki.apache.org/myfaces/Handling_Server_Errors
    has a bunch of info on error handling in myfaces. Is there something similar for mojarra? Or is any of this relevant for mojarra? Thx.

    user3935812 wrote:
    I have the same question.No kidding, seeing as you are the exact same user...
    This is all Myfaces specific. The best you can do in a standard web environment is to use the error handling built into the server, which basically means catching specific HTTP error codes. Here is an example:
    http://www.java2s.com/Tutorial/Java/0400__Servlet/ServletErrorPage.htm

  • Report and Alert don't executed in the error handler with a JMS proxy service

    Hi,
    I'm working with OSB 11.1.1.4.0 and I'm facing a problem with the error handler of my JMS proxy service.
    My error handler contains two main elements :
    - a Report action
    - an Alert with a JMS destination defined
    When the business service failed the message remain in the queue. It's the expected behavior.
    The problem is :
    - the report is missing
    - the alert is raised but missing in the JMS destination defined in the Alert setting.
    I've noticed if I add a Reply with Failure or Success, Report and Alert are successfully executed.
    Unfortunately the message don't remain in the JMS queue.
    What can I do in order to have my report/alert done and the JMS transaction rollback in order to keep the message in the queue ?
    I've already met this problem in the past with alsb v3 and my solution was to add Service Callout in the error handler in order to externalize these actions.
    This solution is not convenient and I hope another solution is possible.

    Inventorying workgroups can be difficult, especially when it comes to remote access and network security. Because workgroups are not centrally managed, some of the items discussed in this
    wiki article on preparing your workgroup environment may require you to visit each machine individually.
    For non-domain credentials, you do not use the <systemname>\<user> format, you simply enter the user name. Regarding how to enter the credentials, if you have an account that uses the same username and password on all machines and is an administrator
    on all of those machines, then you can enter that in the All computers credentials page of the wizard. You can also do this if they are different user names. However, if some machines have an account with the same user name, such as Administrator,
    but different passwords on each machine, you will need to use the Manually enter computer names discovery method, and then enter the information for each group or each machine.
    As you can tell, workgroup environments can quickly negate any benefit that the agentless inventory nature of MAP provides.
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • Issue with SRDemo error handling

    Hi All,
    Glad the forums are back up and running. In debugging some error-handling issues in our own application, I found an issue in the error handling code of SRDemo. I thought I'd post the issue here, as many of us (myself included) use some SRDemo code as the basis for our own applications.
    The issue can be found in the oracle.srdemo.view.frameworkExt.SRDemoPageLifecycle class, specifically in the translateExceptionToFacesErrors method. I'll show the code that has the issue first, and explain the issue afterwards:
            if (numAttr > 0) {
                Iterator i = attributeErrors.keySet().iterator();
                while (i.hasNext()) {
                    String attrNameKey = (String)i.next();
                     * Only add the error to show to the user if it was related
                     * to a field they can see on the screen. We accomplish this
                     * by checking whether there is a control binding in the current
                     * binding container by the same name as the attribute with
                     * the related exception that was reported.
                    ControlBinding cb =
                        ADFUtils.findControlBinding(bc, attrNameKey);
                    if (cb != null) {
                        String msg = (String)attributeErrors.get(attrNameKey);
                        if (cb instanceof JUCtrlAttrsBinding) {
                            attrNameKey = ((JUCtrlAttrsBinding)cb).getLabel();
                        JSFUtils.addFacesErrorMessage(attrNameKey, msg);
                }Now, this bit of code attempts to be "smart" and only show error messages relating to attributes if those attributes are in fact displayed on the screen. It does so by using a utility method to find a control binding for the attribute name. There are two issues with this code, one obvious, and one that is a bit more subtle.
    The obvious issue: if there is a binding in the page definition, it doesn't necessarily mean that the attribute is shown on the screen. It's a good approximation, but not exact.
    The other issue is more subtle, and led to errors being "eaten," or not shown, in our application. The issue comes if you are using an af:table to display and update your data. In that case, the findControlBinding will not find anything for that attribute, since the attribute is contained within a table binding.
    Just posting this as a word to the wary.
    Best,
    john

    somehow, this message got in the wrong thread....
    Hi Frank,
    Yes, I simply scripted it out this way to contrast the behaviour if the first attribute was read-only vs not read-only. I found the issue on a page in our app that was simply drag-and-drop the VO from the data control on the page.
    It's quite annoying, because our particular use case that hit this error is a "save" button on the page. If the commit operation doesn't return any errors (and it doesn't in this use case!), we add a JSF message saying "save successful" - then the attribute errors are further added later in the page lifecycle, so we get 3 messages: "Save successful" and "Fix this error" and "Tried to set read-only attribute" - quite confusing to the end-user when the only message they should see is "fix this error."
    At any rate, the fix is to simply re-order the attributes in the page definition - that doesn't affect the UI at all, other than to fix this issue.
    John
    it was supposed to be something like:
    Hi Frank,
    Thanks for the reply. I was simply posting this here so that people who use the SRDemo application techniques as a basis for developing the same functionality in their own apps (like me) can be aware of the issue, and avoid lots of head-scratching to figure out "what happened to the error message?"
    John

  • JSF error handling when the bean is not correctly loaded

    Hi,
    I am doing some error handling in JSF and I want to do it in an elegant way. I have the following scenario for error handling.
    When the bean is initialized I load the bean with values from DAO which give SQL Exceptions.
    Since the bean is not loaded I properly I have to send the user to an error page showing the error message why I am sending the user to this page.
    I can do it by [ FacesContext.getCurrentInstance.redirect("/error.jsf") ] doing so I will loose all the FacesMessages that are added by the exceptions.
    Instead I want to use the [ FacesContext.getCurrentInstance.dispatch("url") ] which will allow the transfer of the user but I get the following
    16:59:39,341 WARN [lifecycle] executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@8537f9) threw exception
    java.lang.ClassCastException: javax.faces.component.UIViewRoot
    and the method that I am calling is
    public static void programErrorEnd() {
    logger.info("in the prgmErrorEnd mehod");
    //intializing the contex object
    FacesContext ctx = FacesContext.getCurrentInstance();
    try {
    //ready to dispatch the url.
    //ctx.getExternalContext().redirect("app/error/prgmerror.jsf");
    ctx.getExternalContext().dispatch("error/prgmerror.jsf");
    } catch (IOException e) {
    //TODO what to do when there is an error at this stage.
    finally {
    ctx.responseComplete();
    }Thanks and Regarding
    Edited by: sgatl2 on Aug 28, 2008 2:32 PM
    Edited by: sgatl2 on Aug 28, 2008 2:45 PM

    Just let it throw the exception and define an error-page entry in the web.xml which catches the specified exception (or a superclass of it or a HTTP status code) and displays the error.jsf page accordingly.

  • How to perform Error Handling in this Bdc Code

    Hi,
    I had created this BDC for the tcode MB1B and i want to know how to perform the ERROR HANDLING in it ..
    Plzz provide me guidelines for doing it . here's d code:-
    report ZBDC_MB1B
           no standard page heading line-size 255.
    include bdcrecx1.
    data: begin of record OCCURS 0,
          WERKS_001(004),     "Plant
          MATNR_002(018),     "ItemId
          ERFMG_003(013),     "Quantity in Unit of Entry
          ERFME_004(003),     "Unit of Entry
          LGORT_005(004),     "Storage Location
          CHARG_006(010),     "BatchId
          KDAUF_007(010),     "Sales Order Number
          KDPOS_008(006),     "Item Number in Sales Order
          end of record.
    PARAMETERS : P_FILNAM LIKE RLGRAP-FILENAME.
      initialization.
      CTUMODE = 'A'.
      CUPDATE = 'A'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILNAM.
      CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
         MASK                   = ',. '
         MODE                   = 'O'
         IMPORTING
         FILENAME                 = P_FILNAM
       EXCEPTIONS
         INV_WINSYS             = 1
         NO_BATCH               = 2
         SELECTION_CANCEL       = 3
         SELECTION_ERROR        = 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.
    start-of-selection.
    CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         FILENAME                      = P_FILNAM
         FILETYPE                      = 'DAT'
        TABLES
          DATA_TAB                     = RECORD
       EXCEPTIONS
         CONVERSION_ERROR              = 1
         FILE_OPEN_ERROR               = 2
         FILE_READ_ERROR               = 3
         INVALID_TYPE                  = 4
         NO_BATCH                      = 5
         UNKNOWN_ERROR                 = 6
         INVALID_TABLE_WIDTH           = 7
         GUI_REFUSE_FILETRANSFER       = 8
         CUSTOMER_ERROR                = 9
         NO_AUTHORITY                  = 10
         OTHERS                        = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT RECORD.
      BEGIN OF SCREEN 1
    perform bdc_dynpro      using 'SAPMM07M' '0400'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM07M-SOBKZ'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'MKPF-BLDAT'
                                 '22.12.2008'.
    *perform bdc_field       using 'MKPF-BUDAT'
                                 '22.12.2008'.
    perform bdc_field       using 'RM07M-BWARTWA'
                                  '411'.
    perform bdc_field       using 'RM07M-SOBKZ'
                                  'E'.
    perform bdc_field       using 'RM07M-WERKS'
                                  RECORD-WERKS_001.             "Plant
    perform bdc_field       using 'XFULL'
                                  'X'.
    perform bdc_field       using 'RM07M-WVERS2'
                                  'X'.
      BEGIN OF SCREEN 2
    perform bdc_dynpro      using 'SAPMM07M' '0421'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSEG-CHARG(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MSEG-MATNR(01)'
                                  RECORD-MATNR_002.             "ITEMID
    perform bdc_field       using 'MSEG-ERFMG(01)'
                                  RECORD-ERFMG_003.             "QTY.
    perform bdc_field       using 'MSEG-ERFME(01)'
                                  RECORD-ERFME_004.             "UOM
    perform bdc_field       using 'MSEG-LGORT(01)'
                                  RECORD-LGORT_005.             "ST.LOC
    perform bdc_field       using 'MSEG-CHARG(01)'
                                  RECORD-CHARG_006.             "BATCHID
    perform bdc_field       using 'MSEGK-MAT_KDAUF'
                                  RECORD-KDAUF_007.             "S.O.
    perform bdc_field       using 'MSEGK-MAT_KDPOS'
                                  RECORD-KDPOS_008.             "S.O.LINE ITEM
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
      BEGIN OF SCREEN 3
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTE'.
    perform bdc_dynpro      using 'SAPMM07M' '0421'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSEG-ERFMG(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'DKACB-FMORE'
                                  'X'.
      BEGIN OF SCREEN 4
    perform bdc_dynpro      using   'SAPLKACB' '0002'.
    perform bdc_field       using      'BDC_OKCODE'
                                                '=ENTE'.
    perform bdc_transaction using 'MB1B'.
    ENDLOOP.

    hi,
    check this code in bold letters.
    INCLUDE BDCRECX1.
    TABLES : MARC.
    TYPES : BEGIN OF TY_UPLOAD,
            MATNR TYPE MARA-MATNR,
            WERKS TYPE MARC-WERKS,
            STEUC TYPE MARC-STEUC,
            END OF TY_UPLOAD.
    TYPES : BEGIN OF TY_MARC,
            MATNR TYPE MARA-MATNR,
            WERKS TYPE MARC-WERKS,
            END OF TY_MARC.
    TYPES : BEGIN OF TY_MTART,
            MATNR TYPE MARA-MATNR,
            MTART TYPE MARA-MTART,
            END OF TY_MTART.
    DATA : T_MARC TYPE STANDARD TABLE OF TY_MARC,
         : T_UPLOAD TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_BASIC TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_SALES TYPE STANDARD TABLE OF TY_UPLOAD,
         : T_ERROR TYPE STANDARD TABLE OF TY_UPLOAD.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_BDCDATA_VIEW LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           IT_DATA(3200) OCCURS 0 WITH HEADER LINE,
           IT_FIELD(3200) OCCURS 0 WITH HEADER LINE,
           IT_BDCMSG TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA GI_MSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : CHAR1(500),
          CHAR2(500),
          CHAR3 TYPE STRING,
          V_SELECTION TYPE STRING.  " For View Selection
    DATA : W_MARC TYPE TY_MARC,
           WA_UPLOAD TYPE TY_UPLOAD,
           WA_BASIC TYPE TY_UPLOAD,
           WA_SALES TYPE TY_UPLOAD,
           WA_ERROR TYPE TY_UPLOAD,
           WA_MTART TYPE TY_MTART.
    DATA : VAR TYPE N,
           VAR1 TYPE STRING.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.   "SELECTION SCREEN
    PARAMETERS: P_FNAM LIKE RLGRAP-FILENAME.
    PARAMETERS: P_BAS LIKE RLGRAP-FILENAME.
    PARAMETERS: P_SAL LIKE RLGRAP-FILENAME.
    PARAMETERS: P_ERR LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAM.
      PERFORM SEARCH USING P_FNAM.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BAS.
      PERFORM SEARCH USING P_BAS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SAL.
      PERFORM SEARCH USING P_SAL.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_ERR.
      PERFORM SEARCH USING P_ERR.
    *&      Form  SEARCH
          text
         -->PFNAME     text
    FORM SEARCH USING PFNAME.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          STATIC    = 'X'
        CHANGING
          FILE_NAME = PFNAME.
    ENDFORM.                    "SEARCH
    START-OF-SELECTION.
      PERFORM UPLOAD_PROCESS USING P_FNAM.
      PERFORM OPEN_GROUP.
      PERFORM PROCESS.
      PERFORM CLOSE_GROUP.
      IF NOT T_BASIC[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_BASIC[] USING P_BAS .
      ENDIF.
      IF NOT T_SALES[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_SALES[] USING P_SAL .
      ENDIF.
      IF NOT T_ERROR[] IS INITIAL.
        PERFORM DOWNLOAD TABLES T_ERROR[] USING P_ERR.
      ENDIF.
    *&      Form  PROCESS
          text
    FORM PROCESS.
      LOOP AT T_UPLOAD INTO WA_UPLOAD.
        PERFORM CONV_ROUTINE  USING WA_UPLOAD-MATNR
                            CHANGING WA_UPLOAD-MATNR.
        SELECT COUNT(*) FROM MARA WHERE MATNR = WA_UPLOAD-MATNR.
        IF SY-SUBRC NE 0.
          MOVE-CORRESPONDING  WA_UPLOAD TO WA_BASIC.
          APPEND WA_BASIC TO T_BASIC.
          CLEAR WA_BASIC.
          CONTINUE.
        ENDIF.
        SELECT COUNT(*) FROM MARC WHERE MATNR = WA_UPLOAD-MATNR
                                        AND WERKS = WA_UPLOAD-WERKS
                                        AND PSTAT LIKE '%V%'.
        IF SY-SUBRC NE 0.
          MOVE-CORRESPONDING  WA_UPLOAD TO WA_SALES.
          APPEND WA_SALES TO T_SALES.
          CLEAR WA_SALES.
          CONTINUE.
        ENDIF.
        CLEAR : WA_MTART.
        SELECT SINGLE MATNR MTART FROM MARA INTO WA_MTART WHERE MATNR = WA_UPLOAD-MATNR.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=AUSW'.
        PERFORM BDC_FIELD       USING 'RMMG1-MATNR'
                                      WA_UPLOAD-MATNR.
        CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'     " Function module
        EXPORTING
          MATERIAL                  = WA_UPLOAD-MATNR  " Material number
          MATERIALART               = WA_MTART-MTART          " Material Type
          SELECTION                 = 'V'              "
          TCODE                     = 'MM02'           " Tcode where view's are called.
        TABLES
          BTCI_D0070                = IT_BDCDATA_VIEW
        EXCEPTIONS
          MATERIAL_NOT_FOUND        = 1
          MATERIAL_NUMBER_MISSING   = 2
          MATERIAL_TYPE_MISSING     = 3
          MATERIAL_TYPE_NOT_FOUND   = 4
          NO_ACTIVE_DYNPRO_SELECTED = 5
          NO_AUTHORITY              = 6
          OTHERS                    = 7.
        READ TABLE IT_BDCDATA_VIEW WITH KEY FVAL  = 'X'.
        IF SY-SUBRC = 0.
          V_SELECTION = IT_BDCDATA_VIEW-FNAM.
        ELSE.
          CONTINUE.
        ENDIF.
        VAR = IT_BDCDATA_VIEW-FNAM+17(2).
        VAR = VAR + 3.
        CONCATENATE 'MSICHTAUSW-KZSEL(' '0' VAR ')' INTO VAR1.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0070'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'MSICHTAUSW-DYTXT(06)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING VAR1
                                       'X'.
        CLEAR VAR.
        CLEAR VAR1.
       PERFORM BDC_FIELD       USING 'MSICHTAUSW-KZSEL(06)'
                                     'X'.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0080'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RMMG1-VKORG'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING 'RMMG1-WERKS'
                                      WA_UPLOAD-WERKS.
        PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '4004'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=BU'.
       PERFORM BDC_FIELD       USING 'MAKT-MAKTX'
                                     'MTI_ESE_HALB_01'.
        PERFORM BDC_FIELD       USING 'MARC-STEUC'
                                      WA_UPLOAD-STEUC.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'MARC-HERKR'.
        PERFORM BDC_FIELD       USING 'MARC-HERKL'
                                      'IN'.
        PERFORM BDC_FIELD       USING 'MARC-HERKR'
                                      'MAH'.
        PERFORM BDC_TRANSACTION USING 'MM02'.
    move the error record into seperate internal table nad down load it ****
        IF MESSTAB-MSGTYP = 'E'.
          MOVE-CORRESPONDING WA_UPLOAD TO WA_ERROR.
          APPEND WA_ERROR TO T_ERROR.
          CLEAR WA_ERROR.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "PROCESS
    *&      Form  UPLOAD_PROCESS
          text
         -->PFNAME     text
    FORM UPLOAD_PROCESS USING PFNAME.
      DATA : PFNAME1 TYPE STRING.
      PFNAME1 = PFNAME.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = PFNAME1
          FILETYPE            = 'ASC'
          HAS_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB            = T_UPLOAD[].
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    "UPLOAD_PROCESS
    *&      Form  CONV_ROUTINE
          text
         -->P_INPUT    text
         -->P_OUTPUT   text
    FORM CONV_ROUTINE   USING    P_INPUT
                     CHANGING P_OUTPUT.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = P_INPUT
        IMPORTING
          OUTPUT = P_OUTPUT.
    ENDFORM.                    "CONV_ROUTINE
    *&      Form  DOWNLOAD
          text
         -->GI_FINAL   text
         -->PFNAME     text
    FORM DOWNLOAD TABLES
                  GI_FINAL
                         USING  PFNAME .
      DATA : FNAME TYPE STRING.
      FNAME = PFNAME.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                        = FNAME
          FILETYPE                        = 'DAT'
         WRITE_FIELD_SEPARATOR           = 'x'
            HEADER                          = '00'
          IMPORTING
            FILELENGTH                      =
        TABLES
          DATA_TAB                        =  GI_FINAL[]
          FIELDNAMES                      = GI_FIELDNAMES[]
      IF SY-SUBRC = 0.
        MESSAGE 'FILE DOWNLOADED SUCCESSFULLY' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " DOWNLOAD
    Regards
    Siva Prasad

Maybe you are looking for