Error in modification of record in Smart SyncBO

Hi All,
I am working on a Smart sync Application,
Which need to modify a record, but when I try to modify a record, it gives me the following error and exits,
<b>"Modification of SyncKey is NOT allowed"</b>
I am not able to update the changes,
Please help,
Deepak

Hi Deepak,
For modifying one  syncbo instance ,
in the meRepMeta.xml file corresponding to that SyncBo ,  allowModify="true".This must be satisfied.
For modifying one  syncbo instance , u can do it like described below..
  Here u must need the sync key of the header .u have to find out this sync key using one of the standard methods(first entry
of a row is sync key of that sync bo instance).
Then to modify the header instance .
1) u can use the standard method <b>modifyRowInDB</b> . here the input parameters are SyncBo name , Sync Key , Value
and index of the Column. But the limitation of this method is ,if u have more than one field to modify , then u have to use this
method inside the loop. In this method , we are explicitely calling the commit() method . So during looping if one of the
modification fails for particular sync bo instance , then we have to manually do the rollback for the previous transactions.
  we can change the method like this..
public void modifyHeaderOfSyncBo(String syncBoName,String syncKey,String headerFieldNames[],String 
headerFieldValues[])throws SmartSyncException, PersistenceException
SyncBo syncBo = getSyncBoInstance(syncBoName, syncKey);
SmartSyncTransactionManager transactionManager;
          transactionManager = dataFacade.getSmartSyncTransactionManager();
          if (!transactionManager.isTransactionStarted())
               transactionManager.beginTransaction();
          for (int c = 0; c < headerFieldNames.length; c++) {
               setHeaderFieldValue(syncBo, headerFieldNames[c], headerFieldValues[c]);
//Commit the transaction          
transactionManager.commit();
To modify the Item Instance
In two ways
1) If we know the sync key of the header and there is only one item instance.
Here using the header Sync key , we have to find out the SyncBo instance -->> then find out the item instance / instances
-->> then modify the item.
public void  modifyItemOfSyncBo(String syncBoName,String headerSyncKey,String itemName,String itemFieldNames[],String 
itemFieldValues[])throws SmartSyncException, PersistenceException
SyncBo syncBo = getSyncBoInstance(syncBoName, headerSyncKey);
Row [] itemRows = getItemInstances(syncBo,itemName);//this is the standard method.
// itemRows[0] is the one and only item instance
SyncBoDescriptor sbd =
   descriptorFacade.getSyncBoDescriptor(syncBoName);
RowDescriptor rd = sbd.getRowDescriptor(itemName);
SmartSyncTransactionManager transactionManager;
          transactionManager = dataFacade.getSmartSyncTransactionManager();
          if (!transactionManager.isTransactionStarted())
               transactionManager.beginTransaction();
          for (int c = 0; c < itemFieldNames.length; c++) {
          FieldDescriptor fdDesc = rd.getFieldDescriptor(itemFieldNames[c]);                                            
                      setItemFieldValue(fdDesc, itemRow[0], itemFieldValues); // this method is given below
          transactionManager.commit();
2) If we know the  Sync key of the item instance.
    Here what u have to do is find out the particular sync bo item instance and then modify as mentioned above.
