How to call a function with generic table parameter

Hi everybody
I need to call function module RSAR_ODS_API_GET (from BW). It recive an internal table with request ids and should return in E_T_DATA "unstructured" data from the psa and in E_T_RSFIELDTXT the description of the data structure, I guess
from sap help only thing I have reggarding how to use the function module is :
"You can call up the function module RSAR_ODS_API_GET with the list of request IDs given by the function module RSSM_API_REQUEST_GET. The function module RSAR_ODS_API_GET no longer recognizes InfoSources on the interface, rather it recognizes the request IDs instead. With the parameter I_T_SELECTIONS, you can restrict reading data records in the PSA table with reference to the fields of the transfer structure. In your program, the selections are filled and transferred to the parameter I_T_SELECTIONS.
The import parameter causes the function module to output the data records in the parameter E_T_DATA. Data output is unstructured, since the function module RSAR_ODS_API_GET works generically, and therefore does not recognize the specific structure of the PSA. You can find information on the field in the PSA table using the parameter E_T_RSFIELDTXT."
unfortunately I when running de report bellow, I get a dump which says:
Function parameter "E_DATA" is unknown
in the definition of the interface E_DATA has no type, which  means it can recive any table type, right?
So I have two questions?
1) How to get the code working
2) How do I use the parameter E_T_RSFIELDTXT to parse the data returned in E_DATA
by debuging RSSM_API_REQUEST_GET for this code I found it try to put an internal table with the struct of the database table /BIC/B0000151000 in E_DATA
Thanks a lot for any help
rgds
my test report is:
REPORT  ZTEST_PSA_API.
TABLES: /BIC/B0000151000 .
TYPE-POOLS: RSSM.
TYPES: BEGIN OF STC_REQ_LINE,
  sign(1),
         option(2),
         low  TYPE rsa_request,
         high TYPE rsa_request,
         END OF STC_REQ_LINE,
  IT_REQUEST TYPE STC_REQ_LINE OCCURS 0.
DATA: lit_request TYPE RSSM_T_API_REQUEST_GET WITH HEADER LINE,
      lc_system TYPE RSSM_T_API_LOGSYS,
      lit_request1 TYPE IT_REQUEST WITH HEADER LINE.
DATA: lc_dtarget_name TYPE RSA_ODSNAME,
      lit_meta_data TYPE RSARC_T_RSFIELDTXT.
DATA: lt_psa_data LIKE /BIC/B0000151000 OCCURS 0.
CALL FUNCTION 'RSSM_API_REQUEST_GET'
  EXPORTING
    I_SOURCE    = '2LIS_13_VDITM'
    I_TYP       = 'D'
    I_DATEFROM  = '20060627'
  IMPORTING
    E_T_REQUEST = lit_request[]
    E_T_LOGSYS  = lc_system
    EXCEPTIONS  = 1.
READ TABLE lit_request.
lit_request1-sign = 'I'.
lit_request1-option = 'EQ'.
lit_request1-low = lit_request-request .
APPEND lit_request1 .
break-point .
CALL FUNCTION 'RSAR_ODS_API_GET'
  EXPORTING
    I_T_REQUEST = lit_request1[]
  IMPORTING
    E_ODSNAME = lc_dtarget_name
    E_T_RSFIELDTXT = lit_meta_data
  TABLES
    E_DATA = lt_psa_data
  EXCEPTIONS
    NO_DATA_FOUND = 1
    PARAMETER_FAILURE = 2
    REQUEST_NOT_AVAILABLE = 3
    NO_REQUEST_FOUND = 4
    NO_FIELDS_TO_ODS = 5
    NO_ODS_FOUND = 6
    PACKAGE_LOCKED_BY_LOADING = 7 .

Try to pass table parameter without "[]" :
CALL FUNCTION 'RSAR_ODS_API_GET'
EXPORTING
I_T_REQUEST = lit_request1
IMPORTING
E_ODSNAME = lc_dtarget_name
E_T_RSFIELDTXT = lit_meta_data
TABLES
E_DATA = lt_psa_data

