Programatically identify the application server vendor

Hi everyone,
We have just passed J2EE certification for an application migrated from WebLogic to NetWeaver 6.40.
Now, we are trying to merge code and resources as much as possible, but there are part of the code where it is just not possible to write generic, and we want to detect what is the type of the application server running.
Is there any simple code to write - like some env/system property to check - which makes it possible to know that we are running on SAP's J2EE engine ?
Any help is appreciated,
Thanks

Hi Vladimir,
Thanks for the proposal, I will try to implement it and see how it is handy.
Actually, the original application is targetted to version 8.1 SP4 of WebLogic app server, which is rather loose on some aspects of the J2EE specifications. Namely it doesn't care when you use non-XA resources, i.e. execute local transactions, when a JTA transaction has already started.
Our application makes use of this "looseness" for performance gain, i.e. some transactions need not be part of the global transaction and makes the system overall faster when executed as local. This also allows flexibility whether we want to privilege performance or data consistency without changing the code.
NetWeaver's J2EE engine, on the contrary, has a strict constraint on this: if a JTA transaction is started, every transactional resource used thereafter must be XA. Conversely, if not JTA transaction was started, then XA resources cannot be used.
As we want to keep the flexibility to use XA or non-XA resources without changing the source code, parts of the code involving JTA transactions and XA/non-XA resources should be switched depending on the app server type.
But I just realized we might as well just test the class of resources involved...
I will give you points after tested your proposal.

Similar Messages

  • Identify the application server programatically

    Hi,
    Can anyone help me how to detect that how to programatically identify which application server is being used by my web application?
    Thank you in advance.

    I want to identify which application server my application is using.I want to do this programatically.so it the server is weblogic, weblogic specific actions can be performed.If the server is websphere, websphere server specific actions i will perform.

  • How to find out the application server info

    Hi, I am wondering how to find out the application server info in Java code, just like how to find out the db platform being used. Thanks

    Hi,
    I am not aware of any spec defined way of finding out such info. There may be vendor specific APIs or mechanisms.
    But you can use environment entries in your deployment descriptors to specify the information and make use of the entries inside your j2ee component. That will make your code platform neutral.
    Sahoo

  • Add Data Source on the Application Server

    Does anyone know how I can add a data source to be defined on the application server that hosts the LiveCycle ES server.
    Thanks,
    John

    In my datasource location for my jdbc service in workbench I am getting the following error when trying to do a test connection:
    Exception: kingorads not bound. Cause: kingorads not bound
    kingorads is what I named the jndi name.  Here is what I have in the adobe-ds.xml file:
    --------------Begin Code
      KINGORADS
      jdbc:oracle:thin:@kingora:1521:prod
      oracle.jdbc.driver.OracleDriver
      X
      Y
      org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
      Oracle9i
    --------------End Code

  • How to see the file at the application server

    HI TO ALL SDNERS ,
                                 THIS IS MY CODE WHERE TO CHECK THE DOWNLOADED FILE AT THE APPLICATION SERVER.IN TCODE AL11 I HAVE SEEN THERE IS NO FILE GETTING CREATED.WHEN TRANSFERRING THE SY-SUBRC VALUE IS ZERO.
    Program Name        : ZME11_BDC.
    Title               : PURCHASE INFORMATION RECORD LOAD PROGRAM
    Program Objective   : THIS PROGRAM READS IN THE PURCHASE
                          INFORMATION FILE. IT CREATES A BDC SESSION TO
                          USE TO LOAD THE PURCHASE INFORMATION RECORDS
                          INTO SAP using the ME11 Transaction.
    REPORT  ZME11_BDC no standard page heading MESSAGE-ID ZHNC line-size 55.
                constants declaration
    constants: c_x value 'X',
               c_sess type apqi-groupid value 'zcustomer',
               c_xd01 type tstc-tcode value 'ME11'.
                  DECLARING VARIABLES
    DATA: V_MSG(255),
          V_ERREC TYPE I,"NO OF FAILED RECORDS
          V_LINES."NO OF RECORDS
           FLAG DECLARATIONS
    DATA: FG_DATA_EXIST VALUE 'X',"CHECK FOR DATA
          FG_SESSION_OPEN VALUE ''.
          STRUCTURES AND INTERNAL TABLE DECLARATIONS
    TYPES :BEGIN OF TY_PIR,
             LIFNR TYPE EINA-LIFNR,
             MATNR TYPE EINA-MATNR,
             EKORG TYPE EINE-EKORG,
             WERKS TYPE EINE-WERKS,
             VERKF TYPE EINA-VERKF,"sales person
             TELF1 TYPE EINA-TELF1,"telephone
             URZLA TYPE EINA-URZLA,"country
             REGIO TYPE EINA-REGIO,"region
             APLFZ(5),"plan deleivery time
             EKGRP TYPE EINE-EKGRP,"purchase group
             NORBM(13),
             NETPR(13),
         END OF TY_PIR.
    DATA : IT_PIR TYPE TABLE OF TY_PIR,
           WA_PIR LIKE LINE OF IT_PIR.
    DATA: BEGIN OF IT_BDCDATA.
    INCLUDE STRUCTURE BDCDATA.
    DATA END OF IT_BDCDATA.
    DATA : BEGIN OF IT_BDCMSG.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA END OF IT_BDCMSG.
                      SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : FNAME TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN END OF BLOCK B1.
                           AT SELECTION ON VALUE REQUEST
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
       FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = FNAME.
                             START OF SELECTION
    START-OF-SELECTION.
    PERFORM F_GET_DATA USING FNAME
                       CHANGING IT_PIR.
    PERFORM F_GENERATE_DATASET USING FNAME
                               CHANGING IT_PIR WA_PIR.
    *&      Form  F_GET_DATA
          text
         -->P_V_FNAME  text
         <--P_IT_PIR  text
    FORM F_GET_DATA  USING    P_FNAME LIKE FNAME
                     CHANGING P_IT_PIR LIKE IT_PIR.
    DATA: LV_FILE TYPE STRING.
    LV_FILE  = FNAME.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = LV_FILE
       FILETYPE                      = 'DAT'
      HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = P_IT_PIR
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF P_IT_PIR IS INITIAL.
    FG_DATA_EXIST = ''.
    ENDIF.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_GENERATE_DATASET
          text
         -->P_V_FNAME  text
         <--P_IT_PIR  text
    FORM F_GENERATE_DATASET  USING    P_V_FNAME LIKE FNAME
                             CHANGING P_IT_PIR LIKE IT_PIR
                                      P_WA_PIR LIKE WA_PIR.
    MESSAGE I001(ZHNC).
    *OPENING FILE AT THE APPLICATION SERVER FOR WRITING
    OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC  EQ 0.
    MESSAGE I002(ZHNC).
    LOOP AT P_IT_PIR INTO P_WA_PIR.
    SPLIT P_WA_PIR AT '*' INTO P_WA_PIR-LIFNR
                               P_WA_PIR-MATNR
                               P_WA_PIR-EKORG
                               P_WA_PIR-WERKS
                               P_WA_PIR-VERKF
                               P_WA_PIR-TELF1
                               P_WA_PIR-URZLA
                               P_WA_PIR-REGIO
                               P_WA_PIR-APLFZ
                               P_WA_PIR-EKGRP
                               P_WA_PIR-NORBM.
    *TRANSFER THE FILE FROM INTERNAL TABLE TO APPLICATION SERVER
    MESSAGE I003(ZHNC).
    TRANSFER P_WA_PIR TO FNAME.
    ENDLOOP.
    *CLOSING THE FILE AT THE APPLICATION SERVER
    CLOSE DATASET FNAME.
    ENDIF.

    Hello,
    I made a similar program. You can have a look at it.
    *&      Form  write_to_app_server
          text
    -->  p1        text
    <--  p2        text
    FORM write_to_app_server.
    To get filename
      PERFORM get_filename.
    To write into the application server
      OPEN DATASET g_filename_with_path FOR OUTPUT IN TEXT MODE.
      IF sy-subrc = 0.
        LOOP AT <l_table> INTO <l_line>.
          TRANSFER <l_line> TO g_filename_with_path.
        ENDLOOP.
        CLOSE DATASET g_filename_with_path.
      ELSE.
        CLOSE DATASET g_filename_with_path.
      ENDIF.
    To send mail
      PERFORM send_mail.
    ENDFORM.                    " write_to_app_server
    *&      Form  get_filename
          text
    -->  p1        text
    <--  p2        text
    FORM get_filename.
      DATA : l_log_path TYPE  filepath-pathintern
                          VALUE 'Y28M_DOWNLOADS_BACKGROUND' .
      CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
           EXPORTING
                client                     = sy-mandt
                logical_path               = l_log_path
                operating_system           = sy-opsys
                file_name                  = p_fname
           IMPORTING
                file_name_with_path        = g_filename_with_path
           EXCEPTIONS
                path_not_found             = 1
                missing_parameter          = 2
                operating_system_not_found = 3
                file_system_not_found      = 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.
    ENDFORM.                    " get_filename
    You may find it useful.
    Regards,
    Karuna.

  • How to delete the record in the file present in the application server?

    Hi,
      I have two questions.
      i) How can I delete a record based on some condition in the recordx in the file that is present in the application server?
      ii) How can I lock the users whiel one user is accessing the file on the application server?
    Thanks in advance.
    Suvan

    Hi,
    If u want a frequent deletion this approach to delete a record from a file will havee unnecesary copy of records from one file to another and deletion of one file and renaming activities.
    Instead what u can do is Add and field del_flag to ur record structure.
    If u want to delete the record from a file just mark this del_flag as 'X'.
    While processing u can have a loop like
    loop at it_XXX where del_flag <> 'X'.
    endloop.
    This will logically delete the record.
    When u r to finish the application at that time only perform this copying / deleting / and renaing activity
    Hope this helps.
    Cheers,
    Nitin

  • How to delete  File from the Application Server,ABAP

    Hi Gurus,
    I'm using  DELETE  DATASET  Statement ,
    Based on Date  how can i delete files with in the period in the Application server
    Any BAPI/FM  for this Delete file based  on some Date Period
    Thanks in Advance.

    DATA: BEGIN OF file,
            dirname(75) TYPE c, " name of directory. (possibly truncated.)
            name(75)    TYPE c, " name of entry. (possibly truncated.)
            type(10)    TYPE c,            " type of entry.
            len(8)      TYPE p,            " length in bytes.
            owner(8)    TYPE c,            " owner of the entry.
            mtime(6)    TYPE p, " last modification date, seconds since 1970
            mode(9)     TYPE c, " like "rwx-r-x--x": protection mode.
            useable(1)  TYPE c,
            subrc(4)    TYPE c,
            errno(3)    TYPE c,
            errmsg(40)  TYPE c,
            mod_date    TYPE d,
            mod_time(8) TYPE c,            " hh:mm:ss
            seen(1)     TYPE c,
            changed(1)  TYPE c,
          END OF file.
    DATA: BEGIN OF file_list OCCURS 100,
            dirname(75) TYPE c, " name of directory. (possibly truncated.)
            name(75)    TYPE c, " name of entry. (possibly truncated.)
            type(10)    TYPE c,            " type of entry.
            len(8)      TYPE p,            " length in bytes.
            owner(8)    TYPE c,            " owner of the entry.
            mtime(6)    TYPE p, " last modification date, seconds since 1970
            mode(9)     TYPE c, " like "rwx-r-x--x": protection mode.
            useable(1)  TYPE c,
            subrc(4)    TYPE c,
            errno(3)    TYPE c,
            errmsg(40)  TYPE c,
            mod_date    TYPE d,
            mod_time(8) TYPE c,            " hh:mm:ss
            seen(1)     TYPE c,
            changed(1)  TYPE c,
          END OF file_list.
      DO.
        CLEAR file.                           
        CALL 'C_DIR_READ_NEXT'
          ID 'TYPE'   FIELD file-type
          ID 'NAME'   FIELD file-name
          ID 'LEN'    FIELD file-len
          ID 'OWNER'  FIELD file-owner
          ID 'MTIME'  FIELD file-mtime
          ID 'MODE'   FIELD file-mode
          ID 'ERRNO'  FIELD file-errno
          ID 'ERRMSG' FIELD file-errmsg.
       if sy-subrc eq 0.
          MOVE-CORRESPONDING file TO file_list.
          APPEND file_list.
       else.
          exit.
       endif.
    enddo.
    sort file_list based on date and time ie, MOD_DATE and MOD_TIME fields
    and delete the entries

  • File from the Application server

    Hi gurus,
    I am working on a scenario where I need to get a file from the application server and for this I need to ask user to enter the location and that too at the selection screen and then I need to read this location using open data set and read data set in my program , once I am done with this I need to do some other validations. so can you please help me out how to achieve this.
    Thanks
    Rajeev Gupta

    Hi
    Declare the selection screen with file as parameter so that the user enter the application server file..
    the use the OPEND DATASET  as mentioned in below code and process
    Refer this:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
    *& Report  ZUPLOADTAB                                                  *                     &----
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.
    Regards
    Anji

  • Upload tab-delimited file from the application server to an internal table

    Hello SAPients.
    I'm using OPEN DATASET..., READ DATASET..., CLOSE DATASET to upload a file from the application server (SunOS). I'm working with SAP 4.6C. I'm trying to upload a tab-delimited file to an internal table but when I try load it the fields are not correctly separated, in fact, they are all misplaced and the table shows '#' where supposedly there was a tab.
    I tried to SPLIT the line using as separator a variable with reference to CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB but for some reason that class doesn't exist in my system.
    Do you know what I'm doing wrong? or Do you know a better method to upload a tab-delimited file into an internal table?
    Thank you in advance for your help.

    Try:
    REPORT ztest MESSAGE-ID 00.
    PARAMETER: p_file LIKE rlgrap-filename   OBLIGATORY.
    DATA: BEGIN OF data_tab OCCURS 0,
          data(4096),
          END   OF data_tab.
    DATA: BEGIN OF vendor_file_x OCCURS 0.
    * LFA1 Data
    DATA: mandt  LIKE bgr00-mandt,
          lifnr  LIKE blf00-lifnr,
          anred  LIKE blfa1-anred,
          bahns  LIKE blfa1-bahns,
          bbbnr  LIKE blfa1-bbbnr,
          bbsnr  LIKE blfa1-bbsnr,
          begru  LIKE blfa1-begru,
          brsch  LIKE blfa1-brsch,
          bubkz  LIKE blfa1-bubkz,
          datlt  LIKE blfa1-datlt,
          dtams  LIKE blfa1-dtams,
          dtaws  LIKE blfa1-dtaws,
          erdat  LIKE  lfa1-erdat,
          ernam  LIKE  lfa1-ernam,
          esrnr  LIKE blfa1-esrnr,
          konzs  LIKE blfa1-konzs,
          ktokk  LIKE  lfa1-ktokk,
          kunnr  LIKE blfa1-kunnr,
          land1  LIKE blfa1-land1,
          lnrza  LIKE blfa1-lnrza,
          loevm  LIKE blfa1-loevm,
          name1  LIKE blfa1-name1,
          name2  LIKE blfa1-name2,
          name3  LIKE blfa1-name3,
          name4  LIKE blfa1-name4,
          ort01  LIKE blfa1-ort01,
          ort02  LIKE blfa1-ort02,
          pfach  LIKE blfa1-pfach,
          pstl2  LIKE blfa1-pstl2,
          pstlz  LIKE blfa1-pstlz,
          regio  LIKE blfa1-regio,
          sortl  LIKE blfa1-sortl,
          sperr  LIKE blfa1-sperr,
          sperm  LIKE blfa1-sperm,
          spras  LIKE blfa1-spras,
          stcd1  LIKE blfa1-stcd1,
          stcd2  LIKE blfa1-stcd2,
          stkza  LIKE blfa1-stkza,
          stkzu  LIKE blfa1-stkzu,
          stras  LIKE blfa1-stras,
          telbx  LIKE blfa1-telbx,
          telf1  LIKE blfa1-telf1,
          telf2  LIKE blfa1-telf2,
          telfx  LIKE blfa1-telfx,
          teltx  LIKE blfa1-teltx,
          telx1  LIKE blfa1-telx1,
          xcpdk  LIKE  lfa1-xcpdk,
          xzemp  LIKE blfa1-xzemp,
          vbund  LIKE blfa1-vbund,
          fiskn  LIKE blfa1-fiskn,
          stceg  LIKE blfa1-stceg,
          stkzn  LIKE blfa1-stkzn,
          sperq  LIKE blfa1-sperq,
          adrnr  LIKE  lfa1-adrnr,
          mcod1  LIKE  lfa1-mcod1,
          mcod2  LIKE  lfa1-mcod2,
          mcod3  LIKE  lfa1-mcod3,
          gbort  LIKE blfa1-gbort,
          gbdat  LIKE blfa1-gbdat,
          sexkz  LIKE blfa1-sexkz,
          kraus  LIKE blfa1-kraus,
          revdb  LIKE blfa1-revdb,
          qssys  LIKE blfa1-qssys,
          ktock  LIKE blfa1-ktock,
          pfort  LIKE blfa1-pfort,
          werks  LIKE blfa1-werks,
          ltsna  LIKE blfa1-ltsna,
          werkr  LIKE blfa1-werkr,
          plkal  LIKE  lfa1-plkal,
          duefl  LIKE  lfa1-duefl,
          txjcd  LIKE blfa1-txjcd,
          sperz  LIKE  lfa1-sperz,
          scacd  LIKE blfa1-scacd,
          sfrgr  LIKE blfa1-sfrgr,
          lzone  LIKE blfa1-lzone,
          xlfza  LIKE  lfa1-xlfza,
          dlgrp  LIKE blfa1-dlgrp,
          fityp  LIKE blfa1-fityp,
          stcdt  LIKE blfa1-stcdt,
          regss  LIKE blfa1-regss,
          actss  LIKE blfa1-actss,
          stcd3  LIKE blfa1-stcd3,
          stcd4  LIKE blfa1-stcd4,
          ipisp  LIKE blfa1-ipisp,
          taxbs  LIKE blfa1-taxbs,
          profs  LIKE blfa1-profs,
          stgdl  LIKE blfa1-stgdl,
          emnfr  LIKE blfa1-emnfr,
          lfurl  LIKE blfa1-lfurl,
          j_1kfrepre  LIKE blfa1-j_1kfrepre,
          j_1kftbus   LIKE blfa1-j_1kftbus,
          j_1kftind   LIKE blfa1-j_1kftind,
          confs  LIKE  lfa1-confs,
          updat  LIKE  lfa1-updat,
          uptim  LIKE  lfa1-uptim,
          nodel  LIKE blfa1-nodel.
    DATA: END   OF vendor_file_x.
    FIELD-SYMBOLS:  <field>,
                    <field_1>.
    DATA: delim          TYPE x        VALUE '09'.
    DATA: fld_chk(4096),
          last_char,
          quote_1     TYPE i,
          quote_2     TYPE i,
          fld_lth     TYPE i,
          columns     TYPE i,
          field_end   TYPE i,
          outp_rec    TYPE i,
          extras(3)   TYPE c        VALUE '.,"',
          mixed_no(14) TYPE c        VALUE '1234567890-.,"'.
    OPEN DATASET p_file FOR INPUT.
    DO.
      READ DATASET p_file INTO data_tab-data.
      IF sy-subrc = 0.
        APPEND data_tab.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    * count columns in output structure
    DO.
      ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      columns = sy-index.
    ENDDO.
    * Assign elements of input file to internal table
    CLEAR vendor_file_x.
    IF columns > 0.
      LOOP AT data_tab.
        DO columns TIMES.
          ASSIGN space TO <field>.
          ASSIGN space TO <field_1>.
          ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
          SEARCH data_tab-data FOR delim.
          IF sy-fdpos > 0.
            field_end = sy-fdpos + 1.
            ASSIGN data_tab-data(sy-fdpos) TO <field_1>.
    * Check that numeric fields don't contain any embedded " or ,
            IF <field_1> CO mixed_no AND
               <field_1> CA extras.
              TRANSLATE <field_1> USING '" , '.
              CONDENSE <field_1> NO-GAPS.
            ENDIF.
    * If first and last characters are '"', remove both.
            fld_chk = <field_1>.
            IF NOT fld_chk IS INITIAL.
              fld_lth = strlen( fld_chk ) - 1.
              MOVE fld_chk+fld_lth(1) TO last_char.
              IF fld_chk(1) = '"' AND
                 last_char = '"'.
                MOVE space TO fld_chk+fld_lth(1).
                SHIFT fld_chk.
                MOVE fld_chk TO <field_1>.
              ENDIF.       " for if fld_chk(1)=" & last_char="
            ENDIF.         " for if not fld_chk is initial
    * Replace "" with "
            DO.
              IF fld_chk CS '""'.
                quote_1 = sy-fdpos.
                quote_2 = sy-fdpos + 1.
                MOVE fld_chk+quote_2 TO fld_chk+quote_1.
              ELSE.
                MOVE fld_chk TO <field_1>.
                EXIT.
              ENDIF.
            ENDDO.
            <field> = <field_1>.
          ELSE.
            field_end = 1.
          ENDIF.
          SHIFT data_tab-data LEFT BY field_end PLACES.
        ENDDO.
        APPEND vendor_file_x.
        CLEAR vendor_file_x.
      ENDLOOP.
    ENDIF.
    CLEAR   data_tab.
    REFRESH data_tab.
    FREE    data_tab.
    Rob

  • How to load data from a  flat file which is there in the application server

    HI All,
              how to load data from a  flat file which is there in the application server..

    Hi,
    Firstly you will need to place the file(s) in the AL11 path. Then in your infopackage in "Extraction" tab you need to select "Application Server" option. Then you need to specify the path as well as the exact file you want to load by using the browsing button.
    If your file name keeps changing on a daily basis i.e. name_ddmmyyyy.csv, then in the Extraction tab you have the option to write an ABAP routine that generates the file name. Here you will need to append sy-datum to "name" and then append ".csv" to generate complete filename.
    Please let me know if this is helpful or if you need any more inputs.
    Thanks & Regards,
    Nishant Tatkar.

  • Error while integrating  the application server in jdeveloper?

    i am using standalone server connection and given the settings ....
    test process is good..all the test connections are successful...
    but while navigating to SOA folder. i couldn't find deployed files in soa folder.
    i found following error
    javax.naming.NamingException: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://xxxxxxxxxxxxxxxxxxxxxDestination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination] [Root exception is java.lang.RuntimeException: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://xxxxxxxxxxxxx: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination]]
         at oracle.tip.tools.ide.fabric.asbrowser.SOAServerProvider.listBindingsImpl(SOAServerProvider.java:35)
         at oracle.rc.asadapter.context.spi.AbstractContextProvider.listBindings(AbstractContextProvider.java:133)
         at oracle.rc.asadapter.context.spi.DefaultMutableAppServerContext$ContextProviderSupport$3.method(DefaultMutableAppServerContext.java:384)
         at oracle.rc.asadapter.context.spi.DefaultMutableAppServerContext$ContextProviderSupport$MethodCall.invoke(DefaultMutableAppServerContext.java:421)
         at oracle.rc.asadapter.context.spi.DefaultMutableAppServerContext$ContextProviderSupport.listBindings(DefaultMutableAppServerContext.java:381)
         at oracle.rc.asadapter.context.spi.DefaultMutableAppServerContext$ContextProviderSupport.access$500(DefaultMutableAppServerContext.java:314)
         at oracle.rc.asadapter.context.spi.DefaultMutableAppServerContext.localListBindings(DefaultMutableAppServerContext.java:207)
         at oracle.rc.asadapter.context.spi.AbstractEventDirContext.listBindings(AbstractEventDirContext.java:185)
         at oracle.adf.rc.spi.jndi.AbstractDirContext.listBindings(AbstractDirContext.java:214)
         at oracle.rc.asadapter.context.spi.DefaultAppServerManageableContext.getManageables(DefaultAppServerManageableContext.java:58)
         at oracle.jdeveloper.asnav.nodes.DefaultManageableFolder.loadChildren(DefaultManageableFolder.java:327)
         at oracle.jdeveloper.asnav.nodes.DefaultManageableFolder$4.run(DefaultManageableFolder.java:288)
    Caused by: java.lang.RuntimeException: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://xxxxxxxxxxxxx: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination]
         at oracle.tip.tools.ide.fabric.asbrowser.WeblogicSOAServer.initPartitions(WeblogicSOAServer.java:89)
         at oracle.tip.tools.ide.fabric.asbrowser.WeblogicSOAServer.<init>(WeblogicSOAServer.java:68)
         at oracle.tip.tools.ide.fabric.asbrowser.ASBrowserHelper.listWeblogicSOAServers(ASBrowserHelper.java:275)
         at oracle.tip.tools.ide.fabric.asbrowser.ASBrowserHelper.listSOAServers(ASBrowserHelper.java:201)
         at oracle.tip.tools.ide.fabric.asbrowser.SOAServerProvider.listUserObjects(SOAServerProvider.java:54)
         at oracle.tip.tools.ide.fabric.asbrowser.SOAServerProvider.listBindingsImpl(SOAServerProvider.java:21)
         ... 11 more
    Caused by: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://xxxxxxxxx:7021: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination]
         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
         at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
         at weblogic.jndi.Environment.getContext(Environment.java:315)
         at weblogic.jndi.Environment.getContext(Environment.java:285)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at oracle.soa.management.internal.facade.ServerManagerImpl.<init>(ServerManagerImpl.java:76)
         at oracle.soa.management.internal.facade.ServerManagerFactoryImpl.createServerManager(ServerManagerFactoryImpl.java:28)
         at oracle.tip.tools.ide.fabric.asbrowser.WeblogicSOAServer.initPartitions(WeblogicSOAServer.java:85)
         ... 16 more
    Caused by: java.net.ConnectException: t3://xxxxxxxx:7021: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination
         at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
         at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
         at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:353)
         ... 26 more
    Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:470)
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:321)
         at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:254)
         at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
         at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200)
         ... 29 more
    i worked out with the statements in help file which is as follows
    11.6.1 No available router to destination Message is Displayed When Attempting to Connect to the Administration Server from WLST
    When trying to connect to the WebLogic Server Administration Server from WLST using localhost as the host name, the following message may be displayed if the listen-address attribute of the Administration Server has been restricted to certain IP addresses:
    javax.naming.CommunicationException [Root exception is
    java.net.ConnectException : <t3://HOST:PORT> : Destination unreachable;
    nested exception is: java.net.ConnectException: Connection refused; No
    available router to destination
    Workaround
    Use either of the following workarounds:
        Check that the listen-address attribute of the Administration Server has been set correctly in the domain configuration file. You can either remove the listen-address line or simply comment it out. Oracle recommends that you comment it out in case you need to know the value at a later time. For example, in the domain configuration file:
        <server>
           <name>AdminServer</name>
           <ssl>
           </ssl>
           <machine>machine_name</machine>
           <!-- listen-address>machine_ip_address</listen-address -->
        </server>
        Use the host name of the Administration Server, instead of localhost, in the WLST connect command.
    i removed listen address in config file..but i am still facing with same error
    Edited by: 947453 on Jul 25, 2012 7:09 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hello,
    Were you able to resolve this? I am facing the same issue where my JDev is on a separate machine from the SOA server. Where is the "domain configuration file" located? I am running 11.1.1.6. Within JDev all the other options for the Application Server (Deployments, Servers, Web Services) return results quickly. SOA is throwing the error you mention.
    Thank you.

  • Error  while accessing the application server file

    Hello,
    When I try to load the data from CSV file to PSA , I am getting following error message
    "Error  while accessing the application server file"
    "Errors in source system"
    I gave the right file path
    I am not sure about this error message.
    Thanks,

    Hi ram,
    if you have more than one application server running in your BI system (see at transaction SM51) be aware that your infopackage will be executed on the right one. Each application server has its own file system and your job need to run on the server your file is stored on.
    Also check if the os user of the SAP system itself (<sid>adm on Unix) has rights to read that file.
    Bye
    Frank

  • Error while extracting XML file from the application server

    Hi ,
    I am writing a XML file into the application server, after which when i try to extract the file to the local server using the report - RFASLDPC ,
    the file is extracted, but with a '#' symbol at the first position.
    Because of which the XML File does not open. But after i open the file in notepad and manually delete the '#' symbol and then reopen the file, it works fine.
    Is there any way to remove the '#' symbol while extracting itself ??
    Thanks in advance,
    Vikas.

    Select the option "No Character Set Conversion" in stead of Code page 1100.
    However, I still have troubles -> the downloaded xml file misses a space on several places. This causes errors too.

  • Printing files on the application server

    Hi,
    I am looking for ways to print files residing on the application server. Do you know of any function modules/transaction code that can do this?
    Here is my situation:
    I am using GRAPH_PRINT_POSTSCRIPT_FILE to print postscript file to the printer. I have no problem using this FM. The issue is that this function only prints files residing on the PC/local computer. It doesn't print any files on the application server.
    Thanks in advance for any help you can provide.

    Hi,
    use
       CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
         EXPORTING
           dynpfield_filename = 'P_FNAME'
           dyname             = 'ZFILE_HELP'
           dynumb             = sy-dynnr
           filetype           = 'P'
           location           = 'A'.
    Thanks,
    NN.

  • How to find out the application server instance name?

    Hi,
    I installed an Oracle application server a long long while ago and completely forgot the things about the installation, including the name of the instance (I installed single instance, not cluster). Now I am trying to create a connection to the application server and I am prompted to fill in the instance name. Where in the installation can I find out the instance name?
    The version of the server as displayed when the server is started:
    $ ./oc4j -start
    Starting OC4J from /oraInventory/j2ee/home ...
    09/10/08 16:04:39 Oracle Containers for J2EE 10g (10.1.3.2.0)  initializedThis 10.1.3.2.0 number is somewhat confusing. As I understand it, right now if you download a copy of the Application server from Oracle web site, the current version is 10.1.3.1.0.
    I am also reading the installation guide now and when looking at the server starting messages on the screen, I realize that installing the server in the oraInventory directory is not quite right. Does that interfere with the correct functioning of the server? I installed it but have never tried to use it until now.
    Many thanks for your help!
    Newman

    J. Newman wrote:
    Hi,
    I installed an Oracle application server a long long while ago and completely forgot the things about the installation, including the name of the instance (I installed single instance, not cluster). Now I am trying to create a connection to the application server and I am prompted to fill in the instance name. Where in the installation can I find out the instance name?If you have access to that server, then the following should give the instance name.
    grep 'IASname' $ORACLE_HOME/config/ias.properties
    you should also see it in the AS Control Console page.
    The version of the server as displayed when the server is started:
    $ ./oc4j -start
    Starting OC4J from /oraInventory/j2ee/home ...
    09/10/08 16:04:39 Oracle Containers for J2EE 10g (10.1.3.2.0)  initializedThis 10.1.3.2.0 number is somewhat confusing. As I understand it, right now if you download a copy of the Application server from Oracle web site, the current version is 10.1.3.1.0.
    Regarding the version numbers, this fourth digit refers to the Component-specific release number. The OAS documentation says this about it.
    "This digit identifies a release level specific to a component. Different components can have different numbers in this position depending upon, for example, component patch sets or interim releases."
    I am also reading the installation guide now and when looking at the server starting messages on the screen, I realize that installing the server in the oraInventory directory is not quite right. Does that interfere with the correct functioning of the server? I installed it but have never tried to use it until now.
    Many thanks for your help!
    NewmanI think Oracle software should always be installed in a separate directory. I think it may also generate errors in its functioning but it will certainly create a whole lot confusion and mess in later administration and configurations.
    hope that helps!
    AMN
    Edited by: AMN on Oct 8, 2009 5:14 PM

Maybe you are looking for

  • How to create a new user in OWB that can only view other user's mappings

    Hello Everyone, I am new to OWB and want to know if possible to create different users that can only view other user's mappings without making any changes. Do you know if possible each user can have his own password? Thank you for your help! Jennifer

  • Need to print a text of 255 char from a Ztable into sap script printing.

    Hi All, I Have a requirement where I have to fetch an incoterm description maintained in Z table according to incoterm key and print it via SAP script. I am getting the complete 255 char data in the variable which I am passing to the script from the

  • JavaIDL sun site simple example dont work

    Hello all i didn't saw any javaIDL forum so i will port it here , im trying to run the javaIDL tutorial http://java.sun.com/j2se/1.3/docs/guide/idl/tutorial/GSserver.html but im geting error when i trying to compile the code on the HelloServer.java i

  • Firefox or thunderbird refuses to open after windows 7 hibernation

    everytime I close the lid on my laptop it goes into hibernation and everytime in the morning when I open it and wake it up Firefox or Thunderbird refuses to open up it looks like it starts up but then nothing happens not even the main browser window

  • Loadjava JMF uploading problem

    Hi all, I am not sure whether this posting belongs here, but I'd give it a shot anyway ;-). I have developed a java class which generates thumbnails from uploaded videos (stored as BFILE on the Database server's filesystem). For this purpose, I use t