cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Target - while loading form from XML

Former Member
0 Kudos

Hi,

I am using SAP 2004. I created a user defined form and saved the form as XML. Now when i try to load the form from XML i am getting the error "Invalid Target". After that whenever i try to open again it gives the message "Form - already exists". So i have to close SAP and then start again.

Can any one help me on this ?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I found the reason why the error came up. Even then I am not able to solve the issue. The Reason I got that error was, I have not given any LinkedObject to the Linked button that is there in the Form.

Now what I exactly want is ...

I have a linked button attached to an Edit box. The Linked Button should point to a screen that was defined in my Addon and not to any pre-defined SAP Screens. So what I have done is I have not given the LinkedObject for that linked button and instead in the et_ITEM_PRESSED event I have captured the Linked Button and activated the User defined form. It worked fine in SAP 6.5. But in SAP 2004 it is giving the error "Invalid Target". I even tried giving the LinkedObject as lf_None for that linked button but without sucess. Please Help.

Thanks

Former Member
0 Kudos

Hello Mina,

I've done what you said, I've created a linked Button, and linked it to my own form.

Actually I linked it to the business Partner for example, but I catch the event Before_action, I avoid the system action (BubbleEvent = False) and I open my own form

it does work on 2004 version

Sebastien

Former Member
0 Kudos

Hi Sebastien,

Thanks for the reply but even then i get this error message after my form gets loaded ...

No Matching records found 'Business partner' (ODBC 2028)

Can you help me out on this with a sample code

thanks in advance

Former Member
0 Kudos

Mina, here is the code I use in the function that handle my item event. Did you set BubbleEvent to False ?

Select Case pVal.EventType

    Case SAPbouiCOM.BoEventTypes.et_CLICK

       If pVal.Before_Action Then

          Select Case pVal.ItemUID.ToUpper

             Case "lnkFASN".ToUpper

                ' OPen My form

                BubbleEvent = False

Message was edited by: Sébastien Danober

Former Member
0 Kudos

Hi Sébastien,

Your code helped and I was able to fix the problem that I faced.

Thanks for your response.

Answers (0)