Similar Messages

  • 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)

  • 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 can I Create function with an  out Parameter

    how all
    how can I Create function with an out Parameter
    I try to create it it sucess but how can I CALL it , it give me error
    please I want A simple example
    thanks

    3rd post on same question by same user :
    Re: how can I Create function with an  out Parameter
    how can I Create function with an  out Parameter

  • 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.

  • 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.

  • Xdk: calling java function with a CharSequence parameter

    When using xdk version 10.1.0.2.0_production, you can not call a javamethod with a CharSequence parameter.
    Sun documentation:
    Interface CharSequence
    All Known Implementing Classes:
    CharBuffer, String, StringBuffer
    This prevents us from calling a method like
    java.util.regex.Pattern.matches(String, CharSequence)
    Converting the parameter to a normal string would solve the problem.
    Example to illustrate the issue:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes" xmlns:Pattern="http://www.oracle.com/XSL/Transform/java/java.util.regex.Pattern">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xsl:if test="Pattern:matches('...','123')">
    <xsl:text>MATCH</xsl:text>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>
    results in the following stacktrace:
    oracle.xml.parser.v2.XPathException: Extension function error: Error invoking 'matches':'java.lang.NullPointerException'
         at oracle.xml.parser.v2.XSLExtFunctions.callStaticMethod(XSLExtFunctions.java:113)
         at oracle.xml.parser.v2.XPathExtFunction.evaluateMethod(XPathExtFunction.java:296)
         at oracle.xml.parser.v2.XPathExtFunction.evaluate(XPathExtFunction.java:223)
         at oracle.xml.parser.v2.XSLCondition.testCondition(XSLCondition.java:185)
         at oracle.xml.parser.v2.XSLCondition.processAction(XSLCondition.java:165)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:403)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:507)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:484)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:256)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:146)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:218)
         at XSLSample.main(XSLSample.java:75)
    Message was edited by:
    user449717

    Hi Grarup,
    I took a stab at getting this to run and compile and this is what I came up with.  Let me know if this helps at all.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    Console.WriteLine("\"True\" or \"False\"?");
    bool boolVal = bool.Parse(Console.ReadLine());
    Functions f = new Functions();
    TestStruct t = new TestStruct() { Value = boolVal };
    f.Flip(ref t);
    Console.WriteLine(string.Format("Flipped value = {0}: ", t.Value));
    Console.ReadLine();
    public struct TestStruct
    public bool Value;
    public class Functions
    public void Flip(ref TestStruct testStruct)
    testStruct.Value = !testStruct.Value;
    Best of luck.

  • How to call javascript function with dynamic data in display tag

    Hi,
    Iam new to pagination concept. Iam using display tag to display rows in jsp by strtus.
    I have a problem when calling the javascript function using ahref in attribute in display tag.
    <bean:define name="form1" property="EditDetails.List" id="ListDisplay"/>
    <display:table name="pageScope.ListDisplay" cellpadding="0" cellspacing="1" pagesize="10" partialList="false" size="listSize" requestURI="">
    <display:column property="poNo" href='javascript:searchEditDetails("./submitOrder.do? actionID=getMISLoadEdit&poNumberSel=<%=((com.po.bean.EditDetails)poListDisplay).getNo()%>&statusIdSelected=<%=((com.po.bean.EditDetails)ListDisplay).getStatusId()%>")'
    title="Number"/>                         
    <display:column property="strDate"title="Date" />
    <display:column property="orderValue"title="Order Value(INR)"/>
    <display:column property="stringRequestedDeliveryDate"title="Suggested Delivery Date"/>
    <display:column property="statusDescription" title="Status" />
    </display:table>
    The above code display the data in row format is working fine when I click the No It thow javascript error and its not redirecting to the other page.
    When I try this with ordinary struts its working fine the code is:
    <logic:iterate id="polist" name="Form1" property="EditDetails.List" indexId="i" type="com.bean.EditDetails">
    <tr>
    <td ><a href="javascript:searchEditDetails("./submitOrder.do?actionID=getMISLoadEdit&NumberSel=<%=((com.bean.EditDetails)polist).getNo()%>&statusIdSelected=<%=((com.bean.EditDetails)polist).getStatusId()%>")"><html:hidden name="polist" property="No" write="true" /></a>     </td>
    <td><html:hidden name="polist" property="strDate" write="true" /></td>
    <td><html:hidden name="polist" property="orderValue" write="true" /></td>
    <td><html:hidden name="polist" property="stringRequestedDeliveryDate" write="true" />     </td>
    <td><html:hidden name="polist" property="statusDescription" write="true" /></td>
    </tr>
    </logic:iterate>
    Please help me how to call javascript with dynamic data.
    Thanks in advance

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

  • How to call a function with parameters in ScriptStart function

    i am trying to call ScriptStart function from SUD dialog. This is how iam calling Call ScriptStart(path & "test.vbs","abc") abc is function which is written test.vbs. It is working. But when i want to pass some parameters to the abc function of test.vbs. It is not working why. can anybody suggest where i went wrong. I am calling the same function as Call ScriptStart(path & "test.vbs","abc(" & text1.Text & ")"). It is not working why ? Is the ScriptStart function only point to functions. it does not take any parameters or waht ?

    Hi abc421,
    Another option in addition to UserCommands would be to use ScriptInclude(path). If you execute a ScriptInclude(path) command at the beginning of your VBScript, then all the functions and Subs in the VBscript located at "path" are now available to you-- including passing parameters and receiving return values from functions. If you are calling a VBscript that uses only VBScript variables, then this is the preferred method.
    If instead you are calling a VBScript that uses global DIAdem variables declared in a VAS file (their variable names all end with the "_" character), then those parameters are already available at the subroutine called with ScriptStart(path, routine).
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How to call LabView function with nested structs and arrays from C#

    Hi,
    I've got the following functions defined in a LabView-dll:
    uint32_t __stdcall VOSC04_General(uint32_t Command, TD18Hdl *Messages);
    uint32_t __stdcall CheckDiameter(uint32_t Command, TD6 *Parameter);
    typedef struct {
     double SP_Diameter;
     double SP_Tolerantie;
     double PV_Diameter;
     } TD6;
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[1];
     } TD18;
    typedef TD18 **TD18Hdl;
    I've got some C#-code (generated by PInvoke-wizard) to call these functions:
    [DllImport("vosc04.dll")]
    public static extern uint32_t VOSC04_General (uint32_t Command, ref TD18Hdl Messages);
    [DllImport("vosc04.dll")]
    public static extern uint32_t CheckDiameter(uint32_t Command, ref TD6 Parameter);
    [StructLayout(LayoutKind.Sequential,Pack=4)]
    public struct TD18
       public int32_t dimSize;
       [ MarshalAs( UnmanagedType.ByValArray, SizeConst=1)]
       public int32_t [] Numeric;
    [StructLayout(LayoutKind.Sequential,Pack=4)]
    public struct TD6
       public Double SP_Diameter;
       public Double SP_Tolerantie;
       public Double PV_Diameter;
    The problem now is that when I try to read the Messages-output-parameter, I get wrong values (pointers?). I think that the problem lies in the fact that LabView generated a TD18 AND an TD18Hdl struct.
    How can I correct this problem?
    Can anyone give me some advise to correct this problem? I'm not an expert in C, only in C#.

    I think the problematic line is this:
    public struct TD18
       public int32_t dimSize;
       [ MarshalAs( UnmanagedType.ByValArray, SizeConst=1)]
       public int32_t [] Numeric;
    It looks like C# is forcing the array to be of size 1. The thing is, LabVIEW stores arrays as handles which are double pointers to a structure which contains a size element followed by the elements of the array. For your example, int32 arrays are stored in memory as:
    handle -> location -> |size|element 1|element 2| .... |element size-1|
    Because C does not do runtime array bounds checking, you can get away by declaring the structure as:
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[1];
     } TD18;
    The correct declaration would've been:
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[size];
     } TD18;
    But size is not a constant, so C/C++ won't let you do that. So, even though the array is declared to be of size 1, it can (and usually does) have more than 1 element. This does not cause a problem because LabVIEW allocates memory based on the actual size of the array.
    If I were you, I'd try to change the prototype of the LabVIEW DLL function to accept a pointer to array data, rather than an array handle, pre-allocate memory for the array in C# and pass a pointer to the allocated memory into LabVIEW so that LabVIEW can "fill it up".
    Let me know if you need more information.
    Pramod

  • How to call a procedure with SYS_REFCURSOR OUT parameter

    Hi,
    Using Oracle 11g R2.
    I'd like to know if it is possible to display the results of a SYS_REFCURSOR in a query. For example, if I had the following stored procedure
    create or replace procedure testprocedure (result OUT sys_refcursor)
    as
    begin
       open result for
          select 1 from dual
          union all
          select 2 from dual;
    end;
    I'd like to call this procedure similar to the way a query is called and executed. Like this
    select * from testprocedure
    I've seen plenty of examples on the web which show how it is possible to loop through results of a sys_refcursor inside of an anonymous block and display the results using dbms_output.putline, but this isn't the method I am looking for.

    I'd like to know if it is possible to display the results of a SYS_REFCURSOR in a query. For example, if I had the following stored procedure
    No - you can only use schema object types (SQL) in SQL queries and only then if you call a function.
    The function can return a SQL collection type or it can be a PIPELINED function whose return value is a SQL collection type. Either way your query will use the TABLE function and be of the form:
    select * from TABLE(testfunction);
    This is sample code for a PIPELINED function based on the SCOTT.EMP table. The function takes a department number parameter and returns the EMP rows for that department:
    -- type to match emp record
    create or replace type emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
    -- table of emp records
    create or replace type emp_table_type as table of emp_scalar_type
    -- pipelined function
    create or replace function get_emp( p_deptno in number )
      return emp_table_type
      PIPELINED
      as
       TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
        emp_cv EmpCurTyp;
        l_rec  emp%rowtype;
      begin
        open emp_cv for select * from emp where deptno = p_deptno;
        loop
          fetch emp_cv into l_rec;
          exit when (emp_cv%notfound);
          pipe row( emp_scalar_type( l_rec.empno, LOWER(l_rec.ename),
              l_rec.job, l_rec.mgr, l_rec.hiredate, l_rec.sal, l_rec.comm, l_rec.deptno ) );
        end loop;
        return;
      end;
    select * from table(get_emp(20))

  • How to call a function with the dependency editor

    Dear all,
    I am trying to develop a dependency for the charectristics with dependency editor (t-code:CU01).
    But it always occurs an error "E28152 Function myfunction is not declared".
    The following is the snatch of my code. Please provide me the solution, documents or reference link
    about how to write code with the dependency editor.
    000010 pfunction myfunction(
    000020   ......
    000030 )
    Thanks & Regards,
    Red

    I did not get any errors doing this..refer to:
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/92/58c3fc417011d189ec0000e81ddfac/frameset.htm
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/92/58c3fc417011d189ec0000e81ddfac/frameset.htm
    Check if you have the relevant access / authorizations.
    Regards,
    Srini

  • How to call a function module in VC

    Hi,
    I want to call a function module for an addition formula which shall calculate and infer the value.
    eg. quantities of 5 different characteristics (of numeric data) is to be summed up and inferred against the 6th characteristic.
    I want to know the detailed process to create a Variant Function and use it in a dependency.
    Request to please advise the steps, type of dependency and its code.
    Regards,
    Rajesh Mohapatra

    Dear Rajesh,
    I also wanted to learn how to do that, your post motivated me to use a bit of freetime and investigate on the subject. I finally made my function work, so here are the tips.
    The example is very simple, just a variant function with two inputs and which multiplies inside the input values and transfer that result to the output ( 3 x 4 => 12 ).
    Deducting how to add five values or any other logic would be easier starting from there.
    STEP 1: Create Variant Class for the product. I imagine you already have that. In my case its name is ZVC_CLASS, you have already a material assigned to the class, a configuration profile, etc....
    STEP 2: Create Three Characteristics Z_NUM_CH_1,Z_NUM_CH_2,Z_NUM_CH_3 the three of numeric type
    STEP 3: Assign characteristics from step 2 into class ZVC_CLASS
    STEP 4: Create the function module with the code given below. I put the name ZVC_FUN_TEST
    FUNCTION ZVC_FUN_TEST.
    ""Interfase local
    *"  IMPORTING
    *"     REFERENCE(GLOBALS) TYPE  CUOV_00
    *"  TABLES
    *"      QUERY STRUCTURE  CUOV_01
    *"      MATCH STRUCTURE  CUOV_01
    *"  EXCEPTIONS
    *"      FAIL
    *"      INTERNAL_ERROR
    *- Inicializar los valores.
      DATA:
      GV_VALOR_FINAL        TYPE CUOV_01-ATFLV,
      GV_VALOR_NUM1         TYPE CUOV_01-ATFLV,
      GV_VALOR_NUM2         TYPE CUOV_01-ATFLV.
      CLEAR:
        gv_valor_final,
        gv_valor_num1,
        gv_valor_num2.
    CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
        EXPORTING
          ARGUMENT            =  'Z_NUM_CH_1'
        IMPORTING
         VTYPE               =  P_VTYPE1
         SYM_VAL             =  P_VALOR_SYM1
          NUM_VAL             =  gv_valor_num1
      IO_FLAG             =
        TABLES
          QUERY               =  QUERY
        EXCEPTIONS
          ARG_NOT_FOUND       = 01.
      IF SY-SUBRC <> 0.
        RAISE INTERNAL_ERROR.
      ENDIF.
    CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
        EXPORTING
          ARGUMENT            =  'Z_NUM_CH_2'
        IMPORTING
         VTYPE               =  P_VTYPE1
         SYM_VAL             =  P_VALOR_SYM1
          NUM_VAL             =  gv_valor_num2
      IO_FLAG             =
        TABLES
          QUERY               =  QUERY
        EXCEPTIONS
          ARG_NOT_FOUND       = 01.
      IF SY-SUBRC <> 0.
        RAISE INTERNAL_ERROR.
      ENDIF.
    *- Calculate final value
      gv_valor_final = gv_valor_num1 * gv_valor_num2.          "Especifico de c/u.
    DATA: VTYPE TYPE CUOV_01-ATFOR.
    VTYPE = 'NUM'.
    CALL FUNCTION 'CUOV_SET_FUNCTION_ARGUMENT'
        EXPORTING
          ARGUMENT                = 'Z_NUM_CH_3'
          VTYPE                   = VTYPE
          NUM_VAL                 =  gv_valor_final
        TABLES
          MATCH                   = MATCH
        EXCEPTIONS
          EXISTING_VALUE_REPLACED = 01.
      IF SY-SUBRC <> 0.
        RAISE INTERNAL_ERROR.
      ENDIF.
    ENDFUNCTION.
    STEP 5: Activate the function module for Variant Configuration in transaction CU65, put there your function module, release int and in button characteristics write  Z_NUM_CH_1,Z_NUM_CH_2,Z_NUM_CH_3. Flag the first two lines as they are inputs.
    STEP 6: Create a Dependency ZVC_PROC_TEST of type Procedure to call the function with this code:
    000010 Function ZVC_FUN_TEST           
    000020 (Z_NUM_CH_1 = $root.Z_NUM_CH_1, 
    000030 Z_NUM_CH_2 = $root.Z_NUM_CH_2,  
    000040 Z_NUM_CH_3 = $self.Z_NUM_CH_3)  
    STEP 7: Lets say I want to calculate the multiplication only upon the selection of another characteristic "Calculate" YES/NO. For this I create a characteristic in CT04 Z_CALCULATE type CHAR 1 with possible values Y or N. For the value Y y add the procedure ZVC_PROC_TEST so that formula only activates on Y.
    STEP 8: Add characteristic Z_CALCULATE to class  ZVC_CLASS
    STEP 9: VA01, it should work

  • How to call a transaction with a variant

    Hi all
    I created a bdc program after updating it should call another transaction with predefined variant that that transaction program is of type module pool.
    can anyone tell me the syntax how to call a transaction with a variant.

    Hi
    goto Tcode SHD0
    enter the Tcode for which Tran Variant has to be created(dialog Tcode)
    enter Trans variant to be created
    press create button
    it will go through all the screens of that Tcode and save
    and modify the fields as per requirement
    we can create Transaction Variants Using SHD0 Transaction.
    Transaction Variants and Screen Variants
    Transaction variants can simplify transaction runs as they allow you to:
    Preassign values to fields
    Hide and change the 'ready for input' status of fields
    Hide and change table control column attributes
    Hide menu functions
    Hide entire screens
    In particular, hiding fields in connection with screen compression, and hiding screens, can result in greater clarity and simplicity.
    Transaction variants are made up of a sequence of screen variants. The field values and field attributes for the individual screens found in transaction variants are stored in screen variants. Each of these variants is assigned to a specific transaction, can, however, also contain values for screens in other transactions if this is required by transaction flow. The transaction that the variant is assigned to serves as initial transaction when the variant is called.
    There are both client-specific and cross-client transaction variants. All screen variants are cross-client, but may be assigned to a client-specific transaction variant.
    A namespace exists for cross-client transaction variants and screen variants and both are automatically attached to the Transport Organizer. Client-specific transaction variants must be transported manually.
    In principle, transaction and screen variants can be created for all dialog and reporting transactions. There are, however, certain Restrictions that apply to certain transactions, depending on their internal structure.
    No transaction variants are possible with transactions already containing preset parameters (parameter transactions and variant transactions).
    Regards
    Anji

  • 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?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for