How to create inline function inside a test script

i ahve a test script. i want to create a inline function that will do some stuff. how can i do it syntatically.
declare
  -- Local variables here
  i integer;
begin
  -- Test statements here
  -- have a function spec and body how?
end;

Hi,
You can define a function in the DECLARE section and use it in the BEGIN section, like this:
declare
  -- Local variables here
  i integer;
     -- Defining successor function
     FUNCTION successor (in_num  IN NUMBER)
     RETURN      NUMBER
     IS
     BEGIN
          RETURN     in_num + 1;
     END     successor;
begin
     dbms_output.put_line ( successor (1) || ' = successor (1)');
end;
/

Similar Messages

  • Reference functions inside un untitled script object

    Hello,
    Does someone knows how to reference a function inside an untitled script object?
    thank you

    xfa.resolveNode("#script").functionName()
    You should always name your scriptObjects ...it makes accessing them much easier.
    Paul

  • How to Create a Functiona Query

    Dear all,
    Could any body detail me how to create a functional query. Please give me step by step procedure to create a query.
    I would appreciate if you can give me a material with screen shots. Your help will be highly appreciated.
    Thank you
    Raghu Ram

    Hi Raghu,
               Go through this document it may help you,
    SAP Query
    Step 1: Create User Group – SQ03
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
    a) In the User Group: Initial Screen -
    Enter User Group Code (self named)
    Click on “Create”
    b) In the User Group (Code): Create or Change pop-up window -
    Enter the User Group Description
    Click on “Save”
    c) In the Create Object Directory Entry pop-up window -
    Ö Click on “Local Object” button
    Ö The User Group Created is saved
    Step 2: Create User Group – SQ02
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Infosets
    a) In the Infoset: Initial screen -
    Ö Enter Infoset Code (self named)
    Ö Click on “Create” button
    b) In the Infoset: Title & Database Screen -
    Ö Enter Description of Infoset in the “Name” field
    Ö In the Data Source selection: Select appropriate Data Source by clicking
    the radio button
    · Source the data can either be multiple tables OR single table. There are 4
    options for the user to select from
    Ö Click on “Continue” (Enter)
    Ö Selected Table gets displayed in the Infoset : Initial Screen
    c) In the Infoset: Initial Screen -
    Ö Click on “Insert Table” button
    d) In the Add Table Screen -
    Ö Enter the Table Name that is to be inserted
    Ö Click “Continue” (Enter)
    e) In the Infoset: Initial Screen -
    Ö Click on “Back” button
    f) In the Field Group Defaults pop-up Screen -
    Ö Select Appropriate Field Group Option by clicking on the radio button
    · there are 3 options to select from. User can select Empty Field Group
    option and then select the data fields in the steps explained further.
    Alternatively, User can select an option which clubs all the data fields
    From all the tables selected
    Ö Click “Continue” (Enter)
    g) In the Change Infoset Screen -
    · the left side lists the Tables that the user has selected in step b, c & d
    · In the right side, system creates field groups, one for each table listed in the
    left part. Initially, the Field Groups are empty
    Ö In the Left Side, Click on the arror next to the table name and expand and
    display all the data fields in the table
    Ö Select a Data Field from the expanded Table view, which is to be added to
    the Field Group on the right.
    Ö Select a Field Group on the right side, in which Data Field selected above
    has to be added
    Ö Right click on the Data Field selected and click on “Add Field to Field Group”
    Ö The selected Data Field gets added to the selected Field Group, which is
    indicated by an arrow next to the Field Group.
    Ö Carry out the steps above to add the required Data Fields to the respective
    Field Groups
    Ö After transferring Data Fields to Field Groups click on “Generate” button
    h) In the Create Object Directory Entry Screen -
    Ö Click on “Logical Object” button to generate the infoset
    i) In the Change Infoset Screen -
    Ö Click on the “Back” button
    j) User is taken back to the “Infoset: Initial Screen” which displays the
    created Infoset record.
    Step 3: Assigning User Group to Infoset – SQ03
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
    a) In the User Groups: Initial screen -
    Ö Enter the User Group for which Infoset is to be assigned
    Ö Click on “Assign Users & Infosets” button
    b) In the User Group: Assign Users Screen -
    Ö Click on “Assign Infosets” button
    c) In the next screen, select the Infoset, which needs to be attached to the
    User Group selected
    d) Click on the “Back” button
    Step 4: Creating Query – SQ00 & SQ01
    Follow the menu path – SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Queries
    a) In the “Query from User Group: Initial Screen -
    Ö Click on “Other User Groups” button
    Ö In the pop-up screen, User Groups, select the User Group for which the
    Query has to created. The pop-up screen closes.
    Ö Enter the Query Code in the “Query” field
    Ö Click on “Create” button
    b) A pop-up screen “Restrict Value Range” shows the list of Infosets assigned to
    the User Group
    Ö Select the Infoset for which Query has to be created
    c) In the new screen Create Query: Title, Format -
    Ö Enter the Description of the Query in the “Title” field
    Ö Click on the “Next Screen” button
    d) In the Select Field Group” screen
    Ö Select the Field Groups from which Data Fields have to be selected for the
    Output
    Ö Click on the “Next Screen” button
    e) In the “Select Field” screen -
    Ö Select the Data Fields, which should appear in the output
    Ö Click on the “Next Screen” button
    f) In the Screen “Selection” -
    Ö Select the Data Fields for the selection criteria
    Ö Enter the sequence in which the selected fields would appear in the input
    screen of the query.
    Ö Define if the selection criteria should be Single Value or Multiple Value Range
    by clicking in the appropriate check boxes
    Ö Click on the “Basic List’ button
    g) In the screen “Query Layout Design” -
    Ö Select the Output Fields from the Data Fields section by clicking the
    appropriate check box
    Ö Change the sequence of Data Field columns if required
    Ö Click on the “Test” button to test the query created
    h) On the “Test Query” screen click “Continue”
    i) In the “Query” screen -
    Ö Enter the selection criteria
    Ö Click on “Execute” button
    j) Save the Query created
    Step 5: Running the Query – SQ00
    a) In the Query From User Group: Initial screen –
    b) Click on “Other User Groups” button to select the User Group
    c) In the pop-up screen “User Groups” select the User Group
    d) System lists all the queries created for the User Group
    e) Select the appropriate Query
    f) Click on “Execute” button
    g) User is taken to the Selection screen
    h) Enter the selection criteria and click on “Execute” button
    i) System runs the query and gives the output
    Regards,
    Murali.

  • How to create menu function for link to open file

    Hi,
    I need help how to create menu function for link to access file and allow user to save the file when click on it.
    The file will keep inside server.
    Thank you.
    Regards,
    Wilson

    I need help how to create menu function for link to access file and allow user to save the file when click on it.
    The file will keep inside server.AFAIK, you have to write a custom code to achieve this and Oracle does not provide this functionality.
    If you want to store the file as an attachment, please see (How to Store Image/PDF Attachments on the File System in 11i and R12 (like Attachment File Directory) [ID 294525.1]).
    Thanks,
    Hussein

  • How to Create Inline Table to Display Detail Data in a Master Table in 11g?

    Hi,
    I have a requirement to create inline table inside master table to show data.
    I found this 10g article for this http://download.oracle.com/docs/cd/B31017_01/web.1013/b28967/web_masterdetail006.htm#BABCDCGE
    I couldn't find such option in 11g. Am i missing something? Please let me know where i can find more details.
    Required Output:
    [+] DepartmentId DepartmentName
    [-] DepartmentId DepartmentName
    EmployeeId FirstName LastName
    EmployeeId FirstName LastName
    EmployeeId FirstName LastName
    [+] DepartmentId DepartmentName
    Also, I tried creating the Page as below (Departments -Employees Relation). i.e I have tried using the ADF treeModel in the bindings and then created a table/inline table manually to populate. The data is available in the iterators (i found using sops in back bean), but the inline table is not showing any data. I tried enabling PPR on detail based on master. But no luck.
    <af:table rows="#{bindings.Departments1.rangeSize}"
    emptyText="#{bindings.findAllStaff1.viewable ? \'No rows yet.\' :
    \'Access Denied.\'}"
    var="row" value="#{bindings.Departments1.treeModel}">
    <af:column headerText="#{bindings.Departments1.labels.DepartmentId}"
    sortable="false" sortProperty="DepartmentId">
    <af:outputText value="#{row.DepartmentId}"/>
    </af:column>
    <af:column headerText="#{bindings.Departments1.labels.DepartmentName}"
    sortable="false" sortProperty="DepartmentName">
    <af:outputText value="#{row.DepartmentName}"/>
    </af:column>
    <f:facet name="detailStamp">
    <af:table rows="#{bindings.Departments1.rangeSize}"
    emptyText="No rows yet." var="detailRow"
    value="#{row.children}">
    <af:column headerText="#{row.children[0].labels.EmployeeId}"
    sortable="false" sortProperty="EmployeeId">
    <af:outputText value="#{detailRow.EmployeeId}"/>
    </af:column>
    <af:column headerText="#{row.children[0].labels.FirstName}"
    sortable="false" sortProperty="FirstName">
    <af:outputText value="#{detailRow.FirstName}"/>
    </af:column>
    <af:column headerText="#{row.children[0].labels.LastName}"
    sortable="false" sortProperty="LastName">
    <af:outputText value="#{detailRow.LastName}"/>
    </af:column>
    </af:table>
    </f:facet>
    </af:table>
    Thanks in Advance,
    Harikiran

    Hi,
    After reading the above links end-to-end twice, I'm finally able to establish the relationship in UI. I've used iterator for my specific purpose, although it can be done using a table/forEach.
    1) Create VOs for Dept and Emp, i.e. DeptVO and EmpVO.
    2) Then a View Link on deptID, i.e DeptEmpVL
    3) Drag and drop the Dept as AdfTreeTable, b'coz it will create the treeBinding and also add the emp accessor by selecting it in the binding window. (refer to above doc links from BaiG)
    4) In my Page UI, i've created a new table and an iterator in the detailStamp.
    Dept Table ->
    o Value = #{bindings.Departments1.treeModel}
    o Var = dept
    o varStaus = deptVarStatus
    Add these:
    Column1-> OutputText -> #{dept.DepartmentId}
    Column2-> OutputText -> #{dept.DepartmentName}
    Insert into TableFacets -> detailStamp -> iterator
    Iterator ->
    o Value = #{dept.children}
    o Var = emp
    o varStatus = empVarStatus
    Add these:
    OutputText -> #{emp.EmployeeId}
    OutputText -> #{emp.EmployeeName}
    OutputText -> #{emp.Salary}
    This iterator/forEach comes in handy for having n Number of regions inside a layout.
    Thanks,
    Harikiran

  • How to create a function with ref_cursor as parameter in OWB 10.1

    Hi,
    Can any one help me how to create a function with ref_cursor as parameter in OWB 10.1.?
    Its urgent. Please help me.
    Thanks,
    Siv

    Hi David,
    Thanks for your reply.
    Before going for this function, I need to create a package in transformation node in owb module.
    My package is as follows,
    Create or replace package 123
    type xxx is RECORD ( parameters);
    type yyy is RECORD (parameters);
    type aaa is table of yyy;
    type bbb is REF CURSOR return xxx;
    type ccc is record (parameters);
    type ddd is ref cursor return eee;
    END;
    How can I create the above kind of package manually in OWB 10.1 (Should not to import the package)
    Please help me its urgent.
    Thanks,
    Siv

  • How to create user function in Data Functions in Query Designer?

    Could someone tell me how to create user function in Data Functions in Query Designer?
    I mean function like "NDIV0" in Data Functions.
    SAP BW 3.x.
    Query Designer (SAP BW 3.x)

    Hi check the following URL, it gives how to add in Formulas in formula Builder, not in DataFunctions.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f095592f-42f7-2a10-6ab1-c836a559b48f
    Thanks
    Reddy

  • How to create search function (af:query) using method in java

    hi All..:)
    i got problem with search custom (af:query), how to create search function/ af:query using method in java class?
    anyone help me....
    thx
    agungdmt

    Hi,
    download the ADF Faces component demo sources from here: http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html It also has an example for creating a custom af:query model
    Frank

  • How to create a function group (step by step)?

    I would like to know how to create a function group, step by step.
    step 1 do....
    step 2 do ...

    also,
    Go to SE80 for creating a function group.
    Also have a look at below link.
    http://help.sap.com/saphelp_nw04/helpdata/en/d1/801ef5454211d189710000e8322d00/frameset.htm
    i.e.
    TCODE - SE80
    Choose - Function Group ,it wil ask to create..
    Create and then activate..give a name starting with Z .
    Other way is go to tcode SE37.
    In the menu,there is a option in sub menu for creating function group.
    Just create it by clicking that and give names starting with z or y.

  • Pls give some ideas? how to create a function.

    Make an MS-Access form to accomplish:
    Use a list box to display part-time employees and their assignments (SSN, Hours, FullName). Include only those who currently work a total of less than 40 hours/week.
    SSN , Hours and FullName are stored in 2 different table.
    I have no idea how to implement this function. How to create this function to get SSN, Hours and LastName and FirstName (RecordSet which will be used in application)?
    Thanks alot!

    I'm afraid this is an Oracle forum, not an MS-Access forum.
    ;)

  • How to Create the Function Module Exit

    Hi,
      How to Create the Function Module Exit. Please tell me the step by step procedure.

    Hi,
    Check this link for how to create the function module exit..
    http://sap.niraj.tripod.com/id62.html
    Thanks
    naren

  • Webinar (Aug 11): How to create Cross-Platform Automated GUI Tests for Java Apps

    Join Squish expert, Amanda Burma, and learn how to create cross-platform automated GUI tests for your Java applications!
    Register here (multiple time slots)
    August 11th 2014
    Duration: 30 minutes plus Q & A
    This webinar will cover:
    General Squish for Java overview
    Automating BDD Scenarios
    Executing Cross-Platform Automated GUI Tests
    Interacting with Java application objects, properties & API
    See you there!
    Unable to attend? Register and we'll send links to future events and access to our webinar archive following the event.
    Webinar schedule
    Learn more about Squish
    Evaluate froglogic squish

    <property name="messaging.client.jar.path" value="Location in your local drive" />
    <property name="messaging.client.jar.name" value="nameOfYourFile.jar" />

  • How to attach input file in the Test Script in SECATT in ECC6 ?

    Hi ,
    How to attach input file in the Test Script in ECC6  in Tcode SECATT ?
    For Testing in SECATT in ECC6, how to attach input file which contains multiple records ?
    Best Regards,
    Padhy

    Hi and Welcome to the Community!
    Since you have balance, and the issue is in your Work domain, you need to work with your server admins, as it's possible they are forbidding (via IT Policy) the ability to do as you desire.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to create a follow up page in scripts using Duplex and Tumble Duplex

    How to create a follow up page in scripts using Duplex and Tumble Duplex in print mode of scripts ?

    Hi ,
    Set the next page property as duplex , and change the print property back to back

  • How to create a server through WLST  ( Weblogic Scripting Tool ) ?

    How to create a server through WLST ( Weblogic Scripting Tool ) ?
    Thanks in advance...
    Sanjay

    Hi Murugesh,
    Thanks a lot for you reply..
    I was able to create a server using create(). Is it possible to clone a server ?
    When i create a server following tags is added to config.xml
    <server>
    <name>testServer_lab1</name>
    <listen-port>43000</listen-port>
    </server>
    And if i do a clone through admin console, following is added to config.xml
    <server>
    <name>testServer2_lab1</name>
    <machine xsi:nil="true"></machine>
    <listen-port>7001</listen-port>
    <cluster xsi:nil="true"></cluster>
    <listen-address></listen-address>
    <graceful-shutdown-timeout>120</graceful-shutdown-timeout>
    </server>
    If incase, cloning is not possible through WLST, can i add following
    <machine xsi:nil="true"></machine>
    <listen-port>7001</listen-port>
    <cluster xsi:nil="true"></cluster>
    <listen-address></listen-address>
    <graceful-shutdown-timeout>120</graceful-shutdown-timeout>
    under <server> tag which is created through WLST ?
    I am using 9.2 version.
    Regards
    Sanjay

