SAP Business One - сохранение данных матрицы в UDT - PullRequest
0 голосов
/ 21 апреля 2019

Недавно я работал в UDO, в UDO есть матрица, и я заполняю ее с помощью DataTable.Когда я пытаюсь сохранить данные, UDT не получает данные и заполняет их пустыми данными (я проверил это с помощью HANA Studio).

Я попытался: - Сброс данных матрицы.- непонятны данные таблицы.

DT_LLenar = UIAPIRawForm.DataSources.DataTables.Add("DT_Plantas");

                    DT_LLenar.Columns.Add("DocNumNV", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric, 11);
                    DT_LLenar.Columns.Add("DocEntryNV", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("DocLineNumNV", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("ItemCode", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("Dscription", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("DocNumOF", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("DocEntryOF", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("CardName", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("SlpName", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);
                    DT_LLenar.Columns.Add("ShipDate", SAPbouiCOM.BoFieldsType.ft_AlphaNumeric);

                    string Query_Plantas = @"SELECT TOP 10
                                            T0.""DocNum"",
                                            T0.""DocEntry"" AS ""DocEntryNV"",
                                            T1.""LineNum"" AS ""LineNumNV"",
                                            T1.""ItemCode"",
                                            T1.""Dscription"",
                                            T2.""DocNum"",
                                            T2.""DocEntry"",
                                            T0.""CardName"",
                                            T3.""SlpName"",
                                            T1.""ShipDate""
                                            FROM ORDR AS T0
                                            INNER JOIN RDR1 AS T1 ON T0.""DocEntry"" = T1.""DocEntry""
                                            INNER JOIN OWOR AS T2 ON T0.""DocNum"" = T2.""OriginNum"" AND T2.""U_NroLinNV"" = T1.""LineNum""
                                            INNER JOIN OSLP AS T3 ON T0.""SlpCode"" = T3.""SlpCode""
                                            INNER JOIN RDR12 AS T4 ON T0.""DocEntry"" = T4.""DocEntry""
                                            INNER JOIN ""@SEI_TRANS1"" AS T5 ON T4.""CountyS"" = T5.""U_Comuna""
                                            INNER JOIN OITM AS T6 ON T1.""ItemCode"" = T6.""ItemCode""
                                            INNER JOIN OITB AS T7 ON T6.""ItmsGrpCod"" = T7.""ItmsGrpCod""
                                            INNER JOIN ""@SEI_TRANS"" AS T8 ON T5.""DocEntry"" = T8.""DocEntry""                                          
                                            WHERE T1.""ShipDate"" <= T8.""U_FechaDesp""
                                            AND T8.""DocEntry"" = " + DocEntry +
                                            @" AND T7.""ItmsGrpNam"" IN('PLANTA COMPLETA', 'HECHURA')
                                            AND T0.""U_Retira"" = 'Camion'
                                            ORDER BY T0.""DocNum"" ";


                    Matrix_Plantas.Columns.Item("C_1_1").DataBind.Bind("DT_Plantas", "DocNumNV");
                    Matrix_Plantas.Columns.Item("C_1_2").DataBind.Bind("DT_Plantas", "DocEntryNV");
                    Matrix_Plantas.Columns.Item("C_1_3").DataBind.Bind("DT_Plantas", "DocLineNumNV");
                    Matrix_Plantas.Columns.Item("C_1_4").DataBind.Bind("DT_Plantas", "ItemCode");
                    Matrix_Plantas.Columns.Item("C_1_5").DataBind.Bind("DT_Plantas", "Dscription");
                    Matrix_Plantas.Columns.Item("C_1_6").DataBind.Bind("DT_Plantas", "DocNumOF");
                    Matrix_Plantas.Columns.Item("C_1_7").DataBind.Bind("DT_Plantas", "DocEntryOF");
                    Matrix_Plantas.Columns.Item("C_1_8").DataBind.Bind("DT_Plantas", "CardName");
                    Matrix_Plantas.Columns.Item("C_1_9").DataBind.Bind("DT_Plantas", "ShipDate");
                    Matrix_Plantas.Columns.Item("C_1_10").DataBind.Bind("DT_Plantas", "SlpName");


                    DT_LLenar.ExecuteQuery(Query_Plantas);
                    Matrix_Plantas.LoadFromDataSource();
                    Matrix_Plantas.AutoResizeColumns();
...