Call a function with tables in a FORM

Hi all,
I am currently willing to create a FORM that would call a function (which has a table in its parameters).
In the form, I modify the fields of this table, and then I call the function.
I put the table in the FORM parameters (either 'USING' or 'TABLES').
Problem is: the syntax check keeps on telling me that my internal table is not correctly defined (missing the statement 'OCCURS 0') and won't compile.
I tried to add this statement 'OCCURS 0', even 'WITH HEADER LINE', but I cannot make it work.
Can anyone help ?
Thx a lot.
Isa.

Hi,
Declare a Ztable inside the form of the type declared in the FM with a header line.Assign the fields that u require to pass through the table and append to this Ztable.
Now pass this Ztable to the parameters of the FM.
This should help u out...
Mark useful answers...

Similar Messages

  • How to call a function with pl/sql

    How does one call a function with pl/sql that uses a function?

    Hi,
    How does one call a function with pl/sql that uses a
    function?I'm not sure what you mean.
    In PL/SQL function can be used just about anywhere where an expression (with the same data type that the function returns). Arpit gave a very common example.
    Here's another example, where all the functions take a single NUMBER argument and return a NUMBER, so they can all be used in places where NUMBERs are used:
    IF  fun_a (fun_b (0)) < fun_c (1)
    THEN
        UPDATE  table_x
        SET     column_y = fun_d (2)
        WHERE   column_z = fun_e (ROUND ((fun_f (3), fun_g (4)));You call a function simply by using its name, followed by its argument list, if any.
    If the function is in a package, you must call it with the package name, like "pk_foo.bar (1, 2, 3)", unless the call comes from within the same package.
    If the function is owned by someone else, you must give the owner name, like "scott.bar (SYSDATE)" or "scott.pk_foo.bar (1, 2, 3)". You can create synonyms to avoid having to name the owner.

  • Call outside function with same name in a package

    I created a function as follows:
    create or replace function f1 return number
    is
    begin
    return 1;
    end;
    This f1 is to be called in a package created below.
    Then I create a package with a function in it, as follows:
    create or replace package pack1 as
    function f1 return number;
    end;
    Now I define the package body as follows:
    create or replace package body pack1 as
    function f1 return number as
    -- I am trying to call the first function f1 defined above here
    How do I resolve the name issues here?
    In other words, I want to call a function with the same signature outside a package.
    Thanks for your kind help.

    Hi,
    Welcome to the forum!
    Do you have a good reason for using the same name?
    Refer to the stand-alone function with the owner name, even though it's your current schema.
    That is, even if the package and the stand-alone function are owned by scott, in the package, say
    x := scott.f1;

  • Is there a way to call a function with in the initializer of a ArrayCollection?

        Is there a way to call a function with in the initializer of a ArrayCollection?
    It won't let me do this:
    var ac:ArrayCollection = new ArrayCollection([
                        {childName:'addTrade',index:addTradeIndex },
                        {childName:'tradeList',dealsCanvas.getChildIndex(tradeList) }

    The correct syntax is
    var ac:ArrayCollection = new ArrayCollection([
                        {childName:'addTrade',index:addTradeIndex },
                        {childName:'tradeList',index:dealsCanvas.getChildIndex(tradeList) }

  • How to call a function with event

    How do I call a function with a event inside it?
    function showTopTen(e:Event):void
        highscoreData = new XML(e.target.data);
        trace("Hiscores: " + highscoreData.item[0].name.text() + " - " + highscoreData.item[0].score.text())
    //showTopTen();  ..??

    Could you indicate why you would want to?
    The eventhandler you show here uses the properties of the event object passed as an argument.
    The way I read it it is data retrieved from a server so your app won't know anything about is untill it is loaded from the server which should be done with an URLLoader object which in it's turn calls your eventHandler when the Event.COMPLETE is triggered.
    something like:
    var urlLoader = new URLLoader();
    urlLoader.addEventListener( Event.COMPLETE, showTopTen )
    urlLoader.load( new URLRequest( "http:// etc." ) );
    to me would seem the proper method to have the function execute.

  • How to call driver program internal table in a form

    how to call driver program internal table in a form? Given below is my code
    TABLES: VBRK,VBAK,ADRC,KNA1,VBRP,VBAP,J_1IMOCOMP.
    DATA: BEGIN OF IT_CUST_ADD OCCURS 0,
    STREET LIKE ADRC-STREET,
    NAME LIKE ADRC-NAME1,
    POST_CODE LIKE ADRC-PSTCD1,
    CITY LIKE ADRC-CITY1,
    CUST_TIN LIKE KNA1-STCD1,
    END OF IT_CUST_ADD.
    DATA: BEGIN OF IT_IN_DA OCCURS 0,
    VBELN LIKE VBRK-VBELN,
    FKDAT LIKE VBRK-FKDAT,
    END OF IT_IN_DA.
    now suppose these are my internal table. what should i write in FORM INTERFACE (associated type)

    Hi Sashi, this will solve ur problem.
    Check the below link.
    REG:PEFORM IN SCRIPT
    kindly reward if found helpful.
    cheers,
    Hema.

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • Calling a BAPI with Table parameters in BRFplus

    Hi,  BRFplus experts...
    How can we configure a  BAPI "Changing Table" parameter  when it's called form a "Call Procedure" action in BRFplus?
    We'd like to use a BAPI  (i.e. BAPI_REQUEST_CREATE) to create a REQUEST in BRFplus. We're using Call Type "Function Module" in a "Call Procedure" Action Type.
    Importing parameters are working properly, we've set Direct Values, Context Param or expressions.... like always in BRFplus...
    Problem arises when we'd need to"feed" values in a Table in the FM; i.e. REQUESTITEMIN in the mentioned BAPI (FM)...
    ...only "Context Parameter" appears, and after creating them and updating the values , no values are sent to the FM ....(already checked with debugging...)   The REQUEST ITEM is mandatory in the standard object....
    So, if anyone could give us any clue, it will be appreciated....
    Thanks in advance....

    Hi, Carsten
    Many thanks for your reply.
    We've alredy debugged the coding, but still not found why parameters are not passed....
    If we try to test another "wrapper" FM the problen will persist if it contains "TABLE" optional parameters...We couldn`t find the way to manage them in BRF+......
    Parameter "Source Table for Column Update" ....    appears after selecting the parameter REQUESTITEMIN in the list of the "Add Parameter" button  and we do'nt know how can we manage it...
    In the field of the component name REQUESTITEMIN we've already assign values for ALL fields, with "context Parameters.", but we don't really understand why the BRFplus does not allow to assign Direct values or expressions like in the importing parameters.....
    We couldn't find any example in BRF with "Tables" parameters feeded.......
    Notes are already checked deeply....(we're in NW 702 SP 10....)
    Kind regards

  • Call a function with variable function name

    Hey guys,
    I have a func_table which maintains function names (each one makes reference to a dynamically generated stored function)
    I need to make a procedure that calls the functions in that table one by one using its name retrieved from SELECT func_name FROM func_table;
    Thanks

    929955 wrote:
    I have a func_table which maintains function names (each one makes reference to a dynamically generated stored function)
    I need to make a procedure that calls the functions in that table one by one using its name retrieved from SELECT func_name FROM func_table;Okay, first the bit where I, foaming at mouth and vigorously waving a well used lead pipe around, tell you that this is HIGHLY SUSPECT and likely a FLAWED DESIGN. That dynamic code is 99% of the time wrong. That dynamic code opens securities hole for code injection. That dynamic code often results in severe performance penalties as the coder is clueless about what the Oracle Shared Pool is about. And so on...
    As for a basic procedure template to do this - assuming all functions get the same parameter as input and that all functions returns the same data type:
    create or replace procedure FooBarFunctions( paramVal number ) is
      .. variables and types and cursor definitions..
    begin
      for c in (
        select function_name from my_fubar_functions order by function_order
      ) loop
          plsqlBlock := 'begin :result := '||c.function_name||'( param => :p ); end;';
          execute immediate plsqlBlock using out funcResult, in paramVal;
          .. do something with funcResult ..
      end loop;
      .. more code..
    end;
    {code}
    Looks not like a sensible approach though - and begs for justification as to why this approach is needed. What justification do you have?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Rfc function with table parameter

    Hey,
    im trying to call a RFC function from Webdynpro where i have to give a table as parameter.  When creating the table i following exception:
    java.lang.IllegalArgumentException: model object must not be null
         at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:66)
         at be.vrt.wdp.IPublicPlanning_Validation$IP_Update_TableElement.<init>(IPublicPlanning_Validation.java:3667)
         at be.vrt.wdp.IPublicPlanning_Validation$IContextNode.doCreateElement(IPublicPlanning_Validation.java:87)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:854)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElementInternal(Node.java:1346)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElement(Node.java:1365)
         at be.vrt.Planning_Validation.executeRFC_Z_Whatson_Sap_Update_Transmissio_Input(Planning_Validation.java:265)
    The code from Planning_Validation (controller class)
      public void executeRFC_Z_Whatson_Sap_Update_Transmissio_Input( java.util.Vector nodes, java.lang.String display_value )
        //@@begin executeRFC_Z_Whatson_Sap_Update_Transmissio_Input()
         Z_Whatson_Sap_Update_Transmiss_Input transmiss = new Z_Whatson_Sap_Update_Transmiss_Input();
         //transmiss.addP_Update_Table(new Zmm_S_Update_Status_Table());
         wdContext.nodeZ_WHATSON_SAP_UPDATE_TRANSMIS().bind(transmiss);
         //wdContext.createP_Update_TableElement(new Zmm_S_Update_Status_Table());
         for (int i = 0; i < nodes.size(); i++){
              String [] node = (String[])nodes.get(i);
              IWDNodeElement el = wdContext.nodeP_Update_Table().createElement();
              el.setAttributeValue("Won_Id", node[0]);
              el.setAttributeValue("Won_Status", node[1]);
              el.setAttributeValue("Display_Status", display_value);
         try {
              // Call remote function          
              wdContext.currentZ_WHATSON_SAP_UPDATE_TRANSMISElement().modelObject().execute();
              // synchronise data in context with data in model
              wdContext.nodeOutput().invalidate();
         } catch (WDDynamicRFCExecuteException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    Line 265 is where i call wdContext.nodeP_Update_Table().createElement();
    Any ideas ?
    grtz,
    Hannes

    Hey, thanks .. i managed to solve it
    this is the code: 
    //@@begin javadoc:executeRFC_Z_Whatson_Sap_Update_Transmissio_Input()
      /** Declared method. */
      //@@end
      public void executeRFC_Z_Whatson_Sap_Update_Transmissio_Input( java.util.Vector nodes, java.lang.String display_value )
        //@@begin executeRFC_Z_Whatson_Sap_Update_Transmissio_Input()
         Z_Whatson_Sap_Update_Transmiss_Input transmiss = new Z_Whatson_Sap_Update_Transmiss_Input();     
         wdContext.nodeZ_WHATSON_SAP_UPDATE_TRANSMIS().bind(transmiss);
         for (int i = 0; i < nodes.size() ; i++){
              String [] node = (String[])nodes.get(i);          
              Zmm_S_Update_Status_Table updEl = new Zmm_S_Update_Status_Table();
              updEl.setWon_Id(node[0]);
              updEl.setWon_Status(node[1]);
              updEl.setDisplay_Status(display_value);
              transmiss.addP_Update_Table(updEl);                    
         wdComponentAPI.getMessageManager().reportSuccess("wohoo!");
         try {
              // Call remote function          
              wdContext.currentZ_WHATSON_SAP_UPDATE_TRANSMISElement().modelObject().execute();
              // synchronise data in context with data in model
              wdContext.nodeOutput().invalidate();
         } catch (WDDynamicRFCExecuteException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
        //@@end

  • Help!! Calling PL/SQL with table of objects params

    Hi JDBC experts,
    This is probably a familiar problem to many of you and I was hoping you can help me.
    I have a JDBC application that makes calls to a PL/SQL stored procedure that accepts and returns tables (arrays) of objects. I have an equivalent representation of these in Java (the object is a simple Java class and the array of objects is a subclass of ArrayList). The object has around 10 attributes (varchar and number) and the call typically accepts and returns between 50 and 100 objects.
    I noticed that converting from one representation to the other before and after the JDBC call is very time consuming. Before calling the procedure, I need to instantiate a new oracle.sql.ARRAY and fill it with oracle.sql.STRUCT equivalents for each object in my ArrayList. After the procedure call returns, I need to instantiate a new ArrayList and fill it with my Java object representation for each oracle.sql.STRUCT in the returned oracle.sql.ARRAY. Given the # of objects returned and the size of each object, this causes performance degradation.
    Is there any way I can avoid the above conversion overhead? I was reading somewhere about jpub and CustomDatum. I tried it out but the code that sqlj generated looked rather complex - but if this is the recommended approach, I can follow that.
    Also, are there any java code examples for dealing with table of (non-scalar) objects with CustomDatum? I saw some code for using CustomDatum with single objects but not with a table of objects.
    Your help is much appreciated!
    Thanks,
    Niranjan

    I would do it like this :
    - use existsNode function in the filter predicate to look for candidate rows regardless of the number of occurrences of target nodes in the document
    - use XPath predicates on attributes to restrict target nodes
    SQL> create table temp1 of xmltype;
    Table created
    SQL>
    SQL> insert into temp1 values(xmlparse(document
      2  '<soc id="2">
      3   <listsectii>
      4    <sectie cods="4">
      5     <prodv codp="2" cant=""></prodv>
      6    </sectie>
      7    <sectie cods="5">
      8     <prodv codp="8"></prodv>
      9    </sectie>
    10    <sectie cods="6">
    11     <prodv codp="2"></prodv>
    12    </sectie>
    13   </listsectii>
    14  </soc>'));
    1 row inserted
    SQL>
    SQL> update temp1
      2  set object_value =
      3      updateXML( object_value
      4               , '/soc/listsectii/sectie[@cods="4"]/prodv[@codp="2"]/@cant'
      5               , 'new_cant' )
      6  where existsNode( object_value
      7                  , '/soc/listsectii/sectie[@cods="4"]/prodv[@codp="2"]' ) = 1
      8  ;
    1 row updated
    SQL> select * from temp1;
    SYS_NC_ROWINFO$
    <soc id="2">
      <listsectii>
        <sectie cods="4">
          <prodv codp="2" cant="new_cant"/>
        </sectie>
        <sectie cods="5">
          <prodv codp="8"/>
        </sectie>
        <sectie cods="6">
          <prodv codp="2"/>
        </sectie>
      </listsectii>
    </soc>
    Of course, that implies there's already an existing "cant" attribute (not the case in your samples).
    If you actually need to create one, then you must use insertChildXML() instead.

  • Is it possible to call a function with the same name from 2 different dll's at the same time.

    I'm trying to call a function ( F ) form 2 different libraries ( A.dll and B.dll ) at the same time. The first lib loaded determines the function F. A->F and B->F have same interface and name but different implementation.

    Hi,
    I tried it with two dll's, both with the same interface, and at the same
    time, in the same VI. The popups even appear at the same time.
    But now I understand the problem... Both dll's are created by LabVIEW! If
    they are not (or one is not, and the other is), this is no problem.
    And VI's in memory cannot have the same name. LabVIEW doesn't care if VI's
    are in a dll or not.
    This might not help, but if you want to make some sort of "plug in" system,
    you might consider using llb's. By loading VI's dynamically, you can select
    the path from which they are loaded. You must unload (close all references)
    one before the loading the other, or the same problem will occur. If you go
    this way, I consider a different approach. Make on
    e library (or even a dll)
    that has the interface you like, this is the "loader". Now make several
    "plug in"'s, with the same interfaces. The name of each function in a plug
    in is a concatenation of the library name and the function name. The loader
    has one extra function, that loads (and unloads, when done) references to
    all desired libraries to use (the names of the functions can be figured out
    easily). All that the loader functions do is dynamically call the library
    functions. You can use a call by reference node for this (you can use the
    connector pane or the loader vi, since the interface must be the same!).
    If you go this way, I guess the loader library can be converted to a dll...
    Hope this helps.
    Wiebe.
    "rsam" wrote in message
    news:[email protected]..
    > Thx Wiebe,
    >
    > did you load both dll at the same time? For example in 1 vi. Somehow
    > the first loaded function keeps to overrule the second. Notice that
    > the interface is
    exactly the same.
    >
    > I loaded 2 dll created in Labview with results described above.
    >
    > Regards Ruud

  • Can I call a function with an arguement of %ROWTYPE directly from SQL?

    I have the following function in a 10g DB:
    CREATE OR REPLACE FUNCTION f_is_eligible2 (in_dm_row IN amplify_dm%ROWTYPE)
    RETURN NUMBER
    IS
    I know I can call that function from another pl/sql function but I'm wondering if I can call that function directly from a SQL statement, something like this:
    SELECT f_is_eligible2(dm.*)
    FROM amplify_dm dm
    or
    SELECT f_is_eligible2(dm%rowtype)
    FROM amplify_dm dm
    neither of those worked so I'm thinking it's not possible but I thought I'd ask anyway.
    Thanks in advance!

    Not possible as said - but - based on what I'm seeing - you could simply pass the parameter(s) that are key on that table and - accomplish the same thing by modifying the function.
    not sure why you'd need the whole row if I'm interpretting the code excerpt.

  • Problem with table in Adobe Form in Web Dynpro JAVA??

    Hello all,
    I have an issue with the table displaying all the node values in the Adove Form. Right now it displays only the first element of the Node even if there are multiple entries.
    Not sure what is going wrong here.
    How is the table created in a interactive form? Any help is appreciated.
    Thank you, John

    Siva,
    I referred to the website, but still having issues with generating tables in Adobe Form. I can get all the table rows in the adove form, but the pdf doee not add new pages to display all the table rows. It just createa one page with the table inside it, display few of the rows and truncates rest of the table data.
    Here is the heirarchy of the page with the properties set
    Master Pages ---
            ||--> Page 1
                     ||--> content area
                     ||--> subfrom (properties:: Content - Flowed / Flow direction - top to bottom...pagination tab is greayed out completly)
                                ||--> Table
                                          ||--> HeaderRows (Object: Row - Type: Header Row)
                                          ||--> Row1 (Object Tab/Binding: Repeat Row for each data item - checked)
    Can't make it wor, not sure what's wrong here
    I am using NDS 7.0 SP18 and Adobe LiveCycle 8.0. Does that could be a problem.
    Appreciate your help
    John

  • Dot source/calling a function with switch from the cmd line

    Hi
    This is driving me crazy and I know its something really obvious.
    If I have an example script like so, called myexample.ps1
    [CmdletBinding()]
    param
    [Parameter(Mandatory=$false, HelpMessage="My Switch")]
    [switch] $Myswitch,
    [Parameter(Mandatory=$false, HelpMessage="Email Address")]
    [string] $email
    Function Main
    [CmdletBinding()]
    param
    [switch] $Myswitch,
    [string] $email
    if ($Myswitch)
    Write-Host "Switch Enabled"
    Write-Host "Email is $email"
    else
    Write-Host "Switch Disabled"
    Write-Host "Email is $email"
    Main -email $email #This is the line that I think is at fault
    I have two issues
    1) How do I correctly write the code so that the script can be called with either or both parameters. The switch ($Myswitch) is the one that is really causing me issues.
    2) Is invoking it the easiest method/best/most common method of calling it via a batch file
    Here's my understanding
    a) I could dot source it (. .\myexample.ps1) to load the functions into the current session, then call the function
    Main -email hello.com -Myswitch
    or
    Main -email hello.com
    b) or I could Invoke it, which I think is my preference as my final goal here is for it to be called via a batch file in a scheduled task
    & 'C:\Users\myusername\Desktop\MyExample.ps1' -email hello -myswitch
    or
    & 'C:\Users\myusername\Desktop\MyExample.ps1' -email hello
    Any push in the right direction will be appreciated :)

    Why the function?  Just call the file.  We don't "Invoke" scripts. Just call the script..
    # MyExample.ps1
    [CmdletBinding()]
    param(
    [Parameter(Mandatory=$false, HelpMessage="My Switch")]
    [switch] $Myswitch,
    [Parameter(Mandatory=$false, HelpMessage="Email Address")]
    [string] $email
    if ($Myswitch){
    Write-Host "Switch Enabled"
    Write-Host "Email is $email"
    }else{
    Write-Host "Switch Disabled"
    Write-Host "Email is $email"
    Now jsut call it like a normal script:
    .\MyExample.ps1 -email someemail -MySwitch
    It is as simple as that.
    If it has to be a function as in a library then you must either dot source or create a module.
    ¯\_(ツ)_/¯

Maybe you are looking for

  • Getting Bitmap object at runtime

    When you load an external SWF at runtime and instantiate a symbol that contains a Bitmap object in the .fla file the type of the Bitmap is actually Shape at runtime. Without exporting the object for ActionScript is there any way to get the actual Bit

  • Requried help in uploading data from a file

    Hi Friends, I have a doubt while uploading data into SAP System. I have  8 fileds in my flat file. And there are two processes to be run.In one process records 2,3,4 should be updated and in other process 5,6,7,8 should be updated.I am using Call Tra

  • Acrobat 8 Standard and X Pro

    I have Acrobat 8 Standard. I would like to be able to create forms that allow users to add info to fields and to be able to submit those forms. I have been looking over the info on X Pro but I am wondering if I order the software upgrade, will I need

  • HT4972 how do I upgrade my Iphone ios from 3.1.2 to 6.1.3?

    how do I upgrade my Iphone ios from 3.1.2 to 6.1.3?

  • Safari does not load my homepage.

    I have Yahoo saved as my homepage on Safari.  Unfortuantely Safari wil not default to Yahoo when I reopen it.  Safari will only load the last page I visited?  It was fine before I upgraded to Lion.  Any ideas?