Need to save a file on Application server, receiving error.

Hello,
I want to save a file on Application server.
I have data in the final output table gt_out_chng.
I want to write a file in the application server and this is the
code that written,
data : MY_NEW_FILE type file.
        MY_NEW_FILE = '/tmp/test.txt'.
data: gv_output(255) type c,
      P_FILE TYPE rlgrap-filename.
   p_file = 'F:\USR\SAP\PUT'.
CONCATENATE p_file '\' sy-datum sy-uzeit '.txt'
                             INTO p_file.
OPEN DATASET 'P_FILE' IN TEXT MODE FOR OUTPUT
                                  ENCODING DEFAULT.
IF SY-SUBRC = 0.
LOOP AT GT_OUT_CHNG INTO WA_OUTPUT_TAB.
TRANSFER WA_OUTPUT_TAB TO 'P_FILE'.
CLEAR  WA_OUTPUT_TAB.
ENDLOOP.
ENDIF.
CLOSE DATASET 'P_FILE'.
i am receiving an error message as follows :
"WA_OUTPUT_TAB" cannot be a table, a reference,
a string, or contain any of these objects.
Please correct the code if found any errors..
Any suggestions will be apprecaited!
Regards,
Kittu
Edited by: Kittu on May 15, 2009 10:27 AM

Hello,
Instead of using the following,
OPEN DATASET 'P_FILE' IN TEXT MODE FOR OUTPUT ENCODING DEFAULT.
use this,
OPEN DATASET P_FILE IN TEXT MODE FOR OUTPUT ENCODING DEFAULT.
P_FILE is your variable, do not put it in quotes
Edit: The same thing applies for your transfer and close statements
Edited by: Kris Donald on May 15, 2009 2:05 PM

