Skip to Content
author's profile photo Former Member
Former Member

Link Button

Hai To All,

In my form i have only one matrix. While form loading using sql query iam loading data's from various table. For Example

DocEntry | Date | Remark

-


1 | 12/3 | jhjk

2 | 11/3 | jhjkh

3 | 10/3 | hjjhdf

Here first and second record coming from Purchase Module and third record coming from Sales Module.

Docentry having linkbutton if i click 1 and 2 record of link button its going to particular but if i click 3 record its not going to particular form of sales.

My code is here

If obj = "ORS_UDO" Then

app.ActivateMenuItem("ORS")

oForm = app.Forms.Item("ORS")

oForm.Select()

oForm.Freeze(True)

oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE

oForm.Items.Item("txt_RNo").Specific.Value = Trim(doc)

oForm.Items.Item("1").Click()

oForm.Freeze(False)

ElseIf obj = "SALES_PO" Then

app.ActivateMenuItem("PO")

oForm = app.Forms.Item("PO")

oForm.Select()

oForm.Freeze(True)

oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE

oForm.Items.Item("txt_qno").Specific.Value = Trim(doc)

oForm.Items.Item("1").Click()

oForm.Freeze(False)

End If

Here first ORS_UDO goes to purchase but how to specific the menuid of sales???

Anyone have idea help me..........

Regards,

Anitha

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 21, 2008 at 06:15 AM

    Anitha,

    is the problem that you cannot activate

    oForm = app.Forms.Item("PO")?

    Or you cannot specific the menuid? If menuid, give to

    SBO_Application_MenuEvent line

    dim x as string

    x = pVal.MenuUID and give breakpoint there.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Petr i got the answer. Here is my code

      If obj = "SALES_PO" Then

      For frm As Integer = 0 To app.Forms.Count - 1

      Try

      If app.Forms.Item(frm).UniqueID = "PO" Then

      oForm = app.Forms.Item("PO")

      oForm.Close()

      Exit For

      End If

      Catch ex As Exception

      app.StatusBar.SetText(ex.Message)

      End Try

      Next

      If blnBool = False Then

      app.ActivateMenuItem("POCUST")

      oForm = app.Forms.Item("PO")

      oForm.Select()

      oForm.Freeze(True)

      oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE

      oForm.Items.Item("txt_qno").Specific.Value = Trim(doc)

      oForm.Items.Item("1").Click()

      oForm.Freeze(False)

      End If

      End If

      Regards,

      Anitha

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.