Program works but background job for that program fails....

I have a requirement where I have to collect the details of the purchase order and put the details in XML file format and FTP the XML file to an external third party FTP Server.
To realize this I developed a report program which follows following logic.
1)     First I collected the PO details by calling the BAPI BAPI_PO_GETDETAIL1.
2)     Then using the following link "/people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
I converted these PO details to the XML file format that the third party people accept.
       In the code I used u201CCALL METHOD cl_gui_frontend_services=>gui_downloadu201D and in this process first the XML file is generated and is getting stored on my deskytop.
3)     Then I called HTTP_SCRAMBLE, FTP_CONNECT, FTP_COMMAND , FTP_DISCONNECT and RFC_CONNECTION_CLOSE.
This works perfectly well and each time I execute the report the file is getting FTPu2019ed to the third party FTP server.
Now I tried to schedule a batch job for this and the batch job fails with follwing errors
02/25/2009 15:08:47 Error in Control Framework
Message Class  = FES         
Message Number = 022  
Message Type   = E
02/25/2009 15:08:47 Job cancelled after system exception ERROR_MESSAGE 
Message Class  = 00        
Message Number = 564  
Message Type   = A                
Can some one tell me what is going wrong. My report works perfect in front end but fails if I try to schedule a background job for it in SM36.
Can you please tell me whatz going wrong with batch job? Any Help is highly appreciated.
Regards,
JEssica SAm

Robert...Thanks for the reply...
I am using follwing code
l_xml_size = l_ostream->get_num_written_raw( ).
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        bin_filesize = l_xml_size
        filename     = FILEPATH
        filetype     = 'BIN'
      CHANGING
        data_tab     = l_xml_table
      EXCEPTIONS
        OTHERS       = 24.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Now what changes should i make..where should i store my XML file then instead of my desktop?
and whih Function Module should i Use..

