How to write Sync service in ABAP

Dear Experts,
              i m very new to ABAP dev, can anybody help me how to write a sync service in ABAP and how to call a function module in to that sync service.
               My requirement is i want to upload the data from the clint and download the data to client from the backend. i had written the function module to create a customer in CRM, now i want to push the data to create a customer from the client, for this i need to write a sync service for above requirement,
            plz help me out how to write a sync service.
                       Regards
                        eswar

Hi Jyotirmoy,
Check this thread for Subquery
http://help.sap.com/saphelp_nw04/helpdata/en/dc/dc7614099b11d295320000e8353423/content.htm
Correlated, non-scalar subquery:
REPORT demo_select_subquery_1.
DATA: name_tab TYPE TABLE OF scarr-carrname,
      name  LIKE LINE OF name_tab.
SELECT  carrname
  INTO  TABLE name_tab
  FROM  scarr
  WHERE EXISTS ( select  *
                   FROM  spfli
                   WHERE carrid   =  scarr~carrid AND
                         cityfrom = 'NEW YORK'        ).
LOOP AT name_tab INTO name.
  WRITE: / name.
ENDLOOP.
This example selects all lines from database table SCARR for airlines that fly from New York.
Scalar subquery:
REPORT demo_select_subquery_2.
DATA: carr_id TYPE spfli-carrid VALUE 'LH',
      conn_id TYPE spfli-connid VALUE '0400'.
DATA: city  TYPE sgeocity-city,
      lati  TYPE p DECIMALS 2,
      longi TYPE p DECIMALS 2.
SELECT  SINGLE city latitude longitude
  INTO  (city, lati, longi)
  FROM  sgeocity
  WHERE city IN ( select  cityfrom
                    FROM  spfli
                    WHERE carrid = carr_id AND
                          connid = conn_id      ).
WRITE: city, lati, longi.
This example reads the latitude and longitude of the departure city of flight LH 402 from database table SGEOCITY.
Thanks,
Vinay

