Execute custom script Logic from a package.

Hye!
I'm working with 7.0 NW.
I have a custom scriplogic and I would like to execute it from a  package of Datamanager.
Is posible?  Could you gime me an example code?.
Thanks.

Hi Martin,
This is feasible.
Once you have created a script logic, you need to create a process chain and the script logic will be linked with this process chain. Then you need to create the DM and link the process chain with this DM.
There is one document on SDN "How to Run a Top Down Allocation within BPC NW". Please refer to this. This will take you through the process of linking a script logic to a process chain and then to link the process chain to a DM.
Hope this helps.

Similar Messages

  • Calling  multiple  script  logics from  a  single  package

    Team- How  do i  call multiple  script  logics  from a   single  DM  package...?
    I   know  its  possible  and  have seen  a  prototype  but  cant  recollect  or  find  it on sdn...
    Thanks  for  your  time.
    Vishal.

    Hi,
    You can create a master script logic which will include all the other script logics using the *INCLUDE command and call this master script through your DM package.
    Another way is to have multiple tasks in the process chain which is calling a script logic. You can pass separate script logics to each of the tasks.
    I would prefer the first option
    Hope this helps.

  • Script logic from BPC 5 in BPC 7.5

    Hi,
    I am trying to use some script logic from an appset in BPC 5 in BPC 7.5. When I validate the logic in 5 it works fine but in 7.5 I get validation errors.
    They relate to properties of dimension elements that are not currently used (neither in 5 nor in 7.5) but could well be used in the future. As an example, this bit generates an error
    *WHEN ACCOUNTL.RATETYPE
    *IS END,ENDFLOW
    I currently do not have an account defined with ratetype END but it is quite possible that there will be one in the future. And END is defined as an element in the RATE dimension.
    So, why did BPC 5 accept this and BPC 7.5 does not? And, is there a way around other than defining a dummy element in ACCOUNTL that used ratetype END?
    Thanks
    Edited by: ArnoldWarhonowicz on Aug 5, 2010 4:06 PM

    What I havenoticed is that with the new7.5 Script logic, there are more checks and balances performed during the validation.  So, if you have only AVG, ENDRATE on RATETYPE property and no END for any member, yet your logic is calling a set of members with this parameter, the logic fails to validate. I assume the process is checking for a set of END members based on the request. Since they don't exist, the error occurs.  But I would request that BPC Support verify the behavior as well.
    If you remove END, does the logic validate?
    Hope this helps.

  • Executing .sql scripts file from command prompt

    I had created the .sql scripts for
    --Create Database
    --Create tables
    --Create Stored procedure
    I am using SQL server 2008.
    Now i want to deploy it into the target server using the command prompt.
    How can I call to execute that script on the target server?

    with few errors as "Incorrect Syntax near "GO"".
    Hello,
    GO is a command, which is only known & interpretted by SSMS + SqlCmd.exe; SQL Server engine / data access components don't know this command, therefore you get an error.
    See
    Query Options Execution (General Page); for SSMS you can change it from GO to any other term.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to setup Time to execute eCATT scripts automatically from TestPlan

    Hello All,
    Iam working on eCATT using SAPGUI 640.All my scripts are SAPGUI recording.I have bunch of scripts.i have created a Testpackage and a TestPlan and moved all my scripts into that TestPlan.
    Now,I want all the scripts to get executed from TestPlan in the late evening or on weekends automatically without any manual interaction.
    Do we have any solution for the above issue.
    I would appreciate all your comments.
    Thanks,
    Sarapu

    Thank you for your comment and suggestion. I will give your suggestion a try. However, it seems the question is still open:
    If a user wants to write a program/script that does an scp/rsync that transfers a file from one host to another (assuming the .ssh keys are properly set up), and put it into a launchd process that executes like it would under a cron (i.e., they do not need to be logged in, and it persists after a reboot), how is this accomplished without using the root-level /Library/LaunchDaemon?
    Am I miss-informed that a users LaunchAgents are executed only when the user logs in?
    At least in the scientific arena, using a cron to transfer files is a very regular practice. It would be a major headache if the system administrator had to manually add each users launchd files to /Library/LaunchDaemon

  • How to pass the variable in the script logic from text prompt

    hai,
    in my logic i am using Textprompt and the prompt is
    PROMPT(TEXT,%period%,"Enter a period Category",,"")
    i have to append this period in middle of the one category
    how can i do this
    thanks,
    Rajesh

    Hi,
    Can you please explain with an example, about what you are trying to achieve.

  • Send parameter from one script logic to another. SAP BPC 7.5 NW.

    Hello!
    Before i start, want to apologize for my English.
    We work on SAP BPC 7.5 for NetWeaver.
    In general,  we want to send parameter from one Script logic file to another script logic file.
    I will explain why :
    1. We have parametr like %C_CATEGORY_SET% (and another four parameter, like groups, currency and etc.) that work on one script(next, i will named it A_Script). 
           We will send this parametr from BPC EXCEL (we will create button, then use command MNU_eData_SelectPackage(we also set parameters) and run package that we need, also before we set script for this package by the SAP Guide. We send some data, and this A_Script work good. Everything that we want from this script work correctly. )
    2. Next we create another script(B_Script) , and we want use %C_CATEGORY_SET%, but we don't know how use this parametr, if we will just write this parametr on Script Logic,  apears error ("C_CATEGORYDATAVALUE" is not assigned to the Data Administrator). We try to solve this problem by using System_Constants.lgf, but we get error.
    Code:
    *DIM C_CATEGORY          WHAT=%C_CATEGORY_SET%;             WHERE=<<<;                   USING=<<<;    TOTAL=<<<
    *DIM C_ENTITY                 WHAT=%ENTITYSET%;                         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM GROUPS                   WHAT=%GROUPS_SET%;                    WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    *DIM RPTCURRENCY         WHAT=%RPTCURRENCY_SET%;         WHERE=<<<;                  USING=<<<;      TOTAL=<<<
    *DIM TIME                          WHAT=%TIME_SET%;                          WHERE=<<<;                  USING=<<<;     TOTAL=<<<
    If we will change %C_CATEGORY_SET% for  ACTUAL, and also change another parameters, script will work, package will run correctly. But we need using parameters, because we didn't exactly what will choose our client.
    Our question have BPC Script Logic some kind of Globar Parameter(Variable), that we will set in A_Script, and then use them on B_Script?
    How can we define parameter from another script logic, maybe we should send it?
    Should we use System_Constants for solving this problem, if yes, how?
    Any help will be appreciated
    Best Regards,
    Erlan Kadraliev
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:50 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:58 PM
    Edited by: Erlan Kadraliev on Feb 8, 2011 4:59 PM

    Hi Ethan Jewett 
    1. About %ENTITYSET% it is normal. Before this line  i write :
    *SELECT(%ENTITYSET%, "ENTITY", GROUPS, "[ID]=%GROUPS_SET%")
    So it is not this problem. %ENTITYSET% just parameter, that i used.
    2. Are you running the scripts using the same data manager package? I am running two different package for 2 different Script.
    For example aPackage for aScript, and bPackage for bScript.
    My questions was how can i send parametr from one script to another, for example i can run another script by using BADi command Runlogic, but how can send parameter that i need to used on another script. I have for example parameter %GROUPS_SET% (CG001) on aScript, but i can't get this parameter on another script, if i write %GROUPS_SET% i will get error  ("GROUPSDATAVALUE" is not assigned to the Data Administrator)
    OR
    Maybe if you will answer for next question, i will be able solve problem , How can i send parameter CG001 (this is %GROUPS_SET%, for example it stay in EXCEL in cell A5) from excel to script logic by running package. Maybe i can get cell value on Dynamic Script Data Management?  
    My Dynamic Script on bPackage
    PROMPT(RADIOBUTTON,%CHECKLCK%,"u0412u044Bu0431u043Eu0440 u0431u0430u0437u043Eu0432u043Eu0433u043E u043Fu043Eu043Au0430u0437u0430u0442u0435u043Bu044F.",1,{"u0412u0441u0435u0433u043E u0410u043Au0442u0438u0432u044B","u0421u043Eu0431u0441u0442u0432u0435u043Du043Du044Bu0439 u043Au0430u043Fu0438u0442u0430u043B","u0412u044Bu0440u0443u0447u043Au0430 u043Eu0442 u0440u0435u0430u043Bu0438u0437u0430u0446u0438u0438","u0414u043Eu0445u043Eu0434 u0434u043E u043Du0430u043Bu043Eu0433u043Eu0431u043Bu0430u0436u0435u043Du0438u044F u043Eu0442 u043Fu0440u043Eu0434u043Eu043Bu0436u0430u044Eu0449u0435u0439 u0434u0435u044Fu0442u0435u043Bu044Cu043Du043Eu0441u0442u0438"},{"BPAST_ALL","BPEQ","BPPROCE","BPOPIN_GO"})
    INFO
    (%EQU%,=)
    INFO
    (%TAB%,;)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,CHECKLCK%EQU%%CHECKLCK%%TAB%)
    TASK
    (/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,MYTEST_145.LGF)
    Best Regards,
    Kadraliev Erlan

  • Error during script logic processing from UJKT tcode

    Hi,
    When I try to execute the script logic through UJKT tcode, it gives me the following exception:
    UJK_EXECUTION_EXCEPTION:Runtime error Duplicate recordMember (D_AUTO_UAE) of dimension (DIVISION) is not a valid member.
    Following is the script logic:
    *RUN_PROGRAM VALIDATION
       CATEGORY = %CATEGORY_SET%
       GROUP= %GROUPS_SET%
       TID_RA = %TIME_SET%
    *ENDRUN_PROGRAM
    BAdi used is BADI_UJ_CUSTOM_LOGIC
    Also the error log displays entire set of data records, instead I will like to see only the status of whether it went successful or not.
    Where can I check this setting?
    Please help.
    Thanks and Regards,
    Pankaj

    Hi Pankaj,
    I would request you to re-process the DIVISION deimension (preferrably all the dimensions). Then re-process and optimize the application. See, if you are getting any errors or not.
    Hope this helps.

  • FOR loop in script logic

    Dear Gurus,
    This is the logic I am working with:
    *FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
    [ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]? [ACCOUNT].[EQUIPMENT1] : ([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
    *NEXT
    I am trying to execute the above script logic, but the system is throwing an error that says 
    "Duplicate formula found:  [ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+......."
    Any idea why this is happening?
    Also, could you please suggest a better way of writing the above code?
    Thanks,
    Vijay.

    As a testing scenario, I have calculated the depreciation in a different part of the same logic.  Here it is:
    //This logic calculates the accumulated depreciation amount for the time period specified in the logic
    //NOTE:  This logic is not very dynamic and is only valid for the accounts specified in the logic
    //A FUTURE ENHANCEMENT TO THIS LOGIC WOULD BE TO MAKE THE "LIFE" OF THE ASSET A $DATAMANAGER VARIABLE$
    //AND WRITE A CUSTOM SCRIPT LOGIC
    //BEGIN SCRIPT LOGIC FILE//
    //CONSTANTS
    *XDIM_MEMBERSET CATEGORY=ACTUAL
    *XDIM_MEMBERSET ACCOUNT=Depreciation,AccumDepr,NBV_EQUIPMENT1,EQUIPMENT1
    *XDIM_MEMBERSET ENTITY=STORE1
    *XDIM_MEMBERSET TIME=2008.JAN,2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //BEGIN: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE //
    *WHEN ACCOUNT
    *IS EQUIPMENT1
         *WHEN TIME
         *IS 2008.JAN
              *REC(FACTOR=1,ACCOUNT="NBV_EQUIPMENT1")
         *ENDWHEN
    *ENDWHEN
    *COMMIT
    //END: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE   //
    //BEGIN: CALCULATE DEPRECIATION //
    *WHEN ACCOUNT
    *IS EQUIPMENT1
         *REC(EXPRESSION=(%VALUE%/6),ACCOUNT="Depreciation")
    *ENDWHEN
    *COMMIT
    //END: CALCULATE DEPRECIATION   //
    //BEGIN: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE //
    *FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
    *WHEN CATEGORY
    *IS ACTUAL
    *REC(EXPRESSION=IIF((([ACCOUNT].[AccumDepr] + [ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]), [ACCOUNT].[EQUIPMENT1], [ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
    *ENDWHEN
    *NEXT
    //*FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
    //CHECK IF THE NET BOOK VALUE OF THE ASSET IS LESS THAN ZERO//
    //*[ACCOUNT].[#NBV_EQUIPMENT1] = (([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation])>0? ([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation]) : 0)
    //*NEXT
    *COMMIT
    //END: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE   //
    //END SCRIPT LOGIC FILE//
    Please let me know if there is a better way to write this code.
    Thanks for all your help.

  • Script Logic like a function

    Hi all,
    I want to execute a load of data from a year and actual version to year + 1 and budget version based in some assumptions filled in another input schedule. I thought that is possible using a script logic, so i create the script and i don´t know how to call it, Just from de the DEFAULT.LGF but is not my idea for this, cause every change in the data will execute this calculation....  Thats is the scenario:
    Input Schedule
    Time 2011.JAN
    ========== Budget
    Account%        5%
    Real data Query
    Time 2010.JAN
    ==========Actual
    Account1____100
    What i want
    Time 2011.JAN
    ============BUDGET
    ACCOUNT1        105
    There is another way to do that? I
    Thanks

    Hi,
    For executing a script logic, you need to follow few steps.
    1. Create an SSIS package to call your script logic in business intelligence development studio (BIDS) - (please refer to the SSIS package for currency conversion)
    2. Create a DM package to call the above SSIS package (please refer to the DM package for currency conversion)
    You can run the above DM package to execute your script.
    Hope this helps.

  • 7.0NW: script logic to post data to another cube

    Hi,
    On the 7.0NW we have a FINANCE cube (8 dimensions) and a FINANCE_DETAIL (12 dimensions) cube. I was hoping that someone could advise on how to transport data using script logic from FINANCE_DETAIL to FINANCE, knwoing that the SQL logic for the MS-platform is no longer applicable (DESTINATION_APP statement) on the NW-platform.
    Thx&Rgrds
    Bjorn

    BPC7Nw supports ABAP development through script logic. You can use the keyword 'call custom logic' to execute the BADI that you developed. With SP01, you can also pass parameters to this BADI. Here are step by step instructions to do the same.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f4252d-98ca-2b10-e689-f85085ae2d12
    Regards
    Pravin

  • Script logic error - Invalid object name 'tblStatus'

    Hi all,
    Running BPC 5.1 SP5 on SQL 2005.
    Has anyone ever seen this error message before? I only get the error message when choosing the run-time option in the package, to honor work status settings. This problem just appeared in the last few days, and I believe that a month or two ago, users were running the same logic (with the same yes-honor-work-status option selected).
    We did recently upgrade from 5.1 SP3 to 5.1 SP5, and I'm wondering if this may be a cause? That's just a hypothesis though.
    Invalid object name 'tblStatus'. in:
    select distinct d.VERSION,d.ENTITY,d.TIMEID
    from #RESULT_333729 d  where signeddata<>0
    and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
    I understand what it means, and of course there is no table in the appset database tblStatus. Work status locks are kept in tblConsolLock (where Consol is my app name). And in that table, the field name is StatusCode, not Status. So it appears that this is some vestige of code from an earlier version of BPC / O'soft.
    This error occurs in a piece of script logic, that includes both basic SQL WHEN/IS/*REC's and also a *RUNALLOCATION. The error is thrown within the RUNALLOCATION code block. The complete run-up to the error message is shown below.
    -- Calculate difference
    insert into #DIFF_333729 ([ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],signeddata)
    select [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],amtWHERE as signeddata
    from #WHERE2_333729
    select [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],sum(signeddata) as signeddata
    into #RESULT_333729 from #DIFF_333729
    group by [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION]
    --Time to calculate and count differences (45459 found):2.5 sec.
    select distinct d.VERSION,d.ENTITY,d.TIMEID
    from #RESULT_333729 d  where signeddata<>0
    and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
    call 1 completed and data posted in 23.6 sec.
    Run completed in 23.7 sec.
    End time --->11:01:05 AM  -  Date:1/16/2009
    Invalid object name 'tblStatus'. in:
    select distinct d.VERSION,d.ENTITY,d.TIMEID
    from #RESULT_333729 d  where signeddata<>0
    and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
    Here is the original script logic (from the LGX file -- the LGF file has a whole bunch of variables in it that would only confuse the matter more). It works just fine when the
    *RUN_ALLOCATION @A_1||
    USING/TOTAL|
    ACCOUNT WHAT=659210,659310,659320,659410,659510,659610,659620,659630,659710,659810,659820,659910; WHERE=<<<; USING=PCAYTD510000; TOTAL=<<<|
    PRODHIER WHAT=PRODHIERL1A;WHERE=[PRODHIERLEVEL]='5'; USING=<<<; TOTAL=<<<|
    DATASRC WHAT=PCAASSESSSTAGE1,PCAASSESSSTAGE2; WHERE=PCAASSESSALLOC1; USING=INPUTCONSOL; TOTAL=<<<|
    ENTITY WHAT=[COMPANYCODE]='7470' AND [PCAASSESSDRIVERBP]='PCAYTD510000' AND
      ([PCAASSESSMETHODBP] = 'ALLOCAUTO' OR  [PCAASSESSMETHODBP] = 'ALLOCMANUAL');WHERE=<<<;USING=7470.BASE;TOTAL=<<<|
    Anyone experience this same error message? I searched for SAP support notes and found nothing to do with tblStatus or similar.
    Thanks for your help,
    Tim

    Hi Sorin,
    Thanks, you've confirmed what I suspected.
    Yes, we always process & save apps & dims on any upgrade.
    We've reproduced the problem in all 3 of the environments with the customer's appset. I haven't yet reproduced in ApShell, but will do so & report it as a bug.
    And just out of curiousity -- was the other message you saw here in this EPM forum? Before I posted my question, I searched both here, and in the support notes, for "tblStatus" and a few other terms about work status lock errors, etc., and came up with 0 results.
    Thanks again,
    Tim

  • Calling script logic

    Hey guys, I know how to create a custom script logic but lets say i have abcd.lgf file. Now can someone please tell me how to have the user run this script logic? I know that if i do #include abcd.lgf in default.lgf it will run automatically anytime user sends data. what about other ways?
    Thanks.
    Zack

    Hi,
    The script logic need to be linked to a SSIS package and this will be linked to the DM package.
    You need not create a SSIS package from scratch. You can create a copy of an existing one (may be fx retatement). These SSIS packages are available in the server with the extension as DTSX. Create a copy of this SSIS package. Now in BPC excel, create a new DM package and link this to the copied SSIS package. Now go to the advanced script of the DM package. There you will be able to see a statement for logic. Maintain it as your script name.
    Hope this helps.

  • Simple Script Logic

    Hi all,
    Is it possible execute a script logic when i execute the import package? i added in the DEFAULT.LGF the code:
    WHEN *
    is *
    REC(Expression=get(account="ccp0001")*get(account="ccq0001"), account="ccv0001")
    endwhen
    commit
    The idea is calculate value = price * quantity and put in a new rec when i load the data.
    value =ccv0001
    price = ccp0001
    quantity = ccq0001
    i dont know whats wrong but thats calculate nothing.

    Unfortunately you really don't exactly know if a scope is exactly right, unless you work out the tuples specific to each calculation and the define independent script calcs for each tuple set.  A fancy way of saying, breaking down the calculation to each basic account by all the other dimension members that are to get together in a calculation.
    There is a way of testing the script starting in version 7.0SP4 ithink, called the logic debugger.  This process actually has you define some form of scope in order to test the calculations as a dry run, but not run based on an import, rather based on your request to run.
    There are also various rules used during the logic calculation process, such as the engine will query all Accounts for values in the DB that match your inbound data set, or scope. Category, Time and Entity play an critical role in any caluclation, and the processing of values.  And remember that logic that works in default may not look the same as when data is loaded, based onthe sets of data that are used during the passing of inbound detals to the engine for the logic processing.
    hope this helps.

  • Calling a sql script file from a function.

    Hi,
    I need to call a sql script file from a user defined function. Currently i am trying to do this in Oracle SQL Developer. i tried calling with
    @ {filename}, EXECUTE IMMEDIATE etc, but nothing worked. I get the Compiler error.
    Basically my need is to call catldap.sql file so that DBMS_LDAP package gets loaded and then I can call the API functions from this.
    Please let me know if this is possible doing in a PL/SQL function.
    thanks,
    Naresh

    user784520 wrote:
    I need to call a sql script file from a user defined function. Not possible.. and it seems that you do not fully understand the client-server within the Oracle context.
    All SQL and PL/SQL are parsed and executed by an Oracle server process. The SQL and PL/SQL engines each expects a single command block at a time. Neither of these can accept a series of separate commands as a single call and then execute each in turn. The SQL engine expects a single SQL statement at a time. The PL engine expects a single PL/SQL anonymous block at a time.
    This server process also cannot break into the local file system to access script files. Nor can it hack across the network to access script files on the client.
    In order for the server process to access local files, a directory object needs to be created and the current Oracle schema needs read and/or write access on that directory object. As sound security principles apply.
    There's no PL/SQL command to execute a script. You must not mistake SQL*Plus commands (this client has a very limited vocabulary) with PL/SQL commands. SQL*Plus executes its own commands.. and send SQL and PL/SQL commands (a statement block a time) to the Oracle server process to be serviced and executed.
    It is also a very bad idea to execute external script contents from inside an Oracle server process - as that script resides externally and thus outside Oracle's security mechanisms. This means that is is pretty easy for someone to access that script, compromise it, and then have you inject and execute the contents of that script into the database.
    It is not sound security.
    Last issue - it is even worse to have application PL/SQL code dynamically creating (or trying to create) portions of the Oracle data dictionary and PL/SQL call interface.
    The database needs to be installed correctly - and this includes loading and executing the required rdbms/admin scripts during database installation. It does not make sense at all for application code to try and execute such scripts. It raises numerous issues, including having to allow that application code full and unrestricted SYS access to the database instance. A very serious security violation.
    I do not agree at all with the approach you want to use.

Maybe you are looking for