PPTP ip-up.d runs script but doesn't execute program

Hi everybody
I installed and configured PPTP and ip-up.d scripts. Everything seems to work, all three existing scripts are executed and also the echo is written to syslog but I don't get the program to start. If I execute the script manually it works like a charm.
What is the matter?
Solutions tried
PATH definition added
echo line before and after executing remmina added -> both worked
changed program execution with "sudo -u <user> remmina" and "su <user> -c "remmina" etc. also not worked
permissions checked, every script file is on 755
#!/bin/sh
PATH=$PATH:/usr/bin
echo "`date +%b" "%e" "%H":"%M":"%S` PPTP: Remmina wird gestartet" >> /var/log/syslog.log
/usr/bin/remmina

Hi, sorry for late answers:
..scripts that end with '.sh'. Is that the case?
[emak@PC-LE-T42-LI ip-up.d]$ ll
insgesamt 20K
drwxr-xr-x 2 root root 4.0K 20. Mär 13:40 ./
drwxr-xr-x 5 root root 4.0K 6. Mär 07:16 ../
-rwxr-xr-x 1 root root 229 3. Nov 2011 00-dns.sh*
-rwxr-xr-x 1 root root 110 16. Mai 18:45 01-remmina.sh*
-rwxr-xr-x 1 root root 162 20. Mär 13:23 02-routes.sh*
They should be correct and permissions sufficient.
Does remmina fork?
No, I don't see any procs running by executing
ps -ef | grep remmina
Last question:
you can execute it as a separate process by adding &!
I tried that with no better success.
As I wrote above, the script is executed, the echo line is written to syslog but no process of remmina is starting. I'm sure it's a dumb thing but still annoying... Any more ideas to try?

