Modifying the Data Binding value at runtime

Hi
just wondering if there is a programmatic way of adding or removing the Default Binding value at runtime? This is the value that is showing up on the Binding Tab of the Object Tab.
thanks,
John

Have you added teh Label as a text field?
If you have done that, try replacing the label with a Input/Output type field in the display mode by selecting 'Output Only' in the attributes->Program Tab of Screen Painter.
Now from the program , when the user presses F7, you can code to change the value of the Label (Input / Output field).
This will work out. Please let me know if you have any issues.
Regards,
Anish Thomas

Similar Messages

  • The data binding isn't working, what have I done wrong?

    I'm writing a very simple WPF app, one view. I've got a few models defined for the small handful of tables this app works with. I'm making some sort of boneheaded mistake, but I can't see what it is. I'm trying to bind to a property of one of the model
    classes I've define, to a textbox in a stackpanel. Here's the XAML:
    <StackPanel Orientation="Horizontal" Margin="0, 5" DataContext="{Binding cvsSpecMapping}">
    <TextBlock Margin="10,0,5,0">Specimen Mapping: </TextBlock>
    <TextBox x:Name="txtHl7SpecMap"
    Text="{Binding HL7SpecimenTypeName}"
    ToolTip="{Binding HL7SpecimenTypeName}"
    MinWidth="50"
    MaxWidth="100"
    MaxLength="250" />
    </StackPanel>
    Earlier in the same XAML file I've got the following collection view source defined in the windows' resources:
    <CollectionViewSource x:Key="cvsSpecMapping" />
    This isn't rocket science. Here's the model class definition. I'm removing all but the relevant property:
    using System;
    using System.ComponentModel;
    using System.Runtime.CompilerServices;
    namespace SpecMapException.Models
    * This class I am interested in knowing what properties change.
    * Also note that the properties in this class do NOT represent all of the properties
    * in the Prism.SpecimenMapping table. It only represents what this application has
    * to store.
    public class SpecimenMapping : INotifyPropertyChanged
    private const int MAX_HL7SPECIMENTYPENAME_LEN = 250;
    #region class properties
    private string _hl7SpecimenTypeName = "";
    public string HL7SpecimenTypeName
    get { return _hl7SpecimenTypeName; }
    set
    if (value != _hl7SpecimenTypeName)
    _hl7SpecimenTypeName = EnforceMaxLength(value, MAX_HL7SPECIMENTYPENAME_LEN);
    NotifyPropertyChanged();
    #endregion //class properties
    #region local routines
    private string EnforceMaxLength(string PassedValue, int MaxLength)
    if (PassedValue.Length <= MaxLength)
    return PassedValue;
    return PassedValue.Substring(0, MaxLength);
    #endregion
    #region PropertyChanged code
    * The usual property changed code.
    public event PropertyChangedEventHandler PropertyChanged;
    private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
    if (PropertyChanged != null)
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    #endregion
    And lastly here's the relevant code which I've put into the windows Loaded event:
    Models.SpecimenMapping sm = null;
    private void Window_Loaded(object sender, RoutedEventArgs e)
    var cvsSpecMapNames = (CollectionViewSource)(this.FindResource("cvsSpecMapping"));
    cvsSpecMapNames.Source = sm;
    So what is the mistake that I've made? Why isn't the data binding to the textbox txtHl7SpecMap working?
    (I'm using VS 2013, .NET 4.5.)
    Rod

    cvsSpecMapping is a resource and not a property so you should set the DataContext using the StaticResource markup extension instead of Binding:
    <StackPanel Orientation="Horizontal" Margin="0, 5" DataContext="{StaticResource cvsSpecMapping}">
    Also, the Source property of a CollectionViewSource is supposed to be set to a collection:
    private void Window_Loaded(object sender, RoutedEventArgs e)
    sm = new Models.SpecimenMapping();
    var cvsSpecMapNames = (CollectionViewSource)(this.FindResource("cvsSpecMapping"));
    cvsSpecMapNames.Source = new List<Models.SpecimenMapping>() { sm };
    You may also want to set a default value of the HL7SpecimenTypeName property to confirm that the binding actually works after you have done the above changes:
    public class SpecimenMapping : INotifyPropertyChanged
    private const int MAX_HL7SPECIMENTYPENAME_LEN = 250;
    #region class properties
    private string _hl7SpecimenTypeName = "def....";
    public string HL7SpecimenTypeName
    get { return _hl7SpecimenTypeName; }
    set
    if (value != _hl7SpecimenTypeName)
    _hl7SpecimenTypeName = EnforceMaxLength(value, MAX_HL7SPECIMENTYPENAME_LEN);
    NotifyPropertyChanged();
    Hope that helps.
    Please remember to mark helpful posts as answer to close your thread and then start a new thread if you have a new question.

  • Can I modify the data type of a dynamic parameter?

    I am using CR2008 against an Oracle 11 db and have a report with dynamic parameters.
    One of the report sources is a custom view that selects all of the possible 'pay ending dates' where one of the fields from this view is used as the source for the dynamic parameter.
    The view performs a TRUNC on the date field in an effort to eliminate the TIME component.
    The problem is that the parameter definintion defaults to DATE/TIME (vs. just DATE). I'm wondering if there is any way to modify the data type of the parameter to be DATE only.
    I've searched several forumns but have not found anything.
    One solution I can think of is to have the custom view format the date field as a VARCHAR (sans the time component) which I assume would force the dynamic parameter data type to string, and then have the report perform a todate function on the value when applying the criteria.
    Anyone else have an idea? Just seems like CR should allow the developer to specify the data type- especially b/w Date and Date/Time, rather than make an assumption.
    Thank you in advance-
    emaher

    emaher,
    Here's what you can do:
    Leave the existing date column as it is in the view...
    Just add another column to the view that casts the the date as a VarChar data type and formats the date as you would like it to be.
    So now you'll have 2 date columns in the view... 1 that's still a date and another that a character string.
    Now for your parameter, use the date version as the parameter value and the text version as the parameter description.
    Be sure to set the "Prompt with description only" is set to true.
    This way the user sees the LoV in the desired format but there's not need to wrangle it back into a date for data selection.
    HTH,
    Jason

  • Modify the data in POSDM table /POSDW/TLOGS

    Hi Experts,
    I'm looking for a way to modify the data in table /POSDW/TLOGS ,
    I've Modified the Totals Data by updating column "TRANSTURNOVER"
    this modified the totals ,
    now i need to modify the line item and articles values ,
    any advice will be appreciated and rewarded .
    Thanks ,
    Mohamed

    This is a question for OSS.
    Rob

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Who modified the data of table ?

    Hi people,
    You can help me again, please.
    It's possible to know, who modified any data in a table  ?
    For example:
    Someone modified the data DocNum in the table J_1bnfdoc.
    it's, possible to know, who does it ? When ? The user name ?
    tks for all,
    Flavio

    I think you need to look into these fiels
    CREDAT     Create date
    CRETIM     Creation time
    otherwise check any change documents available for this table in CDHDR or CDPOS
    and find this table is NOT buffered so you will not find records from DBTABLOG

  • Need to Modify the Data in the Picklist/Poplist.--- Urgent

    Hi Guys...
    I need to modify the data in the Picklist/Poplist in the Create Expense Page, but I couldn't figure out how the data is populated.. Which VO Object or how?
    Thanks
    Ravi

    Here is the code for Picklist/Poplist.
    Below is the code for the poplist
    <ui:contents>
    <oa:messageChoice readOnly="false" required="no" prompt="Current Transactions for Account" pickListDispAttr="DisplayedValue" pickListValAttr="CardValue" shortDesc="Prompt" id="CreditCardPoplist" promptTranslationExpansion="100%" user:akAttributeCode="OIE_VIEW_TRANSACTIONS_FOR" user:akAttributeApplicationId="200" allowBlankValue="true">
    <ui:primaryClientAction>
    <ui:firePartialAction event="OIEChangeCreditCard" unvalidated="true" id="firePartialAction1"/>
    </ui:primaryClientAction>
    </oa:messageChoice>
    <oa:messageStyledText id="popListInstruction" styleClass="OraInstructionText"/>
    <oa:messageStyledText prompt="Current Transactions for" id="CreditCardText" promptTranslationExpansion="100%" user:akAttributeCode="OIEVIEWTRANSACTIONSFOR" user:akAttributeApplicationId="200"/>
    <oa:image hAlign="start" width="9" prompt="Info Icon" height="30" source="infoicon_status.gif" id="InfoIcon" promptTranslationExpansion="100%" user:akAttributeCode="OIE_INFO_ICON" user:akAttributeApplicationId="200" imageHeight="16" imageWidth="16"/>
    </ui:contents>
    I coundn't figure out which VO object is its calling.
    Thanks
    Ravi

  • Scanning old pictures - want to modify the date to date phone was taken not when it was scanned

    I have a bunch of pictures from the early 2000s, prior to having a digital camera.
    When I scan a picture from Christmas 2001 - it appears with the date I scanned the picture (January 2012)
    I try to edit the date in iPhone with no success.
    Are there options to modify the date on the phone in iPhoto?

    Well if it's not working...
    You can also try the Photos -> Batch Change command
    Regards
    TD

  • Runtime :Javascript problem when trying to display the date binded to RFC

    Hi all,
    I am facing a very strange problem. I Have used a Bapi to pass some inputs to the Bapi function and binded the UI with that. But for the date field when i am running the application and trying to specify some date it is giving some Javascript Error and not Showing the date Dialog box
    The Error is "SAPUR_January is null or not an object"
    Is anyone has any idea on it, then please let me know at the earliest.
    Mukesh

    Hi armin and Mani
    For armin: I did't understand for what you are refering to.
    For Mani: Hi mani those are the Input fields and by default they are binded to the Date field only and user has to supply the date parameter. The Small box that comes when you bind a UI field with the Date type when i am clicking on that i am reciving that error.
    Mukesh Poddar

  • Textbox cannot showing the Data Binding

    Dear All, I have a problem about showing data to textbox. I have a class i call it itemCategoryFormController.java here the code:
    public class ItemCategoryFormController extends GenericForwardComposer {
        @Autowired
        private DatabaseManager databaseManager;
        @Autowired
        private SessionManager sessionManager;
        @Autowired
        private SecurityService securityService;
        @Autowired
        private MasterService masterService;
        private WebUtil webUtil;
        private DataBinder binder;
        private Paging itemGroupPaging;
        private Combobox filterCBox;
        private Listbox itemGroupLBox;
        private Bandbox itemGroupBd;
        private Integer totalItemGroup = 0;
        private String locationPath;
        private Map<String, Object> params;
        private ItemCategory selectedItemCategory;
        private ItemCategory selectedTemp;
        private ItemGroup selectedItemGroup;
        private List<ItemCategory> itemFilters = new ArrayList<ItemCategory>();
        private List<ItemGroup> itemGroups = new ArrayList<ItemGroup>();
        public ItemCategory getSelectedItemCategory() {
            return selectedItemCategory;
        public void setSelectedItemCategory(ItemCategory selectedItemCategory) {
            this.selectedItemCategory = selectedItemCategory;
        public ItemGroup getSelectedItemGroup() {
            return selectedItemGroup;
        public void setSelectedItemGroup(ItemGroup selectedItemGroup) {
            this.selectedItemGroup = selectedItemGroup;
        public List<ItemCategory> getItemFilters() {
            return itemFilters;
        public void setItemFilters(List<ItemCategory> itemFilters) {
            this.itemFilters = itemFilters;
        public List<ItemGroup> getItemGroups() {
            return itemGroups;
        public void setItemGroups(List<ItemGroup> itemGroups) {
            this.itemGroups = itemGroups;
        @SuppressWarnings("unchecked")
        @Override
        public void doAfterCompose(Component comp) throws Exception {
            super.doAfterCompose(comp);
            this.self.setAttribute(Constants.CTRL, this, false);
            webUtil = new WebUtil(comp);
            params = (Map<String, Object>) Executions.getCurrent().getArg();
            AppProgram program = securityService.getAppProgramByUrl(sessionManager.getUrlAddress());
            locationPath = program.getFileName();
            selectedUserLogin = sessionManager.getAppUser();
            setControlPermission(program);
            binder = new AnnotateDataBinder(comp);
        public void onCreateWin(Event event) {
            if(isMessageMode()) loadMessage();         
            selectedItemCategory = (ItemCategory) params.get(Constants.PARAM_ITEMCATEGORY);
            init();
        private void init() {
            String action = (String) params.get(WebUtil.PARAM_ACTION);
            if(action.equals(WebUtil.ACTION_NEW)) {
                if(selectedItemCategory != null){
                    selectedItemCategory.setActive(true);
                    selectedItemCategory.setLastUpdated(databaseManager.getDateServerNow());
                    selectedItemCategory.setLastUpdater(sessionManager.getAppUser().getUserId());
                    selectedTemp = selectedItemCategory;
                    selectedItemCategory = new ItemCategory();
                }else{
                    selectedItemCategory = new ItemCategory();
                    selectedItemCategory.setActive(true);
                    selectedItemCategory.setLastUpdated(databaseManager.getDateServerNow());
                    selectedItemCategory.setLastUpdater(sessionManager.getAppUser().getUserId());
            } else {
                if(selectedItemCategory == null) selectedItemCategory = selectedTemp;
            loadItemGroup();
            viewMode = action.equals(WebUtil.ACTION_VIEW);
            editMode = action.equals(WebUtil.ACTION_EDIT);
            if((action.equals(WebUtil.ACTION_EDIT) || action.equals(WebUtil.ACTION_VIEW))) {
                checkPrevNext();
            binder.loadAll();
        private void loadItemGroup() {
            totalItemGroup = masterService.countItemGroup();
            itemGroupPaging.setTotalSize(totalItemGroup);
            selectedItemGroup = masterService.getitemGroupByNo(selectedItemCategory.getItemCategoryGroupNo());
            itemGroups = masterService.getitemGroups(0, itemGroupPaging.getPageSize());
            doPaging(itemGroupPaging, Constants.PARAM_ITEMGROUP);
        public void onChanging$filterCBox(InputEvent event) {
            Integer sizeOfFilter = Integer.valueOf(Labels.getLabel(Constants.I3_PAGESIZE_FILTER));
            itemFilters = masterService.getitemCategorysByFilter("%" + event.getValue() + "%", 0, sizeOfFilter);
            binder.loadComponent(filterCBox);
        public void onChanging$itemGroupFilterTb(InputEvent event) {
            itemGroups = masterService.getitemGroupsByFilter("%" + event.getValue() + "%", 0, itemGroupPaging.getPageSize());
            itemGroupPaging.setTotalSize(masterService.countItemGroupByFilter("%" + event.getValue() + "%"));
            itemGroupPaging.setActivePage(0);
            binder.loadComponent(itemGroupLBox);
        @SuppressWarnings({ "unchecked" })
        private void doPaging(final Paging paging, final String param) {
            paging.addEventListener("onPaging", new EventListener() {
                @Override
                public void onEvent(Event event) throws Exception {
                    PagingEvent pEvent = (PagingEvent) event;
                    int pageNo = pEvent.getActivePage();
                    int first = pageNo * paging.getPageSize() + 1;
                    int last = first + paging.getPageSize() - 1;
                    redraw(param, first, last);
        protected void redraw(String param, int first, int last) {
            if(param.equals(Constants.PARAM_ITEMGROUP)) {
                itemGroups = masterService.getitemGroups(first, last);
                binder.loadComponent(itemGroupLBox);
        public void onClick$itemGroupClearBtn(Event event) {
            selectedItemGroup = null;
            binder.loadComponent(itemGroupBd);
            itemGroupBd.close();
        private void clearForm() {
            selectedItemCategory = null;
            selectedItemGroup = null;
    I have a zul file that call form.zul Here i want show itemgroups data:
    <bandbox id="itemGroupBd" width="30%" onfocus="itemGroupBd.open=true" autodrop="true" readonly="true" value="@{ctrl.selectedItemGroup, converter='com.cynergy.web.converter.NameObjectConverter' }" disabled="@{ctrl.viewMode }"> <bandpopup>
    <vbox>
    <hbox>
    <image src="/images/icons/icon-filter-16.png"/> <label value="${c:l('label.filter.value')}"/>
    <textbox id="itemGroupFilterTb"/> <space width="5px"/>
    <button id="itemGroupClearBtn" label="${c:l('button.clear.value')}"/>
    </hbox>
    <listbox id="itemGroupLBox" model="@{ctrl.itemGroups }" width="400px" onselect="itemGroupBd.close();" rows="${c:l('label.pageSize.bandbox.value')}" selecteditem="@{ctrl.selectedItemGroup }" emptymessage="${c:l('message.list.data.empty')}">
    <listhead sizable="true">
    <listheader width="30%" label="${c:l('label.code.value')}"/>
    <listheader label="${c:l('label.name.value')}"/></listhead>
    <listitem self="@{each=itemGroup }">
    <listcell label="@{itemGroup.itemGroupNo }"/>
    <listcell label="@{itemGroup.itemGroupName }"/>
    </listitem>
    </listbox>
    <paging id="itemGroupPaging" detailed="true" pagesize="${c:l('label.pageSize.bandbox.value')}" sclass="paging-border"/>
    </vbox>
    </bandpopup>
    </bandbox>
    There are no error showing, but textbox not showing the data. Textbox only showing:
    com.procits.app.master.model.ItemGroup@6924b697
    I'm new in java programming i hope you can help me.
    Best regards,
    Surbakti

    cvsSpecMapping is a resource and not a property so you should set the DataContext using the StaticResource markup extension instead of Binding:
    <StackPanel Orientation="Horizontal" Margin="0, 5" DataContext="{StaticResource cvsSpecMapping}">
    Also, the Source property of a CollectionViewSource is supposed to be set to a collection:
    private void Window_Loaded(object sender, RoutedEventArgs e)
    sm = new Models.SpecimenMapping();
    var cvsSpecMapNames = (CollectionViewSource)(this.FindResource("cvsSpecMapping"));
    cvsSpecMapNames.Source = new List<Models.SpecimenMapping>() { sm };
    You may also want to set a default value of the HL7SpecimenTypeName property to confirm that the binding actually works after you have done the above changes:
    public class SpecimenMapping : INotifyPropertyChanged
    private const int MAX_HL7SPECIMENTYPENAME_LEN = 250;
    #region class properties
    private string _hl7SpecimenTypeName = "def....";
    public string HL7SpecimenTypeName
    get { return _hl7SpecimenTypeName; }
    set
    if (value != _hl7SpecimenTypeName)
    _hl7SpecimenTypeName = EnforceMaxLength(value, MAX_HL7SPECIMENTYPENAME_LEN);
    NotifyPropertyChanged();
    Hope that helps.
    Please remember to mark helpful posts as answer to close your thread and then start a new thread if you have a new question.

  • Where are the data-binding frameworks for Oracle Objects?

    Oracle offers a few different options for data-binding frameworks to Oracle relational data. Amongst them they include TopLink and the Oracle Application Development Framework (ADF)in JDeveloper 10G. J2EE also offers the EJB standard framework. Both of the Oracle data-binding frameworks appear to work well with relational data but fail miserably when one tries to work with a fully fledged Oracle Object-Relational schema. I have spend much time with ADF but have not been able to create successful bindings to Objects with nested complex objects (such as a 2-level nested object) or objects containing nested tables. TopLink will not even touch Object tables.
    Have other people being more successful with this? Do we have to implement our own data binding framework? Does Oracle plan on improving these frameworks to fully support Oracle Objects?

    TopLink Runtime supports both fully fledged OX mappings and nested complex objects. These mappings can be setup in the code.
    TopLink ADF design time however currently does not have support for OX mappings.
    Hope this helps,

  • Data binding, value vs text

    Hi all,
    I'm very much a novice when it comes to LC and scripting. I've got a form which gets submitted by users as an xml file to an email. When I open the xml file, I noticed that a couple dropdown list fields are showing the data in 2 different ways.
    One is showing the field selection value (1) and another is showing the field selection text (OT - Other).
    Both dropdown fields are set up the same way. Binding is Use Name(whateverfieldname) . I cant see anywhere to specify to use value vs text anywhere in the object palette. Where can I define which gets passed to the xml?
    Thanks!

    Hi,
    On the Binding tab of the Object palette for the drop down returning the value will have "Specify Item Values" selected.
    Regards
    Bruce

  • Want the data store values to be displayed in input field of form

    Hi,
    I wanted to know wether is there possibility of displaying the data in a input field instead of expression field.
    In our model i have used a form which has material type,plant and Vendor connected to data service1 in turn gives the out put in chart and i also have the second input form which has To(0CALMONTH) combo box which is connected to Data service2 and gives the data in table.
    But what i wanted is to i also want to use the input fields of first form to second Data service2 and get the data based on on inputs of form1 and form2i.e also To field.
    We can connect the port from form1 to DS2 but problem is we need to click the submit of form1 and form2 and it doesnt gives the output according the input of form1 and form2 as it gives the output of that form when we click that submit button.
    I have followed help.sap for data tore procdure.
    So i have used a datstore where i will store the values of form1 and call it in expression field which i will add and hide it in form2(hide because user should not see that input fields).
    Formula used in data store for expression field.
    IF(CONTAINS(STORE@matltype,@Material_Type),STORE@matltype,STORE@matltype &(IF(LEN(STORE@matltype)>0,'; ',''))&@Material_Type)
    But whats happening is the value is getting concatenated when i goon change the values in input field, so i wanted to get the values to be replaced as soon as i change input field of form1(if  use replace function its not working) and also it would be more preferrable if we use input field instead of expression field.
    I would also like to know is there any alternate solution for the above requirement instead of datastore.
    Thank You
    K.Srinivas

    Hi,
          I have Form1 connected to Data service1 displays the data in a Chart and i have another Form2 connected to Dataservice2 displays the data in table.
    In form1 there are Material Type,plant, and Vendor and form2 i have To (0CALMONTH)SO now i want also Form1 inputs for Table which gets teh data from Dataservice2.
    What i have said earlier is connecting Form1 to Dataservice doesnt fetch the data correectly,its because if i click submit in form1 i get the data of those 3 inputs and i need to click the submit button in form2 after giving input which shows the data accordingly where it doesnt fulfill the requirement.
    So i wanted some solution for that.For that reason i have used the data store and the procedure i have followed the help.sap as i said in my above mesage.
    If Data store is also suggestable than i want to display the data in Text input Field  instead of Expression field which should replace the previous values as soon as values change in data store.
    Hope i have tried to be clear if still it is not i am ready to explain again.
    Thank You
    K.Srinivas

  • Not able to modify the data for infotype 0008 using FM

    Hi All ,
    I have got a requirement for updating the infotype 0008 data  using FM : HR_MAINTAIN_MASTER_DATA.
    While trying to modify the wagetypes data which is of blank ..unable to upload the amount for that partcular field ..
    For this am herewith the link  of o/p :
    http://i55.tinypic.com/28jfw2c.jpg for this am also posting the code...
    Please suggest me furthur in what way i can upload..
          SELECT * FROM pa0008 INTO TABLE itab_pa0008
    FOR ALL ENTRIES IN itab
        WHERE pernr = wa_data-pernr
        AND begda = wa_data-begda_out
        AND endda = wa_data-endda_out.
        DESCRIBE TABLE itab_pa0008 LINES lin.
        IF lin EQ  0.
          c_action = 'INS'.
        ELSE.
          c_action = 'MOD'.
        ENDIF.
        LOOP AT itab INTO wa_itab WHERE pernr = wa_data-pernr.
          CLEAR: wa_bapireturn, wa_bapireturn1, wa_hr_return.
          REFRESH: it_pprop[],it_modified_keys[].
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFAR'.                 "1
          it_pprop-fval = wa_itab-trfar.
          APPEND it_pprop.
          CLEAR it_pprop.
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFGB'.                 "2
          it_pprop-fval = wa_itab-trfgb.
          APPEND it_pprop.
          CLEAR it_pprop.
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFGR'.                  "3
          it_pprop-fval = wa_itab-trfgr.
          APPEND it_pprop.
          CLEAR it_pprop.
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFST'.                  "4
          it_pprop-fval = wa_itab-trfst.
          APPEND it_pprop.
          CLEAR it_pprop.
          flag = flag + 1.
    *****************************************************************************************************5
          BREAK-POINT.
          IF NOT wa_itab-lga1 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA01'.
            it_pprop-fval = wa_itab-lga1.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet1.
          ENDIF.
          IF NOT wa_itab-bet1 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET01'.
            it_pprop-fval = wa_itab-bet1.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************6
         IF NOT wa_itab-lga2 IS INITIAL.
           it_pprop-infty = '0008'.
           it_pprop-fname  = 'P0008-LGA02'.
           it_pprop-fval = wa_itab-lga2.
           APPEND it_pprop.
           CLEAR it_pprop.
           bet1 = wa_itab-bet2.
         ENDIF.
          IF NOT wa_itab-bet2 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET02'.
            it_pprop-fval = wa_itab-bet2.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************7
          IF NOT wa_itab-lga3 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA03'.
            it_pprop-fval = wa_itab-lga3.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet3 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET03'.
            it_pprop-fval = wa_itab-bet3.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************8
          IF NOT wa_itab-lga4 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA04'.
            it_pprop-fval = wa_itab-lga4.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet4 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET04'.
            it_pprop-fval = wa_itab-bet4.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************9
          IF NOT wa_itab-lga5 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA05'.
            it_pprop-fval = wa_itab-lga5.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet5 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET05'.
            it_pprop-fval = wa_itab-bet5.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************10
          IF NOT wa_itab-lga6 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA06'.
            it_pprop-fval = wa_itab-lga6.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet6 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET06'.
            it_pprop-fval = wa_itab-bet6.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************11
          IF NOT wa_itab-lga7 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA07'.
            it_pprop-fval = wa_itab-lga7.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet7 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET07'.
            it_pprop-fval = wa_itab-bet7.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************12
          IF NOT wa_itab-lga8 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA08'.
            it_pprop-fval = wa_itab-lga8.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet8 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET08'.
            it_pprop-fval = wa_itab-bet8.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************13
          IF NOT wa_itab-lga9 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA09'.
            it_pprop-fval = wa_itab-lga9.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet9 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET09'.
            it_pprop-fval = wa_itab-bet9.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************14
          IF NOT wa_itab-lga10 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA010'.
            it_pprop-fval = wa_itab-lga10.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet10 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET010'.
            it_pprop-fval = wa_itab-bet10.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************15
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA11'.
       it_pprop-fval = wa_itab-lga11.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET11'.
       it_pprop-fval = wa_itab-bet11.
       APPEND it_pprop.
       CLEAR it_pprop.
    ********************************************************************************************************16
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA12'.
       it_pprop-fval = wa_itab-lga12.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET12'.
       it_pprop-fval = wa_itab-bet12.
       APPEND it_pprop.
       CLEAR it_pprop.
    ********************************************************************************************************17
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA13'.
       it_pprop-fval = wa_itab-lga13.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET13'.
       it_pprop-fval = wa_itab-bet13.
       APPEND it_pprop.
       CLEAR it_pprop.
    ********************************************************************************************************18
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA14'.
       it_pprop-fval = wa_itab-lga14.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET14'.
       it_pprop-fval = wa_itab-bet14.
       APPEND it_pprop.
       CLEAR it_pprop.
    BREAK-POINT.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
              number = wa_itab-pernr
            IMPORTING
              return = wa_bapireturn1.
          BREAK-POINT.
         IF c_action = 'INS'.
           CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
             EXPORTING
               pernr           = wa_itab-pernr
               actio           = 'INS'
             tclas           = 'A'
               begda           = wa_data-begda_out             "'20110401'
               endda           = wa_data-endda_out             "'99991231'
               dialog_mode     = '2'
             luw_mode        = '1'
             IMPORTING
               return          = wa_bapireturn
               return1         = wa_bapireturn1
               hr_return       = wa_hr_return
             TABLES
               proposed_values = it_pprop
               modified_keys   = it_modified_keys.
           IF NOT wa_bapireturn IS INITIAL.
             WRITE : / wa_bapireturn.
             CLEAR : wa_itab , wa_bapireturn.
           ENDIF.
         ELSEIF c_action = 'MOD'.
            CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
              EXPORTING
             infty         = '0008'
                pernr           = wa_itab-pernr
                actio           = 'MOD'
                begda           = wa_data-begda_out             "'20110401'
                endda           = wa_data-endda_out             "'99991231'
          record        =  p_record
             recordnumber  = wa_itab-SEQNR
             operation     = change
             nocommit      = nocommit
                dialog_mode     = '0'
             IMPORTING
                return          = wa_bapireturn
                return1         = wa_bapireturn1
                hr_return       = wa_hr_return
              TABLES
                proposed_values = it_pprop
                modified_keys   = it_modified_keys.
            IF NOT wa_bapireturn IS INITIAL.
              WRITE : / wa_bapireturn.
              CLEAR : wa_itab , wa_bapireturn.
            ENDIF.
         ENDIF.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              number = wa_itab-pernr
            IMPORTING
              return = wa_bapireturn1.
        ENDLOOP.
      ENDLOOP.

    Here is a sampe, and the logic you are using for wages goes in the internal table for wages (you already have the enqueue & dequeue so you don't have to worry about that, so you only have to add the BAPI_TRANSACTION_COMMIT):
    CALL FUNCTION 'BAPI_BASICPAY_CHANGE'
      EXPORTING
        employeenumber             = pa0008-pernr
        subtype                    = pa0008-subty
        objectid                   = pa0008-objps
        lockindicator              = pa0008-sprps
        validitybegin              = pa0008-begda
        validityend                = pa0008-endda
        recordnumber               = pa0008-seqnr
        payscaletype               = pa0008-trfar
        payscalearea               = pa0008-trfgb
        payscalegroup              = pa0008-trfgr
        payscalelevel              = pa0008-trfst
    *   NEXTINCREASE               =
    *   LOCALALLOWLEVEL            =
    *   PARTNERSHIP                =
    *   CURRENCY                   =
    *   COMPARISONPAYSCLTYPE       =
    *   COMPARISONPAYSCLAREA       =
    *   COMPARISONPAYSCLGRP        =
    *   COMPARISONPAYSCLLVL        =
    *   COMPNEXTINCREASE           =
    *   CAPACITYUTILLEVEL          =
    *   HOURSWORKEDPERPERIOD       =
    *   ANNUALSALARY               =
    *   CASEGROUPCATALOG           =
    *   CASEGROUP                  =
    *   CURRENCYANNUALSALARY       =
    *   REASON                     =
    *   NOCOMMIT                   =
    * importing
    *   return                     =
    TABLES
       wagetypes                  = wages.
    Regards,
    Ryan Crosby

  • Modify the data source of a data view web part

    I have a dataView web part deployed in a template in multiple site collection. This dataView hasn't any query set up, so it loads a lot of items and this is slowing down my system.
    Now I want to programmatically put a query overriding the existent (empty) one and I'm doing like this:
    System.Web.UI.WebControls.WebParts.WebPart y = (System.Web.UI.WebControls.WebParts.WebPart)item;
    Microsoft.SharePoint.WebPartPages.DataFormWebPart z = (Microsoft.SharePoint.WebPartPages.DataFormWebPart)item;
    StringBuilder dataSourceString = new StringBuilder("<%@ Register TagPrefix=\"sharepoint\" Namespace=\"Microsoft.SharePoint.WebControls\" Assembly=\"Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" %>");
    dataSourceString.Append("<%@ Register TagPrefix=\"WebPartPages\" Namespace=\"Microsoft.SharePoint.WebPartPages\" Assembly=\"Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" %>");
    dataSourceString.Append("<sharepoint:SoapDataSource runat=\"server\" SelectUrl=\"http://intranet.contoso.com/sites/spc/_vti_bin/lists.asmx\" InsertUrl=\"\" UpdateUrl=\"\" DeleteUrl=\"\" SelectAction=\"http://schemas.microsoft.com/sharepoint/soap/GetListItems\" InsertAction=\"\" UpdateAction=\"\" DeleteAction=\"\" SelectPort=\"ListsSoap\" InsertPort=\"\" UpdatePort=\"\" DeletePort=\"\" SelectServiceName=\"Lists\" InsertServiceName=\"\" UpdateServiceName=\"\" DeleteServiceName=\"\" AuthType=\"Basic\" AuthUserName=\"contoso\\administrator\" AuthPassword=\"pass@word1\" WsdlPath=\"http://intranet.contoso.com/sites/spc/_vti_bin/lists.asmx?WSDL\" XPath=\"\" ID=\"SoapDataSource3\">");
    dataSourceString.Append("<SelectCommand><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><GetListItems xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\"><listName>Jobs</listName>");
    dataSourceString.Append("<Query><Where><Eq><FieldRef Name=\"Title\" /><Value Type=\"Text\">2012_080_A_0</Value></Eq></Where></Query>");
    dataSourceString.Append("<rowLimit>9999</rowLimit></GetListItems></soap:Body></soap:Envelope></SelectCommand><InsertCommand></InsertCommand><UpdateCommand></UpdateCommand><DeleteCommand></DeleteCommand></sharepoint:SoapDataSource>");
    z.DataSourcesString = dataSourceString.ToString();
    manager.SaveChanges(z);
    In my code, I can see the DataSourceString changing, but if I refresh the page it is still loading all the data: why?!

    Hi,
    According to your description, my understanding is that you want to change the data view web part datasource programmatically.
    We need to override the databind method like below:
    public class ExtendedDataFormWebPart : DataFormWebPart
    public override void DataBind()
    this.DataSource = your own data source;
    base.DataBind();
    Here is a detailed code demo for your reference:
    http://jamestsai.net/Blog/post/How-to-query-cross-site-lists-in-DataFormWebPart-Part-1-Build-your-own-data-source-for-DataFormWebPart.aspx
    Best Regards
    Jerry Guo
    TechNet Community Support

Maybe you are looking for

  • Unable to Change Vendor Account Group

    Hi All,              Due to certain client requirement, Account group for few vendors was changed from ABCD to BLCK (Blocked). Now the clients have come back and asked for the Account Group to be changed back to ABCD. However, when I go to T-code XK0

  • Setting Qos for the Cisco C20plus codec endpoints.

    My company has implemented a cisco video conferencing system using the Cisco C20plus codecs as H323 endpoints. We currently utilise the Optus evolve network (MPLS) for our WAN Our network WAN utilises Qos per VLAN settings. For example, phones are in

  • Quantity correlation for deliv.group 001 -reg

    Hi While creating  delivery am facing below error. "Quantity correlation for deliv.group 001 from sls.order 0000000046 for deliv.item 000020" this i am facing for Genaric article in is-reatil, item cate group am using as 0002 and for main article sys

  • Resource busy

    Can someone plz tell me what could be the problem here?? noone is accessing this table now and the DBA had killed all my sessions, but still i am getting this error. FAS: FASBD001> create index indx_optionexpense on optionexpense(grn_n); create index

  • Raid 1 on MacPro - slow and SMB

    Genius at the Apple store said using Raid 1 on a MacPro would explain why SMB is s-l-o-w. Have one user running database files off a PC. When we had it on Panther (not RAID) - the speed was fine. We upgraded to Leopard and new hardware and the speed