Dynamic IN function in PowerCenter

Hi, I have a requirement to use the IN and NOT IN function dynamically. The format of IN function of an IIF expression is -IIF(IN(expr,value1,value2,........,valuen,Case Flag),true,false) Here in my case -expr = a column name that is coming from sourcevalu1,valu2,....valuen = this is generated from an UI as a string dynamically Here I tried the below approach -IIF(IN(column,value),true,false) where value= the string value1,value2,.....,valuen but it is not working. It treats value1,value2,.....,valuen as a single value. Please help.

Hi, I have a requirement to use the IN and NOT IN function dynamically. The format of IN function of an IIF expression is -IIF(IN(expr,value1,value2,........,valuen,Case Flag),true,false) Here in my case -expr = a column name that is coming from sourcevalu1,valu2,....valuen = this is generated from an UI as a string dynamically Here I tried the below approach -IIF(IN(column,value),true,false) where value= the string value1,value2,.....,valuen but it is not working. It treats value1,value2,.....,valuen as a single value. Please help.

Similar Messages

  • Class to Generate Dynamic Filter Function

    I have built an ActionScript Class to allow me to create a
    dynamic Filter Function for the several ArrayCollections I use in
    my Flex Application. It works just as I intended, however, I'm
    wondering if it's too verbose, and can be skimmed down to use less
    code. For example, is there some way I could extend the Function
    class? See a snippet of my Class attached.

    I have built an ActionScript Class to allow me to create a
    dynamic Filter Function for the several ArrayCollections I use in
    my Flex Application. It works just as I intended, however, I'm
    wondering if it's too verbose, and can be skimmed down to use less
    code. For example, is there some way I could extend the Function
    class? See a snippet of my Class attached.

  • Dynamic select / function module for select queries

    Hello experts,
    Is there any function module to build dynamic select queries and also to build standard select queries .
    Thanks,
    krishnakumar

    What are you meaning by 'to build' ???
    BR, JAcek
    Message was edited by: Jacek Slowikowski

  • Dynamically call function module in the date rule

    Hi Experts
    I am currently working on service request.I am facing a problem in the date management there.In my service request i have 5 statuses .One of my status is "Pending with consumer".I am using duration settings of service request.By duration settings , i am calculating the duration for which its pending with consumer.I am having 2 response profile one is 24*7 and other is having 9 working hours.In the service request from the SLA configuration i am calculating the escalation date & Time .I need to add the pending with consumer duration with the escalation date and time.I am facing a problem , i am explaining whole problem ..
    Let say if the pending with consumer duration is  1440 minutes(that is 24 hours) .I am adding the minutes to the escalation date through the date rule.
    I am facing problem that if the service profile is 24*7 then there is no problem but if it is having the 9 hours working service profile then after adding the minutes to it the escalation date is changing to 4 days ahead which is wrong.
    I need to add only those minutes for which it is pending with consumer in working hours for the 9 hours service profile
    I need to dynamically determine the working hours from the duration then add it to escalation dates when the status is changed from pending with consumer.
    Please suggest a badi will work or how to do it.
    Is there any way so that while adding duration's in the date rule i can determine if the service profile is 24*7 then i will directly add the durations or else if service profile is 9 hours then i will determine the working hours from the duration" pending with consumer" then i will add.
    Is there any way so that i can call any custom function module then write my logic there
    Its urgent as i need to give demo.I will appreciate a quick reply.Please reply
    I will assign points as soon as i will get reply.

    Hi sridhar,
    the explanation already given is correct and good. Small add-on:
    All functions called during one LUW with addition IN UPDATE TASK are stored together with their actual parameters in a temporary memory area. The moment a COMMIT WORK is issued, the functions are released to be executed by a so-called update task which is running in the background. This explains why functions called in update task never return anything, no SY-SUBRC and no export or table parameters If a function called in update task raises an exception or runs into an error the calling user will get an express message informing about this. Also, all database updates done by this update process are rolled back to keep consistency.
    This proceeding helps to keep database tables consistent and allows the user to keep on doing his work before all database updates are complete. You may have seen messages like "material will be changed" after saving. If you open the same material immediately, you'll get a message "object locked by...<yourself>". This means the update task is still running.
    Regards,
    Clemens

  • Dynamic filter function

    I would like to be able to pass a dynamic item.property to the filter function.
    Hardcoding it like this works
    private function filterthis(item:Object):Boolean {
    if(item.companyname == _sortvalue)    // I don't want to hardcode the property of item
         return true;    
         } else {
         return false;
    ----- but this is what I need ------
    private function filterthis(item:Object):Boolean {
    if(item._sortfield == _sortvalue)      // I tried passing in a string but it doesn't work
         return true;    
         } else {
         return false;
    What is the proper way to pass the item.property of my array collection,
    Thanks

    Never mind got it ... item[_sortfield]
    knew it was something simple ... sorry wear too many hats.

  • DYNAMIC TABLE FUNCTION

    Hi Expert
    I want to build a function that receive a dynamic table , how i do it and how i call this function
    thanks and regardes

    hi,
    check this:
    REPORT zmodtab NO STANDARD PAGE HEADING.
    TYPE-POOLS: rsds.
    DATA: is_x030l  TYPE x030l,
          it_dfies  TYPE TABLE OF dfies,
          is_dfies  TYPE dfies,
          it_fdiff  TYPE TABLE OF field_dif,
          is_fdiff  TYPE field_dif.
    DATA: w_selid   TYPE rsdynsel-selid,
          it_tables TYPE TABLE OF rsdstabs,
          is_tables TYPE rsdstabs,
          it_fields TYPE TABLE OF rsdsfields,
          it_expr   TYPE rsds_texpr,
          it_ranges TYPE rsds_trange,
          it_where  TYPE rsds_twhere,
          is_where  TYPE rsds_where,
          w_active  TYPE i.
    DATA: it_content TYPE REF TO data,
          it_modif   TYPE REF TO data,
          it_fcat    TYPE lvc_t_fcat.
    DATA: w_okcode   TYPE sy-ucomm.
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
                   <ntab> TYPE STANDARD TABLE.
    Macros
    DEFINE table_error.
      message e398(00) with 'Table' p_table &1.
    END-OF-DEFINITION.
    DEFINE fixed_val.
      is_fdiff-fieldname = is_dfies-fieldname.
      is_fdiff-fixed_val = &1.
      is_fdiff-no_input  = 'X'.
      append is_fdiff to it_fdiff.
    END-OF-DEFINITION.
    Selection screen
    SELECTION-SCREEN: BEGIN OF BLOCK b01 WITH FRAME.
    PARAMETERS: p_table TYPE tabname OBLIGATORY                    "table
                                     MEMORY ID dtb
                                     MATCHCODE OBJECT dd_dbtb_16.
    SELECTION-SCREEN: BEGIN OF LINE,
                      PUSHBUTTON 33(20) selopt USER-COMMAND sel,
                      COMMENT    55(15) selcnt,
                      END OF LINE.
    SELECTION-SCREEN: SKIP.
    PARAMETERS: p_rows  TYPE i.                                    "rows
    SELECTION-SCREEN: END OF BLOCK b01,
                      SKIP,
                      BEGIN OF BLOCK b02 WITH FRAME.
    PARAMETERS: p_displ TYPE c AS CHECKBOX.                        "display
    SELECTION-SCREEN: END OF BLOCK b02.
    Initialization
    INITIALIZATION.
      MOVE '@4G@ Filter records' TO selopt.
    PBO
    AT SELECTION-SCREEN OUTPUT.
      IF w_active IS INITIAL.
        CLEAR: selcnt.
      ELSE.
        WRITE w_active TO selcnt LEFT-JUSTIFIED.
      ENDIF.
    PAI
    AT SELECTION-SCREEN.
      IF p_table NE is_x030l-tabname.
        CALL FUNCTION 'DDIF_NAMETAB_GET'
             EXPORTING
                  tabname   = p_table
             IMPORTING
                  x030l_wa  = is_x030l
             TABLES
                  dfies_tab = it_dfies
             EXCEPTIONS
                  OTHERS    = 1.
        IF is_x030l IS INITIAL.
          table_error 'does not exist or is not active'.
        ELSEIF is_x030l-tabtype NE 'T'.
          table_error 'is not selectable'.
        ELSEIF is_x030l-align NE 0.
          table_error 'has alignment - cannot continue'.
        ENDIF.
      Default values for system fields
        REFRESH: it_fdiff.
        is_fdiff-tabname = p_table.
        LOOP AT it_dfies INTO is_dfies.
          IF is_dfies-datatype = 'CLNT'.
            fixed_val sy-mandt.
          ELSEIF is_dfies-rollname = 'ERDAT'
              OR is_dfies-rollname = 'ERSDA'
              OR is_dfies-rollname = 'AEDAT'
              OR is_dfies-rollname = 'LAEDA'.
            fixed_val sy-datum.
          ELSEIF is_dfies-rollname = 'ERTIM'
              OR is_dfies-rollname = 'AETIM'.
            fixed_val sy-uzeit.
          ELSEIF is_dfies-rollname = 'ERNAM'
              OR is_dfies-rollname = 'AENAM'.
            fixed_val sy-uname.
          ENDIF.
        ENDLOOP.
      Prepare free selection on table
        REFRESH it_tables.
        is_tables-prim_tab = p_table.
        APPEND is_tables TO it_tables.
        CLEAR: w_selid.
      ENDIF.
      IF sy-ucomm = 'SEL'.
        IF w_selid IS INITIAL.
        Init free selection dialog
          CALL FUNCTION 'FREE_SELECTIONS_INIT'
               EXPORTING
                    expressions  = it_expr
               IMPORTING
                    selection_id = w_selid
                    expressions  = it_expr
               TABLES
                    tables_tab   = it_tables
               EXCEPTIONS
                    OTHERS       = 1.
        ENDIF.
      Display free selection dialog
        CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
             EXPORTING
                  selection_id            = w_selid
                  title                   = 'Selection'
                  status                  = 1
                  as_window               = 'X'
             IMPORTING
                  expressions             = it_expr
                  field_ranges            = it_ranges
                  number_of_active_fields = w_active
             TABLES
                  fields_tab              = it_fields
             EXCEPTIONS
                  OTHERS                  = 1.
      ENDIF.
    Start of processing
    START-OF-SELECTION.
      PERFORM f_create_table USING p_table.
      PERFORM f_select_table.
      PERFORM f_display_table.
          FORM f_create_table                                           *
    FORM f_create_table USING in_tabname.
      FIELD-SYMBOLS: <fcat> TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
           EXPORTING
                i_structure_name = in_tabname
           CHANGING
                ct_fieldcat      = it_fcat
           EXCEPTIONS
                OTHERS           = 1.
      IF sy-subrc = 0.
      Complete field catalog
        LOOP AT it_fcat ASSIGNING <fcat>.
          <fcat>-tabname = in_tabname.
        ENDLOOP.
        CALL FUNCTION 'LVC_FIELDCAT_COMPLETE'
             CHANGING
                  ct_fieldcat = it_fcat
             EXCEPTIONS
                  OTHERS      = 1.
      ELSE.
        WRITE: 'Error building field catalog'.
        STOP.
      ENDIF.
    Create dynamic table for data
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_content.
      IF sy-subrc = 0.
        ASSIGN it_content->* TO <itab>.
      ELSE.
        WRITE: 'Error creating internal table'.
        STOP.
      ENDIF.
    Create dynamic table for modif
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_modif.
      IF sy-subrc = 0.
        ASSIGN it_modif->* TO <ntab>.
      ELSE.
        WRITE: 'Error creating internal table'.
        STOP.
      ENDIF.
    ENDFORM.
          FORM f_select_table                                           *
    FORM f_select_table.
      IF w_active = 0.
        SELECT * FROM (p_table)
                 INTO CORRESPONDING FIELDS OF TABLE <itab>
                UP TO p_rows ROWS.
      ELSE.
      Selection with parameters
        CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_WHERE'
             EXPORTING
                  field_ranges  = it_ranges
             IMPORTING
                  where_clauses = it_where.
        READ TABLE it_where INTO is_where WITH KEY tablename = p_table.
        SELECT * FROM (p_table)
                 INTO CORRESPONDING FIELDS OF TABLE <itab>
                UP TO p_rows ROWS
                WHERE (is_where-where_tab).
      ENDIF.
      IF sy-dbcnt = 0.
        WRITE: 'No record selected'.
        STOP.
      ENDIF.
    ENDFORM.
          FORM f_display_table                                          *
    FORM f_display_table.
      DATA: l_answer TYPE c,
            l_eflag  TYPE c.
      CLEAR: w_okcode.
      REFRESH: <ntab>.
    Display table contents
      CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
           EXPORTING
                header       = p_table
                tabname      = p_table
                display_only = p_displ
                endless      = 'X'
                no_button    = space
           IMPORTING
                okcode       = w_okcode
           TABLES
                nametab      = it_dfies
                table        = <itab>
                fielddif     = it_fdiff
                modif_table  = <ntab>
           EXCEPTIONS
                OTHERS       = 1.
      IF sy-subrc = 0.
        IF p_displ IS INITIAL AND w_okcode = 'SAVE'.
        Confirm update
          CALL FUNCTION 'POPUP_TO_CONFIRM'
               EXPORTING
                    titlebar              = p_table
                    text_question         = 'Do you want to update table ?'
                    default_button        = '2'
                    display_cancel_button = ' '
               IMPORTING
                    answer                = l_answer
               EXCEPTIONS
                    OTHERS                = 1.
          IF l_answer = '1'.
          Apply modifications
            IF NOT <ntab>[] IS INITIAL.
              PERFORM f_add_system USING space.
              MODIFY (p_table) FROM TABLE <ntab>.
              IF sy-subrc NE 0.
                l_eflag = 'X'.
              ENDIF.
            ENDIF.
          Apply deletions
            IF l_eflag IS INITIAL.
              REFRESH: <ntab>.
              CALL FUNCTION 'STC1_GET_DATA'
                   TABLES
                        deleted_data = <ntab>
                   EXCEPTIONS
                        OTHERS       = 1.
              IF NOT <ntab>[] IS INITIAL.
                DELETE (p_table) FROM TABLE <ntab>.
                IF sy-subrc NE 0.
                  ROLLBACK WORK.
                  l_eflag = 'X'.
                ENDIF.
              ENDIF.
            ENDIF.
          Apply creations
            IF l_eflag IS INITIAL.
              REFRESH: <ntab>.
              CALL FUNCTION 'STC1_GET_DATA'
                   TABLES
                        new_data = <ntab>
                   EXCEPTIONS
                        OTHERS   = 1.
              IF NOT <ntab>[] IS INITIAL.
                PERFORM f_add_system USING 'X'.
                INSERT (p_table) FROM TABLE <ntab>.
                IF sy-subrc NE 0.
                  ROLLBACK WORK.
                  l_eflag = 'X'.
                ENDIF.
              ENDIF.
            ENDIF.
            IF l_eflag IS INITIAL.
              COMMIT WORK.
              MESSAGE s261(53).
            ELSE.
              MESSAGE s075(3i).
              PERFORM f_select_table.
            ENDIF.
          ENDIF.
        Display table again
          PERFORM f_display_table.
        ENDIF.
      ENDIF.
    ENDFORM.
          FORM f_add_system                                             *
    FORM f_add_system USING new TYPE c.
      FIELD-SYMBOLS: <irec> TYPE ANY,
                     <upd>  TYPE ANY.
      LOOP AT it_fdiff INTO is_fdiff.
        READ TABLE it_dfies INTO is_dfies
                        WITH KEY fieldname = is_fdiff-fieldname.
        LOOP AT <ntab> ASSIGNING <irec>.
          ASSIGN COMPONENT is_fdiff-fieldname OF STRUCTURE <irec> TO <upd>.
          IF is_dfies-datatype = 'CLNT'.
            <upd> = sy-mandt.
          ELSE.
            CASE is_dfies-rollname.
              WHEN 'AENAM'.
                <upd> = sy-uname.
              WHEN 'AEDAT' OR 'LAEDA'.
                <upd> = sy-datum.
              WHEN 'AETIM'.
                <upd> = sy-uzeit.
              WHEN OTHERS.
            ENDCASE.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.
    this link will also help:
    http://www.sap-img.com/ab030.htm
    Edited by: AD on Dec 2, 2008 12:26 PM

  • Dynamic Visibility Function in TCA

    Hi,
    I have a requirement where I need to create couple of buttons using Extensions (Extensible Attributes) in Customers Online (similar to User Defined Attributes in Oracle Adavanced Product Catalog) . The problem I have is I need to make these buttons dynamically visible. Now we can make these buttons dynamically visible only by using User Defined Java Functions (as we can't use User Defined PL/Sql functions here!).
    I have found a sample code of this user defined java function from the knowledge base which is very simple and is given below. My problem is how can i make call to database pl/sql packages from within this java function (i.e. how to get the page context in my standalone java class?).
    I would really appreciate any help/suggestions on this.
    Java Code for user defined java function:
    public class XX_PARTY_SITE_Function
    public static oracle.apps.ego.common.EgoBoolean getVisible (StringBuffer theInput)
    try {
    if ("N".equals(theInput.toString())) {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
    } else {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("False"))) ;
    catch ( NullPointerException e ) {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
    Thanks,
    Kamal

    hi
    use this example in your code
    import java.sql.CallableStatement;
    import java.sql.SQLException;
    import java.sql.Types;
    OADBTransaction txn = getDBTransaction();
    CallableStatement cs =
    txn.createCallableStatement("begin dbms_application_info.set_module(:1, :2);
    end;");
    try
    cs.setString(1, module);
    cs.setString(2, action);
    cs.execute();
    cs.close();
    catch (SQLException sqle)
    try { cs.close } catch (Exception(e) {}
    throw OAException.wrapperException(sqle);
    This example illustrates an OUT parameter:
    import java.sql.CallableStatement;
    import java.sql.SQLException;
    import java.sql.Types;
    import oracle.jdbc.driver.OracleCallableStatement;
    DBTransaction txn = getDBTransaction();
    String sql = "BEGIN :1 := FND_MESSAGE.GET; END;";
    CallableStatement cs = txn.createCallableStatement(sql, 1);
    String messageBuffer = "";
    try
    665
    ((OracleCallableStatement)cs.registerOutParameter(1, Types.VARCHAR, 0, 2000);
    cs.execute();
    messageBuffer = cs.getString(1);
    cs.close();
    catch (SQLException sqle)
    try { cs.close } catch (Exception(e) {}
    throw OAException.wrapperException(sqle);
    thanx
    Pratap

  • Dynamic Visibility Function in customers Online (TCA)

    Hi,
    I have a requirement where I need to create couple of buttons using Extensions (Extensible Attributes) in Customers Online (similar to User Defined Attributes in Oracle Adavanced Product Catalog) . The problem I have is I need to make these buttons dynamically visible. Now we can make these buttons dynamically visible only by using User Defined Java Functions (as we can't use User Defined PL/Sql functions here!).
    I have found a sample code of this user defined java function from the knowledge base which is very simple and is given below. My problem is how can i make call to database pl/sql packages from within this java function (i.e. how to get the page context in my standalone java class?).
    I would really appreciate any help/suggestions on this.
    Java Code for user defined java function:
    public class XX_PARTY_SITE_Function
    public static oracle.apps.ego.common.EgoBoolean getVisible (StringBuffer theInput)
    try {
    if ("N".equals(theInput.toString())) {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
    } else {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("False"))) ;
    catch ( NullPointerException e ) {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
    Thanks,
    Kamal

    Hi,
    To make it more simpler, I've created a user-defined java function in Customers online and now I want to register a stand alone java class/method which will be used by the newly created user defined java function.
    The problem is that I wouldn't have any control over Page context or any such thing. In that case how will I be able to make database connection from my java class..?
    Thanks,
    Kamal

  • Dynamic LOV - Function returning LOV query

    Hi All,
    For some reason I can not write a generic LOV query and want to edit where clause dynamically. Is there a way to achieve it.
    My LOV query will be
    'SELECT D,R FROM LOV WHERE ID IN (1,2,3)' for one person and
    'SELECT D,R FROM LOV WHERE ID IN (4,5,6)' for another person.
    Here entire string "1,2,3" or "4,5,6" is from a page item say :P1_ID_LIST and I can not use the bind variable like 'SELECT D,R FROM LOV WHERE ID IN (:P1_ID_LIST)'.
    If I have the option of function returning the LOV query I can use
    return 'SELECT D,R FROM LOV WHERE ID IN (' || :P1_ID_LIST || ')'
    Does there a way to acheive in Apex?
    Thanks
    Balaji

    See Re: Search on a typed in list of values for at least part of the answer.
    Scott

  • Dynamically loading functionality to an application

    Hello, [first time post]
    My goal is to find, if possible, a solution to my desire.
    I have an application, called App. This application will perform certain algorithms on a test set. I would like to have a way to dynamically add new algorithms to the application without re-compiling the application. For example the main application code would look something like:
    LoadAllAlgorithmsInDiry('./Algorithms');
    At which point the function would:
    Menu aMenu.GetAlgorithmMenu();
    aMenu.add(newAlgorithmItem);
    My problem lies in the fact that I don't know if RMI, is what I need, or some other API.
    Should each algorithm be its own application? Or can I simply create a class with a standard API for the application?
    Any help in this matter would be appreciated.

    Let's clarify a bit..Minor mistakes aside, thank you for the clarification.
    I stumbled upon this thread since I'm doing something similar.
    My question is... Is there a "tidy" way to arrive at a list of Algorithm implementations in a given folder/directory?
    ie I would like the users of my app to be able to drop various class files, java files and jar files (containing one or more java/class files) in a predetermined folder. Each giving a unique Algorithm implmentation. Then when the app is started up it would search for all the user-defined classes and add them to a menu or something like your example suggested.

  • Oracle 10G - Dynamic Decode Function - s it possible - How for CR ?

    I will rephrase my question with a better example, then aks my question:-
    In the example below, we take the employee name (ename) and the department number (deptno) and display the salary of the employee by their department.
    SELECT  * FROM 
    (SELECT
      ename,
      sum(decode(deptno,10,sal)) DEPT10,
      sum(decode(deptno,20,sal)) DEPT20,
      sum(decode(deptno,30,sal)) DEPT30,
      sum(decode(deptno,40,sal)) DEPT40
      FROM emp
      GROUP BY ename)
      ORDER BY 1;
    The expected result would be as sampled below:- 
    ENAME          DEPT10     DEPT20     DEPT30     DEPT40
    ADAMS                       1100
    ALLEN                                  1600
    BLAKE                                  2850
    CLARK            2450
    ..........etc
    I would wish to make the Select a dynamic one, with resepect to the departments i.e. I envisage a situation where the Departments increase for example, or are merged for that matter, in which case now my Decode will no longer be accurate. Can I do a Select that has dynamic columns for the departments??

    How 'bout using this to feed a cross tab (MS SQL):
    select ename, deptno, sum(sal) as salary
    from emp
    group by ename, deptno
    Use ename for your rows, deptno as your columns, and summarize salary for the body of the cross tab.
    HTH,
    Carl

  • Dynamic Call Function/Class Method

    Hi,
    I have a requirement for which I need your help.
    I want to Call a Method dynamically inside a program. how to do it?
    My another quary is that how to call more than one class method dynamicaly in the program one at a time, based on certain conditions.
    All the requirements mentioned above feels awakward to me, but are they feasible. Eagerly waiting for a reply.
    Regards,
    Pulokesh
    Moderator message - Cross post locked
    Edited by: Rob Burbank on Oct 26, 2009 9:48 AM

    Hello,
    you can call a Method like this where the name of the method is concatenated.
    CONCATENATE 'SC_' me->gf_scenario '_SAVE' INTO lf_method.
      CALL METHOD me->(lf_method).
    Than I can imagine to loop over a tabele with all the Method Call to be executes un there:
    Loop at gt_meth_calls into ls_meth_call.
       ls_meth_call-object_instance->(ls_meth_call-meth_name).
    endloop.
    The table should be structured such that the first component contains a reference to the instance and the second component will be the Method name to run.

  • Should I Use a Dynamic "Get" Function?

    So let's say I have a table called "Book", and it has the columns "ID, Name, Author, ISBN"
    I'm wondering what the Pros and Cons would be to creating a function to get books by any attribute using one function:
    <cffunction name="GetBook">
    <cfargument name="Identifier" type="string">
    <cfargument name="Value" type="string">
    <cfquery name="Books">
    SELECT ID, Name, Author, ISBN FROM Book
    WHERE #Arguments.Identifier# = <cfqueryparam cfsqltype="cf_sql_varchar" value="#Arguments.Value#">
    </cfquery>
    <cfreturn Books>
    </cffunction>
    So that I could call the following functions:
    GetBook('ID', 7);
    GetBook('Name', 'To Kill a Mockingbird');
    GetBook('Author', 'John Gisham');
    GetBook('ISBN', '0321515471');
    Thoughts?

    So what you're suggesting for instance would be:
    <cfif IsDate(Argument.Value)>
    <cfset cfsqltype = 'cf_sql_timestamp'>
    <cfelseif IsNumeric(Argument.Value)>
    <cfset cfsqltype = 'cf_sql_numeric'>
    <cfelse>
    <cfset cfsqltype = 'cf_sql_varchar'>
    </cfif>
    <cfquery name="Books">
    SELECT ID, Name, Author, ISBN FROM Book
    WHERE #Arguments.Identifier# = <cfqueryparam cfsqltype="#cfsqltype#" value="#Arguments.Value#">
    </cfquery>

  • Dynamic editable functionality in Adobe form

    Hi All,
    I am Calling a Interactive Adobe form from webdynpro view.
    second applicant(SBPID)--Read only               second applicant name(SNAME)-Calculated read only
    I have created Action on second applicant ID (SBPID) ---If SBPID is not empty disable SNAME(for user entry)
    I have created Action on second applicant name (SNAME) ---If SBPID is empty enable SNAME(for user entry)
    SBPID and TBPID i am displaying from my webdynpro view.
    I am unable to achieve this functionality.Any helpful inputs  will be appreciated.
    regards,

    Hi All,
    Awaiting your inputs on the issue.
    Regards,

  • Workbook not refreshing dynamically through Function Module.

    We have a workbook with multiple queries having common variable set.
    we are trying to execute workbook from program, using the function module RSAH_LAUNCH_EXCEL. Also we are trying to assign variable values manually.
    through the program, the workbook is getting executed but if i change the variable values inside the program manually, workbook is not getting refreshed. can someone help us.
    the below is the code
    REPORT  ztest.
    DATA: v_workbookid TYPE rsrwbindex-workbookid,
          v_subrc TYPE sy-subrc,
          ls_var TYPE rrx_var,
          lt_var TYPE STANDARD TABLE OF rrx_var.
    v_workbookid = 'D0C1TB5M99SDPACEG070AFU88'.
    ls_var-vnam = 'ZTEST_EXPORT'.
    ls_var-vartyp = '1'.
    ls_var-vparsel = 'P'.
    ls_var-sign = 'I'.
    ls_var-opt  = 'EQ'.
    ls_var-low  = '10008891'.
    ls_var-iobjnm = '0BPARTNER'.
    APPEND ls_var TO lt_var.
    CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
        EXPORTING
         i_genuniid                       = lv_genuniid
          i_workbookid                     = v_workbookid
          i_objvers                        = 'A'
         i_hide_sapgui                    = 'X'
    IMPORTING
        e_subrc =           v_subrc
        TABLES
          i_t_var                          = lt_var.
    Thanks

    Did you create your function module without problems...assigned the Z* function group? activate the function module? i assume that you copy the function module code and the variables definition on TOP include of RSAX_BIW_GET_DATA_SIMPLE
    Regards
    Message was edited by:
            Oscar Díaz

Maybe you are looking for

  • Problem with Result Analysis report (KKAK)

    Hello Experts, I am facing problem with T-code KKAK, when I am executing this transaction (Results Analysis (RA) on sales orders creates the data for posting to the GL, depending on the sales order (i.e. WIP or COS) ) system is displaying/calculating

  • Acrobat Pro 9 & iPad pdf reader issues

    When I create/edit a pdf in Acrobat 5 and then send to my iPad, the pdf will be complete and correct.  When I create/edit the same pdf in Acrobat 9 Pro and send it to my iPad the pdf will be missing any data that I edited and the other text will be g

  • Instant client and jdbc bug 6362104

    I am having a problem with the latest version of the instant client for Linux and tomcat. The error message I get is: "Error while registering Oracle JDBC Diagnosability MBean" which has been determined to be bug 6362104. It looks like there is a pat

  • Change optimization

    hi , oracle 10.2.0.1.0 I just ran a simple explan stmnt and o/p was based on RBO . how to change it to CBO . ? SQL> explain plan for select count(*) from employee_details; Explained. SQL> select * from table(dbms_xplan.display); PLAN_TABLE_OUTPUT | I

  • Adobe concern

    You know I am really concerned about all this Adobe stuff. Adobe Air (what is that and do I need it?), Flash, Shockwave Player, Reader. Secunia is showing all of these as category 4 threats, and the Reader as a category 5 threat stating that hijacker