Programmed Binding (Container IF)

Hello Everyone,
I was experimenting on Programmed Binding (Container IF) but I can't seem to make it work. I have had tried to refer the codes from the Programmed Binding (BOR Container) but to no avail.
Is there anyone who can guide me on this?

hi Liew
You can use programmed binding in a binding instruction. You can use programmed binding to create more complex assignments, such as:
·        Perform calculations or checks on container elements before assignment
·        Combine two or more container elements before assignment
You can implement a programmed binding as an ABAP class or a function module
You can use an ABAP class to implement the Container ® Container and Expression ® Expression bindings.
A binding that is implemented as an ABAP class is displayed in the list of binding statements as an enhancement and is visible in all Workflows. This type of ABAP class is therefore particularly suitable for making company-wide enhancements.
An enhancement such as this is completely integrated in the binding editor. You can implement you own checks for the class and choose the names and symbols to be used to display the enhancement in the binding editor.
Function module
You can use a function module to implement the Container ® Container binding.
A function module can use the BOR container interface or the container interface
The BOR container interface supports compatibility reasons. It is therefore advisable to use the container interface for new function modules for the following reasons:
·         The container interface has no restrictions with regard to data types. The BOR container does not support the following data types: REF TO, STRING, XSTRING, fields that are longer than 255 characters.
·         No data type conversions are required for the container interface. This improves performance.
for more info please go through the following link
http://help.sap.com/saphelp_nw2004s/helpdata/en/7c/b82bcd7b9611d194b80000e82dec10/content.htm
guess it will surely help
regards
ashish

