Calling functions dynamically

how can i retrieve a Method object using the Class method
getMethod(String name, Class[] parameterTypes)[\code]if the method i'm trying to retrieve has primitive parameters (i.e. they cannot be inserted into an array of type Class).  for instance, i want to get the method setCharacterAttribute(int offset, int length, AttributeSet s, boolean change) dynamically.
thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Lets reformat that so it is readable
how can i retrieve a Method object using the Class
method
getMethod(String name, Class[] parameterTypes)if the method i'm trying to
retrieve has primitive parameters (i.e. they cannot be
inserted into an array of type Class). for instance,
i want to get the method setCharacterAttribute(int
offset, int length, AttributeSet s, boolean change)
dynamically.
thanks!You can specify the Wrapper classes for primitive types. So in your example
Class[] params = { Integer.class, Integer.class, AttributeSet.class, Boolean.class };
Method m = classRef.getMethod("setCharacterAttribute", params);To invoke this method on a specific instance of the class the method belongs to you do the following
Object[] paramValues = {new Integer(offset), new Integer(length), s, new Boolean(change) };
m.invoke(instance, paramValues);where instance is a reference to an instance of the class you wish to call, s in the paramValues array is the actual AttributeSet instance.
Go look for Java Tutorials that deal with Reflection and Introspection on the java.sun site.

