Skip to Content
avatar image
Former Member

How to filter data in form Business Partner Master Data

Hi All,

I want to filter the business partner master data form depending the user who is logged. For this i created a conditions like this :

SAPbouiCOM.DBDataSource oDBDataSource;

SAPbouiCOM.Conditions oCons = null;

SAPbouiCOM.Condition oCon = null;

oCons = new SAPbouiCOM.Conditions();

oCon = oCons.Add();

SAPbouiCOM.Form oForm;

oForm = SBO_Application.Forms.ActiveForm;

oCon.Alias = "SlpCode";

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

oCon.CondVal = "3";

oCons.Item(oCons.Count - 1).Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;

oCon = oCons.Add();

oCon.Alias = "SlpCode";

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

oCon.CondVal = "-1";

oForm.DataSources.DBDataSources.Item("OCRD").Query(oCons);

I've this error :

Data Source - is not a user-defined object [66000-17]. Form Unique Id: 'F_32', Table Unique Id : 'OCRD'

This code was for the menu event 1290 (First record Data) and i want to do the same way for the events 1288, 1289, 1291.

How can i do this ?

Thanks for your help

Michael

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 28, 2007 at 11:51 AM

    Hi michael i had a similiar problem. If u are tryin to update the system form dbdatasrc i dont think you can do it.. Atleast that the answer i got from the forum. Maybe you could try creating a dbdatasrc of ur own which is a mirror image of the system dbdatasrc and remove the binding of all the items and rebind it to ur dbdatasrc. But that would be a real long way bout the problem. If you do get a solution for this do let me know.

    Regards

    Aris

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi michael i had a similar problem.

      I am still googling but i got nothing. If u have any solution to this or ant other alternative please let me know.



      Regards

      Nishant Patel

  • avatar image
    Former Member
    Aug 22, 2007 at 12:35 PM

    I'm forgot this point :

    i use SAPB1 2005 SP01 with Visual Studio 2005 in C#

    Thanks.

    Michael

    Add comment
    10|10000 characters needed characters exceeded