Execute more than one times external command of OS Windows NT

Hi all,
        I have to execute more than one times from an ABAP program an exernal command of Operating system windows NT . In order to reach this goal I found the standard program RSBDCOS0 and it works very well if you execute it one time.  Unfortunately I have to execute this external command more than one times. Is there any soluiton?
thank to all
                    Gino Bonfiglioli

Well why are you using this report RSBDCOS0 to execute external commands?
Because SAP provides certain function modules that can be used to call operating system commands; so you can use these functions to do your task.
Just check the following link
http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/0971e1543b11d1898e0000e8322d00/frameset.htm
As you mentioned that you need to execute multiple times, you can easily put the call to function module inside a loop or do/enddo structure. for example consider the following
do 3 times.
call function 'SXPG_COMMAND_EXECUTE'                           
      exporting                                                 
           commandname                   = 'Put operating system command here'          
           additional_parameters         = full_filename        
           targetsystem                  = targtsys  
           stdout                        = 'X'                  
           stderr                        = 'X'                  
           terminationwait               = 'X'                  
      importing                                                 
           status                        = sxpg_status          
           exitcode                      = sxpg_exitcode        
      tables                                                    
           exec_protocol                 = sxpg_results         
      exceptions                                                
           no_permission                 = 1                    
           command_not_found             = 2                    
           parameters_too_long           = 3                    
           security_risk                 = 4                    
           wrong_check_call_interface    = 5                    
           program_start_error           = 6                    
           program_termination_error     = 7                    
           x_error                       = 8                    
           parameter_expected            = 9                    
           too_many_parameters           = 10                   
           illegal_command               = 11                   
           wrong_asynchronous_parameters = 12                   
           cant_enq_tbtco_entry          = 13                   
           jobcount_generation_error     = 14                   
           others                        = 15.                  
write the results
loop at sxpg_results.
write:/ sxpg_results-length,
         sxpg_results-message.
endloop.
refresh sxpg_results.
enddo.

