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

choose from list condition

Experts,

I have one choose from list where the object type is 202 i.e list of all production orders. but I want to have those production orders where issu have been done. How to give this validation?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 09, 2012 at 10:36 AM

    Hi shrutisapsen,

    This code add in onBeforechoosefromlist :

    SAPbouiCOM.ChooseFromList oCFL = form.ChooseFromLists.Item("CFLUniqID");

    string Query = "Your Query";

    CFLPopupWindow(oCFL, Query, " name of Column on which you want to add Condition");

    public void CFLPopupWindow(SAPbouiCOM.ChooseFromList oCFL, string Query, string alias)

    {

    try

    {

    Conditions oConds;

    Condition oCond;

    Recordset RSet = (Recordset)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset);

    RSet.DoQuery(Query);

    oConds = oCFL.GetConditions();

    oConds = null;

    oCFL.SetConditions(oConds);

    oConds = oCFL.GetConditions();

    if (RSet.RecordCount > 0)

    {

    do

    {

    oCond = oConds.Add();

    oCond.Alias = alias;

    oCond.Operation = BoConditionOperation.co_EQUAL;

    oCond.CondVal = RSet.Fields.Item(0).Value.ToString();

    RSet.MoveNext();

    if (!RSet.EoF)

    {

    oCond.Relationship = BoConditionRelationship.cr_OR;

    }

    } while (!RSet.EoF);

    }

    oCFL.SetConditions(oConds);

    }

    catch (Exception ex)

    {

    // B1Connections.theAppl.SetStatusBarMessage(B1Connections.diCompany.GetLastErrorDescription(), BoMessageTime.bmt_Medium, true);

    }

    }

    try this code i think this code will help for you .

    thanks

    surajit

    Add a comment
    10|10000 characters needed characters exceeded

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.