on 07-05-2012 1:09 PM
Hi.. See the image..
one edit box value is there and one button is there
my requirement is if any body press the button that particualr value should be added to the particular account.
i had all ready added one account in journal entry.
but it wont work.. is there any reason
I had used this code..
Try
If (pVal.BeforeAction = True And pVal.FormUID = "TT" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then
If (pVal.ItemUID = "53") Then
oform = sbo_app.Forms.Item("TT")
Dim ojv As SAPbobsCOM.JournalVouchers
ojv = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalVouchers)
'ojv.JournalEntries.Lines.SetCurrentLine(0)
If (oform.Items.Item("25").Specific.value > 0) Then
ojv.JournalEntries.Lines.AccountCode = "1134"
Dim d As Integer = oform.Items.Item("25").Specific.value
ojv.JournalEntries.Lines.Debit = d
ojv.JournalEntries.Lines.Add()
End If
ojv.JournalEntries.Add()
End If
End If
Catch ex As Exception
sbo_app.MessageBox(ex.Message)
End Try
Hi Seenu,
Try this
Oje.Lines.AccountCode = "LH0000ALL";
Oje.Lines.Debit = Amount;
Oje.Lines.Add();
Oje.Lines.AccountCode = "LP0000ALL";
Oje.Lines.Credit = Amount;
Oje.Lines.Add();
int ith = 0;
try
{
ith = Oje.Add();
if (ith != 0)
{
int irrcode;
string errmsg;
SBO_Company.GetLastError(out irrcode, out errmsg);
Program.oMainSAPDI.ShowMessage(errmsg, BoStatusBarMessageType.smt_Error);
}
}
catch(Exception ex)
{
Program.oMainSAPDI.ShowMessage(ex.Message, BoStatusBarMessageType.smt_Error);
}
Hope it helps
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are not checking the return code of the add function.
Do that and you can find out what the problem is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
6 | |
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.