on 11-23-2007 3:47 PM
Hi,
I have built a new Win Form using SDK 2007 with 4 tabs. Tab 3 is the same as Sales A/R > Sales Reports > Document Drafts Report; selection Delivery Document. My Tab 3 is the same as Document Draft. My Link BP Code work, my link Document No. doesn'tt work; I get following message You are not permitted to perform this action 200-30.
My code is built the same way as BP Code which is working.
// Add a column for Document No.
oColumn = oColumns.Add("DSDocNum", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
oColumn.TitleObject.Caption = "Document No.";
oColumn.Width = 80;
oColumn.Editable = true;
// Link the column to the Delivery - Draft system form
oLink = ( ( SAPbouiCOM.LinkedButton ) ( oColumn.ExtendedObject ) );
oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Drafts;
Thank you very much for your help and support
PS
Where do I find the Document name (13, 17, 15)?
Rune
Hi Rune,
Display the DocEntry field instead of the DocNumber field for the draft and your problem will be fix.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rune,
This form is created by user so if u give the link object also it wont work u have to write the item event for that particular link button..
Regards,
Anitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you very much for your help and time.
If I look into the Matrix sample in SDK 2007; there is no code in SBO_Application_ItemEvent for the particular link button. And the BP Code is working without any code in SBO_Application_ItemEvent.
We thought it was the license check box...but it still does not work. Hmmm???
Thank you,
Rune
Rune,
Try this in ItemPressed Event
'
If pVal.ItemUID = "lk_off" And pVal.BeforeAction = False Then
Dim offno As String
offno = Trim(PO_Frm.DataSources.UserDataSources.Item("DS_orno").ValueEx)
Dim oForm As SAPbouiCOM.Form
Dim Bool As Boolean = False
For frm As Integer = 0 To app.Forms.Count - 1
Try
If app.Forms.Item(frm).UniqueID = "ORS" Then
oForm = app.Forms.Item("ORS")
oForm.Close()
Exit For
End If
Catch ex As Exception
app.StatusBar.SetText(ex.Message)
End Try
Next
If Bool = False Then
app.ActivateMenuItem("ORS")
oForm = app.Forms.Item("ORS")
oForm.Select()
oForm.Freeze(True)
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
oForm.Items.Item("t_ONo").Specific.Value = Trim(offno)
oForm.Items.Item("1").Click()
oForm.Freeze(False)
End If
End If
Where ORS is the Form UID which the link have to open the form and t_ono is the find field for ORS form
Here u replace the Form name and field name.
Hope this helps u if it s give reward points,
Regards,
Anitha
The present issue will be fixed by SAP in January 2008.
It works in SBO 2005, not SBO 2007.
Could be fun if your code fix the problem, but I have following errors:
Question:
PO_Frm?
lk_off?
frm?
Changes:
ORS = ODRF; my table
t_ONo=DocNum, the field in ODRF (Link)
if ( pVal.ItemUID == "lk_off" & pVal.BeforeAction == false )
{
string offno;
offno = Trim(PO_Frm.DataSources.UserDataSources.Item("DSDocNum").ValueEx); // Error: TRIM does not exist in the current context, DSDocNum is my field Link
//SAPbouiCOM.Form oForm; // Already defined
bool Bool = false;
for ( int frm = 0; frm <= oApplication.Forms.Count - 1; frm++ )
{
try
{
if ( oApplication.Forms.Item(frm).UniqueID == "ODRF" ) // ORS is changed to my Form name with my Matrix
{
oForm = oApplication.Forms.Item("ODRF");
oForm.Close();
break; // TODO: might not be correct. Was : Exit For
}
}
catch ( Exception ex )
{
oApplication.StatusBar.SetText(ex.Message); // ERROR: No overload for method SetText
}
}
if ( Bool == false )
{
oApplication.ActivateMenuItem("ODRF");
oForm = oApplication.Forms.Item("ODRF");
oForm.Select();
oForm.Freeze(true);
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
oForm.Items.Item("DocNum").Specific.Value = Trim(offno); // Error: Does not contain a definoition for Value
oForm.Items.Item("1").Click(); // Error: No overload for method click
oForm.Freeze(false);
}
}
Edited by: Rune Brattas on Dec 17, 2007 4:20 PM
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
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.