Similar Messages

  • How to save CSV file in application server while making infospoke

    How to save CSV file in application server to be used as destination while making infospoke.
    Please give the steps.........

    Hi
    If you want to load your flatfile from Application server,then you need to trasfer your file from your desktop(Computer) to Application server by using FTP.
    Try using ARCHIVFILE_CLIENT_TO_SERVER Function module.
    You Just need to give thesource path and the target path
    goto SE37 t-code , which is Function module screen, give the function name ARCHIVFILE_CLIENT_TO_SERVER, on click F8 Execute button.
    for path variable give the file path where it resides like C:\users\xxx\desktop\test.csv
    for target path give the directory path on Application server: /data/bi_data
    remember the directory in Server starts with /.
    U have to where to place the file.
    Otherwise use 3rd party tools to connect to ur appl server like : Core FTP and Absolute FTP in google.
    Otherwise...
    Goto the T.code AL11. From there, you can find the directories available in the Application Server.
    For example, if you wanna save the file in the directory "DIR_HOME", then you can find the path of the directories in the nearby column. With the help of this, you can specify the target path. Specify the target path with directory name followed by the filename with .CSV extension.
    Hope this helps
    regards
    gaurav

  • Problem opening file in application server received by FTP.

    Hi,
    I am using FTP_COPY to receive file in application server.
    I am receiving file from FTP but I am unable to open them because the mode was set as 640 as in attributes.
    Could you please help me in how to receive in readable format...
    Any suggestions to use FTP commands?
    Thanks in advance.

    If you do not have authorizations to open the file its easy: there is nothing you can do except contact the ftp admin.

  • Need a List of Files on Application Server WITH "Last Changed Date".

    Experts:
    I'm currently using FM 'SUBST_GET_FILE_LIST' but it does not return the date which I need because I'm working on something that needs to build an internal table of the files on the server with the oldest file on top (which means I need to sort by the date).
    I've searched this forum and there's several existing posts with different function modules and I've tried several but they either display an ALV grid or they do return an itab but it doesn't have the date.
    Please help and thank you!

    You can try:
    data: begin of tabl occurs 0,          "execute command on server
            line(200),
          end of tabl.
    call 'SYSTEM' id 'COMMAND' field com
                    id 'TAB'     field tabl-*sys*.
    where com is something like 'ls -al'.
    Rob

  • Urgent.... Help Needed for Storing file in Application Server

    Hi All,
    I have a requirement where in I have to save a file in Application Server.
    File is of 141 Character Length, so there can be spaces left at the end.
    When I am downloading the file into Application Sever and then downloading the same file from Application Server to Presentation into a notepad then the spaces at the end are truncating.
    I want that the file that is generated should be of 141 character though if there may be spaces at the end.
    It will be great if you can help me out in this.
    Thanks in Advance.
    Jayant Sahu.

    when downloading to App server, you need to specify the LENGTH option on your TRANSFER ststement to keep fixed length.  You must also use a STRING type variable in your transfer.
    From Documentation on Transfer command:
    <b>If the file was opened as a text file or a legacy text file, the trailing blank characters are deleted for all data objects, except for those of data type string. The line end marker defined when the file was opened is then added to the remaining content of the data object or to the result of the conversion, and the final result is written byte-by-byte to the file.</b>
    There also used to be a problem with WS_DOWNLOAD - you had to do the following:
    Maintaining Trailing spaces when downloading to PC
    Before calling DOWNLOAD or WS_DOWNLOAD, do a perform SET_TRAIL_BLANKS(saplgrap) using 'X'
    To set the length of each record including your blanks add this code: perform SET_FIXLEN(saplgrap) using '0' '100'
    Don't think this is needed any more.
    Andrew

  • Download more than 3 files on application server

    Hello Experts,
    I have created a report which has records more than 65000 as the excel sheet takes records only upto 65k .
    Since iI need to save the file on apll server I need to create more than 1 file say 4 files from one report.
    Can anyone help me out on this.
    Thanks & Regards,
    Nikhil.

    I've created FM for downloading on application server. This is simple version of FM. It have some messages in message class ZAM_TXT_FILES.
    *"*"Local interface:
    *"  IMPORTING
    *"     VALUE(I_FILENAME) TYPE  STRING
    *"  TABLES
    *"      DATA_TAB
    *"  EXCEPTIONS
    *"      FILE_WRITE_ERROR
    *"      UNKNOWN_ERROR
    *"      ACCESS_DENIED
    *"      DISK_FULL
    *"      FILE_NOT_FOUND
    *"      WRONG_PARAMETER
    *"      CONVERSION_ERROR
    *"      ERROR_OPEN_FILE
      DATA:
            ls_mess           TYPE STRING.
      TRY.
        OPEN DATASET I_FILENAME FOR OUTPUT IN BINARY MODE MESSAGE ls_mess.
        LOOP AT DATA_TAB.
            TRANSFER DATA_TAB TO I_FILENAME.
        ENDLOOP.
        CATCH CX_SY_FILE_OPEN. " The file is already open
          PERFORM close_dataset USING I_FILENAME.
          MESSAGE ID 'ZAM_TXT_FILES' TYPE 'E' NUMBER '001' RAISING FILE_WRITE_ERROR.
        CATCH CX_SY_CODEPAGE_CONVERTER_INIT. " The required conversion is not supported
          PERFORM close_dataset USING I_FILENAME.
          MESSAGE ID 'FES' TYPE 'E' NUMBER '024' RAISING CONVERSION_ERROR.
        CATCH CX_SY_CONVERSION_CODEPAGE. " Internal conversion error
          PERFORM close_dataset USING I_FILENAME.
          MESSAGE ID 'FES' TYPE 'E' NUMBER '026' RAISING CONVERSION_ERROR.
        CATCH CX_SY_FILE_AUTHORITY. " No authorization to access a file
          PERFORM close_dataset USING I_FILENAME.
          MESSAGE ID 'FES' TYPE 'E' NUMBER '012' RAISING ACCESS_DENIED.
          CATCH CX_SY_FILE_IO. "An error occurred when writing to the file.
            PERFORM close_dataset USING FILENAME.
            MESSAGE ID 'FES' TYPE 'E' NUMBER '016' RAISING FILE_WRITE_ERROR.
        CATCH CX_SY_PIPES_NOT_SUPPORTED. " OPEN DATASET with addition FILTER is not supported on the current operating system
          PERFORM close_dataset USING I_FILENAME.
          MESSAGE ID 'ZAM_TXT_FILES' TYPE 'E' NUMBER '002' RAISING UNKNOWN_ERROR.
        CATCH CX_SY_TOO_MANY_FILES. " The maximum number of open files has been exceeded
          PERFORM close_dataset USING I_FILENAME.
          MESSAGE ID 'ZAM_TXT_FILES' TYPE 'E' NUMBER '003' RAISING UNKNOWN_ERROR.
        CATCH CX_ROOT.            " Unknown error
          PERFORM close_dataset USING I_FILENAME.
          MESSAGE ID 'FES' TYPE 'E' NUMBER '006' RAISING UNKNOWN_ERROR.
      ENDTRY.
      IF SY-SUBRC  0.
        PERFORM close_dataset USING I_FILENAME.
        MESSAGE ID 'ZAM_TXT_FILES' TYPE 'E' NUMBER '000' WITH ls_mess RAISING FILE_WRITE_ERROR.
      ENDIF.
    PERFORM close_dataset USING I_FILENAME.
    FORM close_dataset  USING    U_FILENAME.
      TRY.
          CLOSE DATASET U_FILENAME.
        CATCH CX_SY_FILE_CLOSE. " No memory space on storage medium
          MESSAGE ID 'FES' TYPE 'E' NUMBER '014' RAISING DISK_FULL.
        CATCH CX_ROOT.            " Unknown error
          MESSAGE ID 'FES' TYPE 'E' NUMBER '006' RAISING UNKNOWN_ERROR.
      ENDTRY.
    ENDFORM.                    " close_dataset
    I have slightly more complex FM. But this also must work.

  • File from application server-- Email ?

    Hi,
    I need to pickup a file from application server and Email the same to the intended receipents through ABAP program
    For that i had used the following code:
    REPORT  ZEMAIL_APP_SER_FAIL.
    DATA :is_doc_chng        TYPE sodocchgi1,
          it_objtxt          TYPE STANDARD TABLE OF solisti1,
          is_objtxt          TYPE solisti1,
          it_objpack         TYPE STANDARD TABLE OF sopcklsti1,
          is_objpack         TYPE sopcklsti1,
          it_objbin          TYPE STANDARD TABLE OF solisti1,
          is_objbin          TYPE solisti1,
          it_reclist         TYPE STANDARD TABLE OF somlreci1,
          is_reclist         TYPE somlreci1,
          w_lines_tx         TYPE i.
    ** Create Message Body
    **   Title and Description
    *is_doc_chng-obj_name  = 'MAIL'.
    is_doc_chng-obj_descr = 'Auto genareted Mail from Application server'.
    ** main text
    is_objtxt-line = 'This is an automatically generated mail. Please do not reply  to it.'(028).
    APPEND is_objtxt TO it_objtxt.
    is_objtxt-line = space.
    APPEND is_objtxt TO it_objtxt.
    *   write packing list (main)
    DESCRIBE TABLE it_objtxt LINES w_lines_tx.
    READ     TABLE it_objtxt INTO is_objtxt INDEX w_lines_tx.
    is_doc_chng-doc_size = ( w_lines_tx - 1 ) * 255 + STRLEN( is_objtxt ).
    CLEAR is_objpack-transf_bin.
    is_objpack-head_start = 1.
    is_objpack-head_num   = 0.
    is_objpack-body_start = 1.
    is_objpack-body_num   = w_lines_tx.
    is_objpack-doc_type   = 'CVS'.
    is_objpack-OBJ_NAME   = 'GIND_EXP'.
    is_objpack-Obj_langu  = 'E'.
    APPEND is_objpack TO it_objpack.
    is_reclist-receiver = 'XXX'@'YYY'.COM'.
    is_reclist-rec_type = 'A'.
    Break-point.
    *is_reclist-REC_ID   =  'XXX@YYY'.COM'.
    APPEND is_reclist TO it_reclist.
    CLEAR is_reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
       document_data              = is_doc_chng
       put_in_outbox              = 'X'
       commit_work                = 'X'
    TABLES
       packing_list               = it_objpack
       contents_txt               = it_objtxt
       receivers                  = it_reclist
    EXCEPTIONS
       too_many_receivers         = 1
       document_not_sent          = 2
       document_type_not_exist    = 3
       operation_no_authorization = 4
       parameter_error            = 5
       x_error                    = 6
       enqueue_error              = 7
       OTHERS                     = 8.
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    when i execute this program:
    I get the following error msg:
    Activation setting not yet maintained
    May i know what is the problem?

    If you are sending an email, the receiver type should be U (internet mail address type). From your code it appears that you have input it as 'A'. I am not sure if the error message is related to this. Have you checked in transaction SOST, whether an email has been triggered from your program? At what point of execution is this error message triggered?

  • How to copy a file from application server to local system

    Guys,
    Need to copy a file from application server to local system.Is there an FM for the same.
    Tried searching for it but couldn't find anything useful.
    Code snippets will be highly appreciated.
    Warm Regards,
    P.
    Moderator message: very frequently asked and answered question, obviously you did not search thoroughly, all points removed.
    Edited by: Thomas Zloch on Dec 3, 2010 4:48 PM

    hi,
    You can use the transactions CG3Y or through program u can do like this..
    DATA: BEGIN OF IT_FILE OCCURS 0,
                    LINE TYPE STRING,
               END OF IT_FILE.
    OPEN DATASET <file_name>  FOR INPUT IN TEXT MODE ENCODING DEFAULT.
            IF SY-SUBRC IS INITIAL.
              DO.
                READ DATASET<file_name> INTO IT_FILE-LINE.
                IF SY-SUBRC = 0.
                  APPEND IT_FILE.
                  CLEAR IT_FILE.
                ELSE.
                  EXIT.
                ENDIF.
              ENDDO.
            ENDIF.
    CLOSE DATASET <file_name>.
    Download it to local system using  FM - GUI_DOWNLOAD

  • Function module to read xml files from application server

    Hi experts,
            I need to read  xml files from application server to sap. Is the any siutable function moldule for that?

    Hi Cenosure,
    Donno about FM which will upload data directly to SAP, I think you have to do some mapping for it so that it will suit the SAP format. Again it depends on your requirement..
    Please elaborate more about your requirement.
    Please have a look on below FM
    TEXT_CONVERT_XML_TO_SAP
    Also search on SCN there are many threads on the same topic available.
    http://abapreports.blogspot.com/2008/09/upload-xml-file-from-application-server.html
    This is the link which will give you the Code
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
    Use this XML file to Upload the same, this Program will work for your XML file also,
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/input_xml.xml
    See the below thread also
    Upload XML to internal table and vice versa in SAP 4.6C
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Downloading internal table in excel file on application server

    Hi,
        I am trying to download ITAB into excel file on my application server . I am using FM 'SAP_CONVERT_TO_XLS_FORMAT' for that .
        When I run the report I can see file getting generated on APP server but no ITAB data is saved in that excel.
        After debugging I found that error code  'SAVE_DOCUMENT_FAILED'  is retuned in above FM.
        Could any one please suggest how to go about this?
    Regards,
    Ganesh

    Hi ganesh,
    Please have a look into the below link
    [Link1|How to Upload Excel file to Application Server]
    [Link2|Error in Downloading the Text file on Application Server]
    Hope this will be Helpful
    Thanks
    Kalyan

  • Need a pipe delimiter after every field in the file on application server

    Hi ,
    i have to transport data in internal table to a file on application server.
    I have done this successfully. But the problem is i have to put a pipe
    delimiter after every field in the file on application server.
    Could yoe plz help in  this issue.
    Thanks & Regards
    Suresh kumar D

    Hi Should,
              I think the below code should solve your problem as i also had  a similar type of requirement and this was the code i had used in my program.
      FIELD-SYMBOLS: <FS> TYPE ANY.
      DATA: L_FLINE TYPE STRING.
    Open file for output
      M_CHECK_SELSCR_FNMS O1 O.
      LOOP AT I_TARGET.
    Write records to file
        DO.
          ASSIGN COMPONENT SY-INDEX OF STRUCTURE I_TARGET TO <FS>.
          IF SY-SUBRC EQ 0.
            IF SY-INDEX EQ 1.
              MOVE <FS> TO L_FLINE.
            ELSEIF <FS> NE C_PIPE.
              CONCATENATE L_FLINE C_PIPE <FS> INTO L_FLINE.
            ELSE.
              CONCATENATE L_FLINE <FS> INTO L_FLINE.
            ENDIF.
          ELSE.
            TRANSFER L_FLINE TO W_SRVR_NM_O_O1.
            EXIT.
          ENDIF.
        ENDDO.
      ENDLOOP.
    Close file
      CLOSE DATASET W_SRVR_NM_O_O1.
      IF SY-SUBRC EQ 0.
        MESSAGE S208(00) WITH TEXT-M02.
      ENDIF.
    Regards
    Sikha

  • To access pdf files from application server using web.show_document

    Hello!
    If my pdf file is copied in Oracle_home/forms90/java directory.Then using web.show_document i can access the pdf file.But I can't copy all the pdf files in /forms90/java directory.We have lacs of pdf files which I want to keep in my own directory.But my requirement is if my pdf file is in /home2/docs directory in (Linux application server) ie in my own directory where I store all the pdf files.Then web.show_document does not open the pdf file.It says page cannot be displayed.For that I think we have to configure the directory /home2/docs directory as a webserver.From otn I got something like forms90.conf file in application server where we have to set virtual directory mapping etc.If the pdf is in local machine then in orion-web.xml file we have to mention real path and save the file and shutdown oc4j instance and restart it again.I tried it.But it is not working.Can u give me step by step instructions to solve this problem.I found a few links in discussion forum.But is doesn't work out.My pdf file is in /home2/docs directory in Linux application server.Please treat it as urgent.
    Regards
    Jayashree

    Hi Sandeepmsandy,
    There is no available code sample for this scenario. You may write your own.
    Step 1: Get pdf URL from sqlite database. Please refer to the following MSDN blog and see a code sample.
    http://blogs.msdn.com/b/robertgreen/archive/2012/11/13/using-sqlite-in-windows-store-apps.aspx. Note, you need to retarget the project to 8.1 and then get two sqlite packages from NuGet before building this sample.
    Step 2: Use some special classes to get file from serer.
    HttpWebRequest can help download small pdf files. For more information to see
    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/de96a61c-e089-4595-8349-612be5d23ee6/download-file-with-httpwebrequest?forum=winappswithcsharp. It’s easy for use, but if you want to download the larger or many files, it’s recommend to use
    BackgroundTransfer namespace. The classes in this namespace provide a power way to transfer files in the background. See a code sample from MSND.
    https://code.msdn.microsoft.com/windowsapps/Background-Transfer-Sample-d7833f61.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • File from Application server into BW

    Hi All,
    I have a urgent requirement and I do not know much of ABAP
    The requirement is
    selecting existing file from application server Dynamically in BW server. This will be done by writing an ABAP code at the InfoPackage level in the External Data Tab but I am in need some ABAP code for the same
    Also let me know which table stores AL11 files
    I know USER_DIR stores directories but I required the table for the files within the directories.
    Any help is appreciated

    Hi DPN,
    If we have a condition like depending on System Date we have to get a file some thing like that then we can do that by using the ABAP Routine. But in your Scenario there are no specific conditions to select a file.
    If we have some variable which stores the value which we give and gets the specified file... That Would be Great.
    But in Routine we can not use Variables..(As Far As I Know)
    So better Select manually every time...
    Hope This Helps.
    Regards,
    rik.

  • File from application server

    Hi Guys,
    I want to pick file from application server as an attachment and send as mail.
    Thanks

    *This program will allowed you to send email with attachment.
    First, specify the attachment file from your local hardisk and execute.
    Next, specify the sender email address and click the send button.
    report z_mail.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara like selc occurs 0 with header line.
    data g_objparb like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
    text(4096) type c,
    end of g_files.
    data : fold_number(12) type c,
    fold_yr(2) type c,
    fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
    user = g_user
    PREPARE_FOR_FOLDER_ACCESS = ' '
    importing
    user_data = g_user_data
    EXCEPTIONS
    USER_NOT_EXIST = 1
    PARAMETER_ERROR = 2
    X_ERROR = 3
    OTHERS = 4
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number = g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
    g_objhead,
    g_objpara,
    g_objparb,
    g_receipients,
    g_attachments,
    g_references,
    g_files.
    method1 = 'SAVE'.
    g_document-foltp = fold_type.
    g_document-folyr = fold_yr.
    g_document-folno = fold_number.
    g_document-objtp = g_user_data-object_typ.
    *g_document-OBJYR = '27'.
    *g_document-OBJNO = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes = 'sap-img.com testing by program'.
    g_document-folrg = 'O'.
    *g_document-okcode = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes = 'sap-img.com testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = sy-uname
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    FOLMEM_DATA =
    RECEIVE_DATA =
    File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header.
    *-- End of Program

  • Delete files from APPLICATION SERVER?

    Hi All,
    I am creating the files in application server with folder name as
    /interface/freeway/ and filename as PO concatenating with sy-datum and sy-uzeit.
    Ex file name now is /interface/freeway/PO20081201064120.csv
    Now my req is i need to delete files which has beeen created less than 30 days.
    regards,
    Sachin.

    hi,,,,,,
    REPORT ZDELETE.
    * Delete a file on the application server.
    PARAMETERS: P_DIR LIKE RLGRAP-FILENAME
    DEFAULT '/usr/sap/trans/',
    P_FILE1 LIKE RLGRAP-FILENAME.
    DATA: P_FILE(128).
    DATA: W_ANS.
    START-OF-SELECTION.
    CONCATENATE P_DIR P_FILE1 INTO P_FILE.
    * check file exists
    OPEN DATASET P_FILE FOR INPUT.
    IF SY-SUBRC NE 0.
    MESSAGE E899(BD) WITH P_FILE 'does not exist'.
    EXIT.
    ELSE.
    CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
    EXPORTING
    DEFAULTOPTION = 'N'
    TEXTLINE1 = P_DIR
    TEXTLINE2 = P_FILE1
    TITEL = 'ARE YOU SURE YOU WANT TO DELETE'
    * START_COLUMN = 25
    * START_ROW = 6
    IMPORTING
    ANSWER = W_ANS
    EXCEPTIONS
    OTHERS = 1.
    ENDIF.
    CLOSE DATASET P_FILE.
    CHECK W_ANS = 'J'.
    * delete
    DELETE DATASET P_FILE.
    IF SY-SUBRC NE 0.
    MESSAGE E899(BD) WITH 'Invalid file name' P_FILE.
    ELSE.
    CLOSE DATASET P_FILE.
    MESSAGE I899(BD) WITH P_DIR P_FILE1 'DELETED'.
    ENDIF.

Maybe you are looking for

  • TS3988 Can I remove a device I no longer have in my possession (but belongs to me) from iCloud

    When I bought my iPhone 4S, I let my husband have my old 3GS to listen to my itunes music on (it's connected on iCloud). Trouble is, we're separated now, and I want to turn off the iCloud on that 3GS because I don't want him to be able to turn on any

  • IDoc Number Range - Transaction Code

    Hello All, Hope you all are doing good. What is the transaction code for IDoc number range maintenance. Please reply. Regards, Vamsi

  • How to evaluate dynamic user defined expression

    Hi All, I am looking for a solution where I can provide a GUI interface to user where one create their expression/formulas to get some results. The description goes like this: Suppose using GUI a user chooses an operator than he can choose it operand

  • Logic Pro Crashing when recording audio

    Hi guys, looking for some wisdom... As of today, every time i try and record new audio in logic pro x as soon as i hit the stop button after the track is performed logic crashes with the following logs: I've tried repairing disk permissions, performi

  • SNMP IN Admin and User Context

    Hi Guys, I have a issue in ACE context , while discovering the each context separately . I have 4 user context and one admin context in HA  mode , when i tried to discover the contexts independently , with the interface vlan ip configured  in my NMS