Similar Messages

  • Uninstall Adobe Shockwave 12.1.1.151 scripts run successfully but doesn't uninstall program

    I am using sccm2012 R2 and trying to deploy package to uninstall Adobe shockwave player 12.1.1.151 using following script
    cmd /c shockwave-test.bat
    pushd "%~dp0"
    msiexec /uninstall sw_lic_full_installer.msi
    If run script manually on command prompt it uninstall Adobe shockwave player but deployment using sccm doesn't work.
    Deployment status - success,
    Message ID: 10008
    program completed with success
    Program and features still have Adobe shockwave player listed there.
    I have also tried msiexec /x using product code as application using windows installer and registry key as detection method but same results
    Here are logs of Execmgr.log file
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="AO10022F",ProgramID="Uninstall shockwave - test", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l
    execmgr 06/11/2014 6:45:07 PM
    2480 (0x09B0)
      Processing [{40BF1D3A-8F3D-4088-A1F7-ED85EB5EFF7F}, 0]: OnContentAvailable
    execmgr
    06/11/2014 6:45:11 PM 4664 (0x1238)
    [{40BF1D3A-8F3D-4088-A1F7-ED85EB5EFF7F}]: Content Version 12 is available for advert RET210E2, pkg: AO10022F, program Uninstall shockwave - test.
    execmgr 06/11/2014 6:45:11 PM
    4664 (0x1238)
    An existing MTC token was not supplied, using ExecutionRequest's Id as MTC token and this execution request is the owner of resultant MTC task.
    execmgr 06/11/2014 6:45:11 PM
    4664 (0x1238)
    Request a MTC task for execution request of package AO10022F, program Uninstall shockwave - test with request id: {CBD5312D-CAAB-446C-BB2F-7DB515F6EE79}
    execmgr 06/11/2014 6:45:11 PM
    4664 (0x1238)
    Execution Request for advert RET210E2 package AO10022F program Uninstall shockwave - test state change from WaitingContent to Ready
    execmgr 06/11/2014 6:45:12 PM
    4664 (0x1238)
    MTC task with id {CBD5312D-CAAB-446C-BB2F-7DB515F6EE79}, changed state from 0 to 4
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="AO10022F",ProgramID="Uninstall shockwave - test", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l
    execmgr 06/11/2014 6:45:12 PM
    4664 (0x1238)
      Processing [{40BF1D3A-8F3D-4088-A1F7-ED85EB5EFF7F}, 0]: RemoveNotification
    execmgr 06/11/2014 6:45:12 PM
    4664 (0x1238)
    MTC signaled SWD execution request with program id: Uninstall shockwave - test, package id: AO10022F for execution.
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Sending ack to MTC for task with id: {CBD5312D-CAAB-446C-BB2F-7DB515F6EE79}
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Executing program cmd /c shockwave-test.bat in Admin context
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Execution Request for advert RET210E2 package AO10022F program Uninstall shockwave - test state change from Ready to NotifyExecution
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="AO10022F",ProgramID="Uninstall shockwave - test", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Checking content location C:\Windows\ccmcache\1g for use
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Successfully selected content location C:\Windows\ccmcache\1g
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Executing program as a script execmgr
    06/11/2014 6:45:12 PM 1624 (0x0658)
    Found executable file cmd with complete path C:\Windows\system32\cmd.exe
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Successfully prepared command line "C:\Windows\system32\cmd.exe" /c shockwave-test.bat
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Command line = "C:\Windows\system32\cmd.exe" /c shockwave-test.bat, Working Directory = C:\Windows\ccmcache\1g\
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Running "C:\Windows\system32\cmd.exe" /c shockwave-test.bat with 32bitLauncher
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Created Process for the passed command line
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Raising event:
    [SMS_CodePage(437), SMS_LocaleID(1033)]
    instance of SoftDistProgramStartedEvent
    ClientID = "GUID:d0c3da0e-ff4f-48c2-8612-805a8de31191";
    CommandLine = "\"C:\\Windows\\system32\\cmd.exe\" /c shockwave-test.bat";
    DateTime = "20141107004512.476000+000";
    PackageName = "AO10022F";
    ProcessID = 1264;
    ProgramName = "Uninstall shockwave - test";
    ThreadID = 1624;
    UserContext = "NT AUTHORITY\\SYSTEM";
    WorkingDirectory = "C:\\Windows\\ccmcache\\1g\\";
    execmgr
    06/11/2014 6:45:12 PM 1624 (0x0658)
    Raised Program Started Event for Ad:xx210E2, Package:AO10022F, Program: Uninstall shockwave - test
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="AO10022F",ProgramID="Uninstall shockwave - test", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="AO10022F",ProgramID="Uninstall shockwave - test", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    MTC task with id {CBD5312D-CAAB-446C-BB2F-7DB515F6EE79}, changed state from 4 to 5
    execmgr 06/11/2014 6:45:12 PM
    1624 (0x0658)
    Program exit code 0 execmgr
    06/11/2014 6:45:21 PM 4276 (0x10B4)
    Looking for MIF file to get program status execmgr
    06/11/2014 6:45:21 PM 4276 (0x10B4)
    Thanks in advance for help and suggestions
    RJ
    RJ09

    Thanks for quick reply Daniel
    I tried your suggestion and in log files I found error
     Product: Adobe Shockwave Player 12.1 -- Error 2753.The File 'swhelper_1211151.exe' is not marked for installation.
    Error 2753.The File 'swhelper_1211151.exe' is not marked for installation.
    Property(S): ErrorDialog = SetupError
    MSI (s) (34:D8) [14:08:29:832]: Windows Installer removed the product. Product Name: Adobe Shockwave Player 12.1. Product Version: 12.1.1.151. Product Language: 1033. Manufacturer: Adobe Systems, Inc. Removal success or error status: 1603.
    RJ09

  • Run Script alarm doesn't work when iCal closed

    I have an applescript to remind me to run a maintenance application once a week. I've set a "Run Script" alarm for a weekly event in iCal... But the script ONLY executes if iCal is open!
    If iCal is closed I get the message:
    "An AppleScript event alarm did not execute properly. The script "run_maintenance.scrpt" that was assigned to the event "maintenance" did not open or did not finish running."
    Then, when I then open iCal, the applescript executes.
    How can I get the script to run when iCal is closed, just like a normal alarm?
    By the way, the applescript is quite straightforward, with a dialog and finder instruction to activate the maintenance program. It runs fine manually (& as I say, if iCal is already open).
    Thanks for any suggestions.

    Found the problem: The run_maintenance script couldn't be completed without user action (because of the dialogue), so was giving iCal an error.
    Solution: I've set another script that simply launches the run_maintenance script as the alarm.
    So there are 4 players in this daisy chain: iCal, a script to launch the reminder script, the reminder script, and Maintenance!
    Inelegant, but it works.

  • My Time Machine also runs "successfully" but doesn't back up anything.

    I know on page 2 that this problem was already posted and solved, but it looked like the person didn't have Time Machine on or something like that. Can someone please give me a quick run down into why this is happening and how to fix it?
    Thanks,
    Chuck

    Obviously I need help with why Time Machine is not backing anything up and not with why the Time Machine button doesn't work.
    Thanks (again),
    Chuck

  • Weird behavior: Throws an error while debugging/Run mode, but doesn't when project is built

    Hi there,
    I am trying to see if I could get some help on a strange situation:
    I am developing a desktop application with few window components (like music window, rss feeds, photos window, etc). I am trying to have a checkbox in the "preferences" component which will disable or enable the appropriate window component.
    When I am trying to test this checkbox in my application (in either debug mode or 'run' mode) an error is being thrown which I am not able to figure out why this error occurs (though I know its complaining about Null object reference). But when I am building the application with "Export Release Build" option and installing the application on my desktop to test the same checkbox - it works!! I am not sure why this is happening. Any help?
    Can you tell me why it's not complaining about Null object when I build the project or how to overcome this problem?
    This is the error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Components::ComponentContainer/getComponentData()[/Users/Desktop/projects/DesktopLauncher /src/MyComponents/ComponentContainer.as:48]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at SetIntervalTimer/onTimer()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    Thanks in advance.

    Can you post the code at ComponentContainer.as line 48?
    Also, make sure the debug SWF is up to date; delete it in bin-debug, make a change to ensure the new one has come up.

  • Cube DTP load runs forever but doesn't do anything

    Hi experts.
    I was hoping to get some guidance on an issue I'm having loading one of my cubes.  I've searched the forums but can't seem to phrase the search correctly because I'm not getting any results.  I'm on BW 7.x.  Here is the data flow and scenario:
    APO Datasource A --> BW Cube A --> DTP --> BW Cube C
    APO Datasource B --> BW Cube B --> DTP --> BW Cube C
    This is a monthly load that has been in place for several years with no previous issues.  Yesterday everything went fine up until the load from
    BW Cube B --> BW Cube C.  This DTP normally runs about 10-15 minutes.  But yesterday I tried running it twice, once for two hours, and once for 4.5 hours, and never got a single record to load in the target cube.  It just kept showing "0 Data Records" under the Process Request section.  The load never completed and never erred.  I eventually cancelled both runs manually.  Neither SM21 nor ST22 indicated any problems.  I checked with my Basis guy and he did not see any issues on the Oracle side.
    Now, Cube B is the largest cube in my BW at around 48 GB, but I've never had problems with this load before.  Between the first and second attempt I dropped and rebuilt the indexes and verified statistics.  But I don't know what to fix because I can't find any errors.
    Points will be awared to anyone with viable suggestions or direction to a solution.
    Thanks in advance.

    Hi,
    During your load time, Is any new loads/full loads are scheduled at bw prod?
    There might be something scheduled on that day. you need to track the whole loads scheduled in that time frame. you may find if any changes on scheduling loads other than usual.
    before loading data to cube, have deleted the index?
    Can you check dtp monitor logs in detailed?
    During your load have you checked SM51 whether free application servers available to process your load?
    Thanks

  • Help with NSAPI...loads, but doesn't execute

    Trying to write NSAPI plugin to write a cookie to every request.
    OBJ.CONFI entries:
    Init fn="load-modules" funcs="setSessionCookie" shlib="C:/Data/Test_Cookie.dll"
    Service method="(GET|HEAD|POST|PUT)" fn="setSessionCookie"
    CODE:
    NSAPI_PUBLIC int setSessionCookie(pblock pb, Session sn, Request *rq)
    pblock_nvinsert("Set-cookie", "iPlanetSessionID=99999999", rq->srvhdrs);
    pblock_nvinsert("Set-cookie", "iPlanetFavoriteWord=STUFF", rq->srvhdrs);
    return REQ_NOACTION;
    }

    The order of directives in obj.conf is important. Make sure your Service directive is the first Service directive in the default Object.

  • Run time error (short dump) executing program SCAN_BW_REFERENCES in SE80

    Hi experts,
    I am not an ABAPer, or Basis person, rather a hybrid functional/technical Key User for our Business Warehouse system (BW 3.5, Netweaver 2004).  We have a user who cannot save BW reports to his favorites and he is getting a number of error messages.  OSS note 887002 seems to address this and indicates that I should run program SCAN_BW_REFERENCES from transaction SE80.  The program is supposed to perform the checks for BW objects assigned to the Favorites and identify situations causing terminations in BW frontend applications.  I have attempted to execute this program on several occassions and always get run-time errors (short dumps).  Here is the error:
    Runtime Errors         TSV_TNEW_PAGE_ALLOC_FAILED
    Date and Time          2008.09.17 19:00:49
    ShrtText
         No storage space available for extending an internal table.
    What happened?
         You attempted to extend an internal table, but the required space was
         not available.
    I have been informed by our Basis group that I have reached a memory limit, but they will not extend the memory paramters.  Any ideas on a work-a-round or a way to minimize the number of records this program is pulling in, in an attempt to get it to run?
    Thanks,
    HC

    Hi,
    The only response I got from Basis was that they would not extend the memory parameters because they are for all users in the system.  Not sure what that means. 
    The full dump is too large to paste here.  I think what I will do is to see if our ABAPers can create a modified version of this program to include selection by user.  Typically it is for only one user that I need to run the program, and that surely would fall within the space requirements.
    Thanks for your answer.
    //HC

  • SAP SCRIPT , WRITE_FORM doesn't write to form

    HI EXPERTS,
                       i have one internal table without header line in my program and i looped through it and i called WRITE_FORM FM to write 'DETAIL' Element on script . When i execute program , wa_itab workarea carries values bt it doesnt carry any data while debugging script at the same time . my code is like this:
    TYPES : BEGIN OF TY_ITEM,
               EBELN TYPE EKPO-EBELN,               "PURCHASE ORDER NO.
               EBELP TYPE EKPO-EBELP,               "ITEM NUMBER OF PURCHASE ORD
               LOEKZ TYPE EKPO-LOEKZ,
               TXZ01 TYPE EKPO-txz01,
               MATNR TYPE EKPO-MATNR,               "MATERIAL NO.
               WERKS TYPE EKPO-WERKS,               "PLANT
               MENGE TYPE EKPO-MENGE,               "PO QTY.
               MEINS TYPE EKPO-MEINS,               "UNIT OF MEASUREMENT
               MAKTX TYPE MAKT-MAKTX,               "MATERIAL DESCRIPTION
           END OF TY_ITEM.
    DATA: WA_ITEM TYPE TY_ITEM.
    DATA: IT_ITEM TYPE TABLE OF TY_ITEM.
      loop at it_item INTO WA_ITEM.
                                   CALL FUNCTION 'WRITE_FORM'
                                       EXPORTING
                                           ELEMENT                  = 'DETAIL'
                                           FUNCTION                 = 'SET'
                                           TYPE                     = 'BODY'
                                           WINDOW                   = 'MAIN'
                                       EXCEPTIONS
                                          ELEMENT                  = 1
                                          FUNCTION                 = 2
                                          TYPE                     = 3
                                          UNOPENED                 = 4
                                          UNSTARTED                = 5
                                          WINDOW                   = 6
                                          BAD_PAGEFORMAT_FOR_PRINT = 7
                                          OTHERS                   = 8.
                              endloop.
    In script in MAIN Window ,only i have element called DETAIL , where i write WA_ITEM-EBELN, WA_ITEM-MATNR....like that.
    Bt it doesnt display any data .
    Plz try to solve this issue.
    Thanks,
    Saurin Shah
    Edited by: Matt on Oct 13, 2009 12:44 PM - removed ALL CAPITALS from the subject and moved to correct forum

    Hi,
    please make sure, that your wa_item should be declared Globally.
    use '&' before & last in the variable when you printing variables in Script.
    eg: &wa_item-werks&,,&wa_item-matnr&
    Hope it helps!!
    Rgds,
    Pavan

  • HT4759 can sign into icloud but won`t let me in . says wont open because of long running script . any ideas

    Can sign into icloud but wont let me in . says wont open due to lond running script . any ideas thanks

    Restart your PC and try again.

  • HT201628 so now i've followed this help now i can't re download itunes. i'm on 10.5.8. Still runs great but now i have no itunes. please can a suggestion be made that doesn't involve spending hundreds of pounds? i was only trying to get an iphone connecte

    i'm on MAC OS X 10.5.8. Still runs great but now i have no itunes as i've followed this post that covers my first issue. i've followed it correctly to the part of re install the latest version of itunes and i cant.
    i've been running logic pro on this mac and i have no issues so i've not upgraded software etc.
    i need a way around this problem without having to upgrade the OS if there is one.
    does anyone please have a suggestion that doesn't involve spending hundreds of pounds?
    i was only trying to get an iphone connected and this article says 10.6.8 or earlier?? it is definately earlier
    macbook - MAC OS X v 10.5.8...... trying to connect an iphone 4s os 6
    problem now..........need to re install itunes but can't probably due to my current OS.
    please help. i'm pretty gutted about this. i should of researched a little further me thinks. cheers guys

    said article below....
    HT1747: iTunes: How to remove and reinstall the Apple Mobile Device Service on Mac OS X 10.6.8 or Earlier
    Learn about iTunes: How to remove and reinstall the Apple Mobile Device Service on Mac OS X 10.6.8 or Earlier

  • HT1222 hi i have a apple imac 27 2009 and i have purchased mountain lion but near the end it says An error occurred while running scripts from the package "mzps6175750011235388779.pkg"

    hi i have a apple imac 27 2009 and i have purchased mountain lion but near the end it says An error occurred while running scripts from the package “mzps6175750011235388779.pkg”
    can you please advise me what should i do to fix this

    Some ideas.
    https://discussions.apple.com/message/20034600#20034600

  • After apple wiped my hard drive, my computer no longer recognizes my iphone 4.  It will charge, but doesn't show up in my sidebar or in itunes.  My computer says there are no software updates available.  I'm running OSX 10.5.8 and itunes is 10.3.1.

    After apple wiped my hard drive, my computer no longer recognizes my iphone 4.  It will charge, but doesn't show up in my sidebar or in itunes.  My computer says there are no software updates available.  I'm running OSX 10.5.8 and itunes is 10.3.1.

    After apple wiped my hard drive, my computer no longer recognizes my iphone 4.  It will charge, but doesn't show up in my sidebar or in itunes.  My computer says there are no software updates available.  I'm running OSX 10.5.8 and itunes is 10.3.1.

  • PLSQL compiles but doesn't run.. I've declared it everywhere but still..

    PLSQL compiles but doesn’t run.. I’ve declared it everywhere but still..
    Afternoon.. Hopefully a quick one for someone.. I’m trying to run a Concurrent Program in ORACLE Financials using a Data Template derived BI Publisher report.
    Error message received..
    SUBIXCLT module: UofS Expense Claim Tracking Report
    +--------------------------------------------------------------------------
    All Parameters: raisedby=:status=:claimant=:expense_date_from=:expense_date_to=:LP_ORDERED_BY=Expense Report Number
    Data Template Code: SUBIXCLT
    Data Template Application Short Name: PO
    Debug Flag: N
    {raisedby=, claimant=, expense_date_to=, expense_date_from=, status=, LP_ORDERED_BY=Expense Report Number}
    Calling XDO Data Engine...
    [060410_025628319][][STATEMENT] Start process Data
    [060410_025628324][][STATEMENT] Process Data ...
    [060410_025628329][][STATEMENT] Executing data triggers...
    [060410_025628329][][STATEMENT] BEGIN
    SUBIXCLT.claimant := :claimant ;
    SUBIXCLT.expense_date_from := :expense_date_from ;
    SUBIXCLT.expense_date_to := :expense_date_to ;
    SUBIXCLT.raisedby := :raisedby ;
    SUBIXCLT.status := :status ;
    SUBIXCLT.lp_ordered_by := :lp_ordered_by ;
    :XDO_OUT_PARAMETER := 1;
    END;
    l_flag Boolean;
    BEGIN
    l_flag := SUBIXCLT.BEFOREREPORT(L_ORDERED) ;
    if (l_flag) then
    :XDO_OUT_PARAMETER := 1;
    end if;
    end;
    [060410_025628356][][EXCEPTION] SQLException encounter while executing data trigger....
    java.sql.SQLException: ORA-06550: line 4, column 33:
    PLS-00201: identifier 'L_ORDERED' must be declared
    ORA-06550: line 4, column 1:
    PL/SQL: Statement ignoredThe Data Template
    The Data Template
    <?xml version="1.0" encoding="utf-8" ?>
    - <dataTemplate name="UofS_OutstandngExpenses_Report" defaultPackage="SUBIXCLT" dataSourceRef="FINDEV" version="1.0">
    - <properties>
      <property name="xml_tag_case" value="upper" />
      <property name="include_parameters" value="true" />
      <property name="debug_mode" value="on" />
      </properties>
    - <parameters>
      <parameter name="claimant" dataType="character" defaultValue="" />
      <parameter name="expense_date_from" dataType="date" defaultValue="" />
      <parameter name="expense_date_to" dataType="date" defaultValue="" />
      <parameter name="raisedby" dataType="character" defaultValue="" />
      <parameter name="status" dataType="character" defaultValue="" />
      <parameter name="lp_ordered_by" dataType="character" defaultValue="" />
      </parameters>
    - <dataQuery>
      <dataTrigger name="beforeReportTrigger" source="SUBIXCLT.BEFOREREPORT(L_ORDERED)" />
    - <sqlStatement name="Q1">
    - <![CDATA[
    SELECT DISTINCT
    erh.invoice_num,
    pap.full_name EMP_CLAIMING,
    DECODE(NVL(erh.expense_status_code, 'Not yet Submitted (NULL)'), 'CANCELLED', 'CANCELLED',
         'EMPAPPR', 'Pending Individuals Approval',      'ERROR', 'Pending System Administrator Action',
         'HOLD_PENDING_RECEIPTS     ', 'Hold Pending Receipts', 'INPROGRESS', 'In Progress', 'INVOICED', 'Ready for Payment',
         'MGRAPPR', 'Pending Payables Approval', 'MGRPAYAPPR', 'Ready for Invoicing', 'PAID', 'Paid',
         'PARPAID', 'Partially Paid',     'PAYAPPR', 'Payables Approved',     'PENDMGR', 'Pending Manager Approval',
         'PEND_HOLDS_CLEARANCE', 'Pending Payment Verification',     'REJECTED', 'Rejected',     'RESOLUTN',     'Pending Your Resolution',
         'RETURNED',     'Returned',     'SAVED',     'Saved',     'SUBMITTED',     'Submitted',     'UNUSED',     'UNUSED',
         'WITHDRAWN','Withdrawn',     'Not yet Submitted (NULL)') "EXPENSE_STATUS" ,
    NVL(TO_CHAR(erh.report_submitted_date,'dd-MON-yyyy'),'NULL') SUBMIT_DATE,
    NVL(TO_CHAR(erh.expense_last_status_date,'dd-MON-yyyy'),'NULL') LAST_UPDATE,
    erh.override_approver_name ER_Approver,
    fu.description EXP_ADMIN,
    erh.total,
    erh.description 
    FROM
    AP_EXPENSE_REPORT_HEADERS_all erh,
    per_all_people_f pap, fnd_user fu
    WHERE erh.employee_id = pap.person_id
    AND fu.user_id = erh.created_by
    AND NVL(erh.expense_status_code, 'Not yet Submitted') NOT IN  ('MGRAPPR', 'INVOICED', 'PAID', 'PARPAID')
    AND pap.full_name = NVL(:claimant, pap.full_name)
    AND TRUNC(erh.report_submitted_date) BETWEEN NVL(:expense_date_from, '01-JAN-1999') AND NVL(:expense_date_to,'31-DEC-2299')
    AND fu.description = NVL(:raisedby,fu.description)
    AND erh.expense_status_code = NVL(:status,erh.expense_status_code) &LP_ORDERED_BY
      ]]>
      </sqlStatement>
      </dataQuery>
      <dataTrigger name="beforeReportTrigger" source="SUBIXCLT.BEFOREREPORT(L_ORDERED)" />
    - <dataStructure>
    - <group name="G_XP_CLM_TRACKNG" source="Q1">
      <element name="INVOICE_NUM" value="INVOICE_NUM" />
      <element name="EMP_CLAIMING" value="EMP_CLAIMING" />
      <element name="EXPENSE_STATUS" value="EXPENSE_STATUS" />
      <element name="SUBMIT_DATE" value="SUBMIT_DATE" />
      <element name="LAST_UPDATE" value="LAST_UPDATE" />
      <element name="LP_ORDERED_BY" dataType="varchar2" value="SUBIXCLT.LP_ORDERED_BY" />
      </group>
      </dataStructure>
      </dataTemplate>The PL SQL..
    The PL SQL..
    CREATE OR REPLACE PACKAGE Subixclt IS
    L_ORDERED  VARCHAR2(50);
    RAISEDBY VARCHAR2(50);
    STATUS VARCHAR2(50);
    CLAIMANT VARCHAR2(50);
    LP_ORDERED_BY VARCHAR2(50);
    FUNCTION BEFOREREPORT(L_ORDERED IN VARCHAR2) RETURN VARCHAR2;
    EXPENSE_DATE_FROM DATE;
    EXPENSE_DATE_TO DATE;
    --RETURN VARCHAR2;
    END;
    CREATE OR REPLACE PACKAGE BODY Subixclt IS
    FUNCTION BEFOREREPORT(L_ORDERED IN VARCHAR2)RETURN VARCHAR2 IS
    BEGIN
    Fnd_File.PUT_LINE(Fnd_File.LOG,'L_ORDERED'||L_ORDERED);
    DECLARE
    LP_ORDERED_BY VARCHAR2(50);
    L_ORDERED  VARCHAR2(50);
    RAISEDBY VARCHAR2(50);
    STATUS VARCHAR2(50);
    CLAIMANT VARCHAR2(100);
    EXPENSE_DATE_FROM DATE;
    EXPENSE_DATE_TO DATE;
    BEGIN
    IF (LP_ORDERED_BY='Expense Report Number') THEN
         LP_ORDERED_BY :='order by 1 asc;';
      ELSIF (LP_ORDERED_BY='Person Claiming') THEN
         LP_ORDERED_BY :='order by 2 asc;';
      ELSIF (LP_ORDERED_BY='Submit Date') THEN
      LP_ORDERED_BY :='order by 4 asc;';
      END IF;
    RETURN(L_ORDERED);
    --RETURN NULL;
    END;
    END;
    END;Thanks for looking..
    Steven
    Edited by: Mr_Alkan on Jun 4, 2010 3:35 PM

    One has to initialise a session first for use with Oracle Apps if you want to make it run as a concurrent job.
    Any decleration within your package will not be recognised unless initialisation is sucessful.
    Investigate the built-in packages:
    FND_GLOBAL - for initialisation
    FND_SUBMIT - for setting session relevant parameters
    -- function returns true or false depending on whether the initialisation was sucessful or not
    create or replace function is_Init_OK (p_User_Name       in varchar2
                                          ,p_Responsibility  in varchar2
                                          ,p_Language        in varchar2) return boolean as
      b_Set_NLS   boolean;
      b_Set_Mode  boolean;
      r_ISet      fnd_Init := Get_Init_Set(p_User_Name, p_Responsibility);
      begin
        -- 1
        fnd_global.apps_initialize(r_ISet.User_ID, r_ISet.Resp_ID, r_ISet.App_ID);
        -- 2
        b_Set_NLS := fnd_submit.set_nls_options(p_Language);
        -- 3
        b_Set_Mode  := fnd_submit.set_mode (false);
        return (b_Set_Mode and b_Set_NLS and (    (r_ISet.Resp_ID is not null)
                                              and (r_ISet.User_ID is not null)
        exception
          when others then
            return false;
    end is_Init_OK;
    -- for example
    declare
      l_User_ID number = 'IMPORT_POST'; --- import post user
      l_Resp    number =  'Import and Posting responsibility' -- import posting responsibility
      l_Language varchar2(100) := 'AMERICAN';
      b_Init boolean := false;
      INIT_EXCEPTION exception;
    begin
      b_Init := is_Init_OK(l_User_ID, l_Resp, l_Language);
      if (not b_Init) then
        raise INIT_EXCEPTION;
      end if;
      -- conitnue with your processing
      exception 
        when others then
          when INIT_EXECPTION then
          when others then
    end;
    /

  • Running scripts doesn't end correct

    When running many scriptlines the job run through, but it never finish. SQLDeveloper accept cancel, but the scripts operation still runs (Running Script message on message line).
    Does SQLDeveloper count lines the scripts cover, or does it count a scripts from start to next ; as one line?
    I've tried different sizes here, and somewhere between 2500 - 5000 lines is the critical number. This is about 500-1000 scripts.

    Looks like a java problem. Log file claims "lock deadlock; thread 'SQL Worksheet Execution Thread' blocked" and the lists a lot of java issues

Maybe you are looking for

  • BP Relationship is not deleted in CRM up on deletion of Partner Func in ECC

    Hi, We have used CUSTOMER_MAIN and CUSTOMER_REL to download the customers and relationships into CRM system from ECC system. We downloaded the customers and relationships without any issues. The delta like if any partner function is added to the cust

  • Loads of trouble with n73, please help me.

    Ok, I bought the n73 about a month ago, and I've been happy with it. A bit on the slow side, but acceptable. Now since about a week, the damn thing has been driving me crazy. First, it started losing network connection, no calls in or out. So I went

  • Satellite A660 - cannot see saved files

    The problem is with a game that I have. I can see a file that I downloaded from the net to play, but those files from the game that I have saved do not show up when I look for them they don't show up. But when I view compatibility files they show, bu

  • I have the combo pack Photoshop and Premiere 10 with the multi DVD's and I have Windows 7 Ultimate 6

    I have the comb pack Photoshop 10 and Premiere 10 with multi DVD's labeled 1 of 5 throu 5 of 5 . I have Windows 7 Ultimate and I'm just confused do I start with 1 of 5 then go to 2 of 5 and the fallow it up with 4 of 5 and 5 of 5 ?????? I think I los

  • Delete vs truncate

    Hi, We are using Oracle and we have a daily job of loading data to a table. The existing data needs to be cleaned and fresh insert need to be done. Should I use Delete or truncate to clean the data. If any error occurs i need to have old data ie prev