RFC & BAPI  with Visual Studio 2010 (C/ C++)

Hello,
I would to develop, into MS Visual Studio 2010 (c/ c+), a application that allows establishing a RFC connection to SAP (ECC6) and call a Z program, or call a BAPI from my c/c+ application.
Can you recommend a good documentation, possibly with examples?
If anyone has any sample code, maybe a project in MS VS (c/c++), would be great.
Sincerely,
Serena

Hi,
  Hope the following code will help you.
For establishing connection:
public class MyBackendConfig : IDestinationConfiguration
            public RfcConfigParameters GetParameters(String destinationName)
                if ("SE38".Equals(destinationName))
                    RfcConfigParameters parms = new RfcConfigParameters();
                    parms.Add(RfcConfigParameters.AppServerHost, "192.168.1.14");
                    parms.Add(RfcConfigParameters.SystemNumber, "02");
                    parms.Add(RfcConfigParameters.User, "abaper");
                    parms.Add(RfcConfigParameters.Password, "erpanderp");
                    parms.Add(RfcConfigParameters.Client, "800");
                    parms.Add(RfcConfigParameters.Language, "EN");
                    parms.Add(RfcConfigParameters.PoolSize, "5");
                    parms.Add(RfcConfigParameters.MaxPoolSize, "10");
                    parms.Add(RfcConfigParameters.IdleTimeout, "600");
                    return parms;
                else return null;
            public bool ChangeEventsSupported()
                return false;
            public event RfcDestinationManager.ConfigurationChangeHandler ConfigurationChanged;
Getting tables from BAPI:
private void button1_Click(object sender, EventArgs e)
            checkedListBox1.Items.Clear();
            RfcDestination prd = RfcDestinationManager.GetDestination("SE38");
            RfcRepository repo = prd.Repository;
            IRfcFunction companyBapi1 = repo.CreateFunction("ZBAPI_PACKAGE_OBJECTLIST");
            string package = "EU_" + comboBox1.SelectedItem.ToString();
            companyBapi1.SetValue("PACKNAME", package);
            companyBapi1.Invoke(prd);
            IRfcTable address1 = companyBapi1["TOBJECTS"].GetTable();
            if (address1.RowCount != 0)
                for (int index = 0; index < address1.RowCount; ++index)
                    checkedListBox1.Items.Add(address1[index]["PROGRAM"].GetString());
                    panel2.Visible = true;
            else
                MessageBox.Show("No Programs Found");