Similar Messages

  • Programmed Binding (Container IF) - how to access source container data

    Hi,
    I have created a programmed binding (container IF) using a function module based on SWA_BINDING_TEMPLATE.
    I want to access an element (Meldung) based on BUS2078 (QM notification) from my source container and then retrieve the material from this element.
    When the element is a simple element such as WfInitiator for example I cant retrieve the value using the get method on the source container but when it is a complex element such as a BOR object it does not work. How can I retrieve such data.
    Thanks for your help,
    Emmanuel

    I finally found the answer last week, here is how I have done :
        DATA : l_matnr TYPE matnr.
        DATA : l_string TYPE string.
        DATA: lcx_container TYPE REF TO cx_swf_cnt_container.
        DATA: b_meldung TYPE swf_bor_object.
        TRY.
            CALL METHOD source_container->get
              EXPORTING
                name  = 'Meldung'
              IMPORTING
                value = b_meldung.
            swf_get_property b_meldung 'Material' l_matnr.
          CATCH cx_swf_cnt_elem_not_found .
            l_string = 'cx_swf_cnt_elem_not_found'.
          CATCH cx_swf_cnt_elem_type_conflict .
            l_string = 'cx_swf_cnt_elem_type_conflict'.
          CATCH cx_swf_cnt_unit_type_conflict .
            l_string = 'cx_swf_cnt_unit_type_conflict'.
          CATCH cx_swf_cnt_container INTO lcx_container.
            l_string = lcx_container->t100_msg.
        ENDTRY.
    Emmanuel

  • Event binding (Programmed Binding (Container IF))

    Hello WF gurus !
    I am currenlty trying to trace and debug a WF run and I am having difficulty to understand the binding mechanism of a "Wait for event" step in my workflow.  Here is the story:  Through its execution run, the WF encountered two "Wait for event" step based on the same BOR-Event (ex: BOR = ZISPROCES1 - Event = ABANDON ).  The first occurence is directly is the WF (we will call this WF: WF1) and the 2nd occurence is in a sub-workflow (WF2).  The 2 work items for those 2 "wait for events" steps were created in March 2010, obviously waiting for the same event to occur.  The ABANDON event occured in June 2010 trigerring the execution of both work items waiting for this event.
    When I look at the binding configuration of these "Wait for event" step (Popup screen: Display Binding From Event), I see the following:
    - Under "Workflow" column: Programmed Binding (Container IF)
    - Under "Event 'ABANDON' column: ZCONTAINER_BINDING_MAIL_ISIS
    When I click on the "Programmed Binding (Container IF)" buton, i get a popup screen titled: "Binding Instruction Display" with the following config:
    > Binding Instruction: Container --> Container: Programmed Binding (Container IF)
    > Exit Function Module: ZCONTAINER_BINDING_MAIL_ISIS
    When I look ath the FM ZCONTAINER_BINDING_MAIL_ISIS, I see that it uses three (3) import parameters:
    DATAFLOW_EVENT   TYPE SWA_DAFLOW
    SOURCE_CONTAINER TYPE SWFPARACNT
    TARGET_CONTAINER TYPE SWFPARACNT
    Assumption: Currently, from what I understand, the "Wait for event" step adds an object called "DELETOR" in the container of the workflow it belongs meaning that when the event will occur, the work item associated to these "Wait for event" steps will process and I should expect to have an object called "DELETOR" in the conainer of WF1 and WF2.
    The problem: When I look at my WF log using TCode SWI6, and I look at the container data for each step following the "Wait for event" step (SEND MAIL step), I notice that the WF1's "Send Mail" step container contains an instance of the object called "DELETOR" with data in it.  WF2's "Send MaiL" step also contains an object called "DELETOR" but with mention <No Instance> and I don't understand why...
    QUESTIONS:
    - Where can I see what are the values passed to the FM import parameters ?
    - Does anyone have an idea why in WF1's container, object "DELETOR" is instanciated and holds values and in WF2's container, there is an object "DELETOR" but is not instanciated.
    Edited by: PAQUEJO on Dec 2, 2010 10:04 PM

    Here is the code of FM ZCONTAINER_BINDING_MAIL_ISIS
    FUNCTION zcontainer_binding_mail_isis.
    *"*"Interface locale :
    *"  IMPORTING
    *"     VALUE(DATAFLOW_EVENT) TYPE  SWA_DAFLOW
    *"     VALUE(SOURCE_CONTAINER) TYPE  SWFPARACNT
    *"     VALUE(TARGET_CONTAINER) TYPE  SWFPARACNT
    *"  EXCEPTIONS
    *"      BINDING_ERROR
      INCLUDE <cntn01>.     " macros for accessing BOR objects and container
      INCLUDE <swfcntn01>.  " macros for accessing the new ABAP-OO-container
      TYPE-POOLS: swfbn.
      DATA: my_integer    TYPE        i.
      DATA: lcx_container TYPE REF TO cx_swf_cnt_container,
            l_msg         TYPE        swf_t100ms.
      DATA : l_creator(14).
      DATA : lo_usr01 TYPE swf_bor_object,
             lo_zis   type swf_bor_object.
      IF dataflow_event = swfbn_dataflow_export. " 'E'
    **** 'EXPORT' point of time. This could be:
    **** - workflow container to workitem container (before method call)
    **** - event container to workflow container (event receive or wf start)
    **** - workflow container to role container (before role resolution)
    **** always move data from source to target container
        TRY.
            CALL METHOD source_container->get
              EXPORTING
                name  = '_EVT_CREATOR'                          "#EC NOTEXT
              IMPORTING
                value = l_creator.
    *        ADD 17 TO my_integer.
            swf_create_object lo_usr01 'USR01' l_creator+2.
            CALL METHOD target_container->set
              EXPORTING
                name  = 'DELETOR'                               "#EC NOTEXT
                value = lo_usr01.
          CATCH cx_swf_cnt_container INTO lcx_container.
            l_msg = lcx_container->t100_msg.
            MESSAGE ID l_msg-msgid TYPE l_msg-msgty NUMBER l_msg-msgno
                    WITH l_msg-msgv1 l_msg-msgv2 l_msg-msgv3 l_msg-msgv4
              RAISING binding_error.
        ENDTRY.
      ELSEIF dataflow_event = swfbn_dataflow_import. " 'I'
    **** 'IMPORT' point of time. This could be:
    **** - from workitem container to workflow container (after method exec)
    **** - from workflow container to event container to (raise event)
    **** always move data from source to target container
        TRY.
            CALL METHOD source_container->get
              EXPORTING
                name  = '_EVT_CREATOR'                          "#EC NOTEXT
              IMPORTING
                value = l_creator.
    *        ADD 17 TO my_integer.
            swf_create_object lo_usr01 'USR01' l_creator+2.
            CALL METHOD target_container->set
              EXPORTING
                name  = 'DELETOR'                               "#EC NOTEXT
                value = lo_usr01.
            CALL METHOD source_container->get
              EXPORTING
                name  = '_EVT_OBJECT'                          "#EC NOTEXT
              IMPORTING
                value = lo_zis.
            CALL METHOD target_container->set
              EXPORTING
                name  = '_WI_OBJECT_ID'                               "#EC NOTEXT
                value = lo_zis.
          CATCH cx_swf_cnt_container INTO lcx_container.
            l_msg = lcx_container->t100_msg.
            MESSAGE ID l_msg-msgid TYPE l_msg-msgty NUMBER l_msg-msgno
                    WITH l_msg-msgv1 l_msg-msgv2 l_msg-msgv3 l_msg-msgv4
              RAISING binding_error.
        ENDTRY.
      ENDIF.
    ENDFUNCTION.

  • Programmed binding in workflow

    i had to do calculation with in programmed binding . can any one help me to do it .
    regards
    kamal

    Hello Kamal,
    I would not recommend programmed binding for this type of scenario. You would be binding e.g. a value of 10 from your BO and getting a value of 8 in your WF container. To say it would confuse anyone not familiar with the WF design would be putting it mildly.
    Create a new attribute <i>DiscountedValue</i> in your object where you can call your function module, and use that directly in your WF/task instead of a net value element.
    This is easier to develop and clearer to anyone viewing the WF, and also much easier to debug any problems as you can test the object and see the values. Programmed bindings should really only be used in rare cases if you have no alternatives.
    Hope that helps.
    Cheers,
    Mike

  • Read current workitem ID inside Programmed Binding code

    Hi Experts,
    In one of the workflow we have some approval steps (for FI documents), which creates items in Useru2019s inbox. Now we want to develop a report which shows how much time an approver has taken to approve a particular payment.
    SOLUTION APPROACH: The approach we had taken was to capture the workitem ID in a programmed binding of the task container, which can then provide the start and end timestamps (for the workitem ID and hence) of the approval step.
    ISSUE: The issue is the task container doesnu2019t have the recently generated workitem ID for the step. It gets populated to the task container after the programmed binding is executed. So, we are now stuck up as to how to read the workitem ID.
    Additional Information: While debugging I could find out that the workitem ID gets generated by the class CL_SWF_RUN_WIM_LOCAL in method CREATE_VIA_WFM. But it doesnu2019t get assigned to the task container until just after the CREATEWORKITEM_CONTAINER method which executes the binding operations. In short the programmed binding code gets executed just before the workitem ID is made available to be read and used. See the code snippets of the class below.
    The workitem ID gets generated in method CREATE_VIA_WFM.
    *- get next number
          l_wiid = _get_next_number( ).
          me->set_wiid( l_wiid ).
    The binding operations get executed a little late in the same method.
    *- set properties via method (with dependant data or default data)
          me->m_workitem_context = _create_workitem_context( ).
    The workitem ID gets assigned to the task container just 2 line after the above line.
          me->_set_workitem_container( im_check_oblig_parameters = 'X'
                                       im_container = l_container ).
          me->_set_workitem_object( ).
    I have already tried a number of generic workflow related classes (eg. CL_SWF_RUN_WIM_FACTORY), but couldnu2019t read this workitem ID.
    Any suggestions or pointers regarding this would be well appreciated.
    Thanks and Regards
    Barada

    Hi Karri,
                Thanks for the reply. Honestly I wasn't expecting someone to answer on a weekend.
    I had gone through the wiki section for programmed exits but wasn't very sure if that would help or not. Now after you suggested I am feeling a little more confident about going ahead with it. I was actual hoping someone would suggest that.
    About the question regarding the actual requirement, I want to capture the workitem ID of a decision step once it is created (even before executing).
    My earlier approach was obviously because my incomplete understanding of the use of programmed binding.
    Let me take a try with programmed exits and I will update the thread once I am done.
    Thanks
    Barada.

  • 'Program Files' contains an invalid character when installing iTunes 10.5

    I'm getting an error when I try to install iTunes 10.5: "The folder path 'Program Files' contains an invalid character". Nothing has changed on my machine, I don't see any invalid characters in the path where I'm installing iTunes, and I have now tried to install this manually. Any ideas how to proceed?
    Thanks!

    what was the answer to work around this error message..  i am having the same problem trying to unistall quicktime.. 
    thanks

  • TS3212 I keep getting this error message "The folder path 'Program Files' contains an invalid character.' when upgrading itunes to Itunes 10. I could not uninstall because of the same error message. What needs to done?

    Can not download and install Itunes 10 - Get this message "The folder path 'Program Files' contain an invalid character. I tried to uninstall my old Itune through Control Panel but get the same message. What do I need to do?

    Perhaps try the following user tip with that one:
    "not a valid short file name" and "invalid character" install errors

  • ITunes fails to install update "folder path program files contains an invalid character"

    I'm trying to get the newest version of itunes, but I keep getting "the folder path program files contains an invalid character." I've seen on here before attempts to use Microsoft fix it and Windows Clean up which I've tried and both haven't helped. I've gone to youtube and tried to delete the appropriate folders under the registry edit. Nothing seems to work. I need the new itunes to update my iphone because of the recent hardware crash via the new update.

    At what stage in the process does this occur?
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • ITunes Update attempt: "The folder path 'Program Files' contains an invalid character"

    How can I install the latest version when I get this message : "The folder path 'Program Files' contains an invalid character"? The message appears when I try to install the update and it appears when I try to uninstall the previous version. The instructions for manual uninstall says to use the Control Panel Uninstall Programs first and then "clean up" -- but I can't use the Control Panel Uninstall. I am running iTunes from an external drive. What to do?

    That's normally produced by a damaged iTunes.msi. The basic treatment for it is given in the following user tip:
    ["not a valid short file name" and "invalid character" install errors|http://discussions.apple.com/thread.jspa?threadID=2368028]
    ... but since Microsoft pulled the Windows Installer CleanUp utility from their Downloads Center, things have grown more difficult. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now start with *step 4* from the user tip, and proceed from there.
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • Error Message:The folder path 'Program Files' contains an invalid character

    I have an 80G iPod. I never had a problem with the itunes program until I switched to Vista. When I try to open iTunes I get the following error message:
    *The folder path 'Program Files' contains an invalid character*
    I have itunes installed on both my HP and on an external hard drive that I use as my backup in case something goes wrong. Neither one opens and I get the same error message on both. I have tried to uninstall iTunes and then reinstall and get the same message so I can't uninstall.
    I'm really frustrated, I need to get to my music for a huge presentation in a few days. Can anyone help?
    Thanks in advance,
    Jejo

    Have you tried working through the steps in the General section of this article?
    http://support.apple.com/kb/HT1926

  • I cannot load I Tunes or delete it as the download stops and says the folder path "program files"contains an invalid character, what can I do?

    I cannot load or delete I Tunes from my computer. What comes up is- The folder path "program files" contain an invalid character?

    That's normally produced by a damaged iTunes.msi. The basic treatment for it is given in the following user tip:
    ["not a valid short file name" and "invalid character" install errors|http://discussions.apple.com/thread.jspa?threadID=2368028]
    ... but since Microsoft pulled the Windows Installer CleanUp utility from their Downloads Center, things have grown more difficult. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now start with *step 4* from the user tip, and proceed from there.
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • Binding containe gets reset on button click ?

    Hi All
    In my page i am calling a method of AMIMpl class :
        public void refreshEmpTable(){
          String pRefresh = "Y";
          requeryViewObjectWithBindVariable(getEmp(), "bRefresh", pRefresh);
    and
        private void requeryViewObjectWithBindVariable(ViewObjectImpl pViewObjectImpl,
                                                       String pVariableName,
                                                       String pVariableValue) {
            ViewObjectImpl vo = pViewObjectImpl;
            vo.setNamedWhereClauseParam(pVariableName, pVariableValue);
            vo.executeQuery();
        }And i can see the following log
    <DebugDiagnostic> <print> [12497] DBG: afterActionPerformed :refreshEmpTable
    <ADFLogger> <begin> Refreshing binding container
    <DCBindingContainer> <internalRefreshControl> [12498] **** refreshControl() for BindingContainer :com_xyz_abc_ui_flow_om_omf_omf_prepareSessionSessionPageDef_WEB_INF_com_xyz_abc_ui_flow_om_om_xml_omf
    prepareSession() - default method of the taskFlow
    The button that triggers the refreshEmpTable() of impl class has partial submit as true. What i can see here is it is resetting the task flow. Can some some give a clue as to what i have done wrong here.
    thnks,
    JDev 11.1.1.4
    Edited by: in the line of fire on Jun 22, 2011 5:03 PM
    Edited by: in the line of fire on Jun 23, 2011 11:52 AM

    <ViewObject xmlns="http://xmlns.oracle.com/bc4j" Name="DeptView" Version="11.1.1.59.23" AutoRefresh="true"
    set this value to false if its there... in any of your VO

  • Do I need to cleanup runtime binding container and iterators?

    If I create a runtime binding container and iterator in a JSF session bean as follows:
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ValueBinding valueBinding = facesContext.getApplication().createValueBinding("#{data}");
    BindingContext bindingContext = (BindingContext)valueBinding.getValue(facesContext);
    // To create JUIteratorBinding, we need the following objects
    DCDataControl dataControl = bindingContext.findDataControl("MyDataControlName");
    ApplicationModule appModule = (ApplicationModule)dataControl.getDataProvider();
    DCBindingContainer bindingContainer = new DCBindingContainer();
    // Create dynamic iterator.  Need to set bindingContainer otherwise executeQuery throws exception
    JUIteratorBinding iterator = new JUIteratorBinding(bindingContext, dataControlName, "MyViewObjectName", "MyIteratorName", -1);
    iterator.setBindingContainer(bindingContainer);....do I have to later clean down the iterator and binding container from the data control to release the memory (and what calls do I need to make), or once the objects fall out of scope in my code are they marked for GC?
    CM.
    PS. JDev 10.1.3.1, ADF BC and JSF

    Hi Steve, thanks for the follow up.
    I'm coding a dynamic menu <af:page> control that maps to the MenuTreeModelAdapter (session bean) as detailed in the JDev 4GL/Forms guide.
    I've made a change that instead of loading the menu items from the hardcoded faces-config.xml file, they're actually sourced from the database via the code above, which is placed in the MenuTreeModelAdapter constructor. As the <af:page> tag exists on a number of pages, and thus the MenuTreeModelAdapter may be instantiated for the first time from a number of different locations, I can't hard-code the binding container or iterator into any single pageDef file. Thus I dynamically construct it in the constructor when the session bean is created for each user. I require a session bean as the menu items are different for each user.
    However I'm concerned once I've created the binding container and iterator, that even though the session bean may become invalidated, the 2 binding layer constructs may remain, consuming resources.
    Thanks for your assistance.
    CM.

  • About binding container

    Hi
    I am using jdev 11.1.1.5.0
    I created a fragment page and bounded task flow.
    which have few bindings
    I drop the task flow as region on a jspx page.
    On the flow I drop a method call and define that method in backing of fragment.
    Now I define some functionality in that method to perform some task before page load
    I am using binding container in that method but it returns null .
    there is any solution to solve this problem...?
    Thanks.

    You need to create a pageDef/bindings file for that method call, and then the associated bindings you want to manipulate. To create the pageDef file right click on the method call and select the Create Page Definitions option.
    CM.

  • Binding container lifespan

    Can someone explain or point me to a decent description of the lifecycle of the ADFm binding container?
    For example, if I have variables defined within the "variables" variableIterator of a pageDef when do these get initialized and destroyed?
    Is there similarity to one of the memory scopes (request for example)?

    Hi,
    its by request. However, if you load the page then the variable iterator is filled with values during the init context phase, which is after retsore view. So the variable iterator should not be empty if it uses EL to access its values
    Frank
    Edited by: Frank Nimphius on Jan 7, 2010 4:24 PM

Maybe you are looking for

  • Here I go again... I need a little help on sizing

    In another posting I wrote the following and was told nicely no one would see it there... So I am posting it here... Thanks to Brian... I want the same thing, but when I deleted all the master slides I wasn't using. (All but two). The size of the ppt

  • Can I sync my iPhone contact list to my iPad?

    Is it possible to sync my iphone4 contacts to ipad2.

  • Oracle 11gR2 Cluster - Multiple Database

    Hi , We have a 2 node Cluster (11gR2) hosting a database . In addition to this database , can we additional separate databases levereging the same oracle clusterware .

  • Ipad can not be restore, shows the usb cable icon.

    When I turned it on (whitout being conected to the computer)  the screen shows the usb cable icon for a minute and then turns it off. If I connect it to Itunes: " Itunes has detectes an Ipad in restore mode. You have to restore to use it in Itunes." 

  • Need help in codings

    Hi , I was doing the RSS Feed widget according to this(https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c032ae0a-7d6b-2a10-14a1-cc6efb066dfc) I could also display the end result of the widget but the information shown on the widget