cancel
Showing results for 
Search instead for 
Did you mean: 

Need some information about cfl...

Former Member
0 Kudos

hi..

i need  some information about cfl.......

have a look on first image..

normally  we are selecting  item code using cfl  2 ways u can select

from pressing picker or pasting the item code and pressing the tab key based upon the item code remaining values will come automatically  like item

description....

what i had done is...

see the second image.

i put button for cfl item codes  , once click on the button item master will open...

and once selecting the item code that will copied to the  system form here   goods issue form..

what i am getting the problem is  i am able to copy item code , but  based upon the  item code remaining values should  come ..

like item description , gl account something  but  if i press key down also  i am getting the remaining values........

Actually in button i load   udo object type  document

it has document nos  1,2,3,4,5,6

each document in row level  has items ....

i need this type of functionality there ...................

i dont want to filter cfl ......................

i dont want to use query in cfl...........

how can i execute the cfl logic................ once copy the item code remaining values should come.......

if you have any idea plz share ..........



Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Send a TAB key by program after setting the ItemCode.

Regards,

Eric

Former Member
0 Kudos

hi.

Eric i used that method but not working..

     ''sbo_app.SendKeys("+{F2}")


               sbo_app.SendKeys("+{TAB}")

i used this method but not working.......

Any info...


Former Member
0 Kudos

Hi,

ItemCode cell has to have the focus before sending the TAB key.

Regards,

Eric

Former Member
0 Kudos

hi Eric..

what i understood is  we itemcode, item name 

focus is at item code, after the getting the value at item code  i move the cursor to the  next cell allso ..

for executing the tab functionality, but no use...

is it this info you are trying to say...

Former Member
0 Kudos

Hi,

Took a bit of time, I was testing.

In the FormLoad event, I have:

case "720":

                                        {

                                            var item = form.Items.Item("13");

                                            var matrix = (Matrix)item.Specific;

                                             var edit = (EditText)matrix.Columns.Item("1").Cells.Item(1).Specific;

                                            edit.Value = "A";

                                        }

And in the CFL event, I have:

                        {

                            form = this.Application.Forms.Item(itemEvent.FormUID);

                            var item = form.Items.Item("13");

                            var matrix = (Matrix)item.Specific;

                            var column = 0;

                            for (; pos < matrix.Columns.Count; column++)

                            {

                                if (matrix.Columns.Item(column).UniqueID == "1")

                                {

                                    break;

                                }

                            }

                            form.Select();

                            matrix.SetCellFocus(1, column);

                            this.Application.SendKeys("{TAB}");

                        }

And the caret is moving correctly to the next cell.

The difference from my code to yours is that I force the focus to the form, before sending the SetCellFocus, else the SendKeys will crash.

Regards,

Eric

Former Member
0 Kudos

hi, Eric give me some time..

i will inform you.ok

Former Member
0 Kudos

Hi,

I have forgotten to write that both codes are used with event.BeforeAction = false.

Regards,

Eric

Former Member
0 Kudos

hi

ok eric i check it...

Former Member
0 Kudos

hi. your code is little bit confusion..

normally i am using below code for every time pasting the value into the column matrix..

i put your code in Try block..

bcz after pasting the value in to the particular cell..

we will get one error item is in focus so,that the reason i put the code in try but it's not working......

any changes in my code.......

Try

            If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.BeforeAction = False Then

                Dim val_code As String

                If pVal.FormType = "720" Then

                    oForm = SBO_Application.Forms.GetFormByTypeAndCount("720", "1")

                    Dim ocflevento As SAPbouiCOM.IChooseFromListEvent

                    ' Dim oDataTable As SAPbouiCOM.DataTable

                    ocflevento = pVal

                    Dim sCflid As String

                    sCflid = ocflevento.ChooseFromListUID

                    Dim ocfl As SAPbouiCOM.ChooseFromList

                    oForm = SBO_Application.Forms.Item(FormUID)

                    ocfl = oForm.ChooseFromLists.Item(sCflid)

                    If ocflevento.BeforeAction = False Then

                        Dim oDataTable As SAPbouiCOM.DataTable

                        oDataTable = ocflevento.SelectedObjects

                        If oDataTable IsNot Nothing Then

                            val_code = ""

                            val_code = oDataTable.GetValue(0, 0)

                            oForm = SBO_Application.Forms.GetFormByTypeAndCount("720", "1")

                            Dim omatrix As SAPbouiCOM.Matrix

                            omatrix = oForm.Items.Item("13").Specific

                            omatrix.Columns.Item("1").Cells.Item(1).Specific.value = val_code

                        End If

                    End If

                End If

End If

            'End If

        Catch ex As Exception

            oForm.Select()

            omatirx = oForm.Items.Item("13").Specific

            omatirx.SetCellFocus(1, 1)

            SBO_Application.SendKeys("{TAB}")

            ' sbo_app.MessageBox(ex.Message)

        End Try

Former Member
0 Kudos

Any info.......