Function - check path - application server or presentation server

Hi Gentlemen!!
I'm looking for a function to export a path and return if the path belongs of an application server or an presentation.
thanks.
Polak.-

You can just check if the second character of the path variable is a ':'
IF yes then presentation server
else application server.

Similar Messages

  • Download  350MB of data from Application Server to Presentation server

    i want to Download  350MB(Around 2.5Million record of Table BSEG) of data from Application Server to Presentation server..
    i have tried with the transaction CG3Y and program using open dataset,read dataset,close dataset,ws_download...but went in vain,,,ended with TIMEOUT ERROR..will OPEN DATASET 'path' FOR OUTPUT FILTER 'Compress'  be helpful
    ..please help me ..its urgent..

    you can do the FTP with Unix commands..
    initially connect to the application server  by using command
    FTP <app server ip>,then it willl ask for username and password... after successful connection you  can use the following commnads to transfer file
    lcd <destination path name>(set the dest path)
    cd <source path>(set the sorce path),
    get <filename to be transfererd>( do the transfer)....
    You can do same with ABAP code also, for this you need to use some function modules like..
    FTP_CONNECT ( to establish the connection)
    FTP_COMMAND ( to execute the commands like cd, lcd get,put)
    finally FTP_DISCONNECT to close the open connection...
    for further details refer standard program RSFTP002,RSFTP003....
       reward points if helpful...

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • How to bring the data from application server to presentation server

    hi,
    i have one problem,i have written the program which will open the files in the application server when we run the program in the background(sm37),the same data from application server i want to bring into presentation server in the format of (.csv),how to bring the data from application to presentation server can any body help me on this  topic.folowing is the code .
    *& Report  ZPFA_HIER_LOAD
    REPORT  ZFPA_HIER_LOAD.
    *---- Declaration of Oracle connectioN
    DATA con_name LIKE dbcon-con_name VALUE 'COMSHARE'.
    DATA: MFL1(9),MFL2(5),MFL3(9),MFL4(2),MFL5(8) TYPE c.
    DATA : mfilename type string.
    data: begin of matab1 occurs 0,
          MFL1(9) TYPE C,
          MFL2(5) TYPE C,
          MFL3(9) TYPE C,
          MFL4(2) TYPE C,
          MFL5(8) TYPE C  ,
         end of matab1 .
    data: setid(8) type c.
    data: begin of source occurs 0,
          setid(8) type c,
          end of source.
    *PARAMETERS : p_pfile LIKE filename-FILEEXTERN.
    *PARAMETERS : m_bsenty(8). " type c obligatory.
    *mfilename = P_PFILE.
    EXEC SQL.
      SET CONNECTION :con_name
    ENDEXEC.
    EXEC SQL.
      CONNECT TO :con_name
    ENDEXEC.
    EXEC SQL PERFORMING get_source.
      SELECT set_id FROM UNIT_SET INTO
      :setid
      ORDER BY SET_ID
    ENDEXEC.
    start-of-selection.
    LOOP AT SOURCE.
      REFRESH matab1. CLEAR matab1.
      EXEC SQL PERFORMING evaluate.
    SELECT TO_CHAR(MEM_ID),TRIM(TO_CHAR(MEM_PID)) FROM UNIT_TREE INTO :MFL1,
    :MFL5
    where set_id = :SOURCE-SETID ORDER BY MEM_ID
      ENDEXEC.
      if SOURCE-SETID = '80000000'.
       mfilename = '/tmp/aesorg'.
      elseif SOURCE-SETID = '80000006'.
       mfilename = '/tmp/Consolidation_Manager'.
      elseif SOURCE-SETID = '80000010'.
       mfilename = '/tmp/10org'.
      elseif SOURCE-SETID = '80000012'.
       mfilename = '/tmp/20org'.
      elseif SOURCE-SETID = '80000018'.
       mfilename = '/tmp/30org'.
      elseif SOURCE-SETID = '80000025'.
       mfilename = '/tmp/40org'.
      Endif.
      mfilename = '/usr/test.dat'.
    ************************This was i tried***********************
      open dataset mfilename for output in text mode encoding default." IN
    *TEXT MODE ENCODING DEFAULT.
    if sy-subrc <> 0.
    exit.
    endif.
    close dataset mfilename.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
         FILENAME         = MFILENAME
         FILETYPE         = 'ASC'
       TABLES
         data_tab         = matab1
       EXCEPTIONS
         file_write_error = 1
         invalid_type     = 2
         no_authority     = 3
         unknown_error    = 4
         OTHERS           = 10.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
      clear matab1.
    ENDLOOP.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
    close dataset mfilename.
         MFL5 = '0'.
       CLEAR MFL5.
    FORM evaluate.
      if MFL5 = -1.
        MFL5 = ''.
      ENDIF.
      concatenate MFL1 ','   into MFL1.
      concatenate MFL1 ','   into MFL3.
      matab1-MFL1 = MFL1.
      matab1-MFL2 = 'ZBUE,'.
      matab1-MFL3 = MFL3.
      matab1-MFL4 = ' ,'.
      matab1-MFL5 = MFL5.
      append matab1 .
      CLEAR MFL1.
      CLEAR MFL2.
      CLEAR MFL3.
      CLEAR MFL4.
      CLEAR MFL5.
    ENDFORM.
                     "evaluate
    *&      Form  GET_SOURCE
          text
    FORM GET_SOURCE.
      source-setid = setid.
      append source.
      clear source.
    ENDFORM.                    "GET_SOURCE

    Hi Rammohan,
    You cannot use OPEN DATASET to transfer data from application server to presentation server.
    You can do the following :
    <b>Do 1st point in BACKGROUND</b>
    1. Read the data file from application server into an internal table using OPEN DATASET
    <b>Do 2nd point in Foreground</b>
    2. Once you get the data into an internal table, then use FM GUI_DOWNLOAD to download it on presentation server
    You cannot use the above 2 point together in Background because its not possible. Hence you need program it partially in background and partially in foreground.
    Best regards,
    Prashant

  • Downloading file from application server to presentation server

    Hi,
          We have a requirment to download file from application server to presentation server.  The problem is while down loading, some of the filds showing some junk values. Instead of that junk values we have some Russian texts there.  These Russian texts only coming as junk all other data is correct.  The file in the appplication server is in .dbf format. We are downloading using WS_DOWNLOAD. file type is BIN and code page we didn't specified.
    Thanks in Advance
    Jijeesh.P.G
    Message was edited by: Jijeesh.P.G
            Jijeesh P G

    hi jijeesh,
       Welcome to SDN.
    u can use to download file from application server to presentation server using the t/c CG3Y. in that it will ask the source file path and the target file path.
    if u want to find the source file path in the application server, u can use the transaction AL11 to find that one.
    Regards....
    Arun.
    Reward points if useful.

  • Object level security will be done by bi-server or presentation server

    hi all
    object level security will be done by bi-server or presentation server?
    r both will be done by bi-server?
    Tnks

    Hi,
    object level security will be done by bi-server or presentation server?It would be maintained by both the servers,as the end user sends a request that would be sent to presentation server and then in turn to BI server....while in this processboth checks is there any security implemented on it.
    Ya in simple words authorization and authentication.
    Hope it helps you.
    By,
    KK

  • File download from application server to presentation server

    Hi,
         We have requirment to upload a file to application server in .dbf format and then download it to presentation server.  while downloading the file to presentation server some of the fields  getting junk values.  we are downloading file to excel sheet.  some of the fields values are Russian texts.  Those fields only getting junk values, all other fields are getting correct values.
    Please advice.
    Regards,
    chandra.

    hi
    sample code below should help you......
    <u>Download to presentation server</u>
    This program can be used to download files from Application server to presentaion server.
    1)Maximum length of each field is considered to be 40 characters.
    2)Maximum length of the field can be changed by specifying the length in selection screen parameter
    3)First line of the Application server file should contain the description of each field.
    4)Each field should be delimited by #.
    *& Report ZDOWNLOADFILE *
    REPORT ZDOWNLOADFILE
    MESSAGE-ID B1 .
    INCLUDES *
    INCLUDE ZDOWNLOADFILE_TOP.
    INCLUDE ZDOWNLOADFILE_FORM.
    EVENT-AT SELECTION-SCREEN *
    AT SELECTION-SCREEN ON pa_appl.
    PERFORM check_file_exists USING pa_appl.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_appl.
    PERFORM f4_dxfilename USING pa_appl.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_pres.
    PERFORM f4_filename USING pa_pres.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_del.
    PERFORM f4_dxfilename USING pa_del.
    EVENT INITIALIZATION *
    INITIALIZATION.
    PERFORM initialization.
    EVENT START-OF-SELECTION *
    START-OF-SELECTION.
    PERFORM determine_fields. "Determine number of columns
    PERFORM build_itab. "Create internal table based on number
    "of columns
    PERFORM build_header. "To prepare header for the file
    PERFORM download_data. "Download data to presentation server
    PERFORM delete_files. "Delete files from application server
    *& Include ZDOWNLOADFILE_TOP *
    TYPES: BEGIN OF ty_header,
    text(100) TYPE c,
    END OF ty_header.
    DATA: c_fnh_mask type dxfields-filemask value '.',
    search_dir type dxfields-longpath value '/sapglobal/users'.
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    Internal tables *
    DATA: gt_header TYPE STANDARD TABLE OF ty_header,
    gt_fieldcat TYPE lvc_t_fcat.
    Work areas *
    DATA: gs_header TYPE ty_header,
    gs_fieldcat TYPE lvc_s_fcat.
    DATA: wa_filename TYPE string.
    DATA: wa_count(2) TYPE N,
    wa_start(3) TYPE N,
    wa_end(3) TYPE N,
    wa_len(3) TYPE N.
    DATA: wa_data(12000) TYPE c,
    wa_off TYPE I,
    itab_appl TYPE REF TO DATA,
    itab_line TYPE REF TO DATA,
    col(2) TYPE c.
    DATA: wa_field(30) TYPE c.
    DATA: lv_index TYPE sy-tabix.
    DATA: gs_adrp type adrp,
    gs_usr02 type usr02,
    gs_usr21 type usr21,
    gs_char50(50).
    CONSTANTS: co_slash(1) value '/'.
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
    <wa>,
    <fs_line>,
    <wa_line>.
    SELECTION SCREEN *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-f01.
    PARAMETERS: pa_appl LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE text-f02.
    PARAMETERS: pa_pres LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE text-f03.
    PARAMETERS: pa_del LIKE rlgrap-filename .
    PARAMETERS: pa_deld AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE text-f04.
    PARAMETERS: pa_len(3) TYPE c.
    SELECTION-SCREEN END OF BLOCK B4.
    *& Include ZDOWNLOADFILE_FORM *
    *& Form f4_dxfilename
    text
    -->P_pa_appl text
    form f4_dxfilename using p_file.
    DATA: wa_file LIKE dxfields-longpath.
    CLEAR: wa_file.
    call function 'F4_DXFILENAME_TOPRECURSION'
    exporting
    i_location_flag = 'A'
    i_server = ' '
    i_path = search_dir
    filemask = c_fnh_mask
    fileoperation = 'R'
    importing
    o_path = wa_file
    exceptions
    rfc_error = 1
    error_with_gui = 2
    others = 3
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    else.
    p_file = wa_file.
    endif.
    endform. " f4_dxfilename
    *& Form f4_filename
    text
    -->P_pa_pres text
    form f4_filename using p_data.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    IMPORTING
    FILE_NAME = p_data
    endform. " f4_filename
    *& Form check_file_exists
    text
    -->P_pa_appl text
    form check_file_exists using p_file.
    DATA: wa_file LIKE rlgrap-filename.
    wa_file = p_file.
    OPEN DATASET wa_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc = 8.
    MESSAGE E714
    WITH text-m01 p_file text-m02.
    ELSE.
    CLOSE DATASET p_file.
    ENDIF.
    endform. " check_file_exists
    *& Form build_header
    text
    --> p1 text
    <-- p2 text
    form build_header .
    *Select user details
    clear gs_usr21-persnumber.
    select single persnumber
    into (gs_usr21-persnumber)
    from usr21
    where bname = sy-uname.
    concatenate sy-uname
    co_slash
    gs_adrp-name_text(36)
    co_slash
    into gs_char50.
    condense gs_char50.
    clear gs_usr02-class.
    select single class
    into (gs_usr02-class)
    from usr02
    where bname = sy-uname.
    concatenate gs_char50
    gs_usr02-class
    into gs_char50.
    condense gs_char50.
    Write report technical name
    write 'Name: ' TO gs_header+0(10).
    gs_header+11(*) = sy-repid.
    APPEND gs_header TO gt_header.
    CLEAR: gs_header.
    Write user data
    write 'User: ' TO gs_header+0(10).
    gs_header+11(*) = gs_char50.
    CONCATENATE gs_header gs_char50 INTO
    gs_header SEPARATED BY SPACE.
    APPEND gs_header TO gt_header.
    CLEAR: gs_header.
    Write System data
    write 'System: ' TO gs_header+0(10).
    write: sy-sysid to gs_header+11(3).
    write: co_slash to gs_header+14(1).
    write: sy-mandt to gs_header+15(3).
    APPEND gs_header TO gt_header.
    CLEAR: gs_header.
    Write System date and time
    write 'System: ' TO gs_header+0(10).
    write sy-datum to gs_header+11(10).
    write sy-uzeit to gs_header+22(8).
    APPEND gs_header TO gt_header.
    CLEAR: gs_header.
    Write Local date and time
    write 'Local: ' TO gs_header+0(10).
    write sy-datlo to gs_header+11(10).
    write sy-timlo to gs_header+22(8).
    APPEND gs_header TO gt_header.
    CLEAR: gs_header.
    APPEND gs_header TO gt_header.
    endform. " build_header
    *& Form determine_fields
    text
    --> p1 text
    <-- p2 text
    form determine_fields .
    DATA: wa_data(600) TYPE c.
    CLEAR: wa_count,wa_start,wa_end,wa_data.
    wa_start = 0.
    wa_end = 1.
    OPEN DATASET pa_appl FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    READ DATASET pa_appl INTO wa_data.
    wa_len = STRLEN( wa_data ).
    DO wa_len TIMES.
    IF wa_data+wa_start(wa_end) EQ
    cl_abap_char_utilities=>horizontal_tab.
    wa_count = wa_count + 1.
    ENDIF.
    wa_start = wa_start + 1.
    ENDDO.
    CLOSE DATASET pa_appl.
    wa_count = wa_count + 1.
    endform. " determine_fields
    *& Form build_itab
    text
    --> p1 text
    <-- p2 text
    form build_itab .
    DATA: wa_len(4) TYPE c.
    CLEAR: wa_len.
    IF pa_len IS INITIAL.
    wa_len = 40.
    ELSE.
    wa_len = pa_len.
    ENDIF.
    col = 1.
    DO wa_count TIMES.
    CONCATENATE 'FIELD' col INTO wa_field.
    gs_fieldcat-fieldname = wa_field.
    gs_fieldcat-outputlen = wa_len.
    gs_fieldcat-datatype = 'CHAR'.
    gs_fieldcat-col_pos = col.
    col = col + 1.
    APPEND gs_fieldcat TO gt_fieldcat.
    CLEAR: wa_field.
    ENDDO.
    *Create the internal table dynamically based on the file structure,
    *this table will be used to download data through GUI_DOWNLOAD fm
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = gt_fieldcat
    IMPORTING
    EP_TABLE = itab_appl
    *Assign the pointer to the field symbol
    ASSIGN itab_appl->* TO <itab>.
    CREATE DATA itab_line LIKE LINE OF <itab>.
    *Create a work area for the dynamic internal table
    ASSIGN itab_line->* TO <wa_line>.
    col = 1.
    OPEN DATASET pa_appl FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    DO.
    READ DATASET pa_appl INTO wa_data.
    IF sy-subrc <> 0.
    CLOSE DATASET pa_appl.
    RETURN.
    ELSE.
    wa_start = 0.
    lv_index = 1.
    DO wa_count TIMES.
    ASSIGN COMPONENT lv_index OF STRUCTURE <wa_line> TO <fs_line>.
    FIND cl_abap_char_utilities=>horizontal_tab
    IN wa_data+wa_start(*) MATCH OFFSET wa_off.
    IF sy-subrc = 0.
    IF wa_off NE 0.
    <fs_line> = wa_data+wa_start(wa_off).
    ENDIF.
    wa_start = wa_start + wa_off + 1.
    lv_index = lv_index + 1.
    ELSE.
    <fs_line> = wa_data+wa_start(*).
    ENDIF.
    ENDDO.
    APPEND <wa_line> TO <itab>.
    CLEAR: <wa_line>,<fs_line>.
    ENDIF.
    ENDDO.
    endform. " build_itab
    *& Form download_data
    text
    --> p1 text
    <-- p2 text
    form download_data .
    clear: wa_filename.
    wa_filename = pa_pres.
    call function 'GUI_DOWNLOAD'
    exporting
    filename = wa_filename
    filetype = 'DAT'
    tables
    data_tab = gt_header
    exceptions
    access_denied = 15
    call function 'GUI_DOWNLOAD'
    exporting
    filename = wa_filename
    filetype = 'DAT'
    append = 'X'
    tables
    data_tab = <itab>
    exceptions
    access_denied = 15
    endform. " download_data
    *& Form initialization
    text
    --> p1 text
    <-- p2 text
    form initialization .
    REFRESH: gt_header,gt_fieldcat,gt_header.
    endform. " initialization
    *& Form delete_files
    text
    --> p1 text
    <-- p2 text
    form delete_files .
    IF pa_deld EQ 'X'.
    DELETE DATASET pa_appl.
    ENDIF.
    IF pa_del IS NOT INITIAL.
    DELETE DATASET pa_del.
    ENDIF.
    endform. " delete_files
    <b>reward points if helpful.</b>
    thanks
    vijay

  • How to exreact multiple pdf files from a zip files from application server to presentation server

    Hello exprts,
    I am passing one pdf file and one text file to zip file in apllication server through my custom program and then downloading it using standard function module to my desktop. its working fine. Then I added  another pdf file to my zip file. But only single pdf file is getting download . So can you please help me regardiong this issue? 

    Dear Experts ,
    I finded out the way to extrcat pdf files in presentation server. But now my problem is that I am not able to add multiple pdf files in a zip file. When I am adding new pdf file then older one is not coming in read data set. So please kindly tell me how can I add multiple pdf file in my zip file and again I can get all the pdf files from here.

  • How to download a file from application server to presentation server

    Hi experts,
    I want to download a file from application server to presentaion server, file contaims three fields customer name, customer email id and status..
    help me out i m new into sap.

    Dear Aditya,
    Please check below thread
    http://scn.sap.com/thread/1010164
    it will help you.
    BR
    Atul

  • LDAP Bind Failure: Can't contact LDAP server in Presentation Server

    I have configured LDAP configuration in the RPD and am able to connect to the LDAP from the BI server. Its returning the information i need when i test through the admin tool. But when i try to log in from the PS using the same network id and password, it gives me the below error:
    State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused. [53003] LDAP bind failure: Can't contact LDAP server. (08004).
    I know for sure, the network connectivity is working as i get my results back from the BI Server. Please advise, if i need to change other configurations on the Presentation end. As my network folks have run out of ideas. Thx!

    user9125812 wrote:
    Yes, i am pinging from OBIEE Server through the RPD and i am successful.Pinging the OBIEE Server through the RPD? Ping is a DOS command, how can oyu "ping through the RPD".
    Can you go to the server, open a CMD windows and do "ping nsldap.companyname.com" and see if it works. If it works it could be that the LDAP port is blocked by a firewall or OBIEE is not able to make a connection. Make sure you are using the correct port as well. Install an LDAP client in your OBIEE Server and test that you can connect to your LDAP server from your OBIEE Server, not from the RPD. You can use this:
    http://jxplorer.org/

  • Folder list presentation server

    Hi,
    I want to display help  for directory list in presentation server.
    User can select the directory where they want to store data.
    If they entered a directory then how to check existence of that directory in presentation server.
    1) FM to diaplay and select list of directories in presentation server
    2) How to check given directory exist in presentation server or not.
    Thanks,
    Balamurugan.R

    Hi Bala,
    Use the function module F4_FILENAME.
    CALL FUNCTION 'F4_FILENAME'
    * EXPORTING
    *   PROGRAM_NAME        = SYST-CPROG
    *   DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
    IMPORTING
       file_name           = file_path.
    Declare file_path  of TYPE ibipparms-path.
    Check this link for sample code.
    http://www.sap-img.com/abap/using-function-modules-f4-filename.htm
    Hope this helps you.
    regards,
    Chandra Sekhar

  • Regarding SavIng of reports output into appl. or presentation server

    Hello Everyone I am working on ALE IDoc I am getting my output in forms of XML. I want to save my reports output directly to presentation server or application server (i have neither any flat file on desktop nor any file on application server).
    I have following codes which convert my Idoc into XML:
    *& Report ZIDOC_XML_CONVERSION
    report ZIDOC_XML_CONVERSION.
    types: TRESLIN(4096) type X,
    TRESTAB type standard table of TRESLIN.
    data: RESSTR type ref to IF_IXML_OSTREAM.
    data: RESTAB type TRESTAB.
    data: XSLTP type ref to CL_XSLT_PROCESSOR.
    data: G_IXML type ref to IF_IXML,
    G_STREAM_FACTORY type ref to IF_IXML_STREAM_FACTORY,
    DIR type STRING.
    data: IDOC type ref to CL_IDOC_XML1.
    data: PROGNAME type CXSLTDESC.
    data: STR type STRING.
    data: XSTR type XSTRING.
    data: RESSIZE type I.
    data: ID type EDI_STYLE.
    data GLOBAL_DOCNUM type EDI_DOCNUM.
    data GLOBAL_STYLEID type EDI_STYLE.
    data: GLOBAL_OK_CODE(30).
    data: HTML_CONTROL type ref to CL_GUI_HTML_VIEWER.
    data: FCODE_WA(30).
    data: FCODE_TAB type standard table of CHAR30.
    data: MS_DEFAULT_STYLE type EDI_STYLE.
    data: SAP_DEFAULT_STYLE type EDI_STYLE.
    data: SAP_TEXT_STYLE type EDI_STYLE.
    data: SAP_CONTEXT_STYLE type EDI_STYLE.
    data: TEXT_MS_DEFAULT_STYLE(30).
    data: TEXT_SAP_DEFAULT_STYLE(30).
    data: TEXT_SAP_TEXT_STYLE(30).
    data: TEXT_SAP_CONTEXT_STYLE(30).
    data ACTION like SY-UCOMM.
    parameters: IDOCNUM like EDIDC-DOCNUM,
    IDSTYLE type EDI_STYLE,
    ACTIONS type EDI_STFLAG.
    class CL_IXML definition load.
    class CL_ABAP_CHAR_UTILITIES definition load.
    class CL_GUI_FRONTEND_SERVICES definition load.
    class CL_GUI_HTML_VIEWER definition load.
    data: CONTAINER type ref to CL_GUI_CUSTOM_CONTAINER.
    data: REPID like SY-REPID, DYNNR like SY-DYNNR.
    data: WA_OBJ_LOCATION type IDOCSTYLE.
    data: LOCAL_XSLID type EDI_STYLE.
    data: BASE_URL(30).
    data: DATA_TABLE type TAB_RAW512.
    data: LEN type I.
    data: UI_FLAG type I.
    data: MYEVENT_TAB type CNTL_SIMPLE_EVENTS,
    MYEVENT type CNTL_SIMPLE_EVENT.
    data: LOCAL_STYLEID type EDI_STYLE.
    data: PARENT type ref to CL_GUI_CONTAINER.
    data: LINE type I.
    data: WA_SRC type STRUCT_SRC.
    data: LOCAL_EDIDC type EDIDC.
    data: TAB_OBJ_LOCATION type standard table of IDOCSTYLE .
    data: GEN_EX type ref to CX_XSLT_EXCEPTION.
    data: SRCSTR type ref to IF_IXML_ISTREAM.
    *load-of-program.
    try.
    create object XSLTP.
    catch CX_XSLT_EXCEPTION.
    write / TEXT-E01. exit. " XSLT not supported
    endtry.
    G_IXML = CL_IXML=>CREATE( ).
    G_STREAM_FACTORY = G_IXML->CREATE_STREAM_FACTORY( ).
    DIR = ''.
    call method CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
    changing
    TEMP_DIR = DIR.
    *start-of-selection.
    GLOBAL_DOCNUM = IDOCNUM.
    GLOBAL_STYLEID = IDSTYLE.
    get parameter id 'IDOC_STYLEID' field GLOBAL_STYLEID.
    if GLOBAL_STYLEID is initial.
    GLOBAL_STYLEID = 'IE5'.
    endif.
    clear FCODE_TAB.
    clear GLOBAL_OK_CODE.
    clear ACTION.
    we only support action "deletemark" + "closeproce"
    if ACTIONS ' X X '.
    FCODE_WA = 'DELM'.
    append FCODE_WA to FCODE_TAB.
    FCODE_WA = 'CLPR'.
    append FCODE_WA to FCODE_TAB.
    endif.
    Create Object and create IDOC_XML
    create object IDOC
    exporting
    DOCNUM = IDOCNUM
    exceptions
    ERROR_LOADING_IDOC = 1
    ERROR_BUILDING_XML = 2
    others = 3.
    if SY-SUBRC 0.
    message id SY-MSGID type 'E' number SY-MSGNO
    with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
    raising NO_IDOC_XML_LOADED.
    endif.
    Determine transformation program.
    clear TAB_OBJ_LOCATION.
    select * from IDOCSTYLE into table TAB_OBJ_LOCATION
    where ( STYLEID = GLOBAL_STYLEID or STYLEID = '' )
    and ( MESTYP = LOCAL_EDIDC-MESTYP or MESTYP = '')
    and ( DIRECT = LOCAL_EDIDC-DIRECT or DIRECT = '')
    and OBJNR = 0.
    describe table TAB_OBJ_LOCATION lines LINE.
    if LINE > 0.
    loop at TAB_OBJ_LOCATION into WA_OBJ_LOCATION.
    move WA_OBJ_LOCATION-URL to PROGNAME.
    clear WA_OBJ_LOCATION.
    exit.
    endloop.
    else.
    message E110(IDOC_XML1) with LOCAL_XSLID WA_OBJ_LOCATION-URL
    raising ERROR_LOADING_OBJECT.
    endif.
    Transformation
    call method IDOC->GET_XMLDATA_AS_STRING
    importing
    DATA_STRING = STR.
    RESSTR = G_STREAM_FACTORY->CREATE_OSTREAM_ITABLE( TABLE = RESTAB )
    RUN
    try.
    call transformation (PROGNAME)
    source xml STR
    result xml RESSTR.
    catch CX_XSLT_EXCEPTION into GEN_EX.
    message E110(IDOC_XML1) with LOCAL_XSLID WA_OBJ_LOCATION-URL
    raising ERROR_LOADING_OBJECT.
    exit.
    endtry.
    write : / STR.
    I am getting following output:
    <?xml version="1.0"?><RSREQUST><IDOC BEGIN = "1"><EDI_DC40 SEGMENT="1"><TABNAM><![CDATAEDI_DC40]></TABNAM><M
    i want to save this output on my application server or presentation server, my data is not on presentation server or in application server, its on form of output and i want to save my output directly to application server or presentation server.hope that you people will help me out please reply me for this query.
    Thanks & Regards
    Vimarsh B.

    Hello Subhash,
    Try this
    data: sheet TYPE ole2_object.
    data: lv_file(512) default 'C:tst.xls'.
    * Save excel speadsheet to particular filename
      GET PROPERTY OF h_excel 'ActiveSheet' = sheet.
      CALL METHOD OF sheet 'SaveAs'
        EXPORTING
          #1 = lv_file     "filename
          #2 = 1.                      "fileFormat

  • How presentation server and BI server will communicate

    hi
    i have a question that how the bi server and presentation server will communicate
    Thanks
    Sreedhar

    Hi,
    Refer this link... http://www.ealliancebusinessintelligence.com/obiee_architecture.php
    http://gerardnico.com/wiki/dat/obiee/obiee_overview
    http://gerardnico.com/wiki/dat/obiee/bi_server
    Might be helpful
    Thanks,
    Srikanth

  • Difference between Presentation Server Cache and BI Server Cache

    Hello Experts,
    What is the Diff b/w Presentation Server Cache and BI Server Cache
    Thanks,
    S Gouda

    Hello,
    Okay, what do you want to do about caching at BI server and Presentation server.
    A nQSXXXX.tmp is a temporary cache file which maintained by the BI Server for an analysis request by a user and is kind of shared data between the OBI Server and the OBI Presentation server. This is refereed as the 'Cursor Cache' which could be managed by going thru Administration> Manage Sessions > Clear Cursor Cache.These .tmp files are it is not related to BI Server cache.
    By Default, the BI Server Cache is stored in the and stored as NQSxxxxx.tbl files. [middlware_home]/instances/instance1/bifoundation/OracleBIServerComponent/coreapplication_obis1/cache]
    Caching occurs by default at the subrequest level, which results in multiple cache entries for some SQL statements. Caching subrequests improves performance and the cache hit ratio, especially for queries that combine real-time and historical data.
    Below are some useful links for cache management in OBIEE 11g.
    http://oraclebisolutions.blogspot.com/2013/02/obiee-11g-obi-server-and-presentation.html
    http://drazda.blogspot.com/2012/10/obiee-11g-cache-management.html
    http://allaboutobiee.blogspot.in/2012/03/cache-management-purging-cache.html
    Pls mark itf this helps. Else post the exact questions you have about this post.
    Thanks,
    SVS

  • How to validate a Particular Directory or file path in Presentation server.

    Hi SAP gurus,
    I am having a requirement where I want to download a file into the Presentation server.
    The file path to download will be provided in a parameter.
    What I want to do is to throw a message to the user if He/She provides a wrong Directory or File path.
    For example :
    Say the user is providing the file download path as " E:\test.txt", but there is no "E" drive or such directory in the presentation. So in this case I should be able to check the wrong Directory provided by the user and throw some message to the user saying there is no such Directory present. Please give a proper directory or similar messages.
    I have found a FM: PFL_CHECK_DIRECTORY but i am not able to use it properly.
    So do you have any FM or any method and its explanation to fulfill my requirement .

    Do it this way:
    tables:
      spfli.
    parameters:
      p_file type rlgrap-filename          " File name
                       obligatory.
    Data:
      t_final_data like table of spfli.
    at selection-screen on value-request for p_file.
    call function 'F4_FILENAME'
       exporting
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
         field_name          = ' '
       importing
         file_name           = p_file.
    at selection-screen.
      data:
        lw_file  type string.              " File Path
      lw_file = p_file.
    select * from spfli into table t_final_data.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
         filename                        = lw_file
       tables
         data_tab                        = t_final_data.
    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 sy-subrc <> 0.
        message 'File not found' type 'E'.
      endif.
    With luck,
    Pritam.

