Calling function at onFocus statement

may i ask that the below code is correct or not?
<jsp:useBean id = "pc" class="common.claim" scope="request" />
<td id=progPect><input type="text" size=5 id="progPect" value='<%=progPect.elementAt(c)%>' onFocus="<%=pc.chkBreakdown(wp.elementAt(c),ln.elementAt(c),la_no);"></td>
and this pc.chkBreakdown function is location at class file.
and this function does return an boolean, either true or false.
if return value is true, then link to the other page.
how to write the code at the onFocus statement there...plz help..

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
applicationComplete="functionName()">
or you could trigger it on creationComplete event, or initialize event;

Similar Messages

  • Call function within select statement

    Hi
    I would appreciate if someone help me with the below package. I need to call the function in my select statement and have to insert the results into the table
    Thanks in advance
    Regards
    Sriram
    create or replace package my_tables
    AS
    procedure pop_staff_info_tab;
    -- FUNCTION get_emergency_contact(pn_person_id IN NUMBER);
    end my_tables;
    create or replace package body pop_staff_info_tab
    is
    cursor crs_pri_staff is
    select
    papf.party_id
    ,papf.person_id
    ,papf.employee_number
    ,papf.first_name
    ,papf.middle_names
    ,papf.last_name
    ,papf.known_as
    ,papf.full_name
    ,papf.previous_last_name
    ,papf.title
    ,get_emergency_contact(pn_person_id) as PRIMARY_EMERGENCY_CONTACT_NAME
    from per_all_people_f papf
    where trunc(sysdate) between papf.effective_start_date and
    papf.effective_end_date;
    procedure pop_staff_info_tab is
    begin
    for my_cursor_staff in crs_pri_staff
    loop
    insert into staff_info
    PARTY_ID
    ,PERSON_ID
    ,EMPLOYEE_NUMBER
    ,FIRST_NAME
    ,MIDDLE_NAME
    ,LAST_NAME
    ,PREFERRED_NAME
    ,FULL_NAME
    ,PREVIOUS_LAST_NAME
    ,TITLE_CODE
    ,PRIMARY_EMERGENCY_CONTACT_NAME
    values
    my_cursor_staff.party_id
    ,my_cursor_staff.person_id
    ,my_cursor_staff.employee_number
    ,my_cursor_staff.first_name
    ,my_cursor_staff.middle_names
    ,my_cursor_staff.last_name
    ,my_cursor_staff.known_as
    ,my_cursor_staff.full_name
    ,my_cursor_staff.previous_last_name
    ,my_cursor_staff.title
    ,my_cursor_staff.PRIMARY_EMERGENCY_CONTACT_NAME);
    end loop;
    end pop_staff_info_tab;
    FUNCTION get_emergency_contact(pn_person_id IN NUMBER)
    RETURN VARCHAR2 IS
    lv_emergency_contact_name VARCHAR2(2000);
    BEGIN
    SELECT ppf.full_name
    INTO lv_emergency_contact_name
    FROM per_person_types_tl pttl
    ,per_person_types pt
    ,per_all_people_f ppf
    ,per_contact_relationships con
    ,hr_lookups hl
    WHERE con.contact_person_id = ppf.person_id
    AND ppf.person_type_id = pt.person_type_id
    AND pt.person_type_id = pttl.person_type_id
    AND pt.user_person_type = 'Emergency Contact'
    AND con.contact_type = hl.lookup_code
    AND hl.lookup_type(+) = 'CONTACT'
    AND con.contact_type = 'EMRG'
    AND con.primary_contact_flag = 'Y'
    AND trunc(SYSDATE) BETWEEN
    nvl(con.date_start,
    trunc(SYSDATE) - 1) AND
    nvl(con.date_end,
    trunc(SYSDATE) + 1)
    AND
    trunc(SYSDATE) BETWEEN nvl(ppf.effective_start_date,
    SYSDATE - 1) AND
    nvl(ppf.effective_end_date,
    SYSDATE + 1)
    AND con.person_id = pn_person_id;
    RETURN lv_emergency_contact_name;
    END get_emergency_contact;*/
    END my_tables;

    hi,
    You don't have to call the function inside the select statement. You can do as below:
    procedure pop_staff_info_tab is
    m_emrncy_cntct varchar2(1000); /*Added by Sri_Raghav*/
    begin
    for my_cursor_staff in crs_pri_staff
    loop
    m_emrncy_cntct := get_emergency_contact(my_cursor_staff.person_id); /*Added by Sri_Raghav*/
    /* This above memory varaible(m_emrncy_cntct) can be used to insert into ur new table */ /*Comment added by Sri_Raghav */
    insert into staff_info
    PARTY_ID
    ,PERSON_ID
    ,EMPLOYEE_NUMBER
    ,FIRST_NAME
    ,MIDDLE_NAME
    ,LAST_NAME
    ,PREFERRED_NAME
    ,FULL_NAME
    ,PREVIOUS_LAST_NAME
    ,TITLE_CODE
    ,PRIMARY_EMERGENCY_CONTACT_NAME
    values
    my_cursor_staff.party_id
    ,my_cursor_staff.person_id
    ,my_cursor_staff.employee_number
    ,my_cursor_staff.first_name
    ,my_cursor_staff.middle_names
    ,my_cursor_staff.last_name
    ,my_cursor_staff.known_as
    ,my_cursor_staff.full_name
    ,my_cursor_staff.previous_last_name
    ,my_cursor_staff.title
    ,my_cursor_staff.PRIMARY_EMERGENCY_CONTACT_NAME);
    end loop;
    end pop_staff_info_tab;

  • Call function with select arguments

    Hi Gurus,
    I have problem to call function inside select statements as follow:
    select a.ID_ELE2, a.ID_ELE3, a.DT_FIS_YR, c.NU_FIS_PER, c.dt,
    (case
    when c.ld is null then
    GET_LD_CHECK (a.DT_FIS_YR,c.NU_FIS_PER, a.ID_ELE3, a.ID_ELE2) -- 1
    -- GET_LD_CHECK ('2009',7, '8010', '7493') --- 2
    else
    c.ld
    end ) description
    from ACCOUNT a, TRANSACTION c
    where a.DT_FIS_YR ='2009'
    and a.ID_ELE3 <> '0000'
    and c.TY_SRC not in ('CL', 'CN')
    and a.DT_FIS_YR = c.nu_fis_yr
    and a.AK = c.AK_FGCHAR
    and trim(a.ID_ELE3) ='8010'
    and c.NU_FIS_PER <> 14
    order by 1,4,5,6
    the 1 doesn't output result but the 2 it does! How can pass the select result to the function?
    Thanks in advance for your help.
    Ben

    The statement / function call seems to be ok. So there are not much chances left for your call to return different (=non) values.
    1) It could be that you have different values in the column then during your test call.
    2) Maybe your function raises an error and that error is supressed in some ugly WHEN OTHERS EXCEPTION => Solution: Get rid of the error handler.
    3) datatype conversion. For example if a.dt_fis_yr is a number value, then you should test with number values and not with strings. GET_LD_CHECK (2009,7, '8010', '7493'). Same logic goes for the other paramters, make sure the datatype is correct and matches the function parameter.

  • Call C function in SQL statement

    dear all
    I want to know how i can call C function in SQL statement where clause

    http://asktom.oracle.com/pls/ask/f?p=4950:8:80100593788949622::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:934029542973

  • Unable to call local function in select statement.

    Hi all,
    I am unable to call the local function in select statement in below scenario.
    DECLARE
    l_cnt NUMBER;
    FUNCTION FUN1 RETURN NUMBER
    AS
    BEGIN RETURN 2;
    END;
    BEGIN
    SELECT FUN1 INTO l_cnt FROM DUAL;
    DBMS_OUTPUT.PUT_LINE(l_cnt );
    END;
    /Any alternate way to call local function in select statement?
    Thanks
    Ram.

    Hi,
    Sorry, you can't call a locally defined function in a SQL statement, even if that SQL statement is in a PL/SQL block where the function is in scope.
    This applies to packages, also. If a function is not declared in the package spec, but only in the package body, then you can't call it from SQL statements in the package body.
    Why do you want a locally defined function? Why not a function defined outside the procedure?

  • Error in call function statement

    hi,
    i have defined a function with one of the "tables" parameter as shipto_xxx.
    in my calling prorgam , i say
    call function "zzzz"
    tables
        shipto_xxx = yyy.
    where yyy is a similar structure to hold the data received by the function module.
    when i compile i get the error "The field shipto_xxx is unknown but there is a similar field " *shipto_xxx".
    why ?

    Hi Micky,
    Here we go. Main program logic...
    DATA: BEGIN OF *uuu OCCURS 0,
            xxx            LIKE vbap-xxx,
          END OF *uuu.
    DATA: BEGIN OF *shipto OCCURS 0,
            vbeln            LIKE likp-vbeln,
            adrnr            LIKE vbpa-adrnr,
          END OF *shipto.
    TYPES: BEGIN OF t_xxx,
            vbeln            LIKE vbrp-vbeln,
            vgtyp            LIKE vbrp-vgtyp,
          END OF t_xxx.
    DATA *vvv TYPE SORTED TABLE OF t_xxx
               WITH HEADER LINE
               WITH NON-UNIQUE KEY vbeln.
    CALL FUNCTION 'ZZZZ'
      TABLES
        UUUU     = *uuu.
        VVVV               = *vvv.
        SHIPTO        = *shipto.
    Here I am trying to call the RFC function which will interface with XI and pull the data from another SAP system and get me the results in the two internal tables, i.e. *vvv and *shipto. The internal table *uuu acts as input data which will be passed to XI and thru that to another sap system.
    Now the FM "ZZZZ" has been created based on the relevant structures created in SE 11. and these have been included in the TABLES tab of the function.
    so i have created 3 structures zuuu, zshipto and zvvv in SE11 similar to the code above and included the same in the function udner the tables tab. no import / export parameters have been set. and no code in the FM. this FM is dummy and is used just to pass the data and retrieve the data from other sap system.
    the basic thing is send an internal table of values and receive multiple internal table of values. hope i am clear...please let me know how to proceed. thks

  • What is the use of CALL FUNCTION MODULE - AT BACKGROUND TASK?

    Hi experts,
    I found Call functional module in background task will make the FM run at the next commit work as some people said. So I have some questions:
    1 if we use COMMIT WORK commend, the pending FM will be called? If there are several FMs called at background task, what is the sequence of them? How many conditions will trigger the running of these FMs?
    2 Where can I find the log of this pending FMs? In SAP library, it says there are 2 tables. But I checked these tables and can only find the FM name and user of it. And I can not understand content of these tables. It seems one is for the main information of FM, and the other is for the data of the FM, maybe the parameters.
    3 If I call a FM in this way, Can I canncel it before the next commit work in some way?
    Finally, thanks for reading and help.

    HI,
    When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
    If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

  • PL/SQL Function in Select statement

    Hi
    I am calling a function in select statement. The query works in Toad and PL/SQL developer except SQL plus and disconnecting Oracle connection.
    The error is “ERROR at line 1: ORA-03113: end-of-file on communication channel”.
    When I called the same query from BC4J View Object the error message is “java.sql.SQLException: No more data to read from socket”.
    Can any one advise me please?
    Thanks
    Srini

    Srini
    I've seen similar cases in the past with 9.2.0.x (x <= 5). What Oracle version are you using? It's worth checking the bug database (I can't just now - I don't have a valid support id in my current contract). And as Warren says, post your SQL query.
    HTH
    Regards nigel

  • How to run functions when changing states?

    Hi everybody
    I want to run function when changin states
    For example I change my state and write something on Panels title and when this state appears i want to read my title and to do smth
    How can I do it. Where is my mistake?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
        width="340" height="250"
        layout="absolute"
    currentStateChange="StateChangez();">
    <mx:Script>
    <![CDATA[
    public function StateChangez():void
    if (currentState=='a')
    //Alert.show('a');
    if (Panel1.title=='New')
    Alert.show('New');
    else
    Alert.show('Edit');
    else
    Alert.show('b');
    ]]>
    </mx:Script>
    <mx:states>
      <mx:State name="a">
       <mx:RemoveChild target="{button1}"/>
       <mx:RemoveChild target="{button2}"/>
       <mx:AddChild position="lastChild">
        <mx:Panel x="0" y="40" width="340" height="210" layout="absolute" id="Panel1">
        </mx:Panel>
       </mx:AddChild>
       <mx:RemoveChild target="{button3}"/>
      </mx:State>
      <mx:State name="b">
       <mx:RemoveChild target="{button2}"/>
       <mx:RemoveChild target="{button1}"/>
       <mx:RemoveChild target="{button3}"/>
       <mx:AddChild position="lastChild">
        <mx:Label x="10" y="222" text="b"/>
       </mx:AddChild>
      </mx:State>
    </mx:states>
    <mx:Script>
      <![CDATA[
       import mx.controls.Alert;
      ]]>
    </mx:Script>
    <mx:Button label="New" x="10" y="10" id="button1" click="currentState='a';Panel1.title='New';"/>
    <mx:Button x="68" y="10" label="Edit" id="button2" click="currentState='a';Panel1.title='Edit';"/>
    <mx:Button x="10" y="218" label="b" click="currentState='b';" id="button3"/>
    <mx:Button x="265" y="10" label="Read" click="StateChangez()"/>
    </mx:Application> 
    Message was edited by: AtomicRussian

    Hi,
    I think your event handler "StageChangez()" is called before your Panel title is set. Try first change title, then change currentState.
    Oh yes my mistake, you are adding it when state changes. You can put your Panel's title change in StageChangez() and after that you can do some actions.
    Regards,
    Adrian
    Message was edited by: AdrianWiecek

  • CALL FUNCTIONS

    HI ALL
    WHERE CAN I FIND ALL THE FUNCTION MODULES USED IN ABAP AND I ALSO NEED EXPLANATIONS ....CAN ANYONE HELP
    WITH REGARDS
    VIJAY

    Hi,
    You can use the table TFDIR  to see all the fun modules in ABAP.
    see the doc  and links for further details
    Function Modules;
    Check this matter.
    Function Modules are Glopbal ABAP programs created by SAP for reusable purpose.they have IMPORT,EXPORT and TABLE parameters, and EXCEPTIONS to through when error occurs.
    You can create them from TCode SE37.
    Go through the following doc:
    Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
    Function Module Interfaces
    The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
    Syntax
    ... [IMPORTING parameters]
    [EXPORTING parameters]
    [CHANGING parameters]
    [TABLES table_parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...]
    The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
    Interface parameters
    The interface parameters are defined on the relevant tab pages in the Function Builder.
    IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
    EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for 'pass by value' is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
    CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
    TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
    The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
    The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
    Note
    For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
    RFC is a technology which is used to access a functions (Modules) from
    the remote systems.
    If a function module is set as remote enabled which can be access from
    the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
    A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
    But Normal function modules can not accessd from the remote system.
    Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
    Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
    CALLING A FUNCTION MODULE:
    1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
    --> Write the Corresponding FM name --> Hit Enter
    2)The appropriate import ,export Parameters will be displayed in ur editor
    3)Pass the Values Here.
    Also check these links.
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    reward if useful
    regards,
    Anji

  • Simulation model which call functions in an other dll...

    I have a C simulation model that I implement like NI Model Framework template (NI_VStand_Model_Framework_Guide.pdf ). If I use this simple model I can deploy on my PXI. But I must call functions which are in an other dll. When I call functions in other DLL I can't deploy because Veristand specify that the model is not compatible.
    NI VeriStand: The specified compiled model is not compatible with NI VeriStand.
    =========================
    NI VeriStand: NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi >> NI VeriStand Engine.lvlib:VeriStand Engine.vi >> NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi >> Model Execution.lvlib:Initialize Model Loop Data.vi >> SIT Model API.lvlib:Initialize Model.vi >> SIT Model API.lvlib:Load Model DLL.vi
    <append>=========================
    NI VeriStand: Failed to load c:\ni-rt\NIVeriStand\Models\LD1_T1.dll
    If I use DLL Checker there is no bad import.  How to add a simulation model in veristand which call function in an other DLL?

    Thank you for your answer.
    I know how to import a dll in veristand. My Dll  is LD1_T1. I can import it in Veristand without error. But this DLL depends of an other dll (addition.dll) as you can see in the print screen.
    When I try to deploy to my PXI I have an error message of compatibility. 
    NI VeriStand: The specified compiled model is not compatible with NI VeriStand.
    =========================
    NI VeriStand: NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi >> NI VeriStand Engine.lvlib:VeriStand Engine.vi >> NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi >> Model Execution.lvlib:Initialize Model Loop Data.vi >> SIT Model API.lvlib:Initialize Model.vi >> SIT Model API.lvlib:Load Model DLL.vi
    <append>=========================
    NI VeriStand: Failed to load c:\ni-rt\NIVeriStand\Models\LD1_T1.dll
    For LD1_T1.dll I have use NI Model Framework template (NI_VStand_Model_Framework_Guide.pdf ).
    If I check my Dll with dll checker it's ok but I can't deploy. 
    Please somebody have an idee to deploy my model ?

  • Call Function in Background Task

    Hi all,
    I have written a method in which I call a function in background task, I would like to perform a task after the function has ended succesfully. this is possible with the addition PERFORMING 'next_task' ON END OF TASK.
    This is sadly not possible in a global class.
    How can I get info back on the state of the function in the background?
    greetings Fred.

    Hi,
       try using export import statement in FM
       call function ...
        flay = 'Y'.
        export flag to memory id 'TESt'
       endfunction
        import flag from memory id 'TEST'.
        if flag = 'Y'.
          perform next_task.
          endif.
    Regards
    amole

  • Calling Function Module RV_ORDER_FLOW_INFORMATION in a Loop!

    Hi Guys,
    I need to fetch SD document Flow data into Bw for which I have created an Extractor using function modules. I am using a Standard FM  "RV_ORDER_FLOW_INFORMATION" which is called in the LOOP as below.
    LOOP AT VIT_VBRK INTO VFL_VBRK.
        CLEAR VBCO6.
        VBCO6-MANDT = SY-MANDT.
        VBCO6-VBELN = VFL_VBRK-VBELN.
        REFRESH TVBFA_TAB[].
        CLEAR TVBFA_TAB.
    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
      EXPORTING
       AUFBEREITUNG        = '2'
       BELEGTYP            = VFL_VBRK-VBTYP
        COMWA               = VBCO6
       NACHFOLGER          = 'X'
       N_STUFEN            = '50'
       VORGAENGER          = 'X'
       V_STUFEN            = '50'
    IMPORTING
       BELEGTYP_BACK       = BELEG_TYP
      TABLES
        VBFA_TAB            = TVBFA_TAB
    EXCEPTIONS
       NO_VBFA             = 1
       NO_VBUK_FOUND       = 2
       OTHERS              = 3
    IF SY-SUBRC <> 0.
    ENDIF.
    *OTHER CODE LOGIC*
    ENDLOOP.
    Now the problem is if I run this only once, i.e VIT_VBRK having only 1 document, the result I get is correct. However, if this same code is run in a LOOP with many different values in VIT_VBRK, the first Loop gives correct values and all subsequent values (value of TVBFA_TAB- RFMNG to be precise) are incorrect.
    I am guessing this is b'coz of some internal tables and work areas specific to the function module are not refreshed and the values of earlier iterations are adding up in the subsequent runs. can any one tell me if theres any specific 'REFRESH' statement or FM to be called before calling this FM.
    Thanks in Advance,
    Parth Shah.

    Hi Matt,
    I debugged the Function module like u said in 2 different Session, what I found was that there is a yet another function module called with in the FM RV_ORDER_FLOW_INFORMATION, i.e "GET_HANDLE_SD_DOCUMENTFLOW_SP" heres what the code in this FM looks like.
    FUNCTION GET_HANDLE_SD_DOCUMENTFLOW_SP.
    *"Lokale Schnittstelle:
    *"  EXPORTING
    *"     REFERENCE(HANDLE) TYPE REF TO  IF_EX_BADI_SD_DOCUMENTFLOW
    *"     VALUE(ACTIVE) TYPE  XFELD
    IF L_HANDLE_SD_DOCUMENTFLOW IS INITIAL.
        CALL METHOD CL_EXITHANDLER=>GET_INSTANCE
          IMPORTING
            ACT_IMP_EXISTING = BADI_SD_DOCUMENTFLOW_ACTIVE
          CHANGING
            INSTANCE         = L_HANDLE_SD_DOCUMENTFLOW
            EXCEPTIONS
            OTHERS           = 1.
        IF NOT SY-SUBRC = 0.
          CLEAR BADI_SD_DOCUMENTFLOW_ACTIVE.
        ENDIF.
      ENDIF.
      HANDLE = L_HANDLE_SD_DOCUMENTFLOW.
      ACTIVE = BADI_SD_DOCUMENTFLOW_ACTIVE.
    ENDFUNCTION.
    the only difference I found in the two sessions was that L_HANDLE_SD_DOCUMENTFLOW  is initial in the first run and then in all subsequent run its value remains the same, while in fact it should reset. Sadly there is no REFRESH procedure / Subroutine for it.
    Any idea how i can refresh it, or may be by-pass this check (IF L_HANDLE_SD_DOCUMENTFLOW IS INITIAL) ?
    Edited by: shahparth on Feb 17, 2011 8:39 AM

  • Call function moduel in STARTIG NEW TASK

    Hi All,
    I am calling a custom function module using " <b>starting new task</b>
      call function 'Y_CT_EVENT_TRIGGER'
        starting new task yscchdr-docno
        exporting
          event   = v_event
          objtype = c_yct
          ntime   = v_ntime
        tables
          xyctc   = i_yct_p.
    I am calling this function module in a Loop statement
    I like know how we can find the previous call has been completed or not?
    ie Within the loop i am processing first record and calling this function module, then i am going to second record . before calling this function module for second record i want to know the first record call is completed or not?
    Thanks for your help.
    aRs

    Do like this and try..
    Add one more field to ur internal table with name STATUS(20).
    LOOP AT ITAB
      * call the FM here
      IF SY-SUBRC EQ 0.
        ITAB-STATUS = 'Completed'.
      ELSE.
        ITAB-STATUS = 'Not Completed'.
      ENDIF.
    MODIFY ITAB INDEX SY-TABIX TRANSPORTING STATUS.
    ENDLOOP

  • Call Function in Web Dynpro

    Hi all, does anyone know how to call function 'RH_GET_DATE_DAYNAME' in WDDOINIT?
    Regards,
    YC

    Hi YC,
    see.. for example you have some FM or BAPI or Class method already there, now that you want to use in webdynpro,
    so by using SERVICE CALL option you can use this.
    Generally, WD is MVC pattern, so bussiness logic statements like SELECT, MODIFY, INSERT like commands directly
    not use in webdynpro methods, for this we create any FM or Class method and use those FM in webdynpro using
    SERVICE CALLS.
    Check this example for your understand..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/WebdynproApplicationtocalltwoBAPIsfordisplayingtheFlightdetailsusingtab+strips
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600?quicklink=index&overridelayout=true
    And read this..
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a189b0ee583b8be10000000a421937/frameset.htm
    ->using CALL FUNCTION you can call any FM in webdynpro abap.. same works with pattern too.
    Cheers,
    Kris.
    Edited by: kissnas on Mar 9, 2011 7:00 AM