Similar Messages

  • How to create Background job for Dialog program

    Hi Experts,
    I have copied Standard tcode to Z-tcode (CS12 tcode).
    Now my requirement is to create background job for this program (but program is not a 'E' type its 'I').
    How we can schedule Dialog program to Background.
    Pls suggest me.
    Regards
    SK

    Hi do as below :
    Reefer below :
    Bakcground Job Creation
    You will have to submit your report using Submit statement ,
    then inside the submitted report write open_job.
    Regards,
    Uma

  • Schedule a background job for a program using ABAP code.

    Hi,
    I have to write a program to schedule a background job for another program.
    Need your help to understand how we can achieve this functionality.Any example of an abap code would be of great help.
    Need it urgently.
    Thanks in advance.
    Sandeep.

    Hi Sandeep,
    Here is the demo program regarding the BDC For the background job.
    report zprprbdc1
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    ***data: begin of itab occurs 0 ,
    ***       matnr(20) type c,
    ***       mbrsh(30) type c,
    ***       mtart(30) type c,
    ***       kzsel(20) type c,
    ***       maktx(40) type c,
    ***       meins(5) type c,
    ***       end of itab.
    data: begin of record occurs 0,
    * data element: MATNR
            matnr_001(018),
    * data element: MBRSH
            mbrsh_002(001),
    * data element: MTART
            mtart_003(004),
    * data element: XFELD
            kzsel_01_004(001),
    * data element: MAKTX
            maktx_005(040),
    * data element: MEINS
            meins_006(003),
    * data element: MTPOS_MARA
            mtpos_mara_007(004),
          end of record.
    *** End generated data section ***
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    **do.
    **read dataset dataset into record.
    **if sy-subrc <> 0. exit. endif.
    call function 'GUI_UPLOAD'
      exporting
        filename                      = 'c:\jitu\bdc\10002.txt'
       filetype                      = 'ASC'
       has_field_separator           = 'x'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      tables
        data_tab                      = record
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
    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 record .
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-matnr_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-mbrsh_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-mtart_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-kzsel_01_004.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-maktx_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-meins_006.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-mtpos_mara_007.
    perform bdc_transaction using 'MM01'.
    **enddo.
    endloop.
    perform close_group.
    *perform close_dataset using dataset.
    &*****************Reward point if helpful************&

  • Why the background job for downloading file failed?

    I have a background job for downloading file with logical path.
    with
    'OPEN DATASET l_out_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT';
    Now, the program can be run in foreground;but when it running on background, it shows 'open file error'.
    I do not know what happen?
    Please help ~~

    Hi,
    The logical path you have provided might be incorrect or you might not have the necessary authorization to read/write on that folder.
    Please check the folder in transaction AL11 & check whether you have the authorization to read/write. BASIS consultant would be able to tell you about it.
    Best regards,
    Prashant

  • RFC works but web service for that RFC does not work..weird??

    hi all,
    I created an RFC enabled function module to create a Sales Order in SAP CRM for both for Varinat Configurable and Normal Materials.
    The RFC Works well...if i test it..it creates an order and if i go and check the sales order in CRM GUI. i find that sales order is perfect with the configuration data for the configurable items..
    Now i created a Web service for this RFC by calling the Web service creation wizard.
    Now i am testing the Web service in SOAMANGER T-code and the sales order is created and weird thing the configuration data is missing for Varinat configurable item..
    But i dont encounter this problem if i am testing the RFC directly
    What could be wrong...why is my web service behaving weird?
    I am dying to find this out..did any body enocunter this situation befor ..please help

    Sure Oliver..
    I put a break point using external debugger and when i was testing the Web service in SOAMANAGER..
    i could then land into ABAP debugger.
    There in my RFC i put a logic such that i diffenetiate between VC and Non-VC items and fill the Charateristic Values only if it is aVC item.
    I saw that the IF condition was not executing as they suddenly changed the material structure in ECC and it reflected in CRM.
    SO i am inputting 18 digits of material no like '000000000000000001' for '1'...but the if condition was checking against 1 =1 so that loop never executed and chara values are not getting filled.
    But if i test RFC in se37 ..it works as i am inputting 1...
    Since Web service works with XML (WSDL) need to be very careful with the format in which data is inputted and the format in which the logic we wrote in RFC works.
    Once again ..thanks to all people who helped me with the answers...
    Regards,
    Jessica Sam

  • When opening fox or any program a help pop up for that program keeps popping up until I close the program( fox, internet explore,...AVG etc )....Can anyone help me get rid of this?

    Everytime I turn on my computer a help pop up comes up.When opening any program Fox browser, internet explorer, AVG, etc a help panel opens up. It does not stop until I close the program. I have run AVG and Spybot and it does not fix it.
    == This happened ==
    Every time Firefox opened
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)

    Erin I am sorry you are facing difficulty downloading the Creative Cloud software.  It can be frustrating when you do not have access to high speed stable Internet.
    You can attempt to download the base installers and updates by following the directions listed at:
    Adobe CC 2014 Direct Download Links: Creative Cloud 2014 Release | ProDesignTools
    All Adobe CC 2014 Updates: The Direct Download Links for Windows | ProDesignTools
    You may want to attempt to utilize some form of download management as the main issue seems to be the stability of your connection.
    There is not currently a method to resume downloads within the Creative Cloud Desktop application.  There is download management included though it may not be enough to compensate for the current Internet connection.  If you are curious you can find additional details on how to resolve download errors at Error downloading Creative Cloud applications - http://helpx.adobe.com/creative-cloud/kb/error-downloading-cc-apps.html.

  • Background Job Scheduling of Program RSEIDOC2

    Hi Folks,
    Can we schedule program RSEIDOC2 as background job? This program is used by Transaction Code WE02.
    If it is possible then please let me know how can i do the same. Currently I am trying to schedule this with SM36 but when executing with SM37 then it is moving to canceled status. So please let me how it can be done??
    Thanks and regards,
    Siddarth

    Please refer to the SAP documentation [Scheduling Background Job|http://help.sap.com/saphelp_nw70ehp2/helpdata/EN/c4/3a7f87505211d189550000e829fbbd/frameset.htm]
    Regards
    Suresh

  • I am unable to open my Photoshop program after installing the entire Creative Suite: Premium Production 6. All other programs work, but with Photoshop it says that the program is "locked or in use by another user". I need this fixed immediately.

    I am unable to open my Photoshop program after installing the entire Creative Suite: Premium Production 6. All other programs work, but with Photoshop it says that it "Could not open a scratch file because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the 'Properties' command in the Windows Explorer to unlock the file." Then I select "OK" and the next message comes up "Could not initialize Photoshop because the file is locked, you do not have the necessary permissions, or another program is using the file. Use the 'Properties' command in the Windows Explorer to unlock this file. I installed all of the programs on the same day from a CD. I need this fixed immediately.
    I am not interested in switching to Creative Cloud, so don't even suggest it. I spoke to Mashmi (or something to that effect) on the "Support" Chat and there was absolutely no support. Useless actually.
    Thanks in advance.

    Could not open a scratch file because the file is locked or you do not have the necessary access privileges. (…) | Mylen…
    Mylenium

  • Error in background job for program RSGET_SMSY error message No active job

    Hello!
    I would like to set up the Change Request Management functionality in SAP Solution Manager.
    The only red warning by executing Test-button in Tcode “SOLAR_ADMIN_PROJECT” is:
    <b>Error in background job for program RSGET_SMSY error message No active job found</b>
    Can someone please tell me how to solve this problem?
    (tcodes, technical steps)
    Thank you very much!
    regards
    Thom

    Thank you very much!
    Can you also help me with the warning "Errors occurred during synchronization of the system landscape" in tcode SOLAR_PROJECT_ADMIN" --> System landscape --> Change requests --> "Refresh"?
    The second issue I cannot see any projects in Tcode "/TMWFLOW/CMSCONF"
    according to the SPRO-step "Set Project Assignment of Requests as Mandatory"
    Thank you!
    regards

  • Restrict background Jobs thro' ABAP Program

    Hello,
    While I was working in one of the customer place , they restricted the background jobs thro' one ABAP program for customer reports . Unfortunately , I don't have the source code with me. As you are all aware that users fires the background jobs for different periods so that he/she can submit the reports to the higher up in time.
    Scenario : I have 10 application servers and each application has 20 work processes ( 12-Dialog,4-Background,3-spool,1-Gateway). I would like to restrict 1 background process/per appl server  for customer reports(Y OR Z programs) during the business hours .
    It would be great help  to Basis Consultants , if you can contribute to restrict the background jobs .
    Thanks
    Regards,
    S.Srinivasan

    Hi Daniel,
    The program MEREP_DISTRIBUTOR(Client Data Distributor) determines delta data independent of a download request from the client.This is mainly used to reduce the load on the server and scheduling of this program is part of "SAP MI Administration" which is generally performed as part of OR after MI Post Installation steps that recommends you to Schedule Background Jobs for Generic and Smart Sync which you wanted to confirm in your post.So the programs
    (1)WAF_MW_MAPPING
    (2)WAF_DEPLOYMENT_FROM_ROLES &
    (3)MEREP_RETRY_BP
    are good enough for scheduling Generic & Smart Sync(in your case for MAM).Apart from these you may have to check up the Handler Settings that is mentioned in my previous post.
    Hope this helps.
    Thanks
    Gisk

  • I have an external camera, IceCam2, connected to my MacBook Air, but I cant switch to the camera when I try to use videocam on a websayt. How do I switch from internal to externl camera? In use is Adobe Flash Player, but I cant open that program, is the s

    I have an external camera, IceCam2, connected to my MacBook Air, but I cant switch to the camera when I try to use videocam on a websayt. How do I switch from internal to externl camera? In use is Adobe Flash Player, but I cant open that program, is the s

    I think the McAfee suite will do the trick when I pay them a one-time fee of $69 or $179 for a year for unlimited support.
    Your call of course but IMO a waste of money. Please read this first:
    There are many forms of ‘Malware’ that can affect a computer system, of which ‘a virus’ is but one type, ‘trojans’ another. Using the strict definition of a computer virus, no viruses that can attack OS X have so far been detected 'in the wild', i.e. in anything other than laboratory conditions. The same is not true of other forms of malware, such as Trojans. Whilst it is a fairly safe bet that your Mac has NOT been infected by a virus, it may have another security-related problem, but more likely a technical problem unrelated to any malware threat.
    You may find this User Tip on Viruses, Trojan Detection and Removal, as well as general Internet Security and Privacy, useful:
    https://discussions.apple.com/docs/DOC-2435
    The User Tip (which you are welcome to print out and retain for future reference) seeks to offer guidance on the main security threats and how to avoid them.
    More useful information can also be found here:
    http://www.reedcorner.net/mmg/

  • How to deactivate *Schedule Background Job for Work Items with Errors* SWU3

    Hello Guys,
    Can any one tell me how do I DEACTIVATE Schedule Background Job for Work Items with Errors in sap workflow SWU3.
    Currently it is green which I don't want. I want to stop this service.
    Regards
    NK

    Hello,
    You could also just stop the job in tx SM37.
    But why would you want to do this? As a test?
    regards
    Rick Bakker
    hanabi technology

  • I need Help for that program

    i do aprogram for sample calculator by Java there it , i Hope if u have any sugesst say to me Or if u have a program for that.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Z extends Applet implements ActionListener {
         int n4=0;
         StringBuffer E;
         Character x;
         String s;
         TextField T1;
         public void init(){
              T1=new TextField(20);
              this.add(T1);
         Button a=new Button("2");
         this.add(a);
         a.setActionCommand("2");
         a.addActionListener(this);
         Button b=new Button("3");
         b.setActionCommand("3");
         this.add(b);
         b.addActionListener(this);
         Button d=new Button("-");
         this.add(d);
         d.setActionCommand("-");
         d.addActionListener(this);
              Button f=new Button("+");
         this.add(f);
         f.setActionCommand("+");
         f.addActionListener(this);
    Button c=new Button("=");
         this.add(c);
    c.setActionCommand("+");
    c.addActionListener(this);}
    public void actionPerformed(ActionEvent y){
         s=(y.getActionCommand());
         E=new StringBuffer();
                   x= new Character (s.charAt(0));
         E.append(x.charValue());
              if(E.length() ==3){
                   Character n=new Character(E.charAt(0));
                        Character m=new Character(E.charAt(2));
                   int n1=Integer.parseInt(n.toString());
                   int n2=Integer.parseInt(m.toString());
              if(E.charAt(1)=='+'){
                   n4=n1+n2;}
                   if(E.charAt(1)=='-'){
                   n4=n1-n2;}
                   if(E.charAt(1)=='*'){
                   n4=n1*n2;}
                   if(E.charAt(1)=='/'){
                   n4=n1/n2;}
                   if(s=="="){
                   T1.setText(String.valueOf(n4));
         

    the program is used for do acalculature, i want to know ,why he donot work? .The idea of that program it
    When u click in any number(button) the action performed get that number , and store it in StringBuffer which that stringbuffer enabel me to store three things(the first number, the sign which be *or+, and the secand number)
    and then put the result in variable and then put the result as aString in Text Field.
    I hope u can understand me now and help me for that program, If u donot understand me ,Please Sugesst to me how to do the calculature program.thanks
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Z extends Applet implements ActionListener {
         int n4=0;
         StringBuffer E;
         Character x;
         String s;
         TextField T1;
         public void init(){
              T1=new TextField(20);
              this.add(T1);
         Button a=new Button("2");
         this.add(a);
         a.setActionCommand("2");
         a.addActionListener(this);
         Button b=new Button("3");
         b.setActionCommand("3");
         this.add(b);
         b.addActionListener(this);
         Button d=new Button("-");
         this.add(d);
         d.setActionCommand("-");
         d.addActionListener(this);
              Button f=new Button("+");
         this.add(f);
         f.addActionListener(this);
    Button c=new Button("=");
         this.add(c);
         c.setActionCommand("=");
    c.addActionListener(this);
    public void actionPerformed(ActionEvent y){
         s=(y.getActionCommand());
         E=new StringBuffer();
                   x= new Character (s.charAt(0));
         E.append(x.charValue());
              if(E.length() ==3){
                   Character n=new Character(E.charAt(0));
                        Character m=new Character(E.charAt(2));
                   int n1=Integer.parseInt(n.toString());
                   int n2=Integer.parseInt(m.toString());
              if(E.charAt(1)=='+'){
                   n4=n1+n2;}
                   if(E.charAt(1)=='-'){
                   n4=n1-n2;}
                   if(E.charAt(1)=='*'){
                   n4=n1*n2;}
                   if(E.charAt(1)=='/'){
                   n4=n1/n2;}
                   if(s=="="){
                   T1.setText(String.valueOf(n4));
         

  • Why does Mobile Data notification keep coming up saying 'Mobile Data is turned off for "Numbers" and I have to click on OK to get rid of it? I KNOW it's turned off for that program because that is what I want it to be set at. What I DON'T want is to have

    Why does Mobile Data notification keep coming up saying 'Mobile Data is turned off for "Numbers" and I have to click on OK to get rid of it? I KNOW it's turned off for that program because that is what I want it to be set at. What I DON'T want is to have to click on OK EVERY TIME I open the program when I'm away from wifi.

    That is how it works in general, not just for Numbers. It irritates me on other apps at times, although I can see an argument that if it didn't do that then people would complain about missing functionality after they forgot they had turned data off for an app. At any rate, this is a user to user support forum and we can't do anything about it. If you want to make a suggestion to Apple, following is a place to do that: http://www.apple.com/feedback/

  • HT1353 I have a Ipod mini 6gb that still works but a new computer that doesn't have its software.  How can I download the software for it

    I have a Ipod mini 6gb that still works but a new computer that doesn't have its software.  How can I download the software for it

    Check the iPod Hardisk health with the iPod  Disk Diagnostic, as posted by tt2
    https://discussions.apple.com/message/17776595#17776595
    It wont fix your problem, but may tell help troubleshoot, why it is freezing iTunes, especially when the Pending and Realloc numbers are high.
    have a nice day!

Maybe you are looking for

  • How to Save for Web in the correct size?

    So i created a new project in Illus. CS5 with an artboard size of 700x150 pixels. I have two graphics in there that are about 215 pixels tall so part of it flies off the artboard, but i have a clipping part that hides all the parts that i dont want t

  • Newbie Question: Getting the file name from a JFileChooser

    Hi, I have a simple problem. I'd like to get the filename that a user types into a JFileChooser Save dialog before they save a file. How do I retrieve this name? Cheers, Chris Share

  • MS Access ODBC to Oracle missing tables

    When linking Oracle 8i tables to a MSAccess database using an ODBC connection, some of the tables are not being shown in the list for selection. I can't seem to find any differences between those tables that are listed and those that are not. This is

  • Please give me some material about Oracle forms..!

    HI All This is Narendra ,I did Oracle Certification,now i want to learn Oracle forms also. Please give me some material if you have it,which test book is good for starting and what all to learn.Please send me if you have any PDF's Best Regards Narend

  • Work order settlement issue

    Hi I am not an expert in Work orders and appreciate your input. A work order has been settled to a Sales order ( I can't understand the logic behind settling to a Sales Order). The Profit centre assigned to the sales order is wrong. I.e. they need it