cancel
Showing results for 
Search instead for 
Did you mean: 

SBO SDK 2007 - Matrix you are not permitted to perform this action 200-30

Former Member
0 Kudos

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't’t 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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rune,

Display the DocEntry field instead of the DocNumber field for the draft and your problem will be fix.

Former Member
0 Kudos

Hello,

Any news about this issue? Is it fixed or when it will be ... ?

regards,

Przemysław Chaber

Former Member
0 Kudos

It is not a error.

You have to use the DocEntry field to create your link button.

I took a short cut and displayed the DocEntry field (LinkButton) and the DocNum field.

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Please notice this is a error in SDK 2007, the present is reported to SAP.

The present works in SDK 2005

Thank you,

Rune

Former Member
0 Kudos

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

Former Member
0 Kudos

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