RSOD_DOC_TRAN_CHANGE upload docs in Background mode

Hello, we are trying to use this function in background but it seems that is not possible. (in fact it´s not possible because it´s using the FM gui_upload that only works in dialog mode)
Our problem is the following:
We have created documents trought RSA1-Documents. Once we ahave created this documents, 100 for example, we need to do a massive copy with the same documents only changing one property of them. We are able to do it but not in backgroud because at the end the function provided uses the
function GUI_UPLOAD and it´s not possible to use it in backgroud.
We are able to dowload the documents to the appl.server but we cannot upload from it using this function ? Is there any other way to do this process in background ?
Anybody knows other possibilitie ??
Thanks in advance,
jcasas

Hi Jcasas,
It seems that the system only call FM GUI_UPLOAD when  i_t_file_content_ascii is initial,
make sure FM RSOD_DOC_TRAN_CHANGE is called with parameter I_T_FILE_CONTENT_ASCII, it should be ok to upload doc in background.
      IF i_t_file_content_binary[] IS INITIAL AND
         i_t_file_content_ascii[]  IS INITIAL.
*       load file with I_S_CONTENT_INFO-file_name
        DATA l_string TYPE string. l_string = i_s_content_info-file_name.
        DATA l_int    TYPE i.      l_int    = i_s_content_info-file_size.
          CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename                = l_string
            filetype                = 'BIN'
Regards,
Shidong