Maybe you are looking for

  • Google Play Music and SD Card not possible?

    Good morning, Google launched the Play Music All Access in Germany last night, also the newest version of the Play Music App. On the Xperia Z1 there is the new "Save to SD Card" option, but not on the Tablet Z. Is this a only a problem on my Tablet Z

  • Photos Lost resolution when transferred to DVD using iDVD

    I am new to the iMac and I created a slideshow with pictures imported to iPhoto. When you see the slideshow in the DVD, the photos look awful. Very low resolution. Is there any setting that can help me to improve photo resolution when I create a slid

  • Pdfs not saving in color

    Hey all, I just upgraded to CS6 and all of a sudden when I'm saving files as PDFs they save as grayscale (no colour). Any idea what's causing this? Please let m know! Thanks in advance. Cheers Jon

  • Can Acrobat XI be installed on a Windows PC where CS4 (which includes Acrobat Pro 9) is installed?

    Can Acrobat XI be installed on a Windows PC where CS4 (which includes Acrobat Pro 9) is installed? I have previously been told by Adobe tech support that the applications included in CS4 cannot be upgraded individually, and my guess would be that Acr

  • Which 10g release supports Solaris x86 version 10?

    Hi, I downloaded Oracle 10.1.0.3 for Solaris x86. When I installed it, I got error, saying I can only install this version on Solaris 9 x86. Do you have any idea which Oracle 10g version supports Solaris x86 version 10? Thanks L