cancel
Showing results for 
Search instead for 
Did you mean: 

cfl for Warehouse pops up even after value is selected

Former Member
0 Kudos

Hello Experts,

I have a program which works on validate event of warehouse field on Sales Order. It changes a udf value based on warehouse selection.

But a strange thing is happening for few users when they select warehouse, the warehouse cfl pops up again. This happens only when the add-on is running and it doesn't happen for all the users.

Any suggestion would help.

Below is the piece of code :

if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE && pVal.FormTypeEx == "139" && pVal.Action_Success == true && (oForm.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE || oForm.Mode == SAPbouiCOM.BoFormMode.fm_UPDATE_MODE))

{

if (pVal.ItemUID == "38" && (pVal.ColUID ==  "11") && pVal.InnerEvent == false)

                        {

                                   if (mAltUm.GetCellSpecific("U_ActComm", pVal.Row).value != Details[0][3].ToString())

                                                {

                                                    mAltUm.SetCellWithoutValidation(pVal.Row, "U_ActComm", Details[0][3]);

                                                }

                                  

                         }

}

Thanks

Shiv

Accepted Solutions (0)

Answers (1)

Answers (1)

pedro_magueija
Active Contributor
0 Kudos

Hi Pandey,

Shouldn't the UDF be changed only after the warehouse has been selected? If so you need to check pVal.BeforeAction == false.


Pedro Magueija


LinkedIn Logo View Pedro Magueija's profile on LinkedIn
Follow @pedromagueija on Twitter

If this answer is helpful or correct, marking it as such is a form of saying thank you.

Former Member
0 Kudos

Thanks Pedro for your reply. Though the entire could is in pVal.BeforeAction==false.

Yes UDF changes after the warehouse has been selected, but for some reason the cfl for warehouse selection pops-up again after the warehouse is selected and displayed in Warehouse column. And if the user selects the warehouse again by mistake, strange things happen.

Has someone experienced this before?

I have never seen this behavior before. So just wanted to check what is the cause of this. I have SBO 9.1 PL10.

Thanks

Shiv

former_member233854
Active Contributor
0 Kudos

hmm, try to double check few things

- Do you have another WHS CFL connected to other field?

- Maybe the selected warehouse is only a part of another warehouse e.g.: you have two whs
     -  101; 102 - and the user select 10

- There is another add-on running.

Former Member
0 Kudos

Hi Danilo,

There is not other WHS CFL.

Also the warehouse cfl pops up once. But even after selecting the warehouse, the data gets filled into warehouse column and then again WH cfl pops-up.

Just to update you, I my add-on fills in a UDF based on Warehouse/ItemCode/Quantity columns on Validate Event.

Thanks

Shiv

former_member233854
Active Contributor
0 Kudos

what if you use the lostfocus event or try to set the edittext value instead of setCellWithoutValidation?


Former Member
0 Kudos

Hi Danilo,

Tried your suggestion, still got the same issue.

Wanted to know if you ever got this issue?

I find it strange since the same code is written for both ItemCode & Warehouse, but the issue happens only with Warehouse column. Any ideas why this is happening?

Thanks

Shiv

former_member233854
Active Contributor
0 Kudos

I had something similar with another CFL a long time ago, but that time, I think the problem was with multiples similar names as I said before if you have "Warehouse1" and "Warehouse2" and you only set the beginning  as "Warehouse" but it is not your case.

No idea what is happening. Anyway, I would try to use in another form and another events in a different project, maybe there is something else in your add-on.

I did an example here and I didn`t get any issue

if (pVal.Before_Action == false && pVal.FormTypeEx == "139" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && pVal.ColUID == "24" && pVal.ItemUID == "38")

{

  SAPbouiCOM.Form oForm = (SAPbouiCOM.Form)SBO_Application.Forms.Item(FormUID);

  Matrix oMtx = (Matrix)oForm.Items.Item("38").Specific;

  oMtx.SetCellWithoutValidation(1, "U_Test", "AAA");

}