About Supply Function

Hi , all
  1、There are two table, when select a record in the first table , the Second table
       is update automatic.
  2、The second table can be edited by user, when user select the other record
       in the first table, i update the second table data to context first.
  But when user select the other record in the first table, in this action,i can't get
  the data from the second table and update them to context.

Hi Pei,
   first go to context and create node say vbak which is a header table and then immediately create another node say - vbap with initialization,singleton checked  and supply function name say - Get_item  and then create the item attributes
Then create the respective attributes for the header table say vbeln, vbtyp,...etc.
Now write the logic to get the value of the header value in wdoint and also to get the item value in supply function.
It should work other wise (r)  i will send u the code samples
Regards
Sathish

Similar Messages

  • Supply function in webdynpro for abap

    Hi ,
            I have tree structure as below.
    1.      Node A
                   1.a      Node B
                       1.a.i    Node C
            I have declared method 'Method_A' as supply function for Node A.similarly
            I have declared method 'Method_B' as supply function for Node B.similary
            I have declared method 'Method_C' as supply function for Node C.
            When I am executing in debugging mode both 'Method_A' and 'Method_B' is triggering for initial display of tree. Without expanding Node A ,we are already getting the Node B data and storing in corresponding nodes. This is becoming performance issue as I am hitting database in those 3 methods. My problem is without expanding why that 'Method_B' supply function is
    triggering. Please let me know if you have any idea.
    Thanks,
    Suma

    The supply function is always get triggered even if you do not expand the parent node in tree.
    Reason: It fills the value to the child node based on parent's value.
    To avoid this, you can set teh condition as follows:
    In node B supply function, method_B:
    check the instance of parent node A here, and if that is not initial, then only hit the database for filling node B.
    In node C supply function, method_C:
    Check the instance of parent node B here, and if that is not initial, then only hit the database for filling node C.
    This is the only possible solution one can think of.

  • SUpply function in Web Dynpro ABAP

    I have 2 views - an INPUTVIEW and a DISPLAYVIEW.  I created 2 nodes in the component controller - INPUTNODE and TABLENODE.  In the INPUTVIEW, I mapped INPUTNODE of the component controller and in the DISPLAYVIEW, I mapped both the nodes of the component controller. I need to enter a value in the first view and the corresponding result should be displayed in the second view. I wrote the code in the supply function of the TABLENODE of the component controller. When i enter a value for the first time, the result is being displayed fine in the 2nd view.  But even if i go back and select another value in the INPUTNODE, the result is still the same.  Only if i refresh the 1st view, the result is changing.
    This is the code i wrote in the supply function of the TABLENODE of the component controller.
    data:   inputnode type ref to if_wd_context_node,
            tablenode type ref to if_wd_context_node,
            covalue   type string,
            itab_st  type standard table of zstate.
    inputnode = wd_context->get_child_node( name = 'INPUT_COUNTRY').
    inputnode->get_attribute( exporting name = 'zzco' importing value = covalue ).
    select * from zstate into table itab_st
    where zzco = covalue.
    tablenode = wd_context->get_child_node( name = 'DISPLAY_STATE' ).
    tablenode->bind_elements( itab_St ).
    Any ideas appreciated.  Thanks in advance.

    Hello,
    the supply method runs only when the node is invalid
    this is the case when you start your application.
    solution
    1. You can make the node invalid with the   method "INVALIDATE" in the method which is triggered by your back button.
    2.Don't use the supply method use the method which belongs to the inbount-plug called handle......
    3. You can change th lifetime in property of the view from
    "framworkcontrolled" to "when visible"
    Klaus
    Message was edited by: Klaus Helfrich
    Message was edited by: Klaus Helfrich

  • Problem in triggering the Supply Function

    Hi Experts,
    I am developing one web dynpro application to display the records in MARA table.
    I have created a radio button.Logic is if radio button is selected then displaying of the record should be done.
    NODE_PARENT consists of   NODE_CHILD ( which consists of fields to be displayed ) and key holder ( attribute which is used to check whether radio button selected or not ).
    In radio button properties i used selected key as attribute of the node NODE_PARENT.
    Now in supply function i am reading the parent element attributes i.e. radio button and checking if it is selected then read the data from MARA and bind it.
    But i am getting the runtime error 
    "  Context binding of property SELECTED_KEY cannot be resolved: Node MAIN.1.NODE_PARENT does not contain any elements "
    what is the reason for this error.
    Thanks in advance.

    Hi Kissnas and other experts ,
    Here is the code.
      DATA lo_nd_node_parent TYPE REF TO if_wd_context_node.
      DATA lo_el_node_parent TYPE REF TO if_wd_context_element.
      DATA ls_node_parent TYPE wd_this->element_node_parent.
      DATA lv_keyholder LIKE ls_node_parent-keyholder.
      DATA itab TYPE TABLE OF mara.
    navigate from <CONTEXT> to <NODE_PARENT> via lead selection
      lo_nd_node_parent = wd_context->get_child_node( name = wd_this->wdctx_node_parent ).
    @TODO handle not set lead selection
      IF lo_nd_node_parent IS INITIAL.
      ENDIF.
    get element via lead selection
      lo_el_node_parent = lo_nd_node_parent->get_element(  ).
    @TODO handle not set lead selection
      IF lo_el_node_parent IS INITIAL.
      ENDIF.
    alternative access  via index
    lo_el_node_parent = lo_nd_node_parent->get_element( index = 1 ).
    @TODO handle non existant child
    IF lo_el_node_parent IS INITIAL.
    ENDIF.
    get single attribute
      lo_el_node_parent->get_attribute(
        EXPORTING
          name =  `KEYHOLDER`
        IMPORTING
          value = lv_keyholder ).
      IF ( lv_keyholder EQ 'X'  ).
        SELECT matnr ersda ernam FROM mara INTO CORRESPONDING FIELDS OF TABLE itab." WHERE mandt  = sy-mandt.
      ENDIF.
    bind all the elements
      node->bind_table( itab ).
    *lt_node_table->bind_table( itab ).
    I have written this code in supplyfunction GET_DATA.
    Regards
    Ravindranath CH

  • Documentation about this function module

    ineed Documentation about this function module RP_ANSAL_FROM_PERNR

    Hi Avinash,
    Have a look at the function group program documentation.It gives an idea of what the function module does.
    Short text
    Annual Salary Functionality (ANSAL)
    Description
    This function group contains different functionality for calculating the annual salary, and calculating a period salary from the annual salary.
    The function group evaluates different tables and features:
    Tables
    T503      defines whether an employee is paid on an
              hourly basis or per period
    T510W     defines the time unit
    T511      determines the relevant module from the annual
              salary wage type, rounding, etc.
    T539J     defines the valid wage types for calculating 
              the annual salary
    Features
    ANSAL     defines the annual salary wage type
    PFREQ     number of periods per year
    Old U510F -> use T510F ?
    Thanks
    Lakshman

  • Use of supply function and WDCopyService..

    Hi,
    Thank you for ur help on WdCopyService to copy node elements..
    This is current scenario n requirement is:-
    1. I have a RFC (model node) that returns 20 transactions on each "Load next" button click.
    2. Now using output data of this model node, a context node "Transaction" is populated. A Supply function "SupplyTransaction" is used for this purpose.
    3. This "Transaction" node has further subnodes and these are used to fill up several tables in view.
    3. What i want to do is, Transaction node elements which were previously added using supply function should be retained. The next new 20 elements should get added to it.
    What are the possible ways to do this? 
    Pls help me as soon as possible..
    Regards,
    Amey

    HI Amey
    I think for the result that u want to achieve, u shud nt use supply function.
    I ll suggest u to use the same logic that u ve written in the supply function to be written immediately after u get data in your output model node.
    Try this.
    I hope it solves your problem.
    Regards
    Kapil S Kamble

  • Oracle Payables report showing details about Suppliers and balance

    Hello,
    I am working in Oracle 11i environment.
    I am looking for a report that shows the details about Suppliers, their Invoices and the balances that exist for those suppliers. And the total invoice amount.
    Which report should I run in the Oracle Applications.
    Thank you

    Hello Octopus,
    Yes, I have run the Trial Balance report. but it is just showing the Liability account, Invoice AMount and the remaining amount columns only. I dont have any other details on the report.
    The details of the reports are something like this.
    Liability Account Invoice Amount Remaining Amount
    01-000-2210-0000-000 9,xxx,xxx.xx 9,xxx,xxx.xx
    ================== ==================
    Total for Report : 9,xxx,xxx.98 9,xxx,xxx.xx

  • NEED INFORMATION ABOUT "MAX_TEST" FUNCTION MODULE

    HI ABAPERS,
                      I need information about "MAX_TEST" function module . this function module is used in 4.6 version , now system have been shifted to 6.0.....here in 6.0 version this function module is not prasent.can any one tell me which new function module we can use in place of this function module, without changing the functionality........
             Thanks in advance
    regards,
    SUNIL

    The module is not very sophisticated. Profficiency in Java or ABAP will be a great bonus here. There are plenty of good materials regarding XI on SDN. I suggest to start with step-by-step guides and master all basic integration scenarios
    http://wiki.sdn.sap.com/wiki/display/XI/Step-by-Step+Guides
    Opportunities in industry are not bad also, cause PI is rather popular among customers. The best thing is that it fits any type of customer's business. Integration is demanded almost everywhere.

  • About CallByteMethodA Function

    Hi you all:
    I have some problem about CallByteMethodA function.
    This is what my java code looks like:
    public void setDS_INFO_mac(byte[] mac) {
    for( int i = 0; i < mac.length; ++i ) {
    this.ds_info.mac[i] = mac;
    This is what my c code looks like:
    jobject objref;
    jclass cls = NULL;
    jfieldID fid = NULL;
    jmethodID mid = NULL;
    jbyte dsMac[6];
    jbyteArray returnArray = 0;
    /* code not pertaining to this question snipped. */
    mid = env->GetMethodID(cls, "setDS_INFO_mac", "([B)V" );
      for( int j = 0; j < 6; ++j ) {
          dsMac[j] = search_Info[i].ds_info.mac[j];
    returnArray = env->NewByteArray(6);
    if( returnArray != NULL ) {
    env->SetByteArrayRegion(returnArray, 0, 6, (jbyte*)dsMac);
    env->CallByteMethodA(objref, mid, (jvalue*)returnArray);
    env->DeleteLocalRef(returnArray);
    This is not working.
    and, some about run time exception as follows:
    Exception in thread "main" java.lang.NullPointerException
    at CFGINFO.setDS_INFO_mac(DSCIStructure.java:97)
    at DSCIJNInterface.dsc_EnumSearch(Native Method)
    at MainApp.searching(MainApp.java:105)
    at MainApp.main(MainApp.java:46)
    Any idea what I'm doing wrong?

    You are missing error checking code. Many calls to the JNI interface require that you check the method return value. Many calls also require that java exceptions must be checked for after the call.

  • Calling supply function

    Hi
    Can we call supply function explicitly in any other method of the view using wd_this->supply function name( ) ?.
    In case the supply function is local to the view and when it is defined in component controller ?

    hi vishal........
          you cannot call supply function explicitly.......
          what you can do is.... invalidate the node that has the supply function. so the supply function will be called again.
    ---regards,
       alex b justin

  • Use Of SUPPLY Function & Singletone Class?

    Hi,
    What is the Use of Supply Function & What is Sigletone Class?
    Thanks
    Ranveer

    Hi Ranveer,
    Each context node of a controller can be assigned a supply function. This supply
    function is called by the runtime when the data of the context node is used. This is the case
    when a UI element is to be displayed for the first time with the data of the corresponding
    context.
    In general, the supply function is called when one or more elements of a context node are
    accessed and when
    &#9679; the context node is not filled yet or is initial, or
    &#9679; the context node has been invalidated in a previous step.
    Supply Functions of Singleton Nodes
    The supply function is especially useful in combination with singleton nodes.The
    values of subnode elements of the type Singleton depend on the element of the parent node
    to which the lead selection is currently assigned. If the lead selection is changed by the user,
    the supply function can access the new lead selection element and recalculate the values of
    the subnode elements accordingly.
    You can only create such a view when the lead selection element of the node
    CARRIER_NODE is read in the supply function of the node CONNECTION_NODE:
    For eg:
    method GET_CONNECTIONS .
    data: CARR_ATTR type IF_MAINVIEW=>ELEMENT_CARRIER_NODE,
    FLIGHTS type SPFLI_TAB.
    get filled structure for parent node
    PARENT_ELEMENT->GET_STATIC_ATTRIBUTES( importing
    STATIC_ATTRIBUTES = CARR_ATTR ).
    get connections from help class
    FLIGHTS = CL_WD_GET_SPFLI=>GET_FLIGHTS_BY_CARRID(
    CARRID = CARR_ATTR-CARRID ).
    NODE->BIND_ELEMENTS( FLIGHTS ).
    endmethod.
    Explanation:
    An internal variable of the type of a context element of the parent node
    CARRIER_NODE and another internal variable of the Dictionary type SPFLI_TAB are
    declared.
    &#9679; The attribute values of the lead selection element of the parent node CARRIER_NODE
    are then passed to the internal variable CARR_ATTR.
    For this transfer, each supply function uses the parameter
    PARENT_ELEMENT of the reference type IF_WD_CONTEXT_ELEMENT.
    PARENT_ELEMENT is a reference to the lead selection element of the parent node of
    the current node. The parameter is automatically displayed in the signature of the
    supply function.
    Each time the user selects another table element as the lead selection in the table Carrier,
    the value of the parameter PARENT_ELEMENT changes. The supply function of the context
    node CONNECTION_NODE is called and the values of its attributes are newly filled
    according to the selected table line in the table Carrier.
    Supply functions can only access context data that
    &#9632; is contained in the corresponding parent node or
    &#9632; is contained in another node that is on a next-highest level compared to
    the node filled by the corresponding supply function.
    Cheers,
    Mary

  • Specialty of supply function and  how can we use it efficiently?

    Hi Experts,
    I have one question.
    What exactly the function of “Supply function” for a node.
    Some says when ever lead change happens the “Supply function” triggers.
    I put a break point in Supply function say “ZSupply” written code to populate the table.
    It triggered only once to populate the table. If this is the functionality then I can write code in method and call it in modify view my checking it for first time why “supply function”.   I want to know what is its specialty, how can we use it efficiently?
    Thanks
    Gopal

    Hi Gopal,
    You are correct even without supply function you can achieve the same functionality i.e when ever there is a change in HEADER the corresponding ITEM for the HEADER can be displayed.
    But the idea of using SUPPLY Function is - the code written in the node i.e assume HEADER and ITEM relation gets executed as and when the node is instantiated in the run time where in there is no need us to handle it explicitly.
    If not used SUPPLY Function then we need to handle the complete HEADER and ITEM relation explicitly.
    Regards,
    Mohammed

  • Bind allowed if a node has a supply function or a supplying relation role

    Hello Context-exports,
    I am using NetWeaver CE 7.1 and have implemented a WebService TRCROOF with the following method:
    public void assign(List<TRPartDTO> trparts);
    The class TRPartDTO is defined as follows:
    public class TRPartDTO implements Serializable {
        BigDecimal idProject;
        BigDecimal idSynth;
        String traceIndex;
        String serialNo;
    I have imported the WebService into WebDynpro as Adaptive WS-Model.
    The wizard has built this context:
    Request_Assign
    ---Assign
    Trparts
    IdProject
    IdSynth
    TraceIndex
    SerialNo
    ---Response_Assign
    In wdDoInit I call the following sequence, which works fine:
    TRCROOF_MODEL trcRoofModel = new TRCROOF_MODEL();
    Request_Assign request_Assign = new Request_Assign(trcRoofModel);
    Assign assign = new Assign(trcRoofModel);
    request_Assign.setAssign(assign);
    wdContext.nodeRequest_Assign().bind(request_Assign);
    Now I try to call the WebService-Method and to deliver a list to it:
    ITrparts_Assign_TRPartsElement newPart;
    Vector<ITrparts_AssignElement> partList = new Vector<ITrparts_AssignElement>();
    for (int ix = 0; ix < cnt; ix++) {
       newPart = wdContext.nodeTrparts()
                  .createTrparts_Element(
                       new TrPartDTO(trcRoofModel);
       newPart.setIdProject(...);
       newPart.setIdSynth(...);
       newPart.setSerialNo(...);
       newPart.setTraceIndex(...);
       partList.add(newPart);
    wdContext.nodeTrparts_Assign_TRParts().bind(partList);
    But when calling bind() I get an exception that essentially tells me:
    "calling bind is not allowed if a node has a supply function or a supplying relation role"
    Background info:
    My EJB defining the WebService implements another DTO-class named RoofDTO, which includes a List of TRPartDTO:
    public class RoofDTO implements Serializable {
        private List<TRPartDTO> trparts;
    But this class is not used in conjunction with the method assign().
    Nevertheless the wizard that imported the WebService-Model of course has
    defined a relation betweeen these classes.
    Could anybody explain the situation or even tell me how to fix my problem?
    Thanks for each hint,
    Christoph

    Oops,
    forget this silly question. In case that anybody else has such cranky trains of thoughts as me: Do it like this:
    Vector<TrPartDTO> partList = new Vector<TrPartDTO>();
    trcRoofModel = new TRCROOF_MODEL();
    for (int ix = 0; ix < ...; ix++) {
       partList.add(new TrPartDTO(trcRoofModel));
    wdContext.currentAssignTRPartsElement().modelObject().setTrparts(partList);
    Kind regards,
    Christoph

  • What is Supply Function, use of Supply function?

    Hi Guru's,
    Can you give a definition or description of Supply Function, and what is the use?
    Thanks,
    Pradeep.

    Hi Pradeep,
    Okay, conceptually you have understood it, that is good
    Hope you have also, visited this link
    Supply function with singleton concept | Webdynpro ABAP
    Then let us have a simple example to understand how it works.
    Let us say we have  parent node PNODE & child node CNODE
    PNODE node has 2 records and for each record CNODE has 3 records
    Whenever the data of PNODE is bound/changed, the supply function of CNODE executes. Hence, you are able to get the control during initialization.
    Now, if you have set the lead selection at line 2, i.e.  there is change to context PNODE, hence the supply function of CNODE triggers and it gets the reference of 2nd record in PARENT_ELEMENT inside supply function and based on this the child node data can be populated.
    Even, if you refresh node PNODE using method lo_pnode->INVALIDATE( ), the supply function of CNODE triggers.
    Hence, whenever there is change at PARENT'S context node, the supply function of its child node(s) gets called.
    Hope it gives little light on the supply function's  practical usage.
    Regards,
    Rama

  • Description about a function module O2_LANGUAGE_EXIT_FUNCTION

    Hi All,
    i want to know the description about the function module 'O2_LANGUAGE_EXIT_FUNCTION'. Please explain what is the functionality of this function module clearly.
    Thanks & Regards,
    Nagarjuna.

    hi,
    send me ur mail id ,
    i will send the pay roll related function moduls.
    and document relataed to pay roll.
    ramesh

Maybe you are looking for