Similar Messages

  • How to write sync service in sybase unwired platform

    Hi
    How to write sync service in sybase unwired platform?
    Thanks in advance....

    Hi!
    A RESTful web service (also called a RESTful web API) is a simple web service implemented using HTTP and the principles of REST. It is a collection of resources, with three defined aspects:
    - the base URI for the web service, such as http://example.com/resources/
    - the Internet media type of the data supported by the web service. This is often JSON, XML or YAML but can be any other valid Internet media type.
    - the set of operations supported by the web service using HTTP methods (e.g., POST, GET, PUT or DELETE).
    On Sybase Unwired WorkSpace you can select, in Enterprise Explorer, REST Web Services connection defining a resource base URL and URI template, and then using this as MBO defining HTTP method and parameters.
    Try this:
    http://en.wikipedia.org/wiki/Representational_State_Transfer
    and this:
    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01283.0155/doc/html/fre1261416769728.html
    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01283.0155/doc/html/fre1261424660910.html

  • How to consume WEB SERVICES from ABAP ??

    Q: How to consume WEB SERVICES from ABAP program??
         the point here is i am using SAP release 620 and the creation of proxy is out of scenario
         and also no XI.    Its only through ABAP program i need to consume one web service (its a HTTPS one ),
        Using cl_http_client... i tried it but i am totally confused of whats happening ???
    Req some senior ppl advice on the same/approach.
    any hints will suffice my way of approach...!!!
    Please do put in your valuable advices..!!
    Thanks in advance..!!!!

    Hello Srinivas,
    Following is the code for calling web service:
    data: client type ref to if_http_client,
          host   type string value 'server url',
          service type string value '8080',
          path type string value '/sap/public/ping',
          errortext type string,
          proxy_service type string,
          scheme type i value 1.
    call method cl_http_client=>create
    exporting host  = host
            service  = service
         proxy_host  = host
       proxy_service = service
       scheme        = scheme
    importing client  = client
    exceptions
        argument_not_found = 1
        internal_error     = 2
        plugin_not_active  = 3
        others             = 4.
    case sy-subrc.
      when 0.
         write 'Server reached successfully'.
      when others.
         write: 'sy-subrc =', sy-subrc.
    endcase.
    Once you got the client object you can call following methods:
    "Set the requrie URL for the web service you want to call. This is not WSDL anyway!!
    cl_http_utility=>set_request_uri( request = client->request
    uri =' url 2 be called ').
    *Then you can call send method with proper inputs for sending request to WS
    CALL METHOD client->send
    Then you can use receive method for getting the response
    CALL METHOD client->receive
    *You can get last error in case of exceptions
    CALL METHOD cl_http_client=>get_last_error
    *Close the client object
    CALL METHOD client->close
    For more information on full code refer my link in previous replay.
    Thanks,
    Augustin.
    Edited by: Augustarian on Aug 18, 2009 1:49 PM

  • How to consume Web Services form ABAP ?

    Hi,
    Please advise how to consume web services from ABAP Code ? is there any automatic generating proxy class in order to consume web services ?
    I am using NW 7.0 SP15
    Thank You and Best Regards
    Fernand Lesmana

    Hi Fernand,
    chk out for this link
    Consume an ABAP Webservice (WAS 620) from .Net
    Send SMS to India from ABAP
    working web service from ABAP
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a4433436-0301-0010-f2a9-9281ad574054
    Regards
    Sampath

  • JPA, how to write a service to persist objects in a 1-to-many relationship

    i am using JPA for data persistence. i have two objects that are involved in a one-to-many relationship. for example, i have an object, Company, and Company can have one or more, Employee. i then define a service called, CompanyDao, which has the usual create-read-update-delete (CRUD) operations. my problem is that when i instantiate a new Company with new Employees and call CompanyDao.create(Company), i keep getting an exception.
    Cannot add or update a child row: a foreign key constraint fails (`demo`.`employee`, CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `company` (`id`))
    i have an intuition on why this is happening. when i call CompanyDao.create(Company), the newly instantiated Company doesn't yet have an id (its unique identifier). that is why when it tries to insert the Employees of Company, i get this problem. but, my question is, shouldn't JPA take care of all of this for me? shouldn't it know that it is creating a new Company, will have to insert it, will have to retrieve the unique id (generated) and then populate the employee table with this id?
    i was thinking about this problem, and i thought maybe i could insert the company first and then the employees later. however, the problem is, once i insert the company, how do i get its unique id? i cannot query for it any other way (i.e. by name) that will return a unique result.
    if anyone knows of a good, comprehensive tutorial on how to write a service demonstration CRUD operations on objects with one-to-many relationship, please let me know.

    Hi,
    Could you please send CompanyDao.create(Company) code so that we can dig in to problem.
    Regards
    Murali N

  • How to consume Web Service in ABAP WebDynpro

    Hi
    I want to know the entire details about how to consume Web Service in WebDynpro application.
    regards
    Piyush

    hI piyush,
    Have a look at this Blog by Thomas Jung.
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap
    on consuming webservies thru webdynpro ABAP
    Cheers
    Mary

  • How to use web service with ABAP Web Dynpro

    Hi.
         do you know, how to web service with ABAP Web Dynpro?

    Hi,
    If you have a webservice ready with you then you can generate a proxy from SE80 and you can use that. You just have to create a port and assign to that generated proxy(CLASS) and you are good to go.
    Let me know if you need more information.
    Thank You,
    Gajendra.

  • How to write a log using abap mapping

    Hi all.
    in PI 7.1 environment I need to use abap mapping and I wish to write some XML data into a table that I created for logging the data.
    I know that using the abap mapping I can parse an XML file. My question is how to write this table defining a specific method, if it is necessary.
    Any help or suggestion is well appreciated.
    Many thanks in advance for your kind cooperation.
    Regards,
      Giovanni

    hi,
    >> My question is how to write this table defining a specific method, if it is necessary.
    just like to normal table (insert statement)
    parse XML and get the data you need and just insert into the DB table
    there are many tutorials showing how to parse xml file inside abap mapping
    so just do a little search on sdn
    Regards,
    Michal Krawczyk

  • HT5293 how to find sync services on my mac os x

    I have an operating system OS X 10.5 I want to transfer my bb 9750 contacts to my Mac , how do i put on my sync services . This is needed to work with the downloaded BB software to transfer my contacts

    10.9.5 is Mavericks.
    You'll have to check with Blackberry, it's their phone

  • How to write Tuxedo service with conversational mode ?

    Is there anyone do me a favour and tell me how to write the conversational service
    ? I failed to use tpconnect to set up the converational communication channel
    since the returned error number from tpconnect is 6.
    Many Thanks !

    "huchacha" <[email protected]> wrote:
    >
    Is there anyone do me a favour and tell me how to write the conversational
    service
    ? I failed to use tpconnect to set up the converational communication
    channel
    since the returned error number from tpconnect is 6.
    Many Thanks !Hello,
    1. TPNOENT=6 (from atmi.h).
    2. After tpconnect (from Tuxedo docs):
    [TPENOENT] Cannot initiate a connection to svc
    because it does not exist or is not a conversational service.
    3. Check SERVER section in ubbconfig,
    for example (from Tuxedo docs):
    CONV = {Y | N} specifies whether or not the server
    is a conversational server.
    Connections can only be made to conversational servers,
    and rpc requests (via tpacall() or tpcall()) can only be made
    to non-conversational servers. The default is N.
    Best regards,
    Vladimir

  • How to open sync services for blackberry?

    Hi
    Need to put blackbeery contacts onto i tunes but need to open sync services.
    Can someone help.

    HorseDaddy70 wrote:
    wow. it worked fine with Lion. since i upgraded to Maverick nothing.
    Yes, it was deprecated when Lion was released.
    That is Software-speak for, "we don't plan on supporting this much longer. You need to find another solution."
    They supported it through Lion and Mountain Lion, but have stopped supporting it with Mavericks.

  • How to write a subquery in ABAP

    Please send some example of subquery !

    Hi Jyotirmoy,
    Check this thread for Subquery
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/dc7614099b11d295320000e8353423/content.htm
    Correlated, non-scalar subquery:
    REPORT demo_select_subquery_1.
    DATA: name_tab TYPE TABLE OF scarr-carrname,
          name  LIKE LINE OF name_tab.
    SELECT  carrname
      INTO  TABLE name_tab
      FROM  scarr
      WHERE EXISTS ( select  *
                       FROM  spfli
                       WHERE carrid   =  scarr~carrid AND
                             cityfrom = 'NEW YORK'        ).
    LOOP AT name_tab INTO name.
      WRITE: / name.
    ENDLOOP.
    This example selects all lines from database table SCARR for airlines that fly from New York.
    Scalar subquery:
    REPORT demo_select_subquery_2.
    DATA: carr_id TYPE spfli-carrid VALUE 'LH',
          conn_id TYPE spfli-connid VALUE '0400'.
    DATA: city  TYPE sgeocity-city,
          lati  TYPE p DECIMALS 2,
          longi TYPE p DECIMALS 2.
    SELECT  SINGLE city latitude longitude
      INTO  (city, lati, longi)
      FROM  sgeocity
      WHERE city IN ( select  cityfrom
                        FROM  spfli
                        WHERE carrid = carr_id AND
                              connid = conn_id      ).
    WRITE: city, lati, longi.
    This example reads the latitude and longitude of the departure city of flight LH 402 from database table SGEOCITY.
    Thanks,
    Vinay

  • How to write Web Service Log to a file in Java

    Hi..
    I have a requirement that I need to maintain Log file of my web service which is deployed on OC4J server.
    Is there any API for this ? Or any other way to do it ?
    Regards,
    Ajay

    Hi..
    Thanks.
    Instead of using Logging API, I created own class to handle Log.
    But my issue is When Ever I am appending Log to already created file the following Line is also appending.
    <?xml version = '1.0' encoding = 'UTF-8'?>I want this Line only one time in each log file.
    What should I do for this ?
    Regards,
    Ajay

  • TS1627 Any ideas on how to reset sync services on OSX Mavericks?

    http://support.apple.com/kb/TS1627 holds no answers.  The reset script sited for Mountain Lion doesn't exist for Mavericks.

    Thanks, GabrielHay. That's much clearer, now.
    I already use iCloud, and I'm looking for the iCloud equivalent of SyncServices (or something other than the suggestions I've found, so far, that will reset iCloud sync). That's what it seemed you were looking for: a way to reset sync in Mavericks, as opposed to a way to sync in Maverics. (Essentially.)
    So again, thanks.
    That said, there's no evidence that Apple has ever "mined" clients' data or would even care to. You're free, of course, to not like the idea of syncing via Apple's servers. But to suggest that Apple "chose to switch off SyncCervices" in order to "give themselves a bigger database of client data to mine" is simply unfounded.
    I'm always amused at the notion that despite Apple having hundreds of millions of customers, a given individual is somehow convinced that Apple would care about his data.
    Apple doesn't care about your calendar. Or your contacts. Seriously.
    Think of the many thousands of celebrities and dignitaries who use Apple products. If Apple were paying any attention to their data, let alone doing anything with it, the revolt and backlash would be legendary. I personally know many people who have the contact info for hundreds of celebrities and such in their Apple Contacts and Calendar apps, and not one breach has ever, ever occurred.
    Consider the unfortunate security breach that Target sustained, last week. It's been all over the news, every single day, for nearly a week. If Apple were doing anything of the sort, no one would stand for it. No one! Apple has far too much to lose to do something stupid like that. And to what end? So they can see where a user's having dinner? Or what time his staff meeting is? Even a celebrity's calendar is pointless. What good would it do Apple to know that Charlize Theron's having lunch with Ewan McGregor. None.
    You seem like an intelligent guy. If you think through what you're proposing, you'll realize Apple would stand to gain nothing by doing what you suspect -- and in fact would stand to lose everything.
    Thanks again for the clarification. And best of luck!

  • How to write a programm in abap to the variables in tree format using inter

    if we take the elements as A,X,Y,D,E,F,G,H,Z.
    A is parent node.
    X,Y are child nodes of A.
    D,E,F,are child nodes of X.
    G,H,Z,are child nodes of Y.
    the output will be like this if we any elements
    A X D E F Y G H Z.
    here a has two child nodes.
    X has a parent node A and child nodes D E F.
    Y has parent node A and child nodes G H Z.

    Hi Ramana,
    Welcome to SDN
    Just go through the demo programs provided by SAP. Goto SE38, type BCALV_TREE* and hit F4. You'll get a list of demo programs for trees.
    Hope this helps.
    Regards
    Anil Madhavan

Maybe you are looking for

  • How can I see a running balance of my itunes spending?

    Is there any way I can see my running balance of what I have spent on my account?  For example if I had £10 in my account and I bought one item at 99p it would show running balance history of £9.01.

  • Internet explorer 11 slow or not loading pdf

    Window 7 Ultimate SP1. Internet Explorer 11 Version 11.0.9600.17420 Adobe Acrobat Reader X Adobe Acrobat Pro X Since updating to IE11 pdf's are either extremely slow (twenty minutes at least)  loading or will not load just getting the blue circle. If

  • Yosemite restarts when on a Skype call

    Hi, i Have updated to yosemite not long ago, i installed Skype the latest version, and made a call after a few minutes the call freezes and the mac mini restarts and i got to log back into Skype and yosemite! has anyone been facing the same issues wi

  • Consolidating with two controlling areas

    Hi We are looking to implement JVA on our SAP system, and for this there will be requirement for a second controlling area to be created.  We see this as causing us problems regarding consolidation in BCS u2013 We were wondering if anyone knows if it

  • What does sales order type:zsds,zsdr,zscr ,zscd mean?

    What does sales order type : zsds,zsdr,zscr ,zscd mean? Please provide the fullform and a short description.