Similar Messages

  • Calling a Function dynamically in Forms

    I need help calling a database function dynamically from a WHEN-NEW-RECORD-INSTANCE trigger in Forms. Does anybody know how to do this??
    Thanks

    Do you want to perform DDL? If not it is probably better to call the database procedure/function directly, don't forget to handle any potential errors that may be raised.

  • Calling Function Modules Dynamically

    Hi All,
           Is it possible to call a function module dynamically i.e. to pass the module name and the import and export parameters dynamically at runtime. Please provide a way of achieving this.
    Regards,
                 Milan Thaker

    Hello,
    Read this SAP documentation on calling function modules dynamically: [http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_DYNAMIC.htm|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_DYNAMIC.htm] Here you have an example explaining the technique.
    Also check this link on [ABAP FAQs|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-29].
    Cheers,
    Suhas
    Edited by: Suhas Saha on Mar 9, 2010 3:33 PM

  • Call javascript function dynamically

    Can this be done to call Javascript function dynamically? What I mean is suppose I use Javascript to submit form and target the reply to a popup window:
      function cForm() {
         win=window.open('','myWin','toolbars=0');
         document.aForm.q.value='12345';     
         document.aForm.target='myWin';
         document.aForm.submit();
      }I target the form reply to popup window myWin. Suppose the reply body contains some Javascript function doX(). Is it possible to call doX() automatically, after the submit and the reply is loaded on myWin, maybe using some onload event in the popup window?

    On the PopUo Windows BODY onLoad, call the method doX()

  • How to use CALL FUNCTION '/1BCDWB/SF00000014' in smartform urgent

    hiiiiiiiii
    Iam doing classical report n i want my output to be printed in smartform.
    So my output is in IT_FINAL table.In smartform in Form Interface Table column i had declare :::
    Parameter Name: IT_FINAL
    Type Assignment:LIKE
    Associated Type:ZSD_FINAL ( Its a structure of IT_FINAL)
    And in SE38..iam using...............
    data: FM_NAME1 type RS38L_FNAM.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZCSF_SDPRSR03_PR'
    importing
    FM_NAME = FM_NAME1.
    CALL FUNCTION FM_NAME1
    EXPORTING
    IT_FINAL = IT_FINAL.
    So while running its giving dump..
    I DONT KNOW HOW TO USE THE ABOVE FUNCTION MODULE.
    CALL FUNCTION '/1BCDWB/SF00000014'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Please suggest me with example if possible......URGENT.
    (Rewards if solved)
    Regards.

    Hi
    see the below doc and do accordingly
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    <b>call function 'SSF_FUNCTION_MODULE_NAME'</b>
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    <b>call function FM_NAME</b>
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Smartform
    you can check this link here you can see the steps and you can do it the same by looking at it..
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SMARTFORMS STEPS.
    1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
    2. Create Table type(t_struct) of stracture in se11.
    3. In your program declare Internal table(Itab) type table of structure(struct).
    4. Define work area(wa) like line of internal table.
    5. Open Tcode Smartforms
    6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
    7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
    8. In form pages and window, create Page node by default Page1 is available.
    9. In page node you can create numbers of secondary window. But in form there is only one Main window.
    10. By right click on page you can create windows or Go to Edit, Node, Create.
    11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
    12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
    13. In table there are three areas Header, Main Area, Footer.
    14. Right click on the Main area create table line by default line type1 is there select it.
    15. Divide line into cells according to your need then for each cell create Text node.
    16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
    17. Save form and activate it.
    18. Then go to Environment, function module name, there you get the name of function module copy it.
    19. In your program call the function module that you have copied from your form.
    20. In your program in exporting parameter of function pass the internal table(itab).
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
    configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
    SmartForms System Fields
    Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
    System fields of Smart Forms
    &SFSY-DATE&
    Displays the date. You determine the display format in the user master record.
    &SFSY-TIME&
    Displays the time of day in the form HH:MM:SS.
    &SFSY-PAGE&
    Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
    &SFSY-FORMPAGES&
    Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
    &SFSY-JOBPAGES&
    Contains the total page number of all forms in the currently processed print request.
    &SFSY-WINDOWNAME&
    Contains the name of the current window (string in the Window field)
    &SFSY-PAGENAME&
    Contains the name of the current page (string in the Page field)
    &SFSY-PAGEBREAK&
    Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
    &SFSY-MAINEND&
    Is set as soon as processing of the main window on the current page ends
    &SFSY-EXCEPTION&
    Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
    Example Forms Available in Standard SAP R/3
    SF_EXAMPLE_01
    Simple example; invoice with table output of flight booking for one customer
    SF_EXAMPLE_02
    Similar to SF_EXAMPLE_01 but with subtotals
    SF_EXAMPLE_03
    Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
    Advantages of SAP Smart Forms
    SAP Smart Forms have the following advantages:
    1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
    2. Displaying table structures (dynamic framing of texts)
    3. Output of background graphics, for form design in particular the use of templates which were scanned.
    4. Colored output of texts
    5. User-friendly and integrated Form Painter for the graphical design of forms
    6. Graphical Table Painter for drawing tables
    7. Reusing Font and paragraph formats in forms (Smart Styles)
    8. Data interface in XML format (XML for Smart Forms, in short XSF)
    9. Form translation is supported by standard translation tools
    10. Flexible reuse of text modules
    11. HTML output of forms (Basis release 6.10)
    12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
    Regards
    Anji

  • HR_INFOTYPE_OPERATION not working when called from Dynamic action

    Hi ,
           Senario  : I would like to execute a form from dynamic action which
    creates a record in 0015 (Additional payment IT) .
           I have writen the code as shown below am using FM HR_INFOTYPE_OPERATION
    . When i execute the program from se38 it is creating a record, however it is
    not created when it is called from dynamic action..when i debugged the code in
    inside the FM HR_INFOTYPE_OPERATION there is a FM HR_MAINTAIN_MASTERDATA where
    they are using call dialog (statement) and
    sy-oncom = 'N'   when called from Dynamic action and
    sy-oncom = 'S'   when called executed directly.
    I tried to change the sy-oncom to S while run from Dynamic action it created
    the record.
    So Can anyone explain me abt sy-oncom and how can i resolve the issue..
    code..
    REPORT ZHRPYENH01 .
    perFORM TERMIATION_9000.
    INCLUDE DBPNPMAC.
          FORM Termiation_9000                                          *
    FORM TERMIATION_9000.
    INFOTYPES : 0015.
    *data : i .
    *i ='c'.
    *break-point.
    *message i000(000) with i.
      TABLES : PRELP.
      DATA : P9000 TYPE PA9000." with header line.
      DATA : P0000 TYPE STANDARD TABLE OF  P0000 WITH HEADER LINE.
    DATA : P0015 TYPE STANDARD TABLE OF  P0015 WITH HEADER LINE.
      DATA : HIRE_DATE  LIKE SY-DATUM,
             TERM_DATE  LIKE SY-DATUM.
      DATA : MOLGA LIKE T500L-MOLGA VALUE '25',
             SEQNR LIKE PC261-SEQNR.
      DATA : RGDIR TYPE STANDARD TABLE OF PC261 WITH HEADER LINE.
      DATA : ACTUAL_PERIOD LIKE PA9000-RETENTION.
      DATA : PNP-SW-FOUND TYPE SY-SUBRC ,
             PNP-SY-TABIX TYPE SY-TABIX.
      DATA : TER_PERNR LIKE PA0001-PERNR.
      DATA : REF_PERNR LIKE PA0001-PERNR.
      data : key type BAPIPAKEY.
      data : payed_amount type p0015-BETRG.
    data : future_payment_amount type p0015-BETRG.
    data : p0002 like pa0002.
      types : begin of t_deduction ,
              deducation_date like p0015-begda,
              future_payment_amount type p0015-BETRG.
      types : end of t_deduction.
    data :  future_deduction type standard table of t_deduction with
    *header line.
      data :  future_deduction type  t_deduction .
    data : RETURN type  BAPIRETURN1.
    *data : deduction_p0015 like standard table of p0015 with header line.
    data : deduction_p0015 like p0015 .
    xxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxx
    ****Prepare 0015 data for deduction
    *deduction for payed amount
    clear deduction_p0015.
    *refresh deduction_p0015.
    deduction_p0015-pernr = REF_PERNR.
    *deduction_p0015-pernr = TER_PERNR.
    deduction_p0015-lgart = 'M120'.
    deduction_p0015-begda = sy-datum + 1 .
    deduction_p0015-endda = sy-datum + 1 .
    deduction_p0015-BETRG = payed_amount.
    deduction_p0015-WAERS = 'SGD'.
    deduction_p0015-ZUORD =  TER_PERNR.
    *append deduction_p0015.
    **deduction for future payment amount
    *loop at future_deduction.
    *clear deduction_p0015.
    *deduction_p0015-pernr = REF_PERNR.
    **deduction_p0015-pernr = TER_PERNR.
    *deduction_p0015-lgart = 'M120'.
    *deduction_p0015-begda = FUTURE_DEDUCTION-DEDUCATION_DATE.
    *deduction_p0015-endda = FUTURE_DEDUCTION-DEDUCATION_DATE.
    *deduction_p0015-BETRG = future_deduction-future_payment_amount.
    *deduction_p0015-WAERS = 'SGD'.
    *deduction_p0015-ZUORD =  TER_PERNR.
    *append deduction_p0015.
    *endloop.
    Create a deduction wage type in 0015 for the employee
    break-point.
    CLEAR RETURN.
    CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
      EXPORTING
        NUMBER              = REF_PERNR
        VALIDITYBEGIN       = '18000101'
    IMPORTING
       RETURN              = return
    if not return is initial.
    message E000(000) with
    'Referred Employee could not be locked for referal  payment deducation,
    please try after some time'.
    endif.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        INFTY                  = '0015'
        NUMBER                 = REF_PERNR
       SUBTYPE                = 'M120'
      OBJECTID               =
      LOCKINDICATOR          =
       VALIDITYEND            = SY-DATUM
       VALIDITYBEGIN          = SY-DATUM
      RECORDNUMBER           =
        RECORD                 = deduction_p0015
        OPERATION              = 'COPY'
      TCLAS                  = 'A'
       DIALOG_MODE            = '2'
      NOCOMMIT               =
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = return
       KEY                    = key
    break-point.
    COMMIT WORK.
    if not return is initial.
    *return-TYPE
    *ID
    *NUMBER
    *MESSAGE
    message I000(000) with return-MESSAGE.
    endif.
    CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
      EXPORTING
        NUMBER              = REF_PERNR
        VALIDITYBEGIN       = '18000101'
    IMPORTING
       RETURN              = return
    xxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxx
    Thanks and regards
    -Senthil Bala
    Message was edited by: senthil bala

    Hi Senthil
    Why at all U want a subroutine to create a record in IT0015 through Dynamic action.There are some standard codes available to update infotypes.
    Let me give U an example
    14     9CON     BETRG     4     2     I     INS,0015 This will create a record in IT0015 when IT0014 is updated with Wagetype 9CON
    14     9CON     BETRG     4     3     W     P0015-LGART='5400' Set wagetype for IT0015(Here U can use a subroutine call to set the wagetype)
    14     9CON     BETRG     4     4     W     P0015-BETRG=P0014-BETRG set amount for IT0015(Here U can use a subroutine call to get the amount)
    14     9CON     BETRG     4     5     W     P0015-BEGDA=P0014-ENDDA set the dates(Here U can use a subroutine call to set the dates)
    Hope this will help U.
    Please award points if helpful

  • CRM5.2 UI-Call a dynamic URL on button click

    Hi all, 
               My requirement is to call a dynamic url on the click of a button in the overview page. I have added a custom button in  the method  IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS , and the related code in do_handle_event.I have created a custom method for the button event. I have enhanced a custom controller and created an attribute.In the custom method created for the button event, I have written the code for retrieving the parameters to be passed to the url.
    In the layout of the view associated with the display view , I have written the following code for calling the URL in a new window.
    <%
    DATA: lr_cuco_EMA TYPE REF TO ZL_BP_CONT_BPCONT_IMPL,
          lv_url TYPE string,
          lv_url1 type string,
          lv_count type i.
      lr_cuco_EMA ?= controller->get_custom_controller( 'ZBP_CONT/BPCONT' ).
      check lr_cuco_EMA is bound.
      if lr_cuco_EMA->gv_VALUE is not initial.
      if lr_cuco_EMA->gv_COUNT IS NOT INITIAL.
      clear lr_cuco_EMA->gv_COUNT.
      endif.
      LV_URL = lr_cuco_EMA->gv_VALUE.
      Concatenate 'http:/' LV_URL  into LV_URL1.
      Concatenate '"http:/' LV_URL '"' into LV_URL.
        lv_count = lr_cuco_EMA->gv_COUNT mod '2'.
        if lv_count Ne 0.
      lv_url = lv_url1.
    endif.
      %>
         <scrpt language="Javascript">
            window.open(<%= lv_url%>).focus();
          </script>
       <%
             lr_cuco_EMA->gv_COUNT = lr_cuco_EMA->gv_COUNT + 1.
             clear lr_cuco_EMA->gv_value.
             clear lv_count.
             clear lv_url.
             clear lv_url1.
             ENDIF.
    %>
    But here my URl is getting called alternate times.If I do not write the code  by using the variable GV_COUNT the url is getting called only the first time of the button click  and to call the URL again you need to navigate back to the search page and again back to the overview page and click on the button.
    Can anyone help me regarding this? I want the URL to be called in a new page on every button click.
    Thanks in Advance,
    Chandana

    Hi Nisha,
    The crux of your issue here is that you want to call the event triggered with onClick before calling the event triggered on onClientClick. This can be achieved by the following code in the function called on the onClientClick.
    function fn_button()
               htmlbSL(this,2,'b_row_selection:onInputProcessing()');
               window.open("new_page",target="BLANK");
    Here, fn_button is the javascript function called on button click, and b_row_selection is the event triggered on the onClick event of row selection.
    Try this out and let us know if it works for you.
    Regards,
    Saurabh

  • Call Type node not setting Call Type Dynamically By name.

    I'm attempting to use the Call Type node to set a Call Type dynamically by name using the following logic:
    concatenate("somestring_",userParseFromVXML("CT"),"_Q")
    The userParseFromVXML is a custom function that works correctly and pulls my data out of FromExtVXML correctly.  If I use a peripheral variable and use the same logic then set the Call Type node to set the call type dynamically by name using the peripheral variable it sets the call type correctly without any problems.  I'm using UCCE 9.0.3 and I'm wondering if anyone else has run across this issue.

    I wish I'd known about the table function before myself.
    This is what my experience is now after having tested these scenarios.
    Scenario
    Example
    PASS/FAIL
    String literal
    concatenate("somestring_", "test", "_Q")
    PASS
    Peripheral Variable
    concatenate("somestring_", Call.PeripheralVariable1, "_Q")
    PASS
    Custom Function
    concatenate("somestring_", userParseFromVXML("CT"), "_Q")
    Passing now (not sure what i must have been missing)
    The custom function I'm using returns a string and when I created a new custom function returning a String literal it worked just fine.  After doing my testing and swapping back to my original custom function I started seeing the call tagged with the correct Call Type, so I can only assume that I was missing something in the original concatenate string.  The custom function I am using is as follows:
    if((find(%1%,Call.user.microapp.FromExtVXML[0]))>0,before(";",after(concatenate(%1%,"="),Call.user.microapp.FromExtVXML[0])),if((find(%1%,Call.user.microapp.FromExtVXML[1]))>0,before(";",after(concatenate(%1%,"="),Call.user.microapp.FromExtVXML[1])),if((find(%1%,Call.user.microapp.FromExtVXML[2]))>0,before(";",after(concatenate(%1%,"="),Call.user.microapp.FromExtVXML[2])),if((find(%1%,Call.user.microapp.FromExtVXML[3]))>0,before(";",after(concatenate(%1%,"="),Call.user.microapp.FromExtVXML[3])),"Not Found"))))

  • HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM

    PLEASE ANYONE TELL ME, ABOUT  HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM. IT IS VERY URGENT!!!!!!!!!1

    Hi,
      Under Global Definitions, we have 'Form Routines' tab. Under this tab, u can have a dynamic subroutine call. With in FORM and ENDFORM, you can call the Function Module.With in the Program Lines editor, u can define the subroutine........PERFORM. 
    If helpful, reward points.
    Rgds,
    CK

  • Call a dynamic action automatically on a regular basis

    Hi,
    We have a classic report on a page which we would like to refresh automaticallly every X minutes. We have done this using setInterval and $a_report however as I understand, this is unsupported functionality... So I would like to go down the dynamic action route.
    But my question is this... how can I call the dynamic action automatically say every 3 minutes, without any user interaction?

    Hi John,
    maybe it's easier for you to get the approval because it's a plug-in we (Oracle) provide.
    You mentioned that you already had a setInterval with $a_report solution in place. Instead of the unsupported $a_report you can use the supported
    jQuery( "#static_id_of_your_report_region" ).trigger ( "apexrefresh" );to trigger a refresh of your report region. That will be identical to the "Refresh" dynamic action. But I would still suggest to go with the "Timer" dynamic action plug-in, because this will be more transparent for other developers when looking at your page.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Calling a Dynamic URL in a BSP

    Hi all,
    We are calling a BW Web Report from a BSP application . Presently we have hardcoded the BW Web Report but when we move from Devlopement to Quality and subsequently to Production we would need to pass the respective URL’s.
    One way of achieving the above, is to write Case statements specific to Development, Quality and Production System -IDs, Is there any other way in which we pass the  URL’s dynamically to the BSP.
    Thanx in advance.

    to dynamically construct BW web report url you can do the following
    call the following FM
    CALL FUNCTION 'TH_GET_VIRT_HOST_DATA'
       EXPORTING
         protocol             = 1 " 1 for http 2 for https
         virt_idx             = 0
      LOCAL                = 1
      IMPORTING
        hostname             = server
        port                 = port
      EXCEPTIONS
        not_found            = 1
        internal_error       = 2
        OTHERS               = 3 .
    now you can use something like below.
    concatenate `http://` server `:` port
    `/sap/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&INFOCUBE=<cubename>&QUERY=<queryname>` into bwurl.
    Hope this is clear. If not do get back.
    please note that if you are using webdispatcher then you may have to follow a different approach.
    Regards
    Raja

  • RFC-Call using dynamic Parameters

    Dear Forum!
    I'd like to call a RFC function module using a dynamic parameter list.
    I can either call
    CALL FUNCTION bapiname DESTINATION fsystem.
    or
    CALL FUNCTION bapiname
            PARAMETER-TABLE lt_param
            EXCEPTION-TABLE lt_excep.
    but not both combined!
    The ABAP docu says, both should work together. If using DESTINATION the same options as for standard FM calls are allowed... (seen at: Transaction ABAPHELP, search for CALL FUNCTION, choose topic 4 for RFC)
    Who is wrong? The docu or me? How can I combine both?
    Cheers
    Torsten

    Hi Abir,
    thanks for your helpful answer.
    But I don't understand this:
    For calling a remote enabled FM, it needs to be released which means the parameters would be fixed and thus the RFC layer does not allow using parameter table in such cases.
    The FM resides on a remote system. It does not matter me, whether the FM is released, fixed or done with something other. As long it is reachable, I'm fine.
    I am wondering about the fact, that I can call a local FM dynamically, but cannot do so for a remote call.
    In the online documentation you can read, that a remote call function (with parameter destination ) has the same options like a standard call function. Actually this statement seems to be wrong. Right?
    Best regards
    Torsten

  • Call Fm dynamically

    Hi all,
    I am using FP_FUNCTION_MODULE_NAME    fm to get a fm name of a Interactive/PDF form.
    I want to know that when i get this FM name how to call it dynamically.
    Points will be sured for valuable answers.
    Thanks
    Sanket sethi

    Data: LV_FORM_NAME TYPE FPWBFORMNAME,
             LV_FM_NAME   TYPE RS38L_FNAM,
             FP_TEST_DUMMY TYPE FPINTERFACETYPE.
    Now pass the form name in LV_FORM_NAME .
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
            EXPORTING
              I_NAME           = LV_FORM_NAME
            IMPORTING
              E_FUNCNAME       = LV_FM_NAME
              E_INTERFACE_TYPE = FP_TEST_DUMMY.
    U'll get the FM name in LV_FM_NAME.
    Now 
      GS_DOCPARAMS-LANGU = 'E'.
    GS_DOCPARAMS-COUNTRY = 'US'.
    CALL FUNCTION LV_FM_NAME
        EXPORTING
          /1BCDWB/DOCPARAMS = GS_DOCPARAMS
         LFA1              = LFA1
         MBMFKTO_PDF       = GT_MFKTO_PDF
       IMPORTING
         /1BCDWB/FORMOUTPUT       = FP_RESULT
        EXCEPTIONS
          USAGE_ERROR       = 1
          SYSTEM_ERROR      = 2
          INTERNAL_ERROR    = 3
          OTHERS            = 4.
    Hope this might give answer to U.
    Regards
    Hemendra.

  • Call Function using DESTINATION

    Hi there!
    Abapers, I'm needing some help here with RFCs.
    My destinations (SM59):
    ERP_100
    ERP_120
    ERP_130
    PI_200
    PI_300
    I have to call a function in PI from ERP. I'm doing in this way:
    CALL FUNCTION 'pi_function_module' DESTINATION 'PI_200' ...
    It's working. But the destination can not be hard coded. With the program in ERP_100 (DEV) and ERP_120 (QAS) the destination is PI_200 (PI DEV) and with the program in ERP_130 (PRD) the destination is PI_300 (PI PRD).
    How can I handle this?
    Thanks in advance!
    Best regards,
    Charles

    Hi Charles,
    Refer [this|Re: Deciding RFC destination dynamically; thread.
    I quote the last post by Micky Oestreich - "This solely depends on the naming conventions you are using. Since the name of the RFC destination is arbitrary, there is 'no' way of determining the name of the destination."
    So, your design approach could either be by building a customizing table where you maintain the destination values or use a 'CASE' statement in your code before calling the remote function module....something like:
    DATA:
      lv_own_system  TYPE logsys,
      lv_rfcdest     TYPE rfcdest.
    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
      IMPORTING
        own_logical_system             = lv_own_system
      EXCEPTIONS
        own_logical_system_not_defined = 1
        OTHERS                         = 2.
    IF sy-subrc NE 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CASE lv_own_system.
      WHEN 'ERP_100' or 'ERP_120'.
         lv_rfcdest = 'PI_200'.
      WHEN 'ERP_130'.
        lv_rfcdest = 'PI_300'.
      WHEN OTHERS.
    ENDCASE.
    "Now call the remote function
    CALL FUNCTION 'pi_function_module' DESTINATION lv_rfcdest ...
    Hope this helps,
    Cheers,
    Sougata.

  • Build Labview Application which loads functions dynamically

    I am not sure if this is possible for executables, but it works pretty well in the LabVIEW development mode.
    I have a LabVIEW program which calls some functions (sub-functions) dynamically. In the develop mode, the sub-functions are in separate *.llb files. When a subfunction is selected from the menu of the main LabVEIW program, the main application searches a particular location/directory for a particular *.llb file; if the *.llb is found, it loads the vi and runs it, if not, it tells the user that the function is not available. The advantage of doing this is that I can add/remove/modify these sub-functions simply by puting in or taking out the *.llb file from that directory without causing any problem on the main program.
    Would it be possible to do the same if I buid an LabVIEW executable application (I mean build/compile the main application first, and then add/remove functions by putting/removing some files in a directory)? If yes, then I can distribute new functions to users without having to re-compile the whole thing.
    Thanks.
    Ian

    Hello Andrew,
    When Using LOader method, there are a few things to take care of. It is not so terrible when you know what and why. Consider this If you change your executable, You have to rebuild and then you realize there was a small spelling mistake or a control was not aligned. Doing a double check is sometimes as important as good programming.
    1. Path Issues - These you will have whether you build executable or release it as a library. This happens if you use relative path.
    2. Use of native labview Vi's in your code - When the code changes, You want to distribute the new LLB. Well Use Save with Options and Choose "Application Distribution" Select "Entire Hierarchy", "Include Vi.lib Files" And "Runtime Menu" and "External Routines" If you want your App protected. Click Remove Diagrams. Again Make sure you don't lose your Original file if you choose this. All this saves the whole App as LLB.
    Then your Loader has to call your Main Vi dynamically. How difficult is the path Issue to Call One Main Vi in a Vi Library. There is no Licensing Issue here as LV itself gives you this option.
    I have used this method for a couple of 200 Vis or more Applications and constantly updated by changing the llb file without any hassle.
    Good Luck!
    Mache

Maybe you are looking for

  • Block Stock consider during MRP Run and Stock availibility check

    Dear All, I am facing the stock availibility check , Sytem consider the Defective material which is Block in same storage location ,and system not generate the Planned order . -Blocked Material stock 100, and requirement 100 then system not generate

  • Communicating with a external application through tcp/ip

    Hi all, I have set up a procedure to communicate with a external application. I have used util_tcp to set up this connection. The process I undertake is i send some packets to a remote port XXXX on a particular ip address . i.e util_tcp.open_connecti

  • Spreads and single pages export to pdf

    Hi I have a document that is laid out as spreads 2 a4's next to each other. ie the back page is shown as the first with the front page as page 2. I need to export for both single page pdf electronic copy (ie front cover currently page 2 as page 1 of

  • Windows Vista 32 Bit - Problems with Static Sounds

    Hey Guys, I dled the latest version of iTunes (7.1) and I am hearing static noises over all my mp3s. Recent upgrade to Vista 32 Bit

  • Project-wide Debug flags and conditional execution

    I've programmed in literally dozens of languages, and an still relatively new to Objective-C and even some C programming techniques. In Perl, for example, I often create a module-wide or project wide debug flag which may be a single boolean true or f