Similar Messages

  • Compile Plug-in with Visual Studio 2010 beta

    Hello there,
    I know that only Visual Studio 2005 is supported for the Acrobat SDK. But maybe one of you is also experimenting with visual Studio 2010 and got it to work.
    I get the following error message. Did anyone solve this problem.
    Error    105    error MSB3073: The command "if not "¬roSDKPIDir%"a == ""a if not exist "¬roSDKPIDir%" mkdir "¬roSDKPIDir%"
    if not "¬roSDKPIDir%"a == ""a copy "C:\Users\test\Documents\Visual Studio 2010\Projects\EPapers_Button\EPapers_Button\Debug\EPapers_Button.dll" "¬roSDKPIDir%"
    if not "¬roSDKPIDir%"a == ""a echo EPapers_Button copied to "¬roSDKPIDir%".
    if "¬roSDKPIDir%"a == ""a echo not performed. AcroSDKPIDir environment variable not set.
    :VCEnd" exited with code 255.
    Thanks for your help.

    this is something that i tried i set AcroSDKPIDir to
    C:\acrobatxsdk\Adobe\Acrobat 10 SDK\Version 1\PluginSupport\Samples\WeblinkDemo\win32\Debug
    and in th e post build events i did the following
    <Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'">
        <Message Text="Description: %(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '$(AcroSDKPIDir)'"/>
        <Exec Command="%(PostBuildEvent.Command)$(BuildSuffix)" Condition="$(AcroSDKPIDir)"/>
      </Target>
    can u be plzz more specific in terms of it
    the error i got is
    Error
    84
    error MSB4100: Expected "$(AcroSDKPIDir)" to evaluate to a boolean instead of "C:\acrobatxsdk\Adobe\Acrobat 10 SDK\Version 1\PluginSupport\Samples\WeblinkDemo\win32\Debug", in condition "'%(PostBuildEvent.Message)' != '' and '$(AcroSDKPIDir)'".
    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
    112
    61
    WeblinkDemo

  • Beginning SharePoint 2010 Development with Visual Studio 2010

    I am a beginner with SharePoint 2010 development with Visual studio 2010. Please guide me for some good, practical videos tutorials and books which would help me get started with programming. I need to build some workflow in VS2010 in C#. Please help!

    Hi PinkRuby, 
    There are some good videos on the MSDN site that give a general overview of developing on the SharePoint platform. 
    http://msdn.microsoft.com/en-au/office/dn448488
    Another good resource is PluralSight. You need a paid subscription (though it's not much), but it has lot's of great video content for learning. 
    http://pluralsight.com/training/Courses#sharepoint
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • Problem when adding ABAP custom webservice with Visual Studio 2010

    Hi All,
    After creating a webservice for a custom RFC function developed in a ECC6.0 SAP machine, I tried to add it to a Visual Studio 2010 windows aplication (through a web reference connection).
    The sequence I've done is:
    - Create RFC in ABAP, with testing ok
    - Create a WEBSERVICE with the ABAP editor
    - Configured the webservice with SICF with:
         Procedure: Standard
         Logon data: standard R3 user
         Security requirement: Standard
         Authentication: Standard SAP User
    Then, in SOAMANAGER I copied the webservice URL and tried to add it to Visual Studio 2010, but it keeps asking me the user and password. I try to supply the R3 username and password but if fails.
    Why is ECC6.0 asking the user and passord if I've defined a SAP user for the login process?
    Is there any way to disable this?
    Thanks,
    Manuel Dias

    Hello Manuel,
    You can use the following code:
    CredentialCache cache = new CredentialCache();
          cache.Add(new Uri("WEBSERVICEURL:PORTNUMBER/"), "Basic", new NetworkCredential("USERNAME", "PASSWORD"));
    SAP needs a password.
    Kind regards,
    JK

  • Facing bug Issue with Visual Studio 2010 SP1 software. need a Hotfix Patch KB2561001

    Hi Team,
    i have installed Visual Studio 2010 SP1 software in my system. but i am facing some issue with a bug. This bug needs a Specific Hotfix Patch ( KB2561001). 
    But when i am clicked on above link, not able to find this patch.
    Kindly request you to provide this Requested patch as project has been stuck without this.
    please look into this issue on priority. Eager to listen from your side.

    Hi mihir ray,
    Like this report:
    https://connect.microsoft.com/VisualStudio/feedback/details/611665/storegeneratedpattern-does-not-saved-properly-into-edmx-entity-framework-4-0
    It seems that the link for this kb is not available. So the real issue is that which kind of issue you get, and then check whether this issue has been resolved by the latest VS version. Like the above report, maybe the new VS version would be better for
    certain limitations for old versions.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Crystal Reports 10 with Visual Studio 2010

    We have Crystal Reports 10, which I have installed. The viewer provided with the install runs fine. We have an application that has an embedded viewer.
    Then I'm just trying to get the simple C# sample code to run in VS2010, which is just a form with the viewer component reading an existing .rpt file. But I get a "Load report failed" error with no other details. Seems like it really should be simple. Any idea what I might be doing wrong?
    I'm running Win7 64, but compiling in x86 mode.

    Well, you have two options;
    1) Go with the version of CR that bundles with .NET2005 (CR 10.2)
    2) Go with CRVS2010 and VS2010
    CR10.0 is not supported in either .NET2005 or .NET2010. See [this|https://wiki.sdn.sap.com/wiki/display/BOBJ/WhichCrystalReportsassemblyversionsaresupportedinwhichversionsofVisualStudio+.NET] wiki for more info.
    There are no work-arounds, no nothing that I can help with or recommend.
    - Ludek

  • Issue with New Release Deploying Crystal Reports for Visual Studio 2010

    Previously I created a deployment project with Visual Studio 2010 using the Beta 2 release of the distributable. This worked fine and installed on a 32-bit XP machine.
    I've since updated the project to use the new Release version of the distributable CRRuntime_32bit_13_0.msi. Now when I run the installed program it gives me the following message -
    "An error has occurred while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key permissions are insufficient, or the Crystal Reports runtime is not installed correctly. Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information."
    I've had a look at verious posts and added code to the app.config file so it looks like -
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    and also tried targetting various .NET frameworks, but without success.
      Am I missing something?

    Hello,
    More info, are you installing on the same PC as the Beta was installed on or a clean PC?
    Your app must be set to the full framework, not the client version.
    Are you installing by right clicking on your setup.exe and selecting run as administrator?
    Setting that option in the app.config is only required if you are using that driver you found the info on.
    Run ProcessMonitor and set it to filter your installer and see what it reports.
    Thank you
    Don

  • Sap business one studio 9.0 for microsoft visual studio 2010

    Hi Experts,
    After added a new project, Sap business one 9.0 Add-on Project, that project can't be loaded in Visual Studio 2010.
    When try to re-load the project in the Solution Explorer, the project stays as (unavailable), and the next line says, The project file was unloaded.
    I'm using :
    - Windows 7 professionnel 64 bits. (With no virtual machine)
    - Sap business one studio for Microsoft studio 32 bits. (Visual Studio  2010)
    - Sap business one studio 32 bits. (PL12)
    I've already tried to :
    -  Reload the project in the contextual menu.
    -  Run Visual Studio as Administrator.
    So VisualStudio, B1, DI-API and SBO Studio are all on the same version. (32 bits)
    [I've installed before B1 64 bits, but it did't work with visual studio 2010, because visual studio 2010 is available just in 32 bit version. so i uninstalled everything]
    NB  : I'm still in evaluation period of SAP Businness one 9.0.
    Can u please help me to solve this problem.
    Thank you a lot.
    Regards,
    Amine

    Hi, everyone
    I'm also having issue with SAP B1 for Microsoft visual studio. I've tried creating a project sap b1 add-on using b1s file still indicating unavailable.
    please help...

  • Stand Alone Crystal Reports for Visual Studio 2010

    I wish to use the stand alone product to edit Crystal Report .rpt files created with Visual Studio 2010
    Is CR 2011 stand alone.product the right tool?
    Using CR 2008, I receive a warning message if I open a .rpt created al VS 2010.
    Likewise, if I import the edited .rpt file to VS, another message pop ups saying that it will be updated to a newer version.
    Thank you in advance
    Edited by: Roberto Mirelman on Oct 21, 2011 2:59 PM

    You are correct.
    CR 2011 reports can be run in CR for VS 2010.
    Technically you can still use CR 2008 to edit your reports and shouldnt see any problems other than getting the prompt all the time.  I am not sure if using CR 2011 will cause prompting as well so you may want to try it our using the trial version first.
    Jason

  • How do I resolve error 1310 while installing crystal report version for visual studio 2010.

    How do I resolve error 1310. I try to install crystal version for visual studio 2010, but I got this error message. Error 1310. Error writing to file. mcf80.dll.verify that you have access to that directory. My pc is window 7 (32 bit). Please I need help
    urgently to work with this program in my system successfully. Please help.

    Hello Dorohidea,
    Do you mean that when you install crystal report in virtual studio 2010, you receive the error message about error 1310?
    Please take a look at the following KB.
    Support for Crystal Reports for Visual Studio
    https://support.microsoft.com/kb/317789/en-us
    In Visual Studio 2010, to create a Crystal Reports project or Web site or to import existing projects or Web sites that were created by using older versions of Visual Studio or Crystal Reports, you must first install a version of Crystal Reports that is
    compatible with Visual Studio 2010.
    For more information about how to use Crystal Reports in Visual Studio 2010, visit the following SAP Crystal Reports website:
    http://www.sap.com/crystalreports/vs2010
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Error in upgrade Crystal Reports for Visual Studio 2010 to SP1

    During the installation of SP1 of Crystal Reports for Visual Studio 2010 (RTM was already installed) I got an error message saying:
    Error 2753. The file "agent.exe.6ED28686_7B19_420C_B255_5B6C1BD2C705" is not marked for installation.
    After a rerun of the setup program (choosing reinstall) the message did not re-appear.
    It happens on Windows 7 x64 with Visual Studio 2010 SP1
    Is this a bug in the installation or an "undocumented feature"?
    Regards,
    Adri

    Hi Adri,
    I had that error once and one other poster also had it. Like you I just re-installed and no error on the second round.
    I believe it was some Windows Process had the file locked for some reason. It's not a bug or "undocumented feature" it's a Windows OS thingy....
    Before uninstalling anything it may be a recommendation to reboot first and not load anything that may be locking dependencies.
    How many times have you seen this?
    Thank you
    Don

  • Is ODAC 11.2 Release 4 (11.2.0.3.0) XCopy support Visual Studio 2010 sp1?

    I download and installed "ODAC112030Xcopy_32bit.zip" on Windows7 64bit machine according to the included readme.htm (added c:\oracle and c:\oracle\bin to environment variables, added ORACLE_HOME and ORACLE_HOME_KEY registry), but while I try to add ADO.NET Entity Data Model, I cannot find the Oracle ODP.Net provider list in wizard.
    I didn't install "Oracle Developer Tools for Visual Studio", is it a must for EntityFramework? Or something else I missed?

    Hi,
    Yes, you need to install the Oracle Developer Tools for Visual Studio in the 32-bit home in order to use the Entity Framework tools with Visual Studio 2010.
    Feature for 11.2.0.3.0 R4 ODT:
    Entity Framework Designers and Wizards: Use Visual Studio 2010's Entity Designer for Database First and Model First object-relational mapping
    Regards
    Jenny
    Edited by: jbesaw on Mar 16, 2012 12:03 PM

  • Move a Excel 2010 Dokument Addin Project (Visual Studio 2012) to another devleopment machine with Visual Studio 2012 , but Office 2013

    Hi 
    we do have the following situation
    on computer A there is a Excel Document Addin development project , Visual Studio 2012, Office 2010 installed. All works fine.
    we would like to bring the project to another machine with Visual Studio 2012, but Office 2013 installed.
    Visual Studio can not build the project. It says that the application is not installed on the machine (though Excel 2013 is installed , but not Excel 2010) It seems to have a problem with the
    vbproj. 
    In other forums I found a hint that "Hostpackage = ..} needs to be set accordingly in the vbproj. I created then a "empty Excel-Addin project" under Visual Studio , looked at
    the Hostpackage entry, put that into the vbproj of "problem project. It still does not work.
    It would be great if anyone could help.
    Thomas

    Hello Eugene
    Problem is that it says that projectboard (the name of the main project) can not be loaded. All other projects in the solution can be loaded. Strange thing is , now that I try to create a empty excel Project it says that according to Excel security settings
    it can not be generated !? 
    I opened then Excel and set all Trust Center settings to "Default" - but no effect. I really have no idea what is wrong ..!? 
    Tom

  • How to Install Visual Studio 2010 on a PC with Microsoft Office 2013 with 64 bits

    I am with problems to have acess to the link: http://www.microsoft.com/en-us/download/details.aspx?id=12187
    Why?
    I want do install Visual Studio 2010 on a PC with Microsoft Office 2013 with 64 bits. How can I do it?
    Thanks.

    Hello Carla Sofia,
    Visual Studio installation do not depends on Microsoft Office 2013. They do not have relationship here. I think your problem is that you cannot find the link to install Visual Studio 2010.
    In order to know why, please see here:
    https://support.microsoft.com/en-us/lifecycle/search/default.aspx?sort=PN&alpha=Visual%20Studio%202010&Filter=FilterNO
    The mainstream support for Visual Studio 2010 is already expired and that is why you cannot open any link about Visual Studio 2010 Setup.(I cannot verify whether that link is about VS2010 Setup.)
    I think you need to think about the following:
    1. If you need Visual Studio 2010, you may have to consider some other channels. For example, official site you can try use MSDN Subscription. For non-official site. Sorry I cannot provide any place for you
    2. You can use other latest version of Visual Studio, for example, we have Visual Studio 2012, 2013, 2015 for you to use. You can also use Visual Studio Express 2010 version. It is still available for download.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error with windows phone 7.1 in visual studio 2010 ultimate

    System.ArgumentNullException
    Value cannot be null.
    Parameter name: parentContext
       at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext..ctor(IMetadataContext parentContext)
       at MS.Internal.Host.ProjectMetadataContext..ctor(IMetadataContext platformMetadata, AssemblyReferenceProvider referenceProvider)
       at MS.Internal.Host.ProjectMetadataContext.FromReferences(AssemblyReferenceProvider referenceProvider)
       at MS.Internal.Designer.VSDesigner.GetMetadataForDesignerContext(DesignerContext designerContext)
       at MS.Internal.Host.PersistenceSubsystem.Load()
       at MS.Internal.Host.Designer.Load()
       at MS.Internal.Designer.VSDesigner.Load()
       at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
       at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
       at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
       at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
       at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
       at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)
    this error occurs all the time i tried to open a windows phone aplication and i dont no wtf is this?

    Hi PedroMartins221,
    From your error message looks like it is a VS designer issue, I would recommend you do the same as Ken suggested, besides keep your windows update and reboot the device machine should help.
    Another possibility is maybe you update with Silverlight 5.0, as I can see from a old post:
    https://social.msdn.microsoft.com/Forums/en-US/5964a4c7-7a5b-4d09-a672-268d37aad1ff/windows-phone-7-designer-view-error-in-visual-studio-2010-ultimate?forum=vswpfdesigner uninstall Silverlight 5 might help.
    Give a try and let's see if this helps.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for