BAPI_DOCUMENT_CREATE2 - Document upload to DMS - Back ground

Hi,
We are trying to uploda a file into DMS(CV01N) from SAP R/3, BAPI 'BAPI_DOCUMENT_CREATE2'. This works fine in foregroung but when we ececute it in background, we get an error saying 'Error while checking in and storing'.
Could anyone please suggest me if we can sucessfully execute in back ground mode?
Thanks,
Ranjith Singh.

it is not possible to download in background to a presentation server (your local PC) hence it is not possbile to upload either.
when you submit the program to the background thenthe session is no longer attached to the PC that created it.
Because of this you have to go via the application server.
compare hundred of threads by searcing the ABAP forum with keywords +download +background
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0901cba-f49e-2910-748c-d7ce4c0c4c1c

Similar Messages

  • Documents upload in DMS

    Hello All
    Is it possible to upload the Document in SAP DMS without creating from CV01N transaction?
    Also my requirement is to upload around 2.1 GB documents in SAP is it possible to upload it in one transaction?
    User want to just upload the docs in SAP system so that he can viewed it any time or if user want to add or delete the document any time he can do it
    How to upload or attached ZIP file in DMS from CV01N? Is there any configuration need to do for zip file attachment?
    Currently I can attached zip file from CV01N but if I tries to open the documents from CV02N or CV04N transaction system is giving the error that docs can not be opened.
    Could any one give me step by step solution for above two requirements as I am completely new for DMS module
    Thanks

    Hello,
    Is it possible to upload the Document in SAP DMS without creating from CV01N transaction?
    - If you have some DMS documents already created then you can attach to that doc (CV02N), if not then you have to create a DMS doc and attach it.
    Also my requirement is to upload around 2.1 GB documents in SAP is it possible to upload it in one transaction?
    - Yes, you can upload 2.1 GB but upload and display of document will take some time for performing its action.
    *User want to just upload the docs in SAP system so that he can viewed it any time or if user want to add or delete the document any time he can do it
    - Yes, it can be done in DMS.  
    How to upload or attached ZIP file in DMS from CV01N? Is there any configuration need to do for zip file attachment?
    - For Users uploading & display document in DMS is very convenient. You have to define in your workstation application for zip format & bypass the indicator of authorization. zip format should be defined in workstation application.
    Currently I can attached zip file from CV01N but if I tries to open the documents from CV02N or CV04N transaction system is giving the error that docs can not be opened.
    - What is the error?
    -Thanks,
    Ajay

  • Upload /Download in Back ground processing

    Hi Floks,
    can anyone tell me function module that can be used to download data into presentation server in background processing .
    thanks
    suresh

    You cant download data in back ground to presentation server.
    You can download to application server in back ground and later on you can access.
    Use OPEN DATASET, TRANSFER etc to achieve this
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • Reg: Document upload from DMS to local System

    Hi All,
    I have to download documents from DMS to my local system. I am following:
    1) CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
         EXPORTING
              documenttype    = 'XXX'
              documentnumber  = 'XXXX'
              documentpart    = '000'
              documentversion = '00'
         IMPORTING
              documentdata    = ls_documentdata2
              return          = ls_return
         TABLES
              documentfiles   = li_documentfiles.
    2) Getting file name & path from li_documentfiles & changing the path &  name of the file.
    3)   CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'
             EXPORTING
                  documenttype    = 'IBD'
                  documentnumber  = 'WWI-00000000000000000086'
                  documentpart    = '000'
                  documentversion = '00'
                  documentfile    = ls_documentfiles1
             IMPORTING
                  return          = ls_return
             TABLES
                  documentfiles   = li_documentfiles1.
    Summary:
    1) CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2' - it does not return file name & path
    2) i am changing path name & file name & passing to  ls_documentfiles1.
    3) CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2' - This F/M does not save the file into given path. It always stores at "C:\Documents and Settings\TEMP\SapWorkDir". Also Name of the file is determined by the system. The file name which i pass, is not taken into account.
    Kindly help me out to download the document from SAP to my local system.
    Early response will be highly appreciated.
    Best Regards,

    Hi,
    Try this...use the FM BAPI_DOCUMENT_CHECKOUTVIEW2 to download the files to the directory that sap is saving..Then use the class method CL_GUI_FRONTEND_SERVICES=>FILE_COPY to move the files to the directory you want..
    Thanks
    Naren

  • BADI Needed for encoding document while uploading into DMS

    Hello All,
    Is there any BADI/Enhancement Point available which could be used to encode a file while i upload into DMS? I am in ECC 6.0 (MySAPERP 2005).
    I have the BADI's
    1. Document_MAIN01- has the method AFTER_READ_DATA, but once the file is uploaded i donot see any data passing into this Method.
    2. Document_FILES01 - has the method BEFORE_START_APPL and AFTER_START_APPL are only used and none of the other methods are used. But these methods cannot be used at the time of upload.
    3. EHSB_DMS_ENCODE - has the method ENCODE but this is called once the document is created in the DMS.
    Please note that the document is getting created using BAPI_DOCUMENT_CREATE2 function module.
    My reqmt is to encode and upload the file into the DMS from transaction EHSAMBTAET.
    Any suggestion would be of great help.

    You could develop an event receiver for the library and in the ItemAdded() event, parse the text from the file using OpenXML. There is a good code sample for the text extraction piece
    here.
    Please mark my reply as helpful (the up arrow) if it was useful to you and please mark it an answer (the check box) if it answered your question! Thank you!
    Danny Jessee | MCPD - SharePoint Developer 2010 | MCTS - SharePoint 2010, Configuring
    Blog: http://dannyjessee.com/blog | Twitter: @dannyjessee

  • DMS Document upload: does it pass through sap DMS ?

    Dear All,
    We have a question concerning the transmission of documents from the client to DMS and the Content Server: does the document need to pass through the sap server ?
    Document upload (create document CV01N)
    Does the document go directly from the client to the Content server OR does it pass through the sap DMS before to be stored in the CS ?
    Document download (read document CV03N)
    Does the document go directly from the CS to the client OR does it pass through the sap DMS server ?
    This could be interesting to know for network performances.
    best regards,

    Hi Gurus
    is the cache server a default funtionality from the content server or any configuration is required from our part.
    is that the cache server acts as the RAM of our system?
    please explain the partitioning or biferfication of the Content server, as you told
    content server is divided into storage catagories and  this in turn in to content repositories,
    please  clarify below points,
    1)any server or PC can be made as Content server by insatalling the content server CD if iam right ?
    2) Practical and funtional benifits of partitioning content server into content repositories is it for authorization and storing data by naming convection or can it also help in copiying data from a specific content repository if needed, ( is content repositories a logical partition or practical partition like B,C,D, F drives of our PC hard disk)
    3) can /should there be multiple content server installation for a particular (production) client.
    4) Can Archiving  be done say by creating a separate content repository inside the same Content server, or is it mandatory to have a separate archiving server itself,
    please give some idea with examples
    Thanks and regards
    Kumar

  • Upload Document in SAP DMS

    Hi SDNites,
    My requirement is to upload document in SAP DMS and this document we are receiving from an external system. Can you please let me know,
    1. Is there any way I can provide a link in ECC SAP DMS for the documents which are stored in external system (SAP CRM) .
    2. Also is there any standard FM / BAPI available which uploads a document into SAP DMS (I do not want to pick documents from a local directory).
    Regards,
    Abhi

    Hi,
    1) R U able to upload any other file type to the DIR AA00-0123 (word/ppt/pdf etc) ?
    2) Can u Create a new DIR and try uploading the same excel file? does that get created?
    once u do the above just let me know.
    Regards
    Abhishek
    Edited by: AAYNI_AK on Nov 11, 2011 11:33 AM

  • How to create a white back ground for Jpeg image to upload on various webites

    Hello, I have Photoshop Elements 11. I designed a book cover with Microsoft Word 2010 and saved the file as a Pdf. I want to upload an image of this book cover to various web sites that require a Jpeg image and the book cover has to cover at least 85% of the image and require a pure white back ground. Pixel size can be 1,000 or more. Can somebody help me? I did go to the library to get reference books but, I can't ascertain from these books how to do this. I am a beginner to Photoshop and realize I will have to get training for future projects. Thank you very much for any information you provide to me. I wanted to upload an image from my computer to show you the book cover but there was a dialogue box that appeared saying the file was too large to upload. The book cover I designed is 8.5' x 11.0"

    Wow! I can't thank you enough! There is not enough space here for me to express my gratitude for helping me! You are a saint! I had the Pdf files uploaded and stored in my organizer, so the images of the book covers appeared in the bottom of Photoshop Elements 11 Editor. I did exactly as you instructed, then sent the Jpeg  to Amazon and it uploaded in less than 5 minutes. The image could be a little bigger, but now I can utilize the software enough to tweak it.Thanks so much!!!! Any other ideas would be greatly appreciated. Take care and have a great 2013!

  • Uploading XL file using call Transaction and running in back ground

    Hi all,
       I am updating the T-code VA01 using call TRansaction method ....
      i am uploading the file is XL file for that i m using the FM ALSM_EXCEL_TO_INTERNAL_TABLE.
      But if execute my program in the back ground This FM is giving Dump because it can not Execute in Back GRound...
      Plz let me know any FM to upload data from Excel file Both from foreground and back ground....
      Plz let me know ASAP..
    Thanks,
    Suresh

    HI...,,
    When u run any program in Background, it will not have any contacts with the presentation server.... You cannot upload  a presentation server file..
    But u can use the Application server file...
    SO first store this excel file's data in Application server using the transaction CG3Z and then use the Open data set and read dataset to upload the application server file !!!
    reward all helpful answers !!
    regards,
    sai ramesh

  • DMS - Document upload in SAP

    Hi,
    We created document in SAP DMS by CV01N but those doucments are stored in PC. But we would like store those .xls, .pdf, .doc files in SAP server. So that users from any locations they can access the open the document.
    Is there any possible way to store those doucments in SAP? Will it affect the system performance?
    Regards,
    Ajay

    hi buddy,
    i guess u hve created the docs using ur previous sap only ... so it is very easy to load the files in ur new sap servers.
    if not then the docs must be in table format like excel one so that u can load the data in ur sap tables using sap std FM.
    .......i thk u need the data to be in ur sap system n not in ur pc...
    but since u r planning tat all ur users shld be able to access it then let me tell u buddy ur server performance will def reduce a lot.
    Hope this will help you....
    Dont forget to give pts....
    Thanks & Regards,
    Punit Raval.

  • Efficient way of saving documents uploaded by users

    Hello Experts,
    We are looking out for an efficient way of storing of documents uploaded by the users. Below is the explanation of our scenario in detail.
    We are working on the SAP E-Recruiting module and have designed custom Interactive Adobe Forms & Web Dynpro Components for the client. An end user (initiating manager) would fill in the form & upload file(s) in support of his statement & click on the "submit" button. As of now we are achieving the upload functionality through WDA's FileUpload ui element & dumping the file contents into a field of type RAWSTRING.
    We now want to change our approach of using the RAW_STRING field & go for a more efficient one. I have been googling around and read a bit about approaches like:
    Class CL_BDS_DOCUMENT_SET
    Class CL_FITV_GOS
    Function Module BDS_BUSINESSDOCUMENT_CREATEF
    But all these 3 approaches seem to be targetted towards some particular business object. They expect some sort of class name or the other to be passed on to them as input. However ours is a complete custom requirement wherein the entire forms data is going into a Z-table so none of these approaches would hold good. (Please correct me if I am wrong when I say that coz I haven't personally worked on any of them till date!) Awaiting your expert opinions on this matter.
    Regards,
    Uday
    Any ideas please?
    Edited by: Uday Gubbala on Mar 4, 2010 10:56 AM

    See if this sample code helps....we hav DMS ( Document management System )
    MOVE: 'DRW' TO DOCUMENTDATA-DOCUMENTTYPE,
            'C:\Users\sci30\Desktop\test.doc' TO
             DOCUMENTDATA-DOCFILE1,
            'TEST DESCRIPTION' TO  DOCUMENTDATA-DESCRIPTION.
    *          move 'WR' to documentdata-STATUSINTERN.
      MOVE 'WRD' TO DOCUMENTDATA-WSAPPLICATION2.
      CLEAR : WA_OBJ_LINK.
      MOVE 'MARA' TO WA_OBJ_LINK-OBJECTTYPE.
      MOVE HEADDATA-MATERIAL TO WA_OBJ_LINK-OBJECTKEY.
      APPEND WA_OBJ_LINK TO GT_OBJ_LINK.
      CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
        EXPORTING
          DOCUMENTDATA               = DOCUMENTDATA
    *         HOSTNAME                   =
    *         DOCBOMCHANGENUMBER         =
    *         DOCBOMVALIDFROM            =
    *         DOCBOMREVISIONLEVEL        =
    *         CAD_MODE                   = ' '
    *         PF_FTP_DEST                = ' '
    *         PF_HTTP_DEST               = ' '
    *         DEFAULTCLASS               = 'X'
        IMPORTING
    *         DOCUMENTTYPE               =
    *         DOCUMENTNUMBER             =
    *         DOCUMENTPART               =
    *         DOCUMENTVERSION            =
         RETURN                     =    RETURN_DOCUBAPI
       TABLES
    *         CHARACTERISTICVALUES       =
    *         CLASSALLOCATIONS           =
    *         DOCUMENTDESCRIPTIONS       =
          OBJECTLINKS                = GT_OBJ_LINK
    *         DOCUMENTSTRUCTURE          =
    *         DOCUMENTFILES              =
    *         LONGTEXTS                  =
    *         COMPONENTS                 =
      COMMIT WORK.

  • How To Handle With Back Ground JOB From WEBUI When Click On "Appove"

    Hi
    How To Scheduled A Job Through ABAP Report In back end  Of CRM when i click on "Approve" Button in WEBUI  From result list.
    As per My requirement I have a Search View and Result View
    In Search View I have  Below Fields
    ITC Vendor ID    
    Claim Status
    User status (date status changed)
    Model
    Serial Number
    Date completed of Service Completion
    Based on Search Criteria I will get Result In Result View.(Suppose 10 Records I got In Result View)
    In the Result View I need to Add one Button As "Approve"
    When i Click On Approve button One Pop up Message Need to Open And In that popup window I need to Display Below Text
    "Approve  Claim Job Has Started In Background  
    Note: Only Claims Which are in Submitted  Status  Will be  Approved. you May Close This Window"
    In SAP CRM System  Back Ground Job Need To Start When Click On "Approve" Button In WEBUI .
    In the Back Ground ABAP Report which will validate based on Result List Records"
    In the Result List we may have all types of Claims which are status in "Submitted" "Pending" "Rejected" "Approve".
    I need to collect all records from Result list and validate Those Records who's Status in "Submitted
    1)Sort all the claims based on ITC Vendor ID.
    2)Grouped all the submitted claims against each ITC Vendor ID from the search result
    3)Change the status of the selected submitted claims to Approved.
    4)Displays information messages as mentioned whenever a claim is approved, the same message will be captured in the job log.
    ‘Claims <ClaimID 1>,…<ClaimID N> now approved for ITC Vendor ID’.
    5)Sending Email to each IRC.
    6)Capture all the approved claims in the below format (Format Attached "Screen Shot Attachment")
    7)Store the file in the Application Server AL11 in .csv format
    Please Find Attachement For Reference.
    1)ITC Claim Screen Shot
    2)Screen Shot For Attachment
    Thanks
    Raj

    Hi,
    You can add the following code in on approve method to show popup to the user,
    IF req_edit IS NOT BOUND. " gloabl attribute in impl class of the view
        REFRESH lt_buttons.
        lss_button-id  = 'btnyes'.
        lss_button-text = 'YES'.
        lss_button-on_click = 'YES'.
        APPEND lss_button TO lt_buttons.
        CLEAR lss_button.
        lss_button-id  = 'btnno'.
        lss_button-text = 'NO'.
        lss_button-on_click = 'NO'.
        APPEND lss_button TO lt_buttons.
        CLEAR lss_button.
        CALL METHOD comp_controller->window_manager->create_popup_2_confirm
          EXPORTING
            iv_title          = 'ATTENTION'
            iv_text           = 'Are you sure you want to edit this document?'
            iv_btncombination = '99'
            iv_custombuttons  = lt_buttons
          RECEIVING
            rv_result         = req_edit.
        req_edit->set_on_close_event( iv_event_name = 'EDIT' iv_view = me ). "#EC NOTEXT
        req_edit->open( ).
        RETURN.
      ELSE.
        lr_node ?= req_edit->get_context_node( 'OUTPUTNODE' ).
        lv_outbound = lr_node->get_event_name( ).
    *  CLEAR ptc_pricing_status.
    *    lv_outbound = req_edit->get_fired_outbound_plug( ).
        IF lv_outbound = 'YES'.
    you can use the submit report code here and you can al the validations here
        ELSE. " No
    if user clicks no nothing to do..
        ENDIF.
        CLEAR req_edit.
      ENDIF.
    Best Regards,
    Dharmakasi.

  • ERROR IN BDC SESSION BACK GROUND ( USING PP03 T.CODE)

    Hi Experts,
    When i am executing the session ( pp03 T.Code) ,it is working fine in fore ground as well as in display errors mode. But it is not working in back ground mode.
    it is raising the exception ( cntl-system-error).
    I used flat file which is in the presentation server . I accessed it by gui_upload Function Module.
    <b> I am also getting the error using data sets . After upload the presentation server data into one internal table .I sent it to application server using open data set ( transfer ) , after that i read the application server data using open dataset ( read )
    into another internal table ( i declared with same structure of flat file ) .</b>
    But this time also it is giving same error ( runtime exception).
    Please tell me how can i handle using datasets .  Its Very urgentttttttt
    Please any body help meee ( If any one worked on this (pp03 T.code) ) .
    Send the code  or Inform the full detailsss as soon as possibleeee
    regards ,
    dattu malge.

    Hi,
    Go to the transaction SM35 and select your session and then click the Process Button.
    Here you select the Processing Mode as "Background".
    It is not possible to execute the same session by more than one user at a same time.
    RSBDCSUB is used to automate the processing of Batch input session.
    Cheers,
    Hakim

  • Back ground job

    Hi Experts,
    See the following code.
    When i run this program in fore ground it is giving time out error.Current running time is 600 Sec.When i run in Back ground with Immediate.Excute option after some time the job is cancled.When i see the job log It is mentioned as "More memory space requested".
    Can any body Plz go thru the code and tell me what is the problem?
    *& Report  ZTEST_XML
    REPORT  ZTEST_XML.
    *data: ifile like salfldir occurs 0 with header line.
    data:p_path TYPE rsmrgstr-path value 'F:\usr\sap\CD5\serena\OCOS\'.
    data: p_file type string.
    TYPES: BEGIN OF t_xml_line, "Structure for holding XML data
    data(256) TYPE x,
    END OF t_xml_line.
    data: BEGIN OF t_xml occurs 0,
    rec TYPE x,
    END OF t_xml.
    data: begin of jtab occurs 0,
          text type string,
          end of jtab.
    DATA: l_xml_table TYPE TABLE OF t_xml_line. " XML Table of the structure
    data: wa(256)  type x.
    data: wa_xml like l_xml_table occurs 0.
    data: l_str type string.
    data:  start_line  type i,
           end_line type i,
           v_str type string.
    data: cnt type i,
          idx type i,
          count1 type i,
          len type i,
          diff type i.
    data: catalogid type string.
    DATA : BEGIN OF DAT OCCURS 0,
             LIN type string,
           END OF DAT.
    DATA: BASIC_TEXT LIKE THEAD OCCURS 0 WITH HEADER LINE.
    DATA: YGUID LIKE COMM_PCAT_CTY-GUID,
          ZGUID LIKE COMM_PCAT_CTV-PARENT_CATEGORY.
    DATA: BASICTEXT like TLINE OCCURS 0 WITH HEADER LINE.
    DATA: IT_THEAD LIKE  THEAD OCCURS 0 WITH HEADER LINE.
    data: begin of IT_SERENA occurs 0,
           ID LIKE COMM_PCAT_CTY-ID,
           TEXT type string,
          end of IT_SERENA.
    DATA:WA_SERENA like IT_SERENA.
    DATA: wa_files TYPE rsfillst,
    ifile LIKE TABLE OF wa_files.
    data: begin of it_error occurs 0,
           err type string,
           end of it_error.
    data: errorfile type string value 'error.txt'.
    CALL FUNCTION 'SUBST_GET_FILE_LIST'
      EXPORTING
        DIRNAME            = p_path
        FILENM             = '*'
      PATTERN            =
      TABLES
        FILE_LIST          = ifile
    EXCEPTIONS
      ACCESS_ERROR       = 1
      OTHERS             = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at ifile into wa_files.
      if not wa_files-name cs '.xml'.
        delete ifile.
      endif.
    endloop.
    loop at ifile into wa_files.
      concatenate p_path wa_files-name into p_file.
      open dataset p_file for input in text mode encoding default.
      if sy-subrc = 0.
        do.
          read dataset p_file into l_str.
          if l_str = space.
          exit.
          endif.
          if sy-subrc <> 0.
            concatenate text-002 p_file into it_error-err.
            append it_error.
            clear it_error.
            exit.
          else.
            jtab-text = l_str.
            append jtab.
            clear jtab.
          endif.
        enddo.
      else.
        concatenate text-001 p_file into it_error-err.
        append it_error.
        clear it_error.
        continue.
      endif.
      loop at jtab.
        if jtab-text cs 'Catalog ID'.
          idx = sy-tabix .
        endif.
      endloop.
      read table jtab index idx.
      if sy-subrc = 0.
        catalogid = jtab-text.
      endif.
      if catalogid cs '<![CDATA['.
        shift catalogid left by 56 places.
      endif.
      if catalogid cs ']]></field>'.
        replace ']]></field>' with space into catalogid.
      endif.
      write:/ 'Catalogid is:', catalogid.
      IT_SERENA-ID = catalogid.
      LOOP AT jTAB.
        if jtab-text cs 'longDescription'.
          start_line = sy-tabix + 1.
          exit.
        endif.
      endloop.
      cnt = start_line.
      do.
        read table jtab index cnt.
        if jtab-text cs '</field>'.
          end_line = sy-tabix.
          exit.
        else.
          cnt = cnt + 1.
        endif.
      enddo.
      loop at jtab from start_line to end_line.
        concatenate jtab-text v_str into v_str separated by space.
      endloop.
    shift v_str left by 18 places.
      shift v_str left by 10 places.
      len = strlen( v_str ).
      DO.
        IF COUNT1 >= LEN.
          EXIT.
        ENDIF.
        DIFF = LEN - COUNT1.
        IF DIFF  < 125.
          DAT-LIN = v_str+COUNT1(DIFF).
        ELSE.
          DAT-LIN = v_str+COUNT1(125).
        ENDIF.
    DAT-LIN = v_str+COUNT1(125).
        APPEND DAT.
        WRITE :/ DAT-LIN.
        CLEAR DAT.
        COUNT1 = COUNT1 + 125.
      ENDDO.
      REFRESH BASIC_TEXT.
      REFRESH BASICTEXT.
      CLEAR YGUID.
      CLEAR ZGUID.
      SELECT  SINGLE GUID FROM COMM_PCAT_CTY INTO YGUID
          WHERE ID = IT_SERENA-ID.
    IF NOT YGUID IS initial.
      if sy-subrc <> 0.
        concatenate text-003 p_file into it_error-err.
        append it_error.
        clear it_error.
      else.
        SELECT SINGLE GUID FROM COMM_PCAT_CTV INTO ZGUID
        WHERE PARENT_CATEGORY = YGUID.
      ENDIF.
      BASIC_TEXT-TDOBJECT = 'PCAT_CTY'.
      BASIC_TEXT-TDNAME = ZGUID.
      BASIC_TEXT-TDID = '0001'.
      BASIC_TEXT-TDSPRAS = 'EN'.
      APPEND BASIC_TEXT.
      loop at DAT.
        BASICTEXT-TDFORMAT = '*'.
        BASICTEXT-TDLINE = DAT-LIN.
        APPEND BASICTEXT.
      endloop.
      refresh DAT.
      loop at basictext.
        if basictext-tdline cs '![CDATA['.
          replace '![CDATA[' with space into  basictext-tdline.
        ENDIF.
        modify basictext.
      ENDLOOP.
      loop at basictext.
        if basictext-tdline cs ']]>'.
          replace ']]>' with space into  basictext-tdline.
          modify basictext.
        endif.
      endloop.
      CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
           CLIENT                = SY-MANDT
            HEADER                = BASIC_TEXT
      INSERT                = 'X'
             SAVEMODE_DIRECT       = 'X'
      OWNER_SPECIFIED       = ' '
      LOCAL_CAT             = ' '
         IMPORTING
      FUNCTION              =
           NEWHEADER             = IT_THEAD
          TABLES
            LINES                 = BASICTEXT
      EXCEPTIONS
       ID                    = 1
       LANGUAGE              = 2
       NAME                  = 3
       OBJECT                = 4
       OTHERS                = 5
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CLEAR IT_THEAD.
      IF SY-SUBRC = 0.
        WRITE:/ 'DATA UPLOADED SUCCESSFULLY'.
      ELSE.
        WRITE:/ 'DATA NOT UPLOADED'.
      ENDIF.
      refresh jtab.
      refresh DAT.
      COUNT1 = 0.
      clear v_str.
      REFRESH BASICTEXT.
      refresh dat.
      close dataset p_file.
    endloop.
    open dataset errorfile for appending in text mode encoding default.
    if sy-subrc = 0.
      loop at it_error.
        transfer it_error-err to errorfile.
      endloop.
      close dataset errorfile.
    endif.
    Is there  any other FM which is similar to SAVE_TEXT?

    That depends. Can you please provide some more info how the programs are linked:
    several steps in batch planning
    cascade of submits
    and what kind of failure might occur:
    shortdump
    Kind Regards
    Klaus

  • Back ground job in abap

    Dear  abapers  i want to send an excel attachment from my computer to email and i do that using the following code it works correctly but now i want the program to run in back ground twice a month to some ones email address by giving default recipient email address.
    with best regards,
    Hahu D.
    REPORT  YEMAIL12.
    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 type rlgrap-filename  default 'd:\files\file1.xlsx'.
    * Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ws_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    * PROGRAM_NAME = SYST-CPROG
    * DYNPRO_NUMBER = SYST-DYNNR
    field_name = 'ws_file'
    IMPORTING
    file_name = ws_file.
    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   = 'hahu daily test this'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'hahu daily fishikta ameley'.
    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

    Hi,
    Will this help you.?
    http://scn.sap.com/community/netweaver-administrator/blog/2010/02/25/how-to-email-output-from-background-jobs
    Regards
    Purnand

Maybe you are looking for

  • Linux emulation in Solaris 10

    Hello, I am having trouble getting a Linux program to work in Solaris 10 build 61. I took bin/mktemp, lib/ld-linux.so.2, and lib/ld-2.2.5.so from Debian stable and the program dumped core with FLTBOUNDS / SIGSEGV when I ran it with chroot . bin/mktem

  • Problem with Hyperlink Behavior

    Hi all. In my lasts posts i was trying to make a dropdown menu with some properties, this menu, is activated with the onclick event, in a table, the menu works fine with an image component and his onclick action, shows, and dissapear as i want, the t

  • Tab Delimited Data Outpu

    Can anyone help to get a Tab Delimited datafile as ouput in Spool? How to get the tab between fields?

  • Is it possible to make InDesign files created in CS5.5 backwardly compatible with CS4 and CS3?

    I have recently installed CS5.5 on my iMac running Mac OSX Lion. I have documents that were prepared in CS3 and CS4. They read OK in CS5.5 but I cannot then save them to be read in the earlier versions. Any Ideas please?

  • Selection screen processing

    Hello, I want to update a selection screen field according to the values of two others. The two other field values wait for pressing Enter before passing their values. But I want to get the values of these fields when the focus is changed to the thir