Similar Messages

  • XLS from Application server in background mode to internal table

    Hi,
    I need to transfer the content of an excel file in the application server to an internal table while running my program in background. My file is xls, cant use csv. For dataset bin mode, I need to know how to transfer the data to my internal table, already searched on forum but didnt find answer, at least not for background..
    ow, I am using v6 here
    about the ALSM_EXCEL_TO_INTERNAL_TABLE, I get the upload_ole error all the time, and with TEXT_CONVERT_XLS_TO_SAP, conversion_failed all the time too...
    here is the code, just the load part and data declaration:
    REPORT zbeto.
    TYPE-POOLS: truxs.
    TYPES:
    BEGIN OF y_cot,
    text1(12) TYPE c,
    text2(12) TYPE c,
    text3(12) TYPE c,
    text4(12) TYPE c,
    text5(12) TYPE c,
    END OF y_cot.
    DATA: it_datatab TYPE STANDARD TABLE OF y_cot,
    wa_datatab TYPE y_cot,
    it_raw TYPE truxs_t_text_data.
    DATA:
    v_file TYPE rlgrap-filename,
    begin_col TYPE i VALUE '1',
    begin_row TYPE i VALUE '2',
    end_col TYPE i VALUE '5',
    end_row TYPE i VALUE '102',
    t_ctmp TYPE y_cot OCCURS 0 WITH HEADER LINE,
    t_xls TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    PERFORM f_load_xls.
    FORM : f_load_xls
    FORM f_load_xls.
    v_file = '
    ZSAPDEV\SAPDEVINTERF$\COTACAO\TESTE.XLS'.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    filename = v_file
    i_begin_col = begin_col
    i_begin_row = begin_row
    i_end_col = end_col
    i_end_row = end_row
    TABLES
    intern = t_xls
    EXCEPTIONS
    inconsistent_parameters = 1
    upload_ole = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    I_FIELD_SEPERATOR =
    i_line_header = 'X'
    i_tab_raw_data = it_raw " WORK TABLE
    i_filename = v_file
    TABLES
    i_tab_converted_data = it_datatab[] "ACTUAL DATA
    EXCEPTIONS
    conversion_failed = 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.
    t_ctmp[] = it_datatab[].
    ENDFORM. "f_load_xls
    both FM arent working, and when I try to execute in background mode, before anything, I recieve the following error:
    Message text:
    Error during import of clipboard contents
    Message class:
    ALSMEX
    Message no.:
    037
    Message type:
    A
    and without the ASLM FM, the TEXT_CONVERT give me the conversion_failed exception...
    the directories are right, that I am sure, because I just copy&paste it from CG3Z/CG3Y when I uploaded and downloaded to
    check the file in the server...
    am I missing something?
    thanks again,
    Roberto Macedo
    (PS: I made another topic because none replied the other in 4 days and wasnt solved yet)

    Hi!
    You didn't find answer for this, because it is not possible. If you run your program in background, it is running on the server, and does not have any connection to your local machine. That's why you can't upload/download in background mode.
    You might try to address somehow your local PC, with its IP or MAC address, but I don't think does this task worth so much time.
    Run your program in online mode, or if you want to run it in background, then upload your file into the SAP server.
    Regards
    Tamá

  • Download DMS attachment into an application server in background mode?

    Is it possible to download DMS attachment into an application server in background mode?
    Currently I am using the following code but does not work in background mode
      CALL FUNCTION 'CVAPI_DOC_GETDETAIL'
        EXPORTING
          pf_dokar     = 'Z06'
          pf_doknr     = gs_drad-doknr
          pf_dokvr     = gs_drad-dokvr
          pf_doktl      = gs_drad-doktl
          pf_read_kpro = 'X'
        TABLES
          pt_files      = lt_file
        EXCEPTIONS
          not_found    = 1
          no_auth       = 2
          error            = 3
          OTHERS       = 4.
    *Copy Attachment from DMS to PC File
      CALL FUNCTION 'CVAPI_DOC_VIEW'
        EXPORTING
          pf_dokar      = 'Z06'
          pf_doknr      = gs_drad-doknr
          pf_dokvr       = gs_drad-dokvr
          pf_doktl          = gs_drad-doktl
          pf_appl_start = ' '
          pf_apptp      = '1'
          pf_filename   = 'C:\TEMP\ZLINK.BMP'
          ps_file       = ls_file
        IMPORTING
          pfx_file      = l_pfx_file
        EXCEPTIONS
          OTHERS        = 0.
    *Load BMP into SE78
      PERFORM import_bitmap_bds
        IN PROGRAM saplstxbitmaps
        USING l_filename             "Local File for Upload/Download
                   l_bmpnam             "Name
                  'GRAPHICS'           "Application Object
                  'BMAP'                   "ID
                  'BCOL'                   "Color
                  'BMP'                     "Extension
                  'ZLINK PICTURE'   "Title
                  space          "Resides in Printer Memory in Print Request
                 'X'                 "Reserve Height of Graphic Automatically
                 space           "Graphic Storage: Compressed Bitmaps
        CHANGING l_docid
               l_wf_res.   "Graphic Resolution
    Thanks

    Hi!
    You didn't find answer for this, because it is not possible. If you run your program in background, it is running on the server, and does not have any connection to your local machine. That's why you can't upload/download in background mode.
    You might try to address somehow your local PC, with its IP or MAC address, but I don't think does this task worth so much time.
    Run your program in online mode, or if you want to run it in background, then upload your file into the SAP server.
    Regards
    Tamá

  • Uploading Excel File in SAP In Background Mode

    Dear All,
    We require to upload Excel File in SAP in Background Mode.
    Could anyone suggest me the Function Module for this?
    Or any other method..........please.
    Thanks in advance for ur kind help.
    Best Regards,
    Prasad

    hi check this..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2
    Download in Background
    http://sapabap.iespana.es/sap/info/rfcexec/rfcexec_e.htm
    Reward if find useful

  • How to upload a Excel document in background mode

    Hello there, how are you?
    I am doing an interface program that needs to upload an excel document into an internal table, to do this I used the FM ALSM_EXCEL_TO_INTERNAL_TABLE. The problem with this FM is that only works in foregroung mode, If I run the programin bcakground the FM does not work.
    I would like to know if exist a way to upload an excel document into an internal table, for a program that have to be execute in background mode.
    Thanks in advance
    Best Regards
    Alexis Ramirez

    *& Form application_server
    * text
    * --> p1 text
    * <-- p2 text
    *----------------------------------------------------------------------*FORM APPLICATION_SERVER .
    TYPE-POOLS: KCDE.
    DATA : lt_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.*DATA : INTERN1 TYPE KCDE_INTERN.FILE = PATH.
    OPEN DATASET FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.**--- Display error messages if any.IF SY-SUBRC NE 0.
    MESSAGE E001(ZSD_MES).
    EXIT.* ENDIF.ELSE.
    DO.
    READ DATASET FILE INTO Wa_TAB.
    append wa_tab to IT_TAB.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    ENDDO.
    clear wa_TAB.
    LOOP AT IT_TAB into wa_tab.
    CASE wa_tab-COL.
    WHEN '0001'.
    WA_TAB2-PLANT = wa_tab-VALUE.
    WHEN '0002'.
    WA_TAB2-STGE_LOC = wa_tab-VALUE.
    WHEN '0003'.
    WA_TAB2-MATERIAL = wa_tab-VALUE.
    WHEN '0004'.
    WA_TAB2-QUANTITY = wa_tab-VALUE.
    WHEN '0005'.
    WA_TAB2-BASE_UOM = wa_tab-VALUE.
    WHEN '0006'.
    WA_TAB2-COSTCENTER = wa_tab-VALUE.
    ENDCASE.
    AT END OF ROW.
    APPEND WA_TAB2 TO IT_TAB2.
    CLEAR WA_TAB2.
    ENDAT.
    clear wa_tab.
    ENDLOOP.
    ENDIF.
    CLOSE DATASET FILE.
    ENDFORM. " application_server
    Refer here:[How to Read Excel file from Application or Presentation Server and Download into Internal Table. |https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/how%252bto%252bread%252bexcel%252bfile%252bfrom%252bapplication%252bor%252bpresentation%252bserver%252band%252bdownload%252binto%252binternal%252btable.]

  • Is it possible  upload local file to internal table in background mode?

    Hi, all,
    Is it possbile to  upload local file(not server file) to internal table in background mode.
    If possbile ,please tell me detail . Thanks in advance.
    Regards,
    Lily

    Hello,
    This is possible.
    If you report has to be executed in background using schedule Job. Then the file path should be constant and it can be hard coded in the report itself while populationg the internal table.
    Then create a variant for your report and use that variant in the job.
    This will solve your problem I guess.
    Regards
    Arindam

  • Mass BMP upload in background mode

    Hello all,
    I have to upload 20 Gb of BMP images to SE78 with background mode via coding. I wrote a code about this and it works in foreground mode but it gives error in background mode becouse i adressed my local drive for the source of these images . So should i put these images in the folders of AL11 for background mode? How should i do it? Any ideas?
    Thanks..

    HI..,
    u cannot upload a presentation server file in BACKGROUND processing mode.. because it doesnt know where to go for that file....
    The solution for this problem is... save this file in Application server and upload from application server into the program..
    this is the standard procedure for background processing....
    TO save a file in Application server we use OPEN DATASET ... TRANSFER ... and CLOSE DATASET.. commands..
    regards,
    sai ramesh

  • Can we schedule BDC in Background Mode - SM37

    Hi Guru,
    Can we schedule our BDC in background - SM37 . Upload file will be on Local Sustem - C drive.
    Regards
    Durgesh
    Moderator message: background/GUI problems = FAQ, please search before posting.
    locked by: Thomas Zloch on Oct 6, 2010 2:14 PM

    GUI functions (like GUI_UPLOAD) will not work in background, they need an actual Gui active.
    There are plenty of threads on  this subject, search also in the wiki for threads/guide like [Working with files |http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles] or [Communication to Presentation Server in Background Mode|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2&overridelayout=true] or [Working with FTP Server |http://wiki.sdn.sap.com/wiki/display/ABAP/WorkingwithFTP+Server]
    (To execute a BDC in background use report RSBDCSUB.)
    Regards,
    Raymond

  • Why can't we use GUI_Download in background mode...........

    Hi experts as per the requirement my program should run at specific time in background mode, it need to upload the Personal numbers from the input file and for those personal numbers extract the data from multiple tables. but this report shd run in background.
    and download the output in the form of flat file.
    as i'm running in background mode can't use the F.M GUI_Download and GUI_Upload.
    can any one guide me how to solve this issue and why can't we use these F.M. if we can't use then what is the alternative to run in background mode.

    A program that runs in background mode doesn't have any connection to a frontend. After all, you can schedule it to run at a time where your frontend computer is not running.
    In this case you have to load your files on the application server (or a mount point) and use the FMs C13Z_FILE_DOWN(UP)LOAD_ASCII(BINARY)
    Regards
    Frank

  • Read flat file form other than sapserver(not in sapser) in background mode

    Dear Friends,
    I want to upload data from flat file to sap in background mode.
    I know how to read file for application server in background mode, but my requirement is , i need to read the flat file data from other than sap server in backgound mode.
    please help me,
    Regards,
    prabhu

    hi
    you can do like this way.
    fist should get de directory file name.
      CALL FUNCTION 'RZL_READ_DIR_LOCAL'
        EXPORTING
          NAME           = FILE_PATH
        TABLES
          FILE_TBL       = I_FILES
        EXCEPTIONS
          ARGUMENT_ERROR = 1
          NOT_FOUND      = 2
          OTHERS         = 3.
      IF SY-SUBRC EQ 0.
        FILES_TAG = 1.
      ENDIF.
    second
       LOOP AT I_FILES.
    open datafilenaem.
    close datafilename.
    endloop.

  • BDC in Background mode

    Hi
    After running a BDC program in background, next day morning when you see the results, few records
    are not updated(error records). So at that what we do to update the remaining error records.
    Waiting for reply...
    Regards.

    Hi,
            I am also using BDC Uploads in background mode. I move the error records to separate internal table based on MSTYP in call transaction method. After execution of Recording ,that internal table has set of error records .I will get a file path from the variant saved and upload in error records in tat file path in application server . So they Can Know which records are not created.Some Sample code for moving errors.
    CALL TRANSACTION 'VK11' USING it_BDCDATA MODE 'N'
      MESSAGES INTO IT_MESSTAB1.
         loop at IT_MESSTAB1 INTO WA_MESSTAB1 .
        WA_MESSTAB-MSGTYP =   WA_MESSTAB1-MSGTYP .
        WA_MESSTAB-SPRAS = WA_MESSTAB1-MSGSPRA .
        WA_MESSTAB-MES_ID =  WA_MESSTAB1-MSGID     .
        WA_MESSTAB-MES_NO = WA_MESSTAB1-MSGNR    .
        WA_MESSTAB-MSGV1 = WA_MESSTAB1-MSGV1    .
        WA_MESSTAB-MSGV2 = WA_MESSTAB1-MSGV2    .
        WA_MESSTAB-MSGV3  = WA_MESSTAB1-MSGV3     .
        WA_MESSTAB-MSGV4 =  WA_MESSTAB1-MSGV4  .
        WA_MESSTAB-e_rec1 = WA_head1-vtweg .
        WA_MESSTAB-e_rec2 = WA_head1-werks .
        APPEND  WA_MESSTAB TO IT_MESSTAB.
        endloop.
        CLEAR: WA_MESSTAB, WA_MESSTAB1,idx.
        REFRESH IT_MESSTAB1.
        REFRESH IT_BDCDATA.
    IDX = 01.
    ENDLOOP.
    Regards,
    Manesh.R

  • Local file in background mode

    Hi experts,
    Is it possible to upload data from local drive(presentation server) to sap in background mode.
    As I know ,in the background mode we can upload files from application server only.
    but here my functional consultant saying they did  upload data from local drive to sap in background mode.
    please suggest.
    thanks in advance.
    sastry.

    hey,
    Yes it can be made possible,
    The only way to access files in a background job is to have them on the application server and opened via OPEN DATASET or similar.
    *--Local Variables
    DATA : l_file TYPE string,
    l_line TYPE string,
    l_index TYPE sy-tabix.
    *--Clear
    CLEAR : l_file.
    l_file = p_ipfile.
    *--Read the data from application server file.
    OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    *--Error in opening file
    MESSAGE i368(00) WITH text-005.
    ENDIF.
    *--Get all the records from the specified location.
    DO.
    READ DATASET l_file INTO l_line.
    IF sy-subrc NE 0.
    EXIT.
    ELSE.
    SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
    INTO st_ipfile-vbeln
    st_ipfile-posnr
    st_ipfile-edatu
    st_ipfile-wmeng.
    APPEND st_ipfile TO it_ipfile.
    ENDIF.
    ENDDO.
    Regards,
    Midhun Abraham
    Edited by: Midhun Abraham on Oct 8, 2008 4:36 AM

  • Communicating with presentation server in the background mode

    Hi Folks,
        I have a requirement to communicate the presentation server in the background mode. I'm following the below article for achieving it.
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2?quicklink=index&overridelayout=true|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2?quicklink=index&overridelayout=true]
    But I'm getting an error while testing in the dos prompt. The error is as following.
    The system cannot execute the specified program.
    Kindly Help.
    Regards,
      santosh

    But I'm getting an error while testing in the dos prompt. The error is as following. The system cannot execute the specified program.
    You see this error usually if some libraries (dll's) are missing. To investigate this issue it might help to use the [dependency walker|http://www.dependencywalker.com/] tool on the executable and check for any missing libraries. If you cannot figure it out yourself, please try to post exact comments of what you're doing and complete error messages including ideally version of your RFCSDK.
    Cheers, harald

  • IOS 7 Fetch background mode support

    iOS 7 added a new background mode "fetch" - reading the docs, the OS should periodically wake up the app and invoke a precise method to allow it downloading small chunck of data from remote servers.
    Any plans about supporting this feature? AIR SDK and runtime may support this by implementing the required methods and redispatching them to the app using an NativeApplication event (similar to the Event.SUSPEND strategy).
    A really nice addition to have would also be Flex polling channel integration, meaning that the remoting could adapt the polling channels could "poll" for new messages in this fetch window. This would allow for seamless integration between the iOS fetch strategy and the Flash/Flex remoting polling (probably this must be managed in Apache Flex channel set classes, if the runtime will provide the base integration with the iOS 7 fetch API).

    Hello,
    Could you please open a new enhancement bug report on this over at bugbase.adobe.com?  Once the bug has been added would you mind posting back with the URL so that others affected can add their votes and comments?
    Regards,
    Nimit

  • How to debugg in background mode

    Hi ,
         I have problem while running in background ,
    in mm01 transaction while crating a material in forground it is getting created ,and its perfect .but at the same time while trying to run the BDC in the background
    the same thing is going for dump,so i need to debugg in the background mode .
    can any one help me out on this how to debugg on the background mode.
    Thanks in advance ,
    vinay .

    Hi srinivas,
        Below is the dump iam getting .
    Error analysis
        A RAISE statement in the program "CL_GUI_TEXTEDIT===============CP" raised the
         exception
        condition "ERROR_CNTL_CREATE".
        Since the exception was not intercepted by a superior program
        in the hierarchy, processing was terminated.
        Short description of exception condition:
        For detailed documentation of the exception condition, use
        Transaction SE37 (Function Library). You can take the called
        function module from the display of active calls.
    How to correct the error
        You may able to find an interim solution to the problem
        in the SAP note system. If you have access to the note system yourself,
        use the following search criteria:
        "RAISE_EXCEPTION" C
        "CL_GUI_TEXTEDIT===============CP" or "CL_GUI_TEXTEDIT===============CM002"
        "CONSTRUCTOR"
        or
        "CL_GUI_TEXTEDIT===============CP" "ERROR_CNTL_CREATE"
    "CL_GUI_TEXTEDIT===============CP" "ERROR_CNTL_CREATE"
    or
    "SAPMMG01 " "ERROR_CNTL_CREATE"
    If you cannot solve the problem yourself and you wish to send
    an error message to SAP, include the following documents:
    1. A printout of the problem description (short dump)
       To obtain this, select in the current display "System->List->
       Save->Local File (unconverted)".
    2. A suitable printout of the system log
       To obtain this, call the system log through transaction SM21.
       Limit the time interval to 10 minutes before and 5 minutes
       after the short dump. In the display, then select the function
       "System->List->Save->Local File (unconverted)".
    3. If the programs are your own programs or modified SAP programs,
       supply the source code.
       To do this, select the Editor function "Further Utilities->
       Upload/Download->Download".
    4. Details regarding the conditions under which the error occurred
       or which actions and input led to the error.
    Thanks,
    vinay

Maybe you are looking for

  • Calling session bean's business method through web dynpro component

    Hi All, Can anybody tell me how to call a session bean's methods through a web dynpro WITHOUT java-model or web service model ?? I have following scenario:- 1. Stateless Session bean having two business methods 2. Web Dynpro component 3.Now i want to

  • Replication of custom-fields in BP from CRM to ECC

    Hello all, I have created additonal attributes for a Business Partner in CRM7.0 (ZZKATR1 and ZZKATR2) using the tool AET. In ECC I've added these attributes to tabel KNA1 using an append structure. The replication of the BP from CRM to ECC is already

  • Print Preview broken with Reader 9.3/Firefox 3.5.7?

    Since updating to Firefox 3.5.7 and Reader 9.3, one of our users reports the print preview no longer works properly.  Trying to downgrade to Reader 9.2 or Firefox 3.5.6 produced similar results on my test workstation. Computers in question are runnin

  • Problem when i transported  DTP from DEV to QA

    I am facing a problem when i transported  DTP from DEV to QA   It is not in the folder were it have to be,but i can see it in RSBKDTP table of QA

  • Mail "evaluating messages" forever -- and others' problems

    I suspect something's up with Mail.app. I've read several threads of people in the last few days having trouble with Mail. For some of them, they have to go to the Web to get their mail. For me, Mail is "evaluating messages" for up to ten minutes at