Smart Sync: How to fill Upload SyncBo

Hi,
i am having the following problem.
I have created a Smart Sync APP and i have a GetList SyncBo and a Create SyncBo. The GetList SyncBo gives me a list of materials. Now i want to fill the Create SyncBo with one of the Material name so that it can be synchronized to create an order. Now my question is how do i add the material to the Create SyncBo?
The Create SyncBo has maped the ITEM PUR_MAT (for material name)
I really appreciate
Best Regards Rene

Hi Rene,
  After fresh project creation in NWDS using the meRepMeta.xml , 
they will give one standard method,,
public boolean setHeaderFieldValue(SyncBo sb,     String headerFieldName,Object value). they have given this for the Header (just go throgh the code).
for item to set ,  u have to  create your own method.
sample code piece for inserting item
private void setFieldValue(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);
here the parameters are
FieldDescriptor (corresponding to particular field
instance of Row(corresponding to 010 ,or ....)
value (field value to insert)
SyncBoDescriptor sbd = descriptorFacade.getSyncBoDescriptor(<syncBoName>);
SyncBo newsyncBo = dataFacade.createEmptySyncBo(sbd);
RowDescriptor itemRow = sbd.getRowDescriptor("010");//Here for refering header u can give "TOP" in place of "010"..
Row item = null;
item = newsyncBo.createEmptyRow(itemRow);
FieldDescriptor fd =
itemRow.getFieldDescriptor(<Field Name>);
if (fd != null) {
setFieldValue(fd, item, <Value to insert>);
newsyncBo.insertRow(item);
dataFacade.insertSyncBo(newsyncBo);
//Commit the transaction          
transactionManager.commit();
                                    use this  code..
                               Regards
                               Kishor Gopinathan
Message was edited by: Kishor Gopinathan

Similar Messages

  • How can I upload a video from my PC through I tunes to camera roll on my iPhone? Is there an app or format of specific video supported? Sync from photos include video doesn't work for me.

    How can I upload a video from my PC through I tunes to camera roll on my iPhone? Is there an app or format of specific video supported? Sync from photos include video doesn't work for me.

    download the new you tube apps in i tunes, in os6 just pick a video in the photos apps and select share, the old you tube app icon will appear

  • How do I upload the music in a list that is not purchased music from my iPad to my computer. It doesn't sync automatically.

    I want to download the new 5.0 software to my iPad 2 but I don't want to lose all the music I have in my lists in iTunes. When I sync with the computer, these songs do not automatically sync. Only the ones in "purchased" music will upload. How do I upload these files to my computer from my iPad for downloading later after installing the new software?

    How did you get the music onto the iPad if it is not purchased music and it was not imported via iTunes?
    Manually manage content is for adding content to the iPad from the computer. It is in the summary tab in iTunes.
    If you want to transfer content from the iPad to your computer (if I understand you correctly) - this will help.
    http://www.wideanglesoftware.com/touchcopy/index.php?gclid=CMC-np7qnawCFcFw4AodM 1Kv2g
    Message was edited by: Demo

  • How can you upload a movie to I tunes then sync with Ipad2?

    how can you upload a movie to I tunes then sync with Ipad2?

    There are several options to choose from its either you will buy directly from itunes which go directly to movie. Another option is that convert first your movie to mpeg4 by using any converter software, then after converted drga the file (movie) to itunes library. Next thing you will do is to click your account (your ipad device) then look movie tabs then check sync movies.

  • I was filling a form online, then I got to where I had to upload an Microsoft document but when I clicked on upload document I only had the option of uploading photos and videos, but not Microsoft doc. Please help.... How do I upload Microsoft doc related

    I was filling a form online, then I got to where I had to upload a Microsoft document but when I clicked on upload document I only had the option of uploading photos and videos, but not Microsoft doc. Please help.... How do I upload Microsoft doc  and other related office documents?

    tis true
    I know, I always do that but I was in a rush to get somewhere and I was relying on my thousand dollar Mac to do some kind of recovery or something. I know Microsoft always keeps temporary files (I think Mac does too, part of me asking here in this forum was for someone to tell me where I can find those files) and when you go to open Office Works then it gives you the option of opening the last recent documents, saved or not saved.
    I usually copy paste into my emial just in case something goes wrong with the created document but I just didn't have the time to login and do all that My loss, you live and you learn, BUT still if ANYONE got any info on this, PLEASE DO CHIME IN *keeping the hope alive*

  • How can you upload photos to FaceBook from iPhoto without using the sync where is deleted in iPhoto it will be deleted in FaceBook

    How can you upload photos from iPhoto to FaceBook without having the sync where if you delete from iPhoto you delete

    I think you have to have the files on your HD. So either put them in iPhoto or copy them to a folder in Finder, and from there you can upload to Facebook.

  • License Transfer for Production Premium CS5 - form has been filled out, how do I upload and file a case?

    Hi guys,
    I would like to transfer my license to another person, we have both filled out the form but the helpline isn't working, the chat has been unavailable for the past 5 days so how do I upload it and file a case so the new owner can register the product in their name?
    Thank you

    this is the help available online, Transfer an Adobe product license
    if you've already followed those steps and need more help, you'll need to contact adobe support by clicking this link and then clicking 'still need help', https://helpx.adobe.com/contact.html

  • Smart sync error detection

    Hi,
    I am developing a Smart Sync application and I am trying to read the ErrorConflict inbox. There is a special class for it called surprisingly ErrorConflictInbox. I have at the backend a call transaction logic, and I am simulating an error in this giving bad datum data to the call transaction. I am exporting a RETURN structure and after the call transaction I set the fields of it. In merep_mon transaction I can see that the return type of my BAPI is 'E' (error) though no error text can be seen in the transaction. What is worse, on the client side I can see no message regarding this error. In merep_mon I can see a line telling: Inbox data deleted (mobile ID = 0000000167, sequence number = 26). Could it be the cause that no error message appear on the client side? Or my approach is totally wrong?
    I am using the following code:
    try {
      SyncBoDescriptor sbd = dbAccess.getSyncBoDescriptor(SYNCBO_NAME_CREA );
      ErrorConflictInbox errorConflictInbox = SmartSyncRuntime.getInstance().getInboxNotifier().getErrorConflictInbox();
      MeIterator it = errorConflictInbox.getSyncBoResponses(sbd);
      while( it.hasNext() ) {
        SyncBoResponse sbr = (SyncBoResponse) it.next();
        String text = sbr.getText();
        aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = {0}", text );
      } catch( Exception e ) {
          aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = {0}", "Error reading SyncBo responses" );
         aLogger.log(Severities.DEBUG, "PALS: SyncBoResponse = ", e.getMessage() );
    So does anybody know how to handle errors and conflicts and how to show it to the user when I restart the application after synchronization?
    Any help is highly appreciated.
    Regards,
    Pal

    Hi Jo,
    yes, I have an upload SyncBO, and I sent some data to the backend which applies a call transaction logic for the incoming data. I sent purposely wrong datum data to have an error at the backend which I wanted to show to the client. At the backend I filled up the return structure with the error message of the call transaction, and at the client side I set up a MessageReplyObserver and a SyncReplyObserver object to catch this error message. The MessageReplyObserver didn't react at all for the error, and the SyncReplyObserver got an error message but it was a Middleware generated error message (Message class MEREP_01, message number 185) not the message with which I filled up the return structure. My question is how can I see the message from the backend at the client side.
    Thanks for your reply,
    Regards,
    Pal

  • Smart sync application

    Hi!!!
       I am using WebAS 6.40 SP16 and MI client is MI2.5 sp15 patch04.
    I want to create a smart sync application for practice.I am just trying the examples given in the MDK
    (for them the BAPI wrappers already exist).I created a syncBO for the bapi wrapper MEREP_CONTACT_GETLIST.I followed the
    procedure given there.But finally When I deployed the aplication on the webConsole and assigned a user to it,the link for the
    application is coming.But When I click on that I am getting the following error.
             Error: 500
    Location: /me/jsp/login/login.jsp
    Internal Servlet Error:
    javax.servlet.ServletException
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:461)
    at jsp.login.login._jspService(Unknown Source)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
    at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(Unknown Source)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:534)
    Root cause:
    java.lang.NullPointerException
    at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:103)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:308)
    at com.sap.ip.me.api.services.MEResourceBundle.handleGetObject(Unknown Source)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:308)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at jsp.login.login._jspService(Unknown Source)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
    at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(Unknown Source)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:534)
      What could be the possible error? Are there any sample examples for creating a smart sync application...
    Kindly help me in this issue.

    Hi Veerabhadram Mantha ,
    <<Please guide me in that I could not understand what is meant by deploying the application with language resource text.Could please u explain that?Should I need to make any configugurations in the WebAs server before
    >>
    Jo meant ,
    just include the property file in ur application(because of that missing resource exception) ,then export it as WAR file and upload that WAR file corresponding to ur created MCD through Web Console ,assign that to particular user , while sync it will get downloaded to the client device (this downloading is just like deploying a J2EE application in to the server . in our case tomcat is the server for JSP Runtime).(deploy).
    If u need to change entries in the configuration file (Client specific configuration), then only u have to do conifiguration in MI server(if ur MI server is configured properly).
    <<Exception is Missing Resources>>
    Have u included any resources(language specific property files or property files for configurations) in your SmartSync Application?.
    If yes,
    correct the reference to that resource file in ur code.
    one more thing..
    r u using SP 09 version of developer studio for creating Smart Sync Applications.
    Structure and working of(APIs used for running application in cliet side.)applications developed in SP 09 is different from those applications created in higher versions(from SP 11 v onwards ).
    If u r using SP 9 , then atleast upgrade or install SP 11 (i think latest is SP 16) and try to create applications in that.
    just refer this forum , in this forum i have already discussed in detail about the structural differeces of applications in SP 09 and SP 11 or higher .
    Re: SAP MAU MVC
    After making changes to ur application , u dont have to uninstall that application . u can modify the installed applications using this way .. just refer this blog.....
    /people/kishor.gopinathan/blog/2006/03/17/how-can-we-apply-mi-application-patches
    <<smart sync tutorial for creating smart sync applications.
    Are there any other documnets for the same purpose?
    >>
    just refer these links for help.
    http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/defining_syncbo.html
    http://help.sap.com/saphelp_nw04/helpdata/en/a6/c32a89005ab2449cf95e5b0731ee40/frameset.htm
    http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/bapi_wrapper_types.html
    Troubleshooting guide
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/909d75c3-0801-0010-5f92-920a78c53daa
    Regards
    Kishor Gopinathan

  • Smart Sync APIs????

    Hi All,
      I am new to MI and currently trying to understand Smart Synchorization. I have developed the SmartSync example given in MDK 2.5. However, I am not able figure out where & how I can use SmartSync API in it when the SmartSync Wizard has already done everything. Kindly let me know, if possible with examples, how  & when to use Smart SYnc API in a application already developed using SmartSync Wizard (other than what is given in MDK). Also if any body knows where I can find more SmartSync examples please let me know.
    Regards,
    Abhijit

    hello abhijit,
    the MDK will only create a skeleton of your application.
    you have to implement your business logic and create your
    application's UI as well.
    The MDK has tutorials included in it on how to create a
    simple application. This will give you an idea on how to
    use the APIs.
    http://media.sdn.sap.com/public/html/submitted%5Fdocs/MI/MDK%5F2.5/
    I would recommend you to read on the SmartSync javadoc
    also. Especially on the following interfaces that you
    will using commonly.
    SmartSyncRuntime
    SyncBoDescriptorFacade
    SyncBoDescriptor
    RowDescriptor
    FieldDescriptor
    SyncBoDataFacade
    SyncBo
    Row
    http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/javadoc/com/sap/ip/me/api/smartsync/package-frame.html
    Regards
    Jo

  • Smart Sync Error

    I try to run my first smart sync application from the smart sync tutorial on the mdk , but when I try to sync with the mi server I get "FieldValue cannot be null" message on the mi client trace . I use the merep_contact_getlist bapi wrapper that comes with sap installation , and I have generayed the records as it specifed in the mdk , my mi client , server and nwds are nw04 sp16 version.
    I don't know how to continue from here ?

    hello anna,
    if this happens on the initial data download, try checking
    on your table data e.g. MEREP_PERSON for mandatory fields
    having an empty values.
    check as well your syncbo definitions. you might have set
    all the fields as keys which will make the framework check
    for null values.
    regards
    jo

  • Querie regarding smart sync API

    Hi All,
    I have some questions:-
    Like when we create a Sync BO, we get an option in the merep_sbuilder to keep the processsing mode as Synchronous or Asynchronous.
    My question here is
    1. Is there any API available in smart sync with the help of which I can change the processing mode from my client application.
    2. Does this will create some inconsistency in the application I fi change the processing type from the Client application.. Is it possible.
    Please suggest
    Thanks and Regards
    Neha Mahanty

    Hi,
    Whether it is sync or async, the behavoiur from middleware's perspective is always async. By this what i mean is,
    1. If you are running in async mode, which is recommended mode, the client initiates a sync and doesn't wait for the reply. Then the middleware starts processing and once it is finished processing,  it will put into oubtound queue of the device. So next time when the client syncs it will get data.
    2. If you are running in sync mode, not always recommended, the client initiates a sync and keeps on executing the sync in the repetitive sync mode based on the timeout parameter & the time between repetitive sync interval parameters set, and in this mean time middleware starts processing and once finished and put into outbound queue, you will get data. From clients perspective it thinks that it is in sync mode, because they will not be able to do any changes to application, but infact it does a repetitive sync in the background till middleware gives some data or the client times out based on the parameter set.
    Now the point is how to achieve it.
    1. If you are sure that you always execute the sync of particular syncbo in sync or async mode, then as you said you can change the processing mode in the middleware so that in the merepmeta.xml file itself the syncbo's will be marked either for sync or aysnc mode.
    2. Other option is you need to model normal syncbo's but in code you can use smarsync API to either run in sync mode or asyncmode. I forgot the actual API but the same is already part of MAM25 application.
    Best Regards,
    Siva.

  • I have an iphone 4 with the latest updates, but icloud does not show store option. My pics and music are not on the cloud, how do I upload them from my phone to the cloud? I just paid $20 thinking i needed more storage, but that did nothing. help

    I have an Iphone 4 with OS 5.1.1 and it does not show store or music under my icloud tab in the phone. Also, my music and photos don't show on my icloud?
    My contacts show and find my iphone....on the icloud. I just paid $20 thinking more storage would help, but it didn't. How can i cancel that and get a refund?
    Where are is my music on the cloud? How do I upload my music to it? If I lose my phone, it looks like there is no where to go to retrieve my music.
    And itunes won't let me sync my music to my computer. It is all music that I've purchased on itunes.
    Thanks!

    You need to subscribe to iTunes Match to store your music on iCloud:
    http://www.apple.com/itunes/itunes-match/
    To transfer iTunes Store purchases made on your phone to your computer, connect your phone then choose "Transfer purchases..." from the File menu in iTunes.
    Photostream transfers photos taken on your iOS devices to other devices and your computer. For troubleshooting Photostream see: http://support.apple.com/kb/TS3989

  • How do I upload my music from my iPhone 3G to my iTunes account on a computer with Windows 7?

    How do I upload my music from my iPhone 4 to my iTunes account on a computer operting Windows 7 (computer A)?  All of my music is in my iTunes account on another computer operating Windows 7 (computer b), but I can't seem to get my iTunes account on computer a to recognize the music on computer b (it is the same shared iTunes account), nor can I figure out how to get all of that music, which also is on my iPhone, transferred from my iPhone to computer a.

    Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • How do i upload music from my itunes account to my iphone ?

    how do i upload music from my itunes account to my iphone ?

    Hi viper1997,
    Welcome to the Support Communities!
    There are two ways to get music onto your iPhone.  If you have the latest version of iTunes installed on your computer, you can setup manual syncing so that you transfer the playlists, artists or albums that you want on your iPhone.
    You can also download music you've already purchased from the iTunes store to your iPhone at any time.
    The following links will provide additional information to get you started.   You don't mention what computer you are using, so I'll assume a Mac for now, as the basics are the same.
    The iPhone User Guide is a good place to start:
    Get music - iPhone
    http://help.apple.com/iphone/7/#/iph3cf219ca
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/HT2519
    I hope this information helps ....
    Have a great day!
    - Judy

