on 11-30-2007 5:32 AM
Hello,
I've made a UDO form where 3 fields are taken one after other.
Sales Order No.
Sales Order Date
Customer Name
User will press TAB button on the Sales Order No. field.And he will choose the order from ChooseFromList Window .I can do this.
When the user will choose Order no. ; Sales Order Date and Customer Name
value of that particular order will fill up their corresponding fields.
But the problem is ---my program getting all data Sales Order No. ,
Sales Order Date , Customer Name and showing all data
except Sales Order Date
.
Part of my code for this work as follows--
If oCFLEvento.BeforeAction = False Then
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = oCFLEvento.SelectedObjects
Dim val, val1, val2 As String
Try
val1 = oDataTable.GetValue(10, 0)
val2 = oDataTable.GetValue(13, 0)
val = oDataTable.GetValue(0, 0)
' 'SBO_Application.MessageBox(val)
' 'SBO_Application.MessageBox(val1)
' 'SBO_Application.MessageBox(val2)
Catch ex As Exception
End Try
If (pVal.ItemUID = "OrVal") Or (pVal.ItemUID = "Button1") Then
oEdittext = oForm.Items.Item("CustVal").Specific()
oEdittext.String = val2
oEdittext = oForm.Items.Item("OrdtVal").Specific()
oEdittext.String = val1
oEdittext = oForm.Items.Item("OrVal").Specific()
oEdittext.String = val
End If
End If
Rgds
Subrata
Subrata,
Can u tell me which variable is date u specifiy??
Regards,
Anitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
val is keeping Sales Order No.
val1 is keeping Sales Order Date
val2 is keeping Customer name of Sales Order.
CustVal is the name of Customer EditText Box [Related field in Table U_customer , nvarchar(30) ]
OrdtVal is the name of Order Date EditText Box [Related field in Table U_ordrdt , datetime]
OrVal is the name of Order No. EditText Box [Related field in Table U_ordrno
, nvarchar(20)]
Subrata,
U have assign the Val2 as string. This is date value but u assign as string so what to do is dont assign the value u directly mention the value like below
HEAD_oDBds.SetValue("U_PoDate", 0, CDate(oDT.GetValue("DocDate", 0)).ToString("yyyyMMdd"))
If any doubt ask me...
If its helps give reward points,
Regards,
Anitha
Subrata,
U write the the below code in Choosefromlist itemevent
If oCFL.UniqueID = "POCFL" Or oCFL.UniqueID = "POCFL1" Then
Try
HEAD_oDBds.SetValue("U_PNo", 0, oDT.GetValue("DocNum", 0))
HEAD_oDBds.SetValue("U_PoDate", 0, CDate(oDT.GetValue("DocDate", 0)).ToString("yyyyMMdd"))
HEAD_oDBds.SetValue("U_Curr", 0, oDT.GetValue("DocCur", 0))
Me.LoadCFL(oDT.GetValue("DocNum", 0))
Catch ex As Exception
'app.MessageBox(ex.Message)
End Try
Here instead of PO fields u refer SO fields....
Regards,
Anitha
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.