Triggering ABAP Program upon file drop

Hi Gurus,
I would like to trigger an ABAP program as and when a file is dropped in a drive. Please let me know what is the best way to do this.
Also please let me know how to handle in the program if 2 or more files are dropped at a time.
Appreciate it. thanks.

Hello,
You can create a Z program and schedule a job for the time what you need.
Sample code:
"......... definitions .......
START-OF-SELECTION.
     PERFORM read_files_in_dir_on_server USING p_wfile
                                      CHANGING gt_files.
LOOP AT gt_files INTO gv_filepath.
     gv_progress = sy-tabix / lines( gt_files ).
     PERFORM read_server_file USING gv_filepath
                           CHANGING gt_file_content
                                    gv_filelenght.
     "do what you need here!  
     CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
         percentage = gv_progress
         text       = 'Processing the files'(003).
   ENDLOOP.
*&      Form  READ_FILES_IN_DIR_ON_SERVER
*       Read all files in a directory (server)
*      -->IV_DIR     Directory
*      <--CT_FILES   Files in Directory
FORM read_files_in_dir_on_server  USING     iv_dir     TYPE string
                                   CHANGING ct_files   LIKE gt_files.
   DATA: lv_dir_name TYPE ocs_file-name,
         lt_filelist TYPE STANDARD TABLE OF ocs_file,
         ls_filelist LIKE LINE OF lt_filelist,
         ls_file     LIKE LINE OF ct_files,
         lv_offset   TYPE i,
         lv_dummy    TYPE i,
         lv_error    TYPE boolean.
   lv_dir_name = iv_dir.
   CALL FUNCTION 'OCS_GET_FILE_INFO'
     EXPORTING
       dir_name                  = lv_dir_name
     TABLES
       dir_list                  = lt_filelist
     EXCEPTIONS
       no_authority              = 1
       activity_unknown          = 2
       not_a_directory           = 3
       no_media_in_drive         = 4
       too_many_errors           = 5
       too_many_files            = 6
       bracket_error_in_filename = 7
       no_such_parameter         = 8
       OTHERS                    = 9.
   IF sy-subrc <> 0.
     MESSAGE 'Error on directory selected' TYPE 'E'.
   ENDIF.
   LOOP AT lt_filelist INTO ls_filelist.
     lv_error = abap_false.
          "check a specific prefix
     IF ls_filelist-name(4) NE 'out_'.
       lv_error = abap_true.
     ENDIF.
           "check a specific extension
     FIND '.xml' IN ls_filelist-name MATCH OFFSET lv_offset.
     IF sy-subrc IS NOT INITIAL.
       lv_error = abap_true.
     ENDIF.
          "needs to end with a number (not chars allowed)
     lv_offset = lv_offset - 1.
     TRY .
         lv_dummy = ls_filelist-name+lv_offset(1).
       CATCH cx_root.
         lv_error = abap_true.
     ENDTRY.
          "check if the dir is complete filled (end with \ )
     lv_offset = strlen( iv_dir ) - 1.
     IF iv_dir+lv_offset EQ '\'.
       CONCATENATE iv_dir
                   ls_filelist-name
              INTO ls_file.
     ELSE.
       CONCATENATE iv_dir '\'
                   ls_filelist-name
              INTO ls_file.
     ENDIF.
     IF lv_error NE abap_true.
       APPEND ls_file TO ct_files.
       CLEAR ls_file.
     ENDIF.
   ENDLOOP.