Here we know the Sync Key of the item instance ,so here we will get the exact item row instance.So after retrieving the item
row instance just modify this item row instance with new values as mentioned above.
This method is for setting values in item instance.Just follow this method
     private void setItemFieldValue(FieldDescriptor fd, Row item, Object value)
          throws SmartSyncException, PersistenceException {
          BasisFieldType bft = fd.getFieldType();
          //                 integer oprator
          if (bft == BasisFieldType.N) {
               NumericField nf = item.getNumericField(fd);
               if (nf != null) {
                    BigInteger ii = new BigInteger(value.toString());
                    //                 nf.setValue(ii);
                    item.setFieldValue(fd, ii);
          //                 charactor operator
          if (bft == BasisFieldType.C) {
               CharacterField cf = item.getCharacterField(fd);
               if (cf != null) {
                    //                 cf.setValue(newValues<i>.toString());
                    item.setFieldValue(fd, value);
          //                 decimal operator
          if (bft == BasisFieldType.P) {
               DecimalField df = item.getDecimalField(fd);
               if (df != null) {
                    if (value.equals(""))
                         value = "0";
                    BigDecimal bd = new BigDecimal(value.toString());
                    //                 df.setValue(bd);
                    item.setFieldValue(fd, bd);
          if (bft == BasisFieldType.D) {
               DateField df = item.getDateField(fd);
               if (df != null) {
                    if (value.equals("")) {
                         Date syDatum = new Date(System.currentTimeMillis());
                         value = syDatum.toString();
                    Date dat = Date.valueOf(value.toString());
                    item.setFieldValue(fd, dat);
<b></b>
Regards
Kishor Gopinathan

Similar Messages

  • Error while creating a record in a custom infotype

    hi to all experts,
    I have created a infotype with 3 screens . But one of the screen im getting this error while saving a record .The Required screen change cannot be made.

    Im defining using the table pa9005 not the structure p9005
    (is it the same)
    Please help me ....
    Edited by: mohammed  abdul hai on Sep 18, 2009 8:20 AM

  • Error while Activating Inventory record in WM

    Hi All,
    I am getting an error while activating Inventory record using LI02N ,The Inventory record has been created using LICC Cycle Inventory at Quant Level.The error detrails are as below:
    Message Text:
    Function code cannot be selected
    Technical Data
    Message type__________ A (Cancel)
    Message class_________ BL (Application Log)
    Message number________ 001
    Message variable 1____ Function code cannot be selected
    Message variable 2____ 
    Message variable 3____ 
    Message variable 4____ 
    Message Attributes
    Level of detail_______ 
    Problem class_________ 4 (Additional information)
    Sort criterion________ 
    Number________________         
    Thanks you all in Advance.
    Regards,
    NVK                                                                               

    I am encountering a similar error whils tryng to create or display WM Physical Inventory documents.
    Tx: LX16 - Error Message no. BL001: u201CWarehouse number WH1 does not exist (check your entry)u201D
    Tx: LI01N and LI03N u2013 Error Message no. L4001: u201CWarehouse number WH1 does not exist (check your entry)u201D
    Errors when trying to create or display PIs, but can run reports on u201CWH1u201D and configuration looks ok?
    I cannot find anthing n SAP OSS for WM.
    Any assistance would be appreciated.

  • [SOLVED] FRM-40508:ORACLE error: unable to INSERT record

    Hi all,
    I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
    At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
    So I went on to see the "Display Error" from help and found to be the database error, inserting into a table.
    The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
    I also generated to object list report and tried to find some answer, but no use.
    Please help me in debugging this form.
    Edited by: Charan on Aug 18, 2011 4:05 PM

    I think you need to get a description of the table and compare all the "database" columns in the form with the ones in the database table to see that the types match. Somewhere there's a mismatch. Also check the block(s) "query data source columns" and see if there's any
    columns in there that the type does not match the table. (check the sizes of things too while you're at it.)

  • Error while creating absence record in PA30 using 2001 infotype

    Hi all,
    iam getting an error while creating absence record for infotype 2001for LOP(unpaid)
    error : No quota available for att./abs. 6000 for pers. no. 61000052 between 31.12.2009 and 31.12.2009
    i have did
    Create a absence type LOP
    Determine Entry Screens and Time Constraint Classes
    Define Counting Rules
    Assign Counting Rules to Absence Types
    Payroll: India>>Absences>Describe Absence Valuation Rules 01 Unpaid Leave
    Group Absences for Absence Valuation>>Absence valuation rule>>F4 country grouping 40>> assign 01Unpaid Leave
    please solve this

    Actually I don't know how your system is configured.
    However, the error you're receiving seems you have assigned the absence type to a quota type.
    Please go to your counting rule and check whether Deduction rule - absence quotas - within entitlement field is filled.
    If yes, get the deduction rule value and go to
    SPRO Time man- Time data rec - Absences - Absence Cat - Abs counting - rules for counting (new) - deduction rules for abs quotas and check the quota type in here.
    If there is a quota assignment in place, before creating an IT2001 you need to create a IT2006 for that specific time period.
    Or, you need to delete the quota assignment via two config steps mentioned above.
    Regards,
    Dilek

  • Short dump error when extracting delta records from R/3

    I am working on BW 3.5 and I am facing some short dump error when extracting delta records from the r/3 to BW.
    Below is the error message
    Kindly do the needful ASAP.
    Job started
    Step 001 started (program SBIE0001, variant &0000000024277, user ID BWREMOTE)
    Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
    DATASOURCE = 0ISCM_PAYMENT_01
             Current Values for Selected Profile Parameters               *
    abap/heap_area_nondia......... 2000000000                              *
    abap/heap_area_total.......... 2000000000                              *
    abap/heaplimit................ 40000000                                *
    zcsa/installed_languages...... DE                                      *
    zcsa/system_language.......... E                                       *
    ztta/max_memreq_MB............ 2047                                    *
    ztta/roll_area................ 6500000                                 *
    ztta/roll_extension........... 2000000000                              *
    2,454 LUWs confirmed and 2,454 LUWs to be deleted with function module RSC2_QOUT_CONFIRM_DAT
    ABAP/4 processor: MESSAGE_TYPE_X
    Job cancelled

    Hi,
    I look at the transaction ST22 to see which type of error has given you. Take a look at the notes to correct the error.
    Another option is to look at OSS notes, because the error is giving you a standard extractor.
    Greetings,

  • Error: IDoc XML data record

    Hi all,
       We have file->XI->idoc scenario and the problem we are facing is like, when the idoc structure is prepared using XSLT mapping, when the idoc is ready to get in thru the idoc adapter we are getting the following error.
    <i><b>Error: IDoc XML data record: In segment
    Z1UKGAS_HEADR attribute  occurred instead of SEGMENT                                </b></i>
    Anyone faced the same issue....if so pls do throw some light into this issue....
      We r in XI 3.0 SP13...
    Thanks & regards,
    Jayakrishnan

    Hi,
    In an IDOC structure segment attribute is requried. From the error you posted, it looks like seqment attribute is missing.
    <Z>
       <IDOC BEGIN="">
          <ED SEGMENT="">
          </ED>
       </IDOC>
    </Z>
    Naveen

  • Error : IDoc XML data record: In segment attribute occurred instead of SEGM

    hi friends
    i am doing the file to idoc scenario. in message mapping i had done the static test. but what ever the fields i mapped in the idoc it was not populated in the idoc. and i am getting the error as
    error :IDoc XML data record: In segment attribute occurred instead of SEGMENT
    can any one solve the problem please
    thanks in advance
    Vasu

    Hi Vasudeva,
    Pls do check the nodes which you have mapped to. Also make sure that your SEGMENT field in the target structure is mapped properly.
    Cheers
    JK

  • Error : idoc xml data record : in segment attribute instead of SEGMENT

    hi all
    i am doing the file to idoc scenario. in that i am getting the error
    error : IDOC XML Data record : In segment attribute instead of SEGMENT
    i am doing this scenario since 4 days.
    can anyone help me
    thanks a lot
    Vasu

    in ref. to my post in your earlier thread.
    >>>>
    in your mapping check, in your IDOC if Begin , segment etc are mapped to a constant say '1'.
    Also ref: In segment IDOC attribute I occurred instead of SEGMENT

  • ERROR   OGG-01028  Incompatible record (logical EOF)

    Hi experts,
      i am getting below error in replicat side
    2015-03-13 05:19:08  ERROR   OGG-01028  Incompatible record (logical EOF) in /opt/app/database/ggs/11.2/dirdat/pp1enb6d6/pdrmain/cs034783, rba 153386999
    info replicat
    REPLICAT   replicate   Last Started 2015-03-13 05:18   Status ABENDED
    Checkpoint Lag       37:02:43 (updated 00:28:01 ago)
    Log Read Checkpoint  File /opt/app/p2enb3d6/ggs/11.2/dirdat/database/drmain/cs034767
                         2015-03-11 15:53:51.572589  RBA 179098561
    current trail file is 034767 and corrupted trail file is 034783. i think the transaction is runnin from 034767 onwards.. please confirm if we can skip the transaction as oracle note suggest and move to next good record after rba of 153386999 of trail 034783

    Hi,
    >>current trail file is 034767 and corrupted trail file is 034783. i think the transaction is running from 034767 onwards.
    Yes you can find out the end of transaction by using logdump.
    >> please confirm if we can skip the transaction as oracle note suggest and move to next good record after rba of 153386999 of trail 034783
    Do you know about that transaction? why do you want to skip it, do you know after skipping target table(s) will not be out of sync with primary.
    I would advise reading this note and see if you can recover that.
    Master Note for Oracle GoldenGate(OGG) Error OGG-01028 (Doc ID 1502276.1)
    HTH,
    Pradeep

  • "FRM-40501: Oracle error: Unable to Reserve Record For Update or Delete"

    "FRM-40501: Oracle error: Unable to Reserve Record For Update or Delete"
    as I can unblock a session in the graphical surroundings of administration of the BD 10g of Oracle

    From experience with this problem since the blocked customer form has been coded not to wait for the updating session to complete then there is likely no waiter on the system now so you cannot find the blocking session.
    What you need to do is determine what row the Form was going after then using SQLPlus issue an update on the row. If the blocking session has not yet committed then this update will wait. Now if you look for blocking sessions you will be able to find it and make a determination if the session should be killed or if someone needs to call the user and ask he or she to flip through their screens and get out of the blocking screen.
    Applications screens written not to wait on currently being updated data need to also be written to expose the information necessary to identify the row(s) in question.
    HTH -- Mark D Powell --

  • FRM-40509: ORACLE error: unable to UPDATE record.

    FRM-40509: ORACLE error: unable to UPDATE record.
    what can i do?

    There will always be another error which tells you what the actual problem on the database is. Use the Display message key, or message out DBMS_ERROR_TEXT

  • Customizing error message of duplicate record

    HI All,
    I need to customize an error message of duplicate record inserting in a field of unique-constraint. I want to show the message in an alert. How can i do this?
    Arif

    Hi,
    you can use ON-MESSAGE trigger and check the error code then display your custom error message
    Regards,

  • I keep getting an error message saying, "cannot record" when trying to record over a slide in my presentation. No idea why. Any suggestions? Thanks

    I keep getting an error message saying, "cannot record" when trying to record over a slide in my presentation. No idea why. Any suggestions?
    Thanks

    email ituens at expresslane.apple.com and they will help you for nothing

  • Error: Cannot connect to fulfillment server. Error: cannot find loan record.

    Error: Cannot connect to fulfillment server. Error: cannot find loan record. Definitely connected to internet, authorization correct, etc. Not sure what else to look at.

    Is the computer join the domain?
    Run the following command to check the automatic configuration is working
    Nslookup
    >set type=srv
    >_sipinternaltls._tcp.<sip domain>.com(for internal user)
    >_sip._tls<sip domain>.com(for external user)
    If you can ping to FE, please try to sign in with manual configuration.
    Lisa Zheng
    TechNet Community Support

Maybe you are looking for

  • Valid size not available for this creation when using Greeting Card feature

    Using PSE9 with a Mac.  When attempting to create a greeting card, after selecting the photo, the Greeting Card, I receive a pop up error message as follows: "Valid Size Not Available For This Creation".  (All other Create functions such as Photo Boo

  • Error 0x80300024 when trying to install Windows Ultimate 32 bit on a T60

    I have been trying to install Windows Ultimate 32 bit on a T60 with a 128GB Solid state hard drive and I keep getting the error "Windows cant install to the current location Error code 0x80300024" I have formatted the drive in another PC, created the

  • Text Effects in Bridge wont attach to text layers in AE *Please help

    ** Please Help ** short version I have read the AE help and it says to just double click the preset I want and it will attach to the text in AE, but it doesnt work. What do I do? Long version Ok, I am trying to use the built in animations that are lo

  • TEMPORARY TABLESPACE에서 TEMPFILE 과 DATAFILE의 차이점 (8.1.X ~ 9I)

    제품 : ORACLE SERVER 작성날짜 : 2003-11-27 PURPOSE 이 문서에서는 Oracle 7.3부터 사용되어 오던 create tablespace ... temporary 형태와, 8i부터 사용되는 create temporary tablespace... 의 차이점을 정리해 본다. tablespace의 temporay type과 permanent type에 대한 비교는 <Bulletin#: 11938> 를 참조하도록 하고 여기에

  • Can not see contact name while receive incoming call.

    Dear Support, I have problem with my iphone while receive incoming call. it doesn't show the contact name even i have save that contact number in my phone arleady. iPhone4, OS:5.1.1 My phone is A number : 090 22 11 57 Other phone is B number : 090 22