Similar Messages

  • Executing more than one procedures at a time

    Hi,
    Can any one tell how to execute more than one procedure at a time..
    I am trying to run like this..but its throwing an error...can anyone please suggest?
    CREATE OR REPLACE PROCEDURE HYSXM.QA_AUTO_RETURN_FINAL IS
    i EVENTS_TEST_DATA%ROWTYPE;
    BEGIN
    DELETE FROM TEST_EVENTS;
    COMMIT;
    for i in ( SELECT RADIO_ID,EVENT_TYPE FROM EVENTS_TEST_DATA )
    LOOP
    QA_AUTO_INSTALL(i.radio_id,i.event_type);
    QA_AUTO_RESOLD(i.radio_id,i.event_type);
    QA_AUTO_RETURN(i.radio_id,i.event_type);
    END LOOP;
    END QA_AUTO_RETURN_FINAL;
    /

    what error message is being returned??

  • Execute more than one thing at the same time.

    Hey why every time i want to execute more than one thing(create tables) at the same time
    it say "ORA-00911: invalid character" , i dont wanna execute one thing at a time. check the pic please
    http://img370.imageshack.us/img370/5120/oraclesw5.jpg
    but in my school i use something called isqlplus and i can execute all the things i want at the same time with-out any error.
    im using right-know
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    1) Unless you are using something like DBMS_JOB, SQL*Plus, iSQL*Plus, the Oracle XE web-based front-end, or any other application is going to execute one SQL statement at a time.
    2) There is a dedicated XE forum-- the folks over there might know how to run a script using this particular front-end.
    3) Assuming the XE database is on your local system, you should be able to log in via SQL*Plus and use that utility to run your scripts.
    Justin

  • How to delete more than one workbook from command line

    Hi, I'd like to delete more than one workbook from command line:
    The following syntax, it doesn't work....but I followed the manual instructions:
    dis51adm.exe /connect eul/eul@uatdb /delete /workbook "ALE_TEST_1, ALE_TEST_2" /eul eul /log D:\Ale\delete.log
    where:
    eul/eul@uatdb: is the db’s schema/user where the EUL is installed;
    /delete "ALE_TEST_1, ALE_TEST_2": is the command to delete the workbooks, specified inside the “” (with the relative path)
    /log D:\Ale\delete.log: is the command to write a log’s file named “delete.log” to track the action     
    The log file says:
    22/4/2008 4:00:26 μμ
    dis51adm.exe /connect /delete /workbook ALE_TEST_1, ALE_TEST_2 /eul eul /log D:\Ale\delete.log
    Document ALE_TEST_1, ALE_TEST_2 not found in EUL.
    Internal EUL Error: ObjectNotFound - Can't find EUL element
    There are 0 eul elements to be deleted.
    Completed deleting eul elements.
    22/4/2008 4:00:29 μμ
    Anyone can tell me how is the right syntax ?
    Thanks in advance
    Alex

    Hi Rod
    I was coming to that conclusion myself but wanted to wait until the other avenues had been exhausted first - aka making sure of the workbook names.
    I checked through all of the command line documentation and read nothing which clearly indicated that only one workbook could be processed at a time, other than the fact that the syntax says workbook and not workbooks, which could be a big clue.
    I think you are right though in that it has to be one at a time, which would be a pain.
    Best wishes
    Michael

  • How to share more than one Time Machine folder

    Hi,
    With Snow Leo Server I found how to find how to share more than one Time Machine Folder but I can't see how to do the same with Lion Server, could you help me with that ?
    The goal of that is to offer one TM folder per user which is located on a dedicated partition in order to limit the size of TM backups per user (150Gig).
    In Lion, in can only share one TM folder for everybody and I didn'tfind if I can set a limit size per user...
    Thank you in advance,

    I have figured out a way to enable multiple backup targets.
    However, it's one of these things I wouldn't want to describe to anyone except true programmer types, because everyone else has a 90%+ chance of messing up their system if they do something wrong.
    It involves turning off file sharing, and then editing the plist files in /private/var/db/dslocal/nodes/Default/sharepoints/
    The gist of it is this:
    a) first create all the share points you later want to use for TimeMachine, and set them up for afp-only file sharing, also create one TM target, which you can either use later, or have there so the system has one entry it knows how to handle. I just made a bogus one that I'm not actively using.
    b) turn off file sharing in Server.app
    c) turn off TimeMachine in Server.app
    d) now you can edit the files, the easiest is with Xcode, so you may want to install that first
    e) for each sharpoint you made in a) there will be a corresponding .plist file in the location indicated, these are the files that need to be edited.
    f) for each of these files
         1) the item0 string property in the timeMachineBackup array must be switched from 0 to 1
         2) a new key of type array with the name timeMachineBackupUUID must be created
         3) in the newly created array an item of type string must be placed with the value of a UUID, which can be created with the shell command uuidgen
    g) make sure all the edited plist files are saved
    h) turn on TimeMachine in the Server.app again
    If all went well, you now should be able to go to one of your networked client computers and see all the time machine share points just created as options for being a time machine target.
    Anyway, if you go that route: be careful, don't blame me if you muck things up...

  • How to deploy a Webapplication on WAS more than one times on same server?

    Hi all,
    I 've a special problem:
    In our web-app (some DC's) also stored propertie-Files. Now we would to deploy this application more than one times at same server using different WebContentRoots. (f.e. http://server/app1 and http://server/app2 a.s.o.)
    We know, that we must create different EAR-Projects and refer the web-Module and configure the application.
    But in the second application there it's recommended to change some properties.
    How we can handle this in JDI without copy the web-application?
    I hope my question can be understood.
    Best Regards
    Sven Rickelt
    Using Netweaver + WAS 6.40 2004 SP 13

    Hi Sven,
    as I'm new to NWDI, I cannot give you a 100 percent, field-tested solution. But have you already thought about using the Configuration-Adapter?
    If you can change the source of your web-app, you could maintain the data formerly stored in property files using the configuration adapter of visual administrator. The SC <a href="http://help.sap.com/saphelp_nw04/helpdata/en/45/e7e14b517b42788a1c166f9f32455e/content.htm">configuration</a> allows you to access this data.
    With this approach you can stick to one web-application and do the configuration work separately for each deployed application.
    Best regards,
    Frank

  • Can we prevent entering the same condition more than one time?

    Hi friends,
    Can we prevent the user for entering the same condition type more than one time in same sales order?
    Rama rao

    /write codes in Include ZXVVAU05/
    /prgm avbl in one of the msg in forum/
    DATA: BEGIN OF tXKOMV OCCURS 50.
    INCLUDE STRUCTURE KOMV.
    DATA: END OF tXKOMV.
    data : tab_name(40) type c ,
    ld_len type i , ld_len1 type i .
    field-symbols : <tab> type any.
    tab_name = '(SAPMV45A)XKOMV[]'.
    assign (tab_name) to <tab>.
    txkomv[] = <tab>.
    describe table txkomv lines ld_len .
    sort txkomv by kposn KSCHL .
    delete adjacent duplicates from txkomv comparing kposn KSCHL .
    describe table txkomv lines ld_len1 .
    if ld_len1 ne ld_len .
    refresh txkomv .
    message e002(zmm) with ' Please remove duplicate condition in item price' .
    endif .

  • How to prevent executing more than one client from a machine?

    Hi all,
    Currently I am doing a client server project in java. The client is java swing. There is a requirement to prevent executing more than one client from a machine.
    Now I am relying on socket for this. I listen to a port, say 15000 and when the second session is started it would give an exception at the socket. I know that this a trivial method. Can anybody please suggest a better method. Also is it possible to bring focus to already executing client, if the user tries to execute the client program again in the same machine?
    An early answer to this question is highly appreaciated.
    Thanks in advance
    SSM

    Thanks for the suggestion, but I dont think we can use socket for this. And again if we use file for the same as you described, I think it would sometime create a some serious side effects. Suppose after one client session is invoked, the power goes off. In this case the client shut down is not in the normal sequence and hence we cannot remove the file programaticaly. This creates big problem when the user tries to run client again.
    I am really interested to know, is there any standard way in java which can be used to achieve this. Also is it possible to give focus to already executing client program if the user tries to invoke the client again.
    Thanks
    SSM

  • Will syncing my iphone 3GS more than one time daily wear out the battery?

    Will syncing my iPhone 3GS more than one time daily with Outlook 2007 wear out the battery? An Apple Care advisor said I should only sync it one time per week, but I need to do it daily as I use the calendars and notes for work.

    CindiS wrote:
    Will syncing my iPhone 3GS more than one time daily with Outlook 2007 wear out the battery?
    No.
    An Apple Care advisor said I should only sync it one time per week
    Whoever you talked to has no idea what they are talking about. Ignore their advise.

  • Block create type of operation more than one time

    Hello SAP CRM Experts!
    I have a question.
    How do I get block the user create a type of operation more than one time?
    For example, I have a kind of opportunity that can be created only once for each client. How can I do this using the customizing?
    Best Regards!
    Tks!

    Hi,
    you could only limit the assigned internal number range to one object, which would allow only one document to be saved. The next creation would then fail since there is no number available.
    This is the only solution I can think of, otherwise you need to program a BADI.
    Regards, Kai

  • How to post GR from po more than one time?

    i want to post goods receipt from PO more than one time even the quantity of PO have been totally receipted.

    Hi Dear,
                 whats the problem in that if you have recieved 100 quantity all together, and want to post in break-ups then you can surely do that by changing the quantity in the GR, the system will each time suggest the remaining full quantity, you just need to change it.
    Hope it helps.
    Regards,
    Yawar Khan

  • More than one time machine backup..

    Is it possible to make time machine backup to more than one location? I have a nice big 2TB drive at my office that I use for time machine and it works perfectly but I would also like to run a second time machine backup to a portable 1TB drive that I own so that I have a backup that I can carry around with me as well as the fixed backup I leave at my office.
    When I last tried to backup to the portable drive it forgot all about the original backup so when I came to try and back that up again it wanted to run from scratch and ignored all of the files on the external drive.

    Chanandl3r wrote:
    I then ejected the big 2TB drive and re-connected the smaller 1TB portable drive. I opened TM and clicked on Backup Now
    Did you change the destination via TM Preferences > Select Disk?  If not, that may be the problem.  
    Can't I just plug in different disks when I want and the system recognise them and run the appropriate backup for me?
    No; you must tell TM when you swap destinations.
    Did the new backup complete?  Are you sure TM was writing to the 1 TB drive?  There are some circumstances where OSX will "forget" that an external drive has been disconnected, and create a folder in the /Volumes folder on your internal HD; then Time Machine (or other app) will write there, instead of to the external HD.   See the blue box in Where did my Disk Space go? to check.

  • How can i find out the more than one times occurance of integer in a array?

    How can i find out the more than one occurance of integer in a array. Assume i have 2,2,3,4,2,5,4,5 in a Array and i need to find out the how many times of 2, 5 and 4 is exists in that array. Please some one help me as sson as possible. thanks in advance....

    Kumar_Mohan wrote:
    How can i find out the more than one occurance of integer in a array. Assume i have 2,2,3,4,2,5,4,5 in a Array and i need to find out the how many times of 2, 5 and 4 is exists in that array. Sort the array. Then loop through it and compare each i-th element with the (i+1)-th element.
    Please some one help me as sson as possible. thanks in advance....In future postings, please refrain from telling that it is urgent, or you need help ASAP. It is rather rude to do so.

  • Report is executing more than one hour

    Hi All,
    I have an issue with my report,its taking more than one hour for execution.
    This report is called through an package,in package there are cursors which retrive data and sends to mail.The problem is with this select statement in cursor,its taking a lot of time to retrive the data.
    In my cursor select statement i am using the following tables
    HZ_PARTY_SITES HPS,
    HZ_CUST_ACCOUNTS CUST,
    HZ_CUST_ACCT_SITES_ALL HCASA,
    HZ_CUST_SITE_USES_ALL HCSUA,
    HZ_LOCATIONS HL,
    OE_ORDER_HEADERS_ALL OOH,
    OE_TRANSACTION_TYPES_TL OT,
    OE_AUDIT_ATTR_DESC_V AADV
    when i use OE_AUDIT_ATTR_DESC_V ,its taking a lot of time to retrive.So any one can help me out in this issue,how to add this view to other tables
    Regards,
    RR

    RR,
    Before you add any indexes to the listed tables, check with Oracle support to ensure you will be violating your Oracle Enterprise Business Suite agreement. Oracle has specific rules on modifying EMS tables. Additionally, any EBS patch or update that gets applied will likely drop any custom changes to these tables. It might be better for you to open a Service Request with Oracle Support and have them tell you how to improve the performance of your query since all of your tables are EBS tables.
    Craig...
    Message was edited by:
    CraigB
    RR, you may also want to check with your DBA(s) to see when the Statistics were last gathered on these tables.

  • Can we execute more than one SQL in Stored Procedure?

    Please help me with this.
    I am connecting to SQL SERVER
    Thanks
    Venu

    Hi Venu,
    >>1) Get the input parametrs for SP in from file
    You can pass parameters to the SP from the payload of the message. I am not sure what do you mean by "Getting the parameters for SP in form file"..
    >>2 Configure Receiver JDBC adapter(Synchronous)which executes a STORED PROCEDURE that has some processing logic containing more than one sql statment
    This is no problem. You can have any number of select /update statements inside the stored procedure. But your stored procedure will not return data to XI and that will not be sent as a response to your BPM
    3) Send the response from SP to a BPM
    yes.You can have another Stored procedure that have only one select statement to send response to BPM. You may have to define abstract interfaces .
    hence for 2) and 3) the message payload would be something like this
    <StatementName1>
    <storedProcedureName action=” EXECUTE”>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName > 
      </StatementName1>
      <StatementName2>
    <anyName action=” SQL_QUERY”>
    <access>SQL-String with optional placeholder(s)</access>
    <key>
      <placeholder1>value1</placeholder1>
      <placeholder2>value2<placeholder2>    
    </key>
    </anyName > 
      </StatementName2>
    Regards
    Arul
    PS: Mark usefull answers and for more info about points - read the post "Rules of engagement" at the top of the XI forum

Maybe you are looking for