ENDFORM.                    " READ_FILES_IN_DIR_ON_SERVER
*&      Form  READ_SERVER_FILE
*       Read server file
*      -->IV_FILEPATH  text
*      <--CT_FILE_CONTENT  text
*      <--CV_FILELENGHT  text
FORM read_server_file  USING iv_filepath     TYPE string
                     CHANGING ct_file_content TYPE table_of_strings
                              cv_filelenght   TYPE i.
   DATA: lv_content LIKE LINE OF ct_file_content,
         lv_msg     TYPE string.
   REFRESH ct_file_content.
   CLEAR cv_filelenght.
   OPEN DATASET iv_filepath FOR INPUT
                            IN TEXT MODE
                            ENCODING UTF-8
                            MESSAGE lv_msg.
   DO.
     READ DATASET iv_filepath INTO lv_content.
     IF sy-subrc IS NOT INITIAL.
       EXIT.
     ENDIF.
     APPEND lv_content TO ct_file_content.
     gv_filelenght = gv_filelenght + strlen( lv_content ).
   ENDDO.
ENDFORM.                    " READ_SERVER_FILE

Similar Messages

  • Problem in triggering abap program in process chain

    i m running a infopackage in a process chain .
    this infopackage creates the request in the DSO .
    after infopackage i m including the abap program to delete the same request in the process chain .
    but the abap program is not getting triggered .i have maintained the variant correctly for the program in the process chain .
    what can be done so that the program gets triggered .

    Hi,
    You can trigger you ABASP program from
    1. SM64  : copy the ABAP program's Afer event and parambeter and give it there and execute
    2.or go to
    SE37 >>Program : BP_EVENT_RAISE  >> say test execute
    and give the same after event and parameter ..and execute
    this might trigger your program
    Hope this helps you,
    Regrads,
    shikha

  • Transport of ABAP Programs via File

    Hello,
    I want to transport an ABAP-Program into my training-system at home (SneakPreview 2004s).
    Because there is no connection between the systems, I search for a solution via filesystem.
    Thanks
    Armin

    Hello Armin,
    The approach for downloading to a notepad maynot be very be useful The report will have includes,function modules etc... Also it will have screens which you cannot download on notepad!!
    So do one thing. Include the report with all its components : includes,screens etc..in a transport request. Do it though SE80 transaction. Once done release the transport request. This will result in creation of data file and co file.
    Now at OS level you can get these files and then you can copy them on CD/DVD. Put these files i the respective folders of your target system and import the transport.
    If this is Z report and has a Z development class/message class I would suggest including it also in the transports. Development class/message class  availability before the report import happens is a must. So include every thing in the transport and use data files and co-files.
    Please award points for useful answers.
    Regards.
    Ruchit.

  • Event Triggering ABAP Programs

    Hi SDN User,
    I have a strange issue. We have many process chains and there are triggering by Events and these events are triggering by ABAP programs. My question is I want to know which even is triggering by which ABAP program.
    Any idea guys.
    Thanks
    Sravu2019

    Hi VIkram
    Thanks foir u r input but thiis also not working and am not able to fine the ABAP Program name.
    Thanks
    Srav's

  • ALE triggering ABAP program instead of iDoc

    Is it possible to have ALE trigger an ABAP program instead of an iDoc?
    We need to send changes in Master Data to a system that can't handle iDoc, but does know what to do with SOAP.

    We're talking about an All-in-One system on NetWeaver 700 and ECC 6.0. My company has developed an Add-On for Business One and now they want to develop a similar Add-On for All-in-One. That Add-On should integrate an Open Source system into an SAP system, or at least make the flow of data seem seamless.
    I should be very careful with my comments, as I'm not really understanding enough about your requirements. I must admit key words changes in master data and ALE triggered my initial comment.
    On second thought it might actually be worthwhile to think about other alternatives. E.g. you could look at the technique SAP uses for BW extractors, which might also be suitable.
    I might just be able to hook into the Change Doc system by defining new Change Doc and Change Pointer Types.
    Well, per my comment above, maybe you don't even need change pointers. However, if you do, you can mostly rely on existing change documents unless you're dealing with some odd or custom object.
    Am I right if I think that IDocs handle those Change Pointers from some kind of scheduled background job?
    Part of the setup for change pointers for a specific message type is to define which function module is used for evaluating the change pointers. All change pointers are then evaluated via transaction BD21, program RBDMIDOC, which can also be scheduled in the background.
    but we only need less than 5% of the information contained in an iDoc
    Well, in theory SAP offers some options: You can filter segments via ALE, use reduced message types or define IDoc views. However, depending on the technique this sometimes requires that the actual application (function module creating the IDocs) has to support it (because it's additional API calls that have to be present).
    Defining new IDoc types isn't that attractive to us.
    Though I do understand such statement in specific cases, it's hard to relate to it on a general level. I.e. in the latter case it's often more driven by strange company policies than by good design choices.
    Anyhow, in the end I'm tempted to think that change pointers with IDocs are one option among many. In your specific case however it sounds as if there's possibly other techniques that might be more suitable. So I'll stop for now before I tell you too much crap pushing you in a wrong direction...

  • Triggering Event in BW through a ABAP Program in R/3

    Hello Friends,
    I am working on triggering a process chain in BW using ABAP program in R/3.
    1.  I have created a test process-chain in BW which sends test email upon running. This process chain is triggered by an event "Z_START_PC".
    2.  I created a function module "ZBW_EVENT_RAISE" which triggers this event.
         ( This function module is "remote enabled module")
    3.  I tested running the process chain, with function-module (SE37), which works fine.
         ( i.e. I do receive test-email after..)
    4.  Now I created a ABAP program "ZBW_EVENT_RAISE" in R/3.
         The code of which is as follows:
         REPORT  ZBW_EVENT_RAISE.
        parameters: rfcdest like t000-logsys.
        parameters: bwevent like tbtco-eventid.
        call function 'ZBW_EVENT_RAISE'
        destination rfcdest
         exporting
         eventid = bwevent.
    5.  When I try to run this ABAP program in R/3 (SE38),
         The process chain does not get triggered.
      (a)  The "<b>rfcdest</b>" i got from SM59 - RFC Destinations -
            R/3 Connections - BW Development Server Client
            Value is "BWDCLNT999".
    How do I go about debugging this issue? I know for sure, the BW- function module -- to Trigger -- to Process-chain is working fine. Only part is R/3 to B/W function module starting.
    Any help is appreciated.
    I promise to award points.
    Thanks
    PK

    in ST05 there is an option for RFC trace. Not sure how much detail that will give you but you can try.
    It is possible that your userid doesn't have an RFC call authorization in R/3. Do a SU53 immediately after running the program.
    Also, replace the FM with any other FM that you know for sure runs  (eg some BAPI FM) and run it - either in SE37 in R/3 with RFC destination for BW, or, from your code itself and see if that works (you can check return code).

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • How can user attach file to interactive form, and be read by abap program?

    Hello,
    I created an abap interactive form, sent to the user, then user fills out the form fields, then it is uploaded back to sap, then my program reads this data and process it.
    It works.
    Now I want users to be able to attach any file they want, and the abap program to extract this file out of the PDF, to put it into SAP (or anywhere).
    I succeeded in attaching a file, I can "see" it via function module get_annotations, but I get the file in compressed form by Adobe (filter="FlateDecode").
    Do you know how to unzip the file, or is there another way to attach files in adobe reader/extract them via abap?
    I use acrobat reader 8.1.2
    Thx a lot!
    sandra
    Below is the xml obtained by GET_ANNOTATIONS. We see that there are other text annotations, and that the attached file has {length="98005"}, though real file (before "attach file" to the PDF, and also after "detach file") has length 111 995 bytes. It's why I deduced that there is a compression (I also tried to extract it as-is and open it with adobe but it doesn't work.
    <?xml version="1.0" encoding="UTF-8"?>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
      <annots>
        <highlight rect="212.347,624.257996,252.979004,636.539978" creationdate="D:20080604100938+02'00'"
    name="2114308b-275d-4eca-8bfc-c8288ef4a77c" color="#FFFF00" flags="print"
    date="D:20080604100938+02'00'" title="mtresori" subject="Texte surligne "
    coords="215.432999,636.179016,249.893005,636.179016,215.432999,624.619019,249.893005,624.619019"
    page="0">
          <popup rect="595.276001,516.179016,775.276001,636.179016" flags="print,nozoom,norotate"
    open="no" page="0"/>
        </highlight>
        <fileattachment rect="15.345001,802.841003,29.345001,822.841003"
    creationdate="D:20080604101011+02'00'" name="f6e12648-c9b0-4cd1-b08b-82876c8300d7"
    color="#4055FF" flags="print,nozoom,norotate" date="D:20080604101019+02'00'" title="mtresori"
    subject="Piece jointe" file="SAP_WIDGETS2.pdf" mimetype="application/pdf"
    creation="D:20080603112937+02'00'" modification="D:20080603112937+02'00'" size="111995"
    checksum="9F846412B510089F7C6DBCC6527C6339" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>SAP_WIDGETS2.pdf</p>
            </body>
          </contents-richtext>
          <data MODE="raw" encoding="hex" length="98005" filter="FlateDecode">
    4889CC570B5414D719F651A38EC468D5C6A2980104E528BBF3B8F3B2626405242920020A0AA4AEBB
    C3B2BAECEAEEA2A018030A628C8FFA4A0F568F58426A1EF5118FB5266A8D9AA2B16A55044541C5
    A62656EBA315935AE8BDB3BBEC2C0BD9D5B39EB3671966FEFBFCE6BF
    ETC. (all hexa code is the attached file, but with compression by adobe)
          </data>
        </fileattachment>
        <text rect="96.187408,680.099976,116.186996,698.099976" creationdate="D:20080613144537+02'00'"
    name="73360fcf-f5e5-4d5b-9315-fe4c42924300" color="#FFFF00" flags="print,nozoom,norotate"
    date="D:20080613144617+02'00'" icon="Comment" title="srossi" subject="Note" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p dir="ltr">
                <span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;
    font-weight:normal;font-style:normal">
    ffffffffffffffffffffff
                </span>
              </p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,578.099976,775.276001,698.099976" flags="print,nozoom,norotate"
    open="yes" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144627+02'00'" state="Marked"
    name="d524b7d5-1a85-4b62-80b3-5875dd152c51"
    color="#FFFF00" flags="hidden,print,nozoom,norotate" date="D:20080613144627+02'00'"
    icon="Comment" title="srossi" subject="Note"
    inreplyto="73360fcf-f5e5-4d5b-9315-fe4c42924300" statemodel="Marked" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Marked definie par srossi</p>
            </body>
          </contents-richtext>
          <popuprect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144633+02'00'" state="Accepted"
    name="88af2cb6-7516-4f21-81e6-97edc7a85184"
    color="#FFFF00" flags="hidden,print,nozoom,norotate" date="D:20080613144633+02'00'" icon="Comment"
    title="srossi" subject="Note" inreplyto="d524b7d5-1a85-4b62-80b3-5875dd152c51" statemodel="Review"
    page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144642+02'00'" state="Marked"
    name="a8c6b485-c3f9-44e2-ad53-c61b2766d9d5" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144642+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="f6e12648-c9b0-4cd1-b08b-82876c8300d7" statemodel="Marked" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Marked definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144647+02'00'" state="Accepted"
    name="0136b689-575c-46b8-a21a-86e3c8d73904" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144647+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="a8c6b485-c3f9-44e2-ad53-c61b2766d9d5" statemodel="Review" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144657+02'00'" state="Accepted"
    name="a21fc3c5-cf6a-4c6f-bc1f-328a91050b4e" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144657+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="2114308b-275d-4eca-8bfc-c8288ef4a77c" statemodel="Review" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
      </annots>
      <f href="acTempF-00000028453-00000000089"/>
      <ids original="03473EFED11DB2110A00000000000000" modified="959796E85292D54DB7FA558CAAD4A346"/>
    </xfdf>

    Hello everybody,
    I am sure you have an answer to my question above. It was :
    how is it possible for a user to ATTACH files to a PDF interactive form, and then be able to READ them via a program ? (I guess the solution to read them via ABAP or JAVA is quite the same?)
    Thx a lot !
    sandra

  • XML files from ABAP programs

    Hi everyone!
    Is there a way in ABAP to output XML files?  Pls. send code/ function module if any.
    From ABAP programs, we are sure that we can output TEXT files, but how about XML files?
    The significance of this question is related
    Currently we are using XI to interface SAP and AMS, this question for ABAP to produce XML file arose, if for example, the XI server is down and we have to still send data from one system to another. IDocs can also produce XML files, pls confirm.  Earlier however, we have preferred XI rather than IDocs to do this.  Anyway, any idea regarding this scenario will be greatly appreciated. 
    Thanks and God bless!
    Celeste

    Hi,
    Please check this sample codes from other thread.
    1. itab --- > xml
        xml ---> itab.
    2. This program will do both.
    (just copy paste in new program)
    3.
    REPORT abc.
    *-------------- DATA
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    DATA : BEGIN OF itab OCCURS 0,
    a(100) TYPE c,
    END OF itab.
    DATA: xml_out TYPE string .
    DATA : BEGIN OF upl OCCURS 0,
    f(255) TYPE c,
    END OF upl.
    DATA: xmlupl TYPE string .
    ******************************* FIRST PHASE
    ******************************* FIRST PHASE
    ******************************* FIRST PHASE
    *------------------ Fetch Data
    SELECT * FROM t001 INTO TABLE t001.
    *------------------- XML
    CALL TRANSFORMATION ('ID')
    SOURCE tab = t001[]
    RESULT XML xml_out.
    CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
    EXPORTING
    TEXT = xml_out
    * IMPORTING
    * LENGTH =
    TABLES
    FTEXT_TAB = itab.
    *-------------- Download
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filetype = 'BIN'
    filename = 'd:xx.xml'
    TABLES
    data_tab = itab.
    ******************************* SECOND PHASE
    ******************************* SECOND PHASE
    ******************************* SECOND PHASE
    BREAK-POINT.
    REFRESH t001.
    CLEAR t001.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'D:XX.XML'
    filetype = 'BIN'
    TABLES
    data_tab = upl.
    LOOP AT upl.
    CONCATENATE xmlupl upl-f INTO xmlupl.
    ENDLOOP.
    *------------------- XML
    CALL TRANSFORMATION ('ID')
    SOURCE XML xmlupl
    RESULT tab = t001[]
    BREAK-POINT.
    Regards,
    Ferry Lianto

  • Read an XML file into an ABAP program and manipulate it.

    I would like to know if it is possible to do the following in an ABAP program:
    1) Read an XML file into an ABAP internal table
    2) Call an XSLT transformation on the source file and store the results in an ABAP table.
    Is this possible to do? I have used ABAP XSLT in PI, but never in an ABAP program. I see you can use the CALL TRANSFORMATION command, but I have never used it in an ABAP program.
    Kind Regards,
    Tony.

    Check out these blogs.
    XML DOM Processing in ABAP part I -  Convert an ABAP table into XML file using SAP DOM Approach.
    XML DOM Processing in ABAP part II - Convert an XML file into an ABAP table using SAP DOM Approach.

  • File to File and then Call ABAP Program and pass file name and location

    Hi
    I am new to PI and am working on the following requirement and some guidance would help:
    A file is picked up from a third party server using FTP and is put in an SAP server in a specific location. After I have put in the file successfully, I need to call an ABAP program and provide the name and location of the file for further processing by the ABAP program.
    Although I am familiar with File to File, how can I add in the ABAP call with the filename and location? I do not want to pass any other information to the ABAP program.
    Thanks for your help.
    Manoj

    I think I get what you're saying. This additional file would have the file and the path in it's content. I would then use this as a source (FCC?) for Mapping with the RFC. Right?
    Exactly and yes, FCC would be helpful
    Would you have a sample OS script to do the above?
    Actually it depends on the operating system on which your PI system is standing. For instance for Windows, you might try with the following as a start point (but I was not able to test it, so I can't guarantee it will do the job):
    cmd.exe /C "%f %F > C:\target_directory\%DATE%_%TIME%.txt"
    In case you needed more, try googling on "windows batch script" or similar.
    Hope this helps,
    Greg

  • Attach files to a Shopping Cart in SRM portal using a ABAP program.

    Hello.
    We need to attach files to a Shopping Cart using a ABAP program and see them in SRM portal.
    Currently we know how to attach files in the backend using the function Xxxxxxxxxx but with this function we can not see the attachment in the SRM portal.
    Do you know someway to attach files direclty in the front-end using a program?
    Maybe i have to attach first in the back-end and after that transfer to front-end?
    I have seen some thread but the solution provided is in the other way arround (transfer from front-end to backend) and then is not useful for my proble.
    Thanks in advance.
    Kr,
    Angel.

    Hello Angel,
    You can attach a file to SC ,and it is a standard functionality provided in SRM.
    While creating a Shopping cart,under Documents and attachements tab,there is an option to select a local file and attach it to a SC
    If you are looking at attaching the document in SRM and sending it to BE system.(R/3 system), then have a look at SAP note Note 1057932 - FAQ: Atachment transfer to backend, Required Configurations.
    The Following BADI’s will have to be implemented to allow the above functionality
    For transfer of attachments in PO , activate the BADI BBP_CREATE_PO_BACK. Set the values of the following parameters in the
    method BBP_CREATE_PO_BACK~Fill_PO_INTERFACE
    CV_ATTACH_TRANSFER_ACTIVE = 'X'
    CV_ATTACH_BE_STORAGE_CAT = 'DMS_C1_ST'
    CV_ATTACH_BE_DOC_TYPE = 'SRM'.
    For transfer of attachments in PR, activate the BADI
    BBP_CREATE_REQ_BACK. Set the values of the following parameters in the method BBP_CREATE_REQ_BACK~FILL_REQ_INTERFACE
    CV_ATTACH_TRANSFER_ACTIVE = 'X'
    CV_ATTACH_BE_STORAGE_CAT = 'DMS_C1_ST'
    CV_ATTACH_BE_DOC_TYPE = 'SRM'.
    Award points if useful.
    Thanks
    Arshad

  • Sending HR-File as email by the ABAP program as password protected ZIP file

    Hi All,
    My requiremet is to directly email the SAP-HR files to the users as the password protected ZIP file on UNIX.
    Can anyone help me out how to implement this in my ABAP program.
    Regards,
    Saumik

    hi,
    To populate data in different column you may use the below code.
    DATA : filename TYPE string VALUE  "Path
    DATA :BEGIN OF wa_string,
                   data TYPE string,
              END OF wa_string.
    DATA : it_data LIKE STANDARD TABLE OF wa_string,
               data  TYPE string.
    DATA: v_tab TYPE char1.
    v_tab = cl_abap_char_utilities=>horizontal_tab.
    CONCATENATE 'happy' 'new year'  INTO wa_string-data SEPARATED BY v_tab.
    APPEND wa_string TO it_data .
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = filename
      TABLES
        data_tab              = it_data.
    IF sy-subrc <> 0.
    ENDIF.

  • Execute ABAP Program - Error in Open File Cust_Dim.dat

    HI All,
    I am trying to Implement scenario of Data Service designer for Extract SAP Application data (page no. 181 Onwards). It is for transfer data from SAP ECC - KNA1 to MSSQL table.
    I have Data Service server install on my system.
    I have implement all the steps. When I execute job server. I am getting error like
    "Execute ABAP program <C:/Program Files/Business Objects/BusinessObjects Data Services/ZCUSTDIM_1.aba> error < Open File Error -- C:\Program Files\Business Objects\/Cust_Dim.dat>"
    Does anyone knows about this? I have tried to find lot in SDN but didn't find any solution.
    Thanks
    Ratnakar

    Hi all
    I was having the exact same problem as the one explained here.
    I was a little mixed up because I assigned full privileges on the destination folder to one specific account called installsap
    I used  this account for installing SAP BO Data Services. This account is the one configured on the Business Objects Data Services Service:
    However, I kept getting the same error, as if this account had not enough privileges over the folder.
    I saw that there is another Service called Server Intelligent Agent. I went through its configuration Properties by using the Central Configuration Manager, specifically within the Log On As Property and it seemed like a non specific System Account was configured there.
    Then I open the services.msc (Windows application) in order to see this very same service configuration and it had NOTHING specified there, nor a Local System Account nor an specific user account.
    So, I stopped the service and specified the installsap account I used for the Business Objects Data Services Service. After that I verified I could see this configuration through the Central Configuration Manager and now both tools showed the same.
    Then I started the SIA Service retried again executing the ABAP Data Flow and the Error in Open File was gone.
    It is how the SIA Service configuration looks like.
    By the way, I am not sure if the "Job Server Service" which was cited before in this thread is the same as the Server Intelligence Agent Service I modified
    Besides, although I've been using DS for quite a considerable amount of time, I have never heard of such "Job Server Service". Let me know if I am wrong.
    Anyways it worked for me and I hope it works for someone else who faces the same error.
    Best regards!

  • Hi,I want  ABAP program to create an file of this data and to upload in app

    Hi Sir/Madam,
               I want  ABAP program to create an file of this data and to upload in application server.this is urgent requirement.plz reply soon. i'll b thankful to u.
    Regards,
    Vishali

    Hi ,
    Use this abap code .this will create a file in AL11 that you can use .
    data: d_msg_text(50),
          v_string(20000) type c,
          v_filename type rlgrap-filename,
    ******Create a file on app server
    concatenate '<directory name present in AL11 case sensitive>' ' filename.CSV' into v_filename .
    condense v_filename no-gaps .
    open dataset v_filename for output in text mode
    encoding default message d_msg_text.
    if sy-subrc ne 0.
      write: 'File cannot be opened. Reason:', d_msg_text.
      exit.
    endif.
    ****Header for file
    concatenate 'information you want to write in file like header etc ' into v_string separated by '|'.
    transfer v_string to v_filename.
    *****Write data into file by looping an internal table
    loop at  <internal table > assigning <work area>.
      concatenate      <work area>-field name1   <work area>-field name2    into v_string separated by '|' .
      transfer v_string to v_filename.
    endloop.
    close dataset v_filename.
    Hope this will solve your purpose.
    Regards,
    Jaya Tiwari

Maybe you are looking for

  • Is there a way to recover deleted photos from Lightroom?

    Hi, I recently lost pictures from my hard drive and I don't know how but I had deleted or removed the pictures from Lightroom as well. The catalog name still shows up on Lightroom but it shows that there are "0" pictures in the folder. Any advice on

  • KeepAlive not working with WL 6.1 SP1 in a Sun box.

    Hi all, We deployed the same exact application in a linux and in a solaris box (for QA purposes), and noticed that the keepalive configuration is not been respected in the Sun box. If we telnet to our web server, we read the returning headers includi

  • Looking for a way to log privilege adds even when the user has that priv

    We've run into a situation where we want IDM to log privilege adds/removes, even when that privilege already exists (for add) or doesn't exist (for remove) on a person.  Let me give some background. We are a small team working on an IDM project, each

  • Is DVD Player higher quality than standalone DVD player?ne

    I tried finding an answer to this question with various searches and could not, but I apologize if this is a repeat question. I'm a teacher and I'm showing DVDs (not Blu-Rays) to my class. I have a fairly new LG HDTV in my classroom. I don' have the

  • Lightweight qt music player?

    i'm looking for a simple, fast, lightweight qt music player, basically something like foobar2000. i've tried qmmp, but it scans my music directory on startup and takes an exceedingly long time to load. at the moment, i'm using juk, but it's buggy (sl