Triggering UNIX script with IDOC creation?

Hello group,
I create an IDOC when a delivery goods-issue is being posted (IDOC via outputcondition).
The name of the IDOC file is being created by a function module to add a timestamp to the filename. So every IDOC has a unique name!
Now what I need to do is to call a UNIX file right when the IDOC has been created.
Furthermore, I need to pass the name of the IDOC as parameter to that UNIX script.
Any ideas how this can be accomplished?
Thank you in advance,
Dirk

Hi!
Like windows, unix has also its scheduler. Unfortunately I don't remember how could you do this, but on a unix forum, people in 5 mins will tell you that...
We are using jobs, and our job log is full with jobs, but it do not disturbs anyone. Not disturbing, because mostly only the problematics jobs are needed, and you can select the jobs with their statuses.
Regards
Tamá

Similar Messages

  • Unix Scripting with screen saver

    I have been trying commands from every version of Unix. I cannot find a way to start screen saver from Darwin. I am frustrated. Furthermore, is there a way someone can inform me how to connect to a bluetooth phone using a Mac Address. Similar to "hcitool scan" but for Darwin. So, I am looking for two things from a response from this post. 1) What is the alternative command for "hcitool scan" in Darwin and 2) How do I start my screen saver in Unix?
    Thank you all!

    Wonderful! thank you very much. I will absolutely look into the Mac OS X Technologies forum. Big help!
    I understand freeBSD and Darwin are not entirely equivalent. However, I checked out a book on Unix at the library. That book mentioned a few different versions of Unix including freeBSD. I basically used the book for it's commands and figured out which commands worked in Darwin. That took sometime but it is a long process. Now I am just using the manual pages with the command "man".
    To answer your question, the cocoa application is not for me because I want to learn to program. I saw on YouTube I could program a script easily so I started.
    I've been learning with computers and electronics since I was a young lad (approximately sixth grade for computers and electronics second grade). I learned quickly how much fun these two disciplines could be. In high school my parents pressured me to go into programming but I refused for little reason. Now I recently bought an Apple, after a exploring it a little I found I could download XCode for free. I tried programming in Objective C but my friend advised, "you should learn to program something more simple." so, I tried basic on my TI-86 calculator then I got bored with that and started with Unix. So, here I am learning to code in Unix because of pragmatism (meaning whatever is useful). I have a friend who once knew how to code who is guiding me in my experience. I am hoping to be a computational mathematics major at UCSC. Just waiting for a reply so I am programming to get some skill before I get to my school. I love this stuff!

  • UNIX script with Runtime.exec and ssh

    I am trying to run a script that is on a UNIX server which doesn't require a password to connect to. Here's my code:
    String _cmd = new String("ssh -l root mach01 \"(/projects/examples/findsw java)\"");
    Process proc = Runtime.getRuntime().exec(_cmd);
    InputStreamReader is = new InputStreamReader(proc.getErrorStream());
    BufferedReader br = new BufferedReader(is);     
    String line = null;
    while ( (line = br.readLine()) != null)
    _logger.error(line);
    proc.waitFor();
    The error outputs:
    ERROR [Thread-7] beans.RunScript - sh: (/projects/examples/findsw java): not found
    INFO [Thread-7] beans.RunScript - _proc.exitValue() = 1
    When I execute _cmd directly from xterm, I have no problems.
    Thanks

    Runtime.exec is not a shell and doesn't run a shell. Try
    adding something like "/bin/sh -c" or whatever shell you use to the beginning of the command.
    BYe!
    EXP

  • UNIX scripting with id and password in clear text

    Hi
    I have a shell script to connect and do several PLSQL.
    how can the script doing it without the ID password in cleartext?
    i.e.
    #!/bin/sh
    conn id/password ....

    If you create an operating system authenticated user, you connect to the database without a password, i.e.
    sqlplus / is sufficient (assuming the script is running as the appropriate operating system user). Tom Kyte talks about this here
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1477204811604
    There are examples of using DBMS_SCHEDULER to invoke operating system scripts on Tim Hall's site
    http://www.oracle-base.com/articles/10g/Scheduler10g.php
    Justin

  • Triggering encryption script with XI

    Hi,
    we are implementing SAP HR -XI-file scenario but data that is coming from HR system has to be encrypted before XI place the data on file servers,not needed before entering or in XI encryption.we are using encryption script ,so basically we need to trigger the script as the last thing to do in the process,i.e;before placing the data on file system.
    can we achieve this in the reciever file adapter in OSS commands?or any special things need to be made in Xi?
    thank you,
    babu

    Babu,
    I dont understand your requirement fully. First of all how you are getting data into XI. You want the final output file to be encrypted. Also what kind of encryption you are trying to use like PGP etc?
    <i><b>
    can we achieve this in the reciever file adapter in OSS commands?or any special things need to be made in Xi?</b></i>
    You can run the OS command from the file receiver communication channel very easily. You dont need to do any changes for that. But if you are using PGP for encryption then you to install PGP on the XI box. Then only you can able to encrypt.
    Please tell us the full requirement? The last option is to write an adapter module and call in you File receiver communicatin channel and it will encrypts the file.
    ---Satish

  • Problem with idoc creation

    while creating a logical system in Tcode : SALE in 810, i'm getting a message that there is no permission to create a logical system.
    where to get the permission ? what to do?
    i think this is related to BASIS.i don't find any forum for BASIS........is there a BASIS Forum ?
    Please help......

    Hi,
    Go and ask ur BASIS team directly..they will help u about this issue..

  • Running unix scipt with DBMS_SCHEDULER

    Hi,
    I am trying to test unix script with DBMS_SCHEDULER.
    SCHEDULAR execute the script without any error messgae if my job_action is "/tmp/test.ksh".
    But if I am providing command line argument to script in job_acrion (/tmp/test.ksh -F), it gives follwing error message.
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    begin
    DBMS_SCHEDULER.CREATE_JOB
    job_name => 'test_unix_script',
    job_type => 'EXECUTABLE',
    job_action => '/tmp/test.ksh',
    job_class => 'DEFAULT_JOB_CLASS',
    enabled => FALSE,
    auto_drop => FALSE,
    comments => 'test_unix_script.'
    END;
    and my script test script is
    #!/bin/ksh
    f_force=n
    echo SUCCESS > /tmp/test_out
    while getopts :F opt
    do
    case $opt in
    F) f_force=y ;;
    ?) echo Invalid option
    return 1 ;;
    esac
    done
    if [[ $f_force = "n" ]] ; then
    echo "Are you sure you want to continue (y/n) ? \c"
    read x
    echo
    if [[ `echo $x | tr '[A-Z]' '[a-z]'` != "y" ]] ; then
    return 1
    fi
    fi
    echo SUCCESS >> /tmp/test_out
    I don't want use "dbms_scheduler.set_job_argument_value".
    Please confirm if we can pass command line argument to job_acrion. If yes, How we can pass command line argument in DBMS_SCHEDULER?
    Thanks,

    Hi,
    The error the Scheduler is throwing is accurate. It is looking for a file called "/tmp/test.ksh -F" and not finding it.
    What you want to do is leave the job action as "/tmp/test.ksh" and set number of arguments=>1
    then call
    dbms_scheduler.set_job_argument('test_unix_script',1,'-F')
    and then enable the job.
    This will correctly pass "-F" in as an argument and not part of the executable name (remember that executable names can have spaces in them).
    Hope this helps,
    Ravi.
    PS Also note that the Scheduler has its own forum
    Scheduler

  • Can a Button call a java script and then proceed with the creation

    Hi all,
    I have a simple APEX form on a table,
    with simple function as create and apply changes,
    some items of the form are computed by a "Computation"
    I need the create button to show the computed values, before move to the next page, then proceed with the creation ( submission)
    I have tried to show the values by a java script, but after clicking the button OK of the javascript msg, no submission performed ,
    details:
    the java script is called in the URL of the Button,
    it only contains a alert statement
    is there a way to let the button do that
    or may be the case could be solved by another idea!!!
    rgrds,

    Hi Varad,
    It is Before header of course. I forgot to mention this.
    Yes, you are right Varad, I have read again the question and seems original request was to show Computation that is done in After Submit, more javascript is required of course.
    One possibility is to create On Demand process called COMPUTEITEM where you compute your item, and in the end of on demand process it prints it
    htp.p(:P1_X)
    Then put in HTML header of your page
    <script language="JavaScript" type="text/javascript">
    function setShowItemSub(pThis){
       var l_This   = $x(pThis);
       var ajaxRequest = new htmldb_Get(null, $v('pFlowId'),  'APPLICATION_PROCESS=COMPUTEITEM', $v('pFlowStepId'));
       ajaxRequest.add($x(l_This).id, $v(l_This));
       var gReturn = ajaxRequest.get();
       alert(gReturn);
       ajaxRequest = null;
      doSubmit('aa');
    </script>And in Button URL textarea put:
    javascript:setShowItemSub('P1_X');
    Then no need in After Submit process anymore
    I have put this now in http://apex6.revion.com/pls/apex/f?p=225:1
    COMPUTEITEM On demand process is :
    :P1_X := :P1_X || ' Added this trail';
    htp.p(:P1_X);Of course, all this should be modified accordingly
    Regards,
    Oleg

  • IDOC Creation with message control

    I have created an IDoc using standard FM ' MASTER_IDOC_DISTRIBUTE' (without message control) for my own table. Now, I want to create IDoc with message control to send data from SAP to SAP. Can anyone please tell me the steps to create IDoc for my own database table and program to be created.
    Thanks in advance.

    Pankaj,
    You can access the following link to understand Custom IDOC creation flow.
    http://wiki.scn.sap.com/wiki/display/HOME/Step+by+Step+procedure+for+creation+of+IDOC
    In The Process code FM, you can call Z-API to update your own database table & create a program to trigger & process the IDOCs.
    Further, a report program can be created to trigger/monitor IDOCs.
    Ravi

  • Triggering background job event from Unix script

    Hi all,
      I am having one question regarding triggering of background job in SAP using Events from Unix script. Is this possible? If so, can anyboy provide some sample code related to Unix script and how do we communicate to SAP from Unix system. Actually, here the backend of R/3 system is MSSQL. I am having a program in R/3 system which is scheduled as a background job based upon event trigger. I want to trigger that even from the unix script.
      Appreciate for your help in advance.
    Thanks,
    Adithya K

    Hi,
    Check if this can help you
    http://help.sap.com/saphelp_sm32/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/content.htm
    Regards,
    Atish

  • Issue with running Unix Script during post processing

    Dear all,
    In one of the requirement, we need a execute a UNIX script in the post procesing steps of file channel.
    When the script is run independently on the UNIX prompt, it executes very well.
    But when the same script is kept in the post processing steps of the file channel, it doesn't give the desired results.
    In the channel log, it says the script is executed but we are not able to see the output. (in this case, ist writing some dummy text in a new file). The script has all the permissions for all the users, read write and execute.
    If anyone has a similar issue, kindly respond with the resolutions.
    Regards,
    Younus

    HI Younus
    How you are running the script. Could be a problem with the command you are trying to execute from channel. Let us know the way you are doing
    Check whether installed and executed on XI server properly then again check with channel.
    Check with these for reference
    http://help.sap.com/saphelp_nw70/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm
    The specified item was not found.
    Executing Unix shell script using Operating System Command in XI
    Thanks
    Gaurav

  • Oracle career with unix scripting?

    hi
    iam working in a reputed mnc with CMMi level 5 .started as fresher (BE I.T) i have around 1.6 years of experiance in unix scripting/oracle sql production support.
    with learning of sql and shell scripting
    i want to make my career in oracle which should be more dynamic,learning and creative not like in production support which have monotonus life.
    could anyone please guide me about what career path i should choose ?
    DBA , i have heard is montonous job too with same routine backups,no creativity with nightshifts and all, but it is more stable as people said. I have no experiance of it.
    second devolper track in sql/pl sql having its own limitations like less demand, less financial growth etc. and people usually wants to shift in other area like BO
    i don`t have any info about others areas like that i would like to explore
    1)Datawarehousing
    2)Oracle apps
    3)Business objects (BO reporting)
    4)Oracle CRM etc
    5)Others (thats all i know,please add some others if they are creative )
    iam really confsused now which way to chosse. and how to jump in other company on wat basis?
    preparing for OCA right now but uncertain for career.
    Seeking good help from forum experts.

    "with learning of sql and shell scripting"
    Ah, very good move, so you must pick my tool, it is all about managing Oracle DB through Korn shell http://www.smenu.org.
    As of your question, the answer is in your mood and preference.
    Oracle DBA: Definitely more money, less opportunity. the job is dwindling somehow due to Grid automation and budget restriction.
    It is not that you don't need DBA, but manager thinks they can do without and don't (try) replace them. Pressure on DBA is a myth: more work = more money = happy DBA until wife run away.
    Developer : Definitely less money, not necessary more opportunity unless you have java EE. no shift but more pressure: Projects are always in late, usually in the development area, not in the infrastructure.
    One funny thing I noticed during these last 15 years, is that DBA have usually more children than others people (unix sys admin or Dev). Probably related to better earning.
    DBA can be boring or passionate depending on your own knowledge, most of others DBA I know are still in the job, only one is now JAVA EE guy.

  • Accounting document creation for sales invoice with IDOC INVOIC02 ?

    Hi All,
    Our sales invoice are managed in a external system and those Invoice are going to be send in FI with IDOC interface.
    is it possible to use the IDOC INVOIC02 to do this operation ?
    if yes, what are the customizing points I have to implement ?
    if not, what kind of IDOC can I use ?
    Thank you in advance for your help
    Franck

    Hi Thenna
    The accounting document status in the document flow is determined dynamically when you display the document flow,
    it's not saved in a specific table.
    Here is the relevant logic:
    LV05CF01 -> form BUCHHALTUNGSBELEG
    IF vbrk-vbeln <> vbfa_tab-vbeln.
       PERFORM vbrk_ermitteln USING vbfa_tab-vbeln.
       REFRESH xbkpf.
       CALL FUNCTION 'FI_DOCUMENT_READ'
        LOOP AT xbseg WHERE bukrs EQ xbkpf-bukrs
                      AND   belnr EQ xbkpf-belnr
                      AND   gjahr EQ xbkpf-gjahr
                      AND   ( koart EQ 'D' OR koart EQ 'K' ).
        ENDLOOP.
                IF NOT sy-subrc IS INITIAL.
      SET STATUS TO 'No items are cleared'
                  l_xdoc_num-status = 'A'. <<<
                ELSE.
                  LOOP AT xbseg WHERE augbl IS initial
                                AND   umskz NE 'A'
                                AND   vorgn NE 'AZUM'
                                AND   ( koart EQ 'D' OR koart EQ 'K' ).
                  ENDLOOP.
                  IF NOT sy-subrc IS INITIAL.
      Set status to 'All items are cleared'
                    l_xdoc_num-status = 'C'. <<<
                  ENDIF.
                ENDIF.
    Regards,
    Alex

  • Make HTTP request with Idoc Script

    Is there a way to make an HTTP request to a remote host with Idoc?
    For example, in PHP you could do:
    file_get_contents('http://website.com/');
    Does Idoc have a similar method?

    "garry.b" <[email protected]> wrote in
    message
    news:gnndbf$i2q$[email protected]..
    > Hi,
    >
    > When using AS3 to generate an HTTP POST request:
    >
    > var service:HTTPService = new HTTPService ();
    > service.url = "
    http://localhost:9090/service";
    > service.method = "post";
    > // service.request = {itemId: "12345"};
    > service.send ({itemId: "12345"});
    >
    > my CherryPy web server complains about unexpected body
    parameters:
    >
    > HTTPError: (400, 'Unexpected body parameters: itemId')
    >
    > Using Firebug's Network display, its Post tab shows the
    following content:
    >
    > Referer:
    http://localhost:8080/log/log-1.0-SNAPSHOT.swf
    > Content-type: application/x-www-form-urlencoded
    > Content-length: 12
    >
    > itemId=12345
    >
    > which looks very strange to me as I would expect the
    Referer, etc.,
    > request
    > headers to show up in the Request Headers section and
    not as POST body
    > content.
    > While this could be some Firebug issue, I think the
    request message is
    > really
    > formatted incorrectly. When the web server gets the
    request, it does
    > recognize
    > 'itemId' as a body parameter but then complains that
    it's unexpected.
    >
    > I've googled the error message, studied HTTPService
    examples, spent
    > several
    > hours playing with it and am stumped. Tracy Spratt
    suggested setting the
    > service 'request' to force a POST and I tried it but am
    getting the same
    > error.
    > How do I make a POST request? Can I get POST data into
    the message body?
    > Stick with URL parameters only?
    What happens if you post to the same service using an html
    form?

  • Unix Shell Scripts with Oracle

    Any body who can give me the link where I can find the Unix Shell Scripts to access the Oracle database and execute the stored procedures and cursors.

    Your unix script will contain (at appropriate places):
    sqlplus -s username/pasword@server @your_sql_Script_that_calls_the procedure.SQLor
    sqlplus -s / @your_sql_Script_that_calls_the procedure.SQL

Maybe you are looking for