Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8430

Re: Choose From List Event

$
0
0

Hi,

 

Although there are many threads regarding this Choose From List event but still I am providing you following piece of code. You can try this as follows:

 

On BeforeAction = false

 

 

 

SAPbouiCOM.ChooseFromListEvent cflevent = (SAPbouiCOM.ChooseFromListEvent)pVal;

SAPbouiCOM.ChooseFromList oCFLEvento = default(SAPbouiCOM.ChooseFromList);

string strUid = cflevent.ChooseFromListUID;

oCFLEvento = this.m_SBO_Form.ChooseFromLists.Item(strUid);

SAPbouiCOM.DataTable oDataTable = cflevent.SelectedObjects;

                                   

                                    if (oDataTable == null)

                                    {

                                        return;

                                    }

 

 

                                    if (pVal.ItemUID == enControlName.BranchCode && strUid == "CFL_2" && pVal.FormMode != Convert.ToInt32(BoFormMode.fm_FIND_MODE))

                                    {

                                        string ProjectCode = oDataTable.GetValue("PrjCode", 0).ToString();

                                        string ProjectName = oDataTable.GetValue("PrjName", 0).ToString();

                                        this.oDataSource = (DBDataSource)m_SBO_Form.DataSources.DBDataSources.Add("@DMRMASTER");

                                        this.oDataSource.SetValue("U_CBrnch", 0, "");

                                        this.oDataSource.SetValue("U_NBrnch", 0, "");

                                        this.oDataSource.SetValue("U_CBrnch", 0, Conversions.ToString(ProjectCode));

                                        this.oDataSource.SetValue("U_NBrnch", 0, Conversions.ToString(ProjectName));

                                    }

 

 

 

Hope I am pretty clear.

 

 

Thanks & Regards

 

Ankit Chauhan


Viewing all articles
Browse latest Browse all 8430

Trending Articles