Skip to Content
author's profile photo Former Member
Former Member

C#: Simple - but difficult - Get JournalEntries

SAPbobsCOM.Company vCompany = new SAPbobsCOM.Company();

vCompany.CompanyDB = "SBODemo_US";

vCompany.Password = "manager";

vCompany.UserName = "manager";

vCompany.Server = "SBO";


if (oCompany.Connected)


lblinfo.Text = "Connected to SBO";




lblinfo.Text = "Not connected to SBO";


SAPbobsCOM.JournalEntries JournalEntries;

JournalEntries = oCompany.GetBusinessObject(vJournalEntries); <---

I get a "The name 'oJournalEntries' does not exist in the class or namespace 'SAPbobsCOM_1.form1'

I've done this in VB6 but I'm kinda lost here in C#.NET.

Anyone can give a helping hand? F.x. an example on how to make a form - with a grid. When you load the form it fills the grid with for instance the journalEntries - the LedgerTable or whatever.

Thanks in advange.

TBR Allan.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2004 at 08:42 AM

    Correction - the last line is ofcourse:

    where oCompany is mentioned - read vCompany instead...

    and the last line is:

    JournalEntries = vCompany.GetBusinessObject(oJournalEntries); <---

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      You may want to explicitly cast the object returned from your vCompany and fully qualify the BoObjectTypes enum.

      Something like this:

      JournalEntries = (SAPbobsCOM.JournalEntries)vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries);

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.