Maybe you are looking for

  • Problem with autoscale on 3d graph (new)

    Hi I have a problem with scaling on the 3D graph (it doesn't work, see attached figures). I've read about the bugs found but this one is not mentioned. Do you guys have any suggestions ? (or I am doing something wrong ?) thanks Attachments: 3d_image.

  • Web App Security Fallback (client-cert then form-based)

    Can you setup a web application to fall back to form-based login if the client-cert (i.e. identity assertion token) is not available. I think this would be very valuable because once you've configured the web app to use the "client-cert" authenticati

  • XSQL and BEA Weblogic 6.1

    I spent a lot of time trying to figure out how to configure the XSQL servlet to run on BEA Weblogic 6.1 It is really simple once you understand that you should work off expanded directory instead of trying to get a .war or .ear file uploaded. I decid

  • New user:  Problems placing text over object

    Hi, I have recently started using InDesign CS5 to produce the biannual magazine for a volunteer organisation.  My background is not in this area, so please excuse me if  I do not use correct terminology or am asking something obvious.  Having said th

  • Should I get an HD camcorder?

    I was considering updating my camcorder from a DV that records on digital 8 tapes to something more modern. I have been trying to figure out if an HD camcorder would be a good choice. I do like to the edit the family footage. As far as I can tell, th