Maybe you are looking for

  • How do I get rid FX4 and go back to 3...? I cannot use photobucket uploader 1.3 with this present system? Thanks

    I am not so tech adept. When u sent me an upgrade for Firefox4 I downloaded and was off and running. Unfortunately I have a couple picts that I cannot get onto Photobucket for a further pass on as the format document they are saved to is unrecognised

  • Reading File from Application Server using Read Dataset

    Hi, i am trying to read excel file from Application Server and has multiple records in that based on structure below. but when i execute its giving me error message.here is the code, can sumone suggest me on this please ?? FORM f_data_upload .   DATA

  • Exchanging iPhone multiple times?

    Has anyone here done multiple exchamges at the Apple store? Reason I am asking is that both my first iPhone 4 and the exchanged one seem to have a more prinounced antenna issue than my wife's iPhone4. The latest one they gave me has a reddish cast on

  • Airport express ethernet troubleshooting with Belkin Powerline HD

    Dear All, Equipment: x3 Airport Express stations (G generation not N) x3 Belkin Powerline HD (up to 1000mbit) x1 iMac plugged (connected via ethernet) I have three airport express devices around my house in order to play music in those rooms from itu

  • Org Structure Craetion - 2

    There is a req to create new Company since client moved into new business. Company Policies, Work Timings, Leaves everything remains same including Grades & Levels, everything will be same. Finance Team Created New Company Code... For my part I intia