Connecting SAP with VB 2010

Dear gurus
I'm Using Visual Basic 2010 and i want to connect SAP from my applications.
I have find that SAP net connector works only on VB 2003 not for upgraded version.
Can you please guide me
Regards
Saad Nisar

Hi Saad,
The current NCo version is limited to usage with .NET 1.1 and within VS2003.
However, there is a by SAP-documented workaround to enable the NCo to also utilize with .NET 2.0 and later runtime context / and within VS2005 and later: [Using SAP Connector for MS .NET (NCO) in Microsoft Visual Studio 2005|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/92333e6b-0b01-0010-9cbf-fecd62d6c895]
Note also that SAP has a new version of NCo in the pipeline - .NET Connector 3.0 - it might be worth it to try to participate in the beta program. See [SAP announces new release of SAP .NET Connector|http://williamvanstrien.blogspot.com/2010/06/sap-announces-new-release-of-sap-net.html]
Also see this earlier [post|Re: Which connector to use?]
Best regards, William.

Similar Messages

  • Connecting SAP with an independent SQL database

    Dear all,
    I need to connect SAP with an independent MSSQL database.
    My requirement is to transfer a set of records from my Ztable to a table in SQL database.
    I have maintained the settings in DBCO transaction. I maintained DBMS as 'MSS' in DBCO.
    send some sample code of how to establish the connection. Is it possible to write data in to SQL database.
    How to edit the file tnsnames.ora in application server directories. I heard that for connecting to an oracle database we need to edit this , is it necessary to edit this tnsnames.ora even for connecting with SQL database?
    Thanks in advance.
    Lakshman

    This is not possible.
    My suggestion is that you create shell scripts on the unix side that copy the data to the other database.
    ARD runs it's own private copy of PostGgreSQL inside the package so it won't interfer with any other SQL databases on the network or even on the machine.

  • Steps needed or any guidance to connect SAP with DB2,

    Hi Experts,
    I need detailed steps to connect SAP with DB2 server. If any standard document or any one is having any docs / hints can provide , it would be a great help to me.

    Hello Mamata,
    If your current ECC 6.0 is also on DB2/400, you can use DBCO - outlined in the following blog.
    /people/sap.user72/blog/2006/08/31/configure-dbco-database-multiconnect-on-ibm-i5iseries
    If the retail business can be moved to SAP solution, plain SAP RFC just works fine. If not, you can install a SAP gateway instance on DB2.
    There are many options. It could be hard to identify the best choice without a detailed review/analysis.
    Best regards,
    Victor

  • Integrating SAP with Sharepoint 2010

    Hello All,
    I need some information regarding integrating SAP R/3 with Sharepoint 2010. I am aware of BCS solutions to connect SAP BSP/WebDynpro/Portal enabled processes to Sharepoint. However, I would like to whether we can call an SAP Transaction directly from Sharepoint without developing BSP pages or WebDynpro?
    Can we achieve something on Sharepoint 2010 like ITS does on SAP Portal? If yes, how to do that?
    Thanks,
    Anil

    Hi Anil,
    with Duet Enterprise you can bring RFC or WebServices that are available in your backend system into SharePoint 2010. So if your transaction consits of several RFCs that are called in the background -- you can do that. Depending on the transaction you might also have to develop the value help functionalities and stuff like that.
    You can checkout the videos on the [Duet Enterprise Summit|http://www.duetenterprisesummit.com] site where some customers talk about what they have developed during the ramp-up..
    However, if you want to bring ITS / SharePoint Web-SAP-GUI functionality into SharePoint this will be pretty complicated...
    Regards,
    Holger.

  • Connecting SAP with Excel (Beginner)

    Hello!
    I'm new to the SAP scripting. On my company we use lots and lots of Excel spreadsheet lists with sales orders and projects, which is why i need to learn to connect those lists with SAP.
    I have a list of sales orders in Excel starting downwards from cell A2 and I want to get the exchange rate on each of the orders from the header of VA03, so that the script copies the currency rate of each sales order next to the order number in the spreadsheet.
    How do i do this? :s
    Thanks, Mattias

    Hi Mattias,
    if you have allready worked with Scripting (Recording) you allready have the way to connect excel with SAP
    To Connect an existing Instance of SAP with Excel you will need this code:
    Public sapsession
    Public Sub Connect_SAP()
    If Not IsObject(SAPguiApp) Then
    Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
    End If
    If Not IsObject(sapsession) Then
    Set sapsession = sapConnection.Children(0)
    End If
    If IsObject(WScript) Then
    WScript.ConnectObject sapsession, "on"
    WScript.ConnectObject sapApplication, "on"
    End If
    End Sub
    at end of all action you have to destroy all objects
    Public Sub Destory_SAP()
    set sapsession = nothing
    set sapapplication = Nothing
    set sapGuiapp = Nothing
    End Sub
    PS Look for Threads that have the same Title as yours -
    There are many in this forum ...
    Greetings
    Thomas B

  • Connecting SAP HRIS with Kenexa BrassRing

    Hi Experts...
    I am not sure that HR would be the right forum to discuss this but since this is HR related, I'll take a stab...
    We would like to connect SAP with Kenexa BrassRing. Since we do not use SAP PI, we will need to directly connect with Kenexa BrassRing.
    What are our options to connect and transfer data between the two system. I have been reading about using XML but are there other options to look at. What would you suggest that would be easy to implement and maintain.
    Thank you in advance for all responses...
    Regards,
    Harshal

  • What's the best way to connect Cognos with SAP 4.6c on iseries V5R4

    We have SAP 4.6c on iseries V5r4.
    What's the best way to connect Cognos with SAP so that data could be extracted from SAP and create reports with Cognos.
    Thanks
    Joe

    DB2 Connect version 8.2 is no longer supported by IBM (support ended April 30, 2009, see http://www.ibm.com/software/data/support/lifecycle/). As far as I know, DB2 Connect is communicating through DRDA, which is a platform-independent protocol supported by all DB2 platforms, so any DB2 Connect client should be able to talk to any DB2 database. However, there may be limitations on the supported release combinations.
    Kind regards,
    Christian Bartels.
    Edited by: Christian Bartels on Sep 6, 2010 4:17 AM

  • Configuring JCo3 Connection Pool with single sign on on non SAP Java server

    Hi Everyone,
    i have configured a connection pool on JBoss as per JCo3 Documentation and is working great.
    Now I need help to configure this connection pool with single sign on so that RFc on SAP ECC systems are executed using end users credential rather than using single user name password used to configure JCo connection pool.
    On SAP Java stack I am sure its possible within Java WebDynpro    and i assume using JCA resource adapter. But what if we don't want to use SAP Java App server.
    Any help will be appreciated.
    Thanks,
    Divyakumar Jain

    Eason, 你好!
    I have exactly the same problem.  Did you find a solution to this problem?  If so, please let me know!

  • I am trying to connect my Macbook pro 2010 to my Samsung HDTV using a mini display port to hdtv cable. Trying to play a slide show in IPhoto but I only get sound with no picture. Does anyone have any suggestions?

    I am trying to connect my Macbook pro 2010 to my Samsung HDTV using a mini display port to hdtv cable. Trying to play a slide show in IPhoto but I only get sound with no picture. Does anyone have any suggestions?

    I keep saying this over and over, in the hope that people who do a search will find it.  Apple cannot possibly test for or be reponsible for the bazillion combinations of adapter, cables, and TV's out there.  The only monitors that are 100% guaranteed to work with the MacBook Pro are the Cinema Displays and Thunderbolt Displays, because, they're made by Apple.  They're expensive, but they work perfectly.
    My guess is that you bought a cheap MDP to HDMI cable, or have a defective one.  From my reading of these boards over the past few months, cheap cables have a high failure rate.  And the regular priced ones have only a slightly less of one.  Try a new one.  Make sure you do not damage the Thunderbolt port.

  • CR2008 connectivity issue with BOE Universes(sap and non sap universes)

    Hi Experts !!
    Recently we tried to build/connect to a Universe in Crystal Reports2008 via 'Make a new connection tab'.
    The universes are of SAP BW or non SAP Lying in BOE Servers and we are trying to build reports on them by conncting/utilizing the universes as a database for Crystal Reporting.
    Our issue is most of the time we are not able to connect to the Universes and the connectivity blows out by some 'communication Error' thing initially.
    While at some other points in time, the connectivity takes us to the Universe and we are able to select few characteristics and key figures from the Universe but the moment we go futher and try to run by pressing 'OK' button it blows out and say' LOGON FAILED'.
    Apparantly, it is an connectivity issue with BOE server and from the different blogs it looks like it is a known issue for long.
    The proposed issue resolution were like either CR2008 should be SP2 with BOE SP3 or there should be some additional .dll files defined in the paths in case of MSSQL database. None of this applies to us as we are on CR2008 with SP3 and going back to SP2 is probably not a viable option for us, and we are using Oracle as underlying database in this specific case.( i would like to tell you here that we are able to connect to Oracle Database directly though).
    We have raised a message with SAP and was just wondering if we do have some solution/workaround already available to this known issue in place please?
    Thanks&Regards.
    Edited by: AMIT GHILDYAL on Aug 1, 2011 2:41 PM
    Edited by: AMIT GHILDYAL on Aug 1, 2011 2:44 PM
    Edited by: AMIT GHILDYAL on Aug 1, 2011 3:14 PM

    Hi Amit,
    Moved to Universe Forum.
    If you have a case logged then no point posting here also, this is a public site and not a case management tool.
    Once you do get the solution from your case please post it here also to help others if they have the same problem.
    Thank you
    Don

  • Internal server error while connecting SAP's customer financial fact sheet with iOS device

    Hi all,
    I am trying to connect SAP's customer financial fact sheet latest ( version 3.7)   with iOS phone/iPAD (version 7.1) but it shows internal server error,
    when trying to connect  Neither "Gateway (direct)" nor "SMP Cloud" enabled with port 80/443.
    On other hand my android devices with this app is working ok.
    Trace Log is below:
    2014-09-11 11:27:58.298 Debug Communication error: Error Domain=HTTPRequestErrorDomain Code=11 "INTERNAL SERVER ERROR" UserInfo=0x15eef620 {NSLocalizedDescription=INTERNAL SERVER ERROR}
    2014-09-11 11:27:58.295 Debug Request http://server:8010/url t finished with error Error Domain=HTTPRequestErrorDomain Code=11 "INTERNAL SERVER ERROR" UserInfo=0x15eef620 {NSLocalizedDescription=INTERNAL SERVER ERROR}
    response <?xml version="1.0" encoding="utf-8"?><error xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"><code>HTTP/500/E/Internal Server Error</code><message> Call of service /sap/opu/odata/sap/fincustfactsheet terminated because of an error. The following error text was processed in system NQT : The ASSERT condition was violated.The error occurred on the application server . The termination type was: RABAX_STATE.If the termination type is RABAX_STATE, you will find more information on the cause of termination in system NQT in transaction ST22. If the termination type is ABORT_MESSAGE_STATE, you will find more information on the cause of termination on the application server  in transaction SM21. If the termination type is ERROR_MESSAGE_STATE, you can search for further information in the trace file for the work process in transaction ST11 on the application server . You may also need to analyze the trace files of other work processes. If you do not yet have a user ID, contact your system adminmistrator. </message></error>
    2014-09-11 11:27:58.286 Debug [ERROR] 500:INTERNAL SERVER ERROR/Location:-[ODPRequest startSynchronous] + 1427
    2014-09-11 11:27:56.239 Debug DE:Using SUP Manual User
    2014-09-11 11:27:56.238 Debug DE:Get svcDoc URL http://server:8010/url
    2014-09-11 11:27:56.216 Debug DE:startSAPODataRequest CompanyCodeCollection
    2014-09-11 11:27:56.204 Debug DE:SAPODataAccess dealloc CompanyCodeCollection
    2014-09-11 11:27:56.198 Debug DE:CustomerCardsViewController refresh
    2014-09-11 11:27:52.600 Debug Logging/Tracing on
    2014-09-11 11:27:19.792 Debug Communication error: Error Domain=HTTPRequestErrorDomain Code=11 "INTERNAL SERVER ERROR" UserInfo=0x193f3060 {NSLocalizedDescription=INTERNAL SERVER ERROR}
    2014-09-11 11:27:19.787 Debug Request http://server:8010/url  finished with error Error Domain=HTTPRequestErrorDomain Code=11 "INTERNAL SERVER ERROR" UserInfo=0x193f3060 {NSLocalizedDescription=INTERNAL SERVER ERROR}
    response <?xml version="1.0" encoding="utf-8"?><error xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"><code>HTTP/500/E/Internal Server Error</code><message> Call of service /sap/opu/odata/sap/fincustfactsheet terminated because of an error. The following error text was processed in system NQT : The ASSERT condition was violated.The error occurred on the application server. The termination type was: RABAX_STATE.If the termination type is RABAX_STATE, you will find more information on the cause of termination in system NQT in transaction ST22. If the termination type is ABORT_MESSAGE_STATE, you will find more information on the cause of termination on the application server  in transaction SM21. If the termination type is ERROR_MESSAGE_STATE, you can search for further information in the trace file for the work process in transaction ST11 on the application server . You may also need to analyze the trace files of other work processes. If you do not yet have a user ID, contact your system adminmistrator. </message></error>
    2014-09-11 11:27:19.768 Debug [ERROR] 500:INTERNAL SERVER ERROR/Location:-[ODPRequest startSynchronous] + 1427
    2014-09-11 11:27:12.717 Debug timeout
    2014-09-11 11:27:12.681 Debug timeintervalinminutes: 23506917 timeoutInterval: 0
    2014-09-11 11:27:12.679 Debug applicationGoesToForeground
    Can anyone help me how to troubleshoot this error?
    Any help will be highly appreciated.
    Thanks
    Mahesh

    are these LUNs shared or standalone?
    I don't think it's really wise to have more than one DSM on the same server, so you're mixing the EVA and 3par DSMs and on 2003...
    other than ensuring that HBA firmware and drivers are all up to date and DMS drivers are at the latest, not much else you can do from the host side...maybe update the storport.sys driver to the latest for that OS
    are you sure that the HBAs are in fact supported/compatible with both storage back-ends? what about their driver/firmware/DSM versions - some SANs are very picky when it comes to this stuff, check the interop matrixes to find out
    overall, if you don't need SAN connection to one of these storage back-ends, I suggest you get rid of it and its DSM

  • Hi I just got my new Apple TV and I cant figure out how to connect it with My MacBook Air (11-inch, Late 2010- Processor  1.4 GHz Intel Core 2 Duo) OSX Version 10.8

    Hi
    Hi I just got my new Apple TV and I cant figure out how to connect it with My MacBook Air (11-inch, Late 2010- Processor  1.4 GHz Intel Core 2 Duo) OSX Version 10.8

    Are you referring to mirroring or you just unable to set up homesharing.
    AirPlay Mirroring requires a second-generation Apple TV or later, OS X 10.8 or better and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer). It also requires the computer to be using wi-fi.

  • How to connect SAP R/3- System with SAP NetWeaver Portal (2004s)?

    Hello to all,
    sorry, can someone help me? How can I connect SAP R/3- System with SAP NetWeaver Portal (2004s)?
    Thanks and regards,
    Galyna

    Hi,
    In previous link contain this info
    This describes how to connect an SAP R/3 system to SAP NetWeaver Portal using an iView
    1)      Go to System Administration
    2)      Go to System Configuration
    3)      Go to Portal Content (Right Side Panel), open that folder.
    4)      Right Click on Portal Content, a Panel is displayed select "System (from Template)".
    5)      That will display a new view on right side, now select "SAP system using dedicated application server" from
    the existing templates. (Other templates are possible - for example, load balanced or through a SAProuter connection string).
    For this exercise, we'll use the simplest type.
    6)      Choose next
    7)      Give the System Name and System Id (which are mandatory fields) incase you want to give any brief notes
    about the system then give them in the "Description" field.
    8)      Open the Newly Created System.
    9)      Now when you want to create a New System, you have to fill four Properties they are:
    "Connector" - contains basic connectivty details
    "Internet transaction Server (ITS) - if you wish to use SAPGUI for HTML and/or IACs",
    "Web Application Server" - if you wish to access BSPs and/or Web Dynpro for ABAP and
    "User Management".
    You also need at least one "System Alias" has to be defined from the Display drop down menu.
    Make sure you have set end user access in the Permissions drop down menu to all users who need to access the system
    10)  Select "Connector" property, now fill the required fields such as:
    a)      Application Host (should be fully qualified hostname) - Give the R/3 "Application Name",
    which can be obtained from the SAP Logon Pad (check what R/3 system you are using, right click on it , go to the properties,
    it will open a window which has the Application Server Name.
    b)      Logical System Name - Give the logical name as defined in the backend system
    c)      SAP Client - Check the Client in the backend system and give the appropriate number (3 digits)
    d)      SAP System ID(SID)* - Check the R/3 properties and give the check for System ID
    e)      System Type* - Since we are connecting to R/3, select SAP_R3 system.
    f)       System Number - This is a two digit number that you can find in the SAP Logon Pad
    11)  Select "Internet transaction Server (ITS)" property, now fill the required fields like
    a)      ITS Description à Give some Description
    b)      ITS Host Name - Same as "Application Host" of R/3 (when integrated ITS) and should be attached with the
    port number of ITS Server (to get port number detailed description is given below). ex: hostname : port number
    c)      ITS Path - To get the path along with the port number you have to Log on to R/3 system. Use the
    Transaction Code "SICF", it opens a new window go to:
          default_host -> sap -> bc -> gui -> sap -> its -> webgui -> SAP GUI for HTML -> right click on
    that and click "Test Service'. This will open a new window, on the address bar you will find the "port number", and
    the path something like (/sap/bc/gui/sap/its/webgui). Use the path after the port number.
    d)      ITS Protocol - There are two protocols "http" & "https", select the appropriate protocol which is
    visible when you opened "Test Service" window.
    12)  Select "Web Application Server" property , now fill the required fields like
    a)      Web AS Description -> Give some Description
    b)      Web AS Host Name - same as ITS Host Name
    c)      Web AS Path - usually /sap/bc/bsp/sapd)*    
    Web AS Protocol - should be same as the ITS Protocol.
    13)   Select "User Management" property, now fill the required fields like
    a)      Authentication Ticket Type - Since we are not using SSO leave the field
    empty i.e. put in select mode. (Please note that longer term you will probably want to use SSO)
    b)      Logon Method - Select UIDPW.
    c)      User Mapping Type - In case you have administration rights then you choose "admin" or in case you
    just have user rights then choose "user", better go for "admin/user".
    14)   Since all the required fields are filled appropriately now create a System Alias name, this can be done by following steps:
    a) go to Display -> Select "System Aliases" give some Alias Name, let's call it "SAP_R/3"
    15)  Now that System is created we have to create a iView which will display the given Transaction Code.
    16)  Go To "Content Administration".
    17)  Go To "Portal Content".
    18)  Go to Portal Content (Right Side Panel), open that folder
    19)  Right Click on Portal Content, a Panel is displayed select "New" -> iView
    20)  Select iView template, click next
    21)  Select "SAP Transaction iView" from the list of templates available. Click next.
    22)  Give the iView name and iView ID. Incase you want to give any brief notes about the iView then give it in "Description" field. Click next
    23)   Select "SAP GUI for HTML" radio button. Click next
    24)  Now select the system which you have create "SAP_R/3", give some Transaction Code, say SE12 (Dictionary Display). Click next and Finish.
    25)  Now Preview the iView
    26)  You will see a new Window where in SE12 Dictionary Display window is displayed.
    Regards,
    Senthil K.

  • SSRS 2012 with SharePoint 2010: Unable to connect to the remote server

    We had originally installed SSRS 2012 with SP 2010 and I did not like how the installation was configured, so we uninstalled everything and removed the SSRS server from the SharePoint farm and uninstalled all the SQL bits (SSRS was deployed to web tier in
    sharepoint mode).
    I've since added a new application server to host the SSRS SharePoint Mode and Installed the reporting services add-in on the WFE.   For reference, I have 1 WFE and 2 App Servers.  the WFE has the Reporting Service Add-in and both App Servers have
    the SharePoint mode of SSRS installed as described here: https://msdn.microsoft.com/en-us/library/hh479774(v=sql.110).aspx
    I've also installed the Service Application and all seems to work well up until I make an attempt to create a report or data source on the WFE.
    It looks like somewhere, the WFE is still looking to connect to the original SSRS machine we installed.  I've gone through registry, config files and the SharePoint config database to see if I can see where the reference value is.  Still can't
    find it anywhere.  None of the Reporting commandlets are helping.
    Technically what is occurring;
    Add Reporting service content types and create a New Reporting Data Source through UI
    ULS Logs go after the url: /_layouts/ReportServer/NewSharedDataSource.rsds
    Exception occurs after some time because it times out trying to connect to wrong host.  Exception below:
    Exception encountered for SOAP method GetSystemProperties: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <WRONG HOST IP>:80
    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
    at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) -
    -- End of inner exception stack trace ---
    at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetConnectionProtocol()
    at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)
    No powershell commands or any of the settings in the service application allow me to set this.  Any help would be appreciated.
    20 Bay Windows Home Server (Not Vail!)
    http://piroozjavan.blogspot.com/

    Issue an iisreset on the WFE, and validate that SSRS Service is running on the App servers.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Error when connect to SAP with JCo Connector on linux

    Dear all,
    Please, i need help. i was tray to connect to SAP with SAP JCo on linux ubuntu, but i have an error.
    this is the error :
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
    Connect_PM  GWHOST=myhost, GWSERV=sapgw00, ASHOST=myhost, SYSNR=00
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       hostname 'avatar-bumi' unknown
    TIME        Thu Feb 14 15:25:48 2008
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -2
    MODULE      niuxi_mt.c
    LINE        388
    DETAIL      NiPGetHostByName2: hostname 'avatar-bumi' not found
    SYSTEM CALL gethostbyname_r
    ERRNO       110
    ERRNO TEXT  Connection timed out
    COUNT
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1125)
            at com.sap.mw.jco.JCO$Client.connect(JCO.java:3138)
            at sapjco.Main.main(Main.java:34)
    Exception in thread "main" com.sap.mw.jco.JCO$Exception: (121) JCO_ERROR_NULL_HANDLE: Invalid rfc_handle = NULL encountered
            at com.sap.mw.jco.rfc.MiddlewareRFC.nativeGetAttributes(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.getAttributes(MiddlewareRFC.java:1233)
            at com.sap.mw.jco.JCO$Client.getAttributesInternal(JCO.java:2940)
            at com.sap.mw.jco.JCO$Client.getAttributes(JCO.java:2994)
            at sapjco.Main.main(Main.java:38)
    How to resolve this error....
    Regards,
    Lisa
    Edited by: Lisa Yanti on Feb 14, 2008 9:35 AM

    I was resolve this error by my self.
    We can handle this error with registering our current IP and host name on /etc/hosts.
    example:
    content of /etc/hosts:
    127.0.0.1 localhost
    127.0.1.1 myhost.workgroup
    The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    added the ip and host name to be like this configuration
    127.0.0.1 localhost
    127.0.1.1 myhost.workgroup
    172.20.17.74 myhost
    The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

Maybe you are looking for