on 09-24-2008 7:09 AM
Hi
I am developing an ADDOn purchase indent.
in that added a copyto button which does the functionality of copying the content of existing form to purchase order.
i am able to open purchase order form but ,, how can i add / copy the content. can you please give me any hints of it .
Thanks Regarding
Hi Narayana,
U can copy the cotents to the Purchase order form, Once the form is opened just get the form references and copy the data.
Hope it helps,
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This is the code i have written to access the purchase order form
but the references are not working properly..
SBO_Application.ActivateMenuItem("2305")
Dim f As SAPbouiCOM.Form
f = SBO_Application.Forms.Item("142")
'f.Select()
' f.Execute() Dim f As SAPbouiCOM.Form
Dim oField As SAPbouiCOM.EditText
'f = SBO_Application.Forms.Item("142")
oItem = f.Items.Item("14")
oField = oItem.Specific
oField.String = "helllllo"
can please get me the sample code to copy the the data from indent form to purchase order
HI
This is my full code.. written in itemevent.
If pVal.Before_Action = False Then
Select Case pVal.FormUID
Case "TBL_INDENT1_"
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_CLICK
If pVal.ItemUID = "28" And pVal.FormMode <> "3" Then
Try
SBO_Application.ActivateMenuItem("2305")
Dim f As SAPbouiCOM.Form
f = SBO_Application.Forms.Item("142")
*****************
Dim oField As SAPbouiCOM.EditText
'f = SBO_Application.Forms.Item("142")
oItem = f.Items.Item("14")
oField = oItem.Specific
oField.String = "helllllo"
SBO_Application.MessageBox("Its a TESTING")
Catch ex As Exception
SBO_Application.MessageBox("Its a TESTING FOR COPY TO FUNCTIONALITY ")
End Try
End If
End Select
End Select
End If
when the code is executing after opening the form.. wen we assign form 142.. then it skips to catch block...
can u help me plz......
give me a hint to solve it..
Thanks Regarding.
Hi I am very sorry .. i tried with u code.. replaced as
SBO_Application.ActivateMenuItem("2305")
Dim f As SAPbouiCOM.Form
f = SBO_Application.Forms.ActiveForm
Dim oField As SAPbouiCOM.EditText
oItem = f.Items.Item("14")
oField = oItem.Specific
oField.String = "helllllo"
SBO_Application.MessageBox("Its a TESTING")
now it is unable to open the purchase order form,,,
Thank u very much.. i am able to open the purchase order form, what i need to do is the content of the indent form form which i designed is to be filled to purchase order.
code what i wrote is...
SBO_Application.ActivateMenuItem("2305")
Dim f As SAPbouiCOM.Form
f = SBO_Application.Forms.ActiveForm
'Dim f As SAPbouiCOM.Form
'f = SBO_Application.Forms.Item("142")
'f.Select()
' ' f.Execute() Dim f As SAPbouiCOM.Form
Dim oField As SAPbouiCOM.EditText
oItem = f.Items.Item("16")
oField = oItem.Specific
oField.String = "Based On PurchaseIndent:" + oForm.Items.Item("3").Specific.Value
Dim sSql As String = ""
Dim oRS As SAPbobsCOM.Recordset
oItem = f.Items.Item("38")
oMatrix = oItem.Specific
oColumns = oMatrix.Columns
sSql = "select a.U_ITEM as Code, a.U_DESC as Descp,a.U_QTY as Quantity,a.U_RATE as price from [@TBL_INDENTROWS1] a,[@TBL_INDENT1] b where a.DocEntry=b.DocEntry and b.U_INDNO='" & oForm.Items.Item("3").Specific.Value & " '"
oRS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
oRS.DoQuery(sSql)
If oRS.RecordCount > 0 Then
Dim i As Integer = 0
oRS.MoveFirst()
While oRS.EoF = False
i = i + 1
oMatrix.Columns.Item("1").Cells.Item(i).Specific.Value = oRS.Fields.Item("Code").Value******************************************************
oMatrix.Columns.Item("3").Cells.Item(i).Specific.Value = oRS.Fields.Item("Descp").Value
oMatrix.Columns.Item("11").Cells.Item(i).Specific.Value = oRS.Fields.Item("Quantity").Value
oMatrix.Columns.Item("13").Cells.Item(i).Specific.Value = oRS.Fields.Item("price").Value
' oMatrix.AddRow()
oRS.MoveNext()
End While
End If
when the control reaches to the column 1 it raises exception ..
can u plz help me in solving the matrix issue,,
Plz write ur code in the Item Event.
Now u want to update ur UDT when the PO is clicked..?? for this In the Item event of the PO screen in the Item Pressed event of Item UID 1(Add update button) and when BeforeAction = False u can use direct SQL query or DI objects for updating ur UDT.
Hope it helps,
Vasu Natari.
If pVal.Before_Action = False Then
Select Case pVal.FormUID
Case SBO_Application.Forms.ActiveForm
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_CLICK
If (pVal.ItemUID = "1") Then
SBO_Application.MessageBox(" updating indent form")
End If
End Select
End Select
End If
this is the code i wrote for button click even of add
is it correct or not
plz verify it plzzz/
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.