cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted Search working Partially on SDK Field

Former Member
0 Kudos

I have a text field on the Service call screen called

"A"

I need the field to be updated with a value taken from the Item Master table, U_A field.

I have created my query as below,

SELECT I.U_A FROM OITM I

WHERE I.ItemCode = $[$33.0.0]

and set a formatted search on the field A in the Service Call screen to refresh regularly when the Item No field changes.

The Formatted search does NOT fire when the item number changes.

It fires only when I do Shft + F2

HOWEVER if I try the formatted search on a system field on the same screen such as the Description field, then the Item Number Change fires the formatted search.

Does anyone know of this resriction, or a workaround please?

appreciate your help.

Thanks,

Indika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Indika,

I encountered the same problem as you and here are my findings:

If you have an edittext on a system form that is databound to a user field in a system table, then you can set a formatted search on that field but <b>you have to do it from User-defined fields form</b>. Otherwise it won't refresh correctly.

As there are two edittext databound to the same user-field, it looks like the edittext in the user-defined fields form gets priority over the one you added programmatically on the system form.

Felipe, do you confirm this?

Cheers all

PS. I am using SBO 2004A with Patch 23.

Answers (1)

Answers (1)

FOA
Advisor
Advisor
0 Kudos

Hi Indika,

Try by adding a minus sign before the field id. Like this $[$-33.0.0]

Best regards,

Felipe

Former Member
0 Kudos

No luck with that too!! (same result)

Indika.

FOA
Advisor
Advisor
0 Kudos

I have no problem displaying the value using the formatted search Indika. I used this Query:

SELECT T0.U_MyCode FROM OITM T0 WHERE T0.ItemCode = $[$33.0.0]

I tested it in a not very updated version 2004 PL09

Regards,

Felipe

Former Member
0 Kudos

Hi Felipe,

The problem happens when I use the formatted query on a text field I created using the SDK only. It works on any other SAP field.

as I mentioned, if I press Shift + F2 then it works regardless.

I tried this on the Item Master screen too with the same result. of course I changed the query to $[$5.0.0].

Threrefore I don't think it has anything to do with the query syntax , rather the SDK field.

in any case here is the code (vb6) I used on the Item Master


Private Function temp(ByRef pval As SAPbouiCOM.ItemEvent) As Boolean
    Dim oItm As SAPbouiCOM.Item
    Dim oForm As SAPbouiCOM.Form
    Dim oRelateItm As SAPbouiCOM.Item
    Dim iRelateItmHt As Integer
    Dim oEdtBox As SAPbouiCOM.EditText
    
    
    Set oForm = mObjSBOApplication.Forms(pval.FormUID)
            
    With oForm
        '---text
        Set oItm = .Items.add("maxGstT", it_EDIT)
        Set oRelateItm = .Items("76") 'closed on date edit box
        oItm.Left = oRelateItm.Left
        oItm.Width = oRelateItm.Width
        oItm.Top = mObjSBOApplication.Forms(pval.FormUID).Items("36").Top   'item group top
        oForm.DataSources.UserDataSources.add "dsmaxGstT", dt_SHORT_TEXT
        Set oEdtBox = oItm.Specific
        oEdtBox.DataBind.SetBound True, "", "dsmaxGstT"
    End With ' With oForm
End Function

Message was edited by: Indika Dekumpitiya (spelling)