Maybe you are looking for

  • Problems with wifi after iOS4 update

    Hi guys well I have an iPhone 3Gs currently running 4.1 but came with 3.1.3. The wifi at home works fine and that is WEP secured the only problem is the schools network. In order to connect through wifi you need to use Manual Proxy Settings with the

  • I made a copy of my iWeb domain file, but now both the copy and original is empty!

    Please help. I am freaking out. I wanted to make a back-up of my domain file. I made a copy, so I could rename it, instead. when I opened it, it is empty! I have just lost two webistes! Is there anything I can do?

  • Restore to new,  is there a way to get contacts only back

    I want to reinstall my os 3.1.3 as my phone has been a bit doggy. I would like to just manually put stuff back on it. Right now I do not sync my contacts as I have a limited amount on my phone as opposed to my computer and I want to keep it that way.

  • Using Photoshop random shut downs/blue screen

    I have a new iMac and moved everything over form my G5. Everything is fine (except for the F12 on the keyboard) but when using Photoshop, 4 times in 3 weeks the machine just shuts off to the blue screen. It only happens when using photoshop, so I'm n

  • HT201363 Email hacking

    Hi just had an email from itunes.regarding my billing information ia out of date and i believe my email address has been hacked as i havent had any changes to my card details or address?anyone else had this problem?is it a spam or a real enquiry?than