Skip to Content
avatar image
Former Member

Can I fill a proxy field with value from screen control using databind?

For example, I have a RFM "Z_Get_Mat_Desc" and I created a proxy field "I_Matnr" as import parameter for this RFM, and I want to tie it to the screen field "StrMatnr". So I setup databind between these 2 fields. However it seems that the text in screen field "StrMatnr" would not update the proxy field "I_Matnr" automatically, what could be wrong or did I miss any step? I know I can do it with the code "SAPproxy11.I_Matnr = StrMatnr.text" but would like to see if we can use the databind instead... If this is doable, then the next question would be if we can fill a proxy field table automatically. 😊

One more question. I want to return data with RFM "RFC_Read_Table" and show the data in a datagrid control. Is there a way to "easily" format the datagrid control according to the returned fields, that is, to show each field in a separate column? Note the number and names for the return fields are from the screen input.

Thanks in advance!

Sunny

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 15, 2006 at 10:42 AM

    Hi Sunny,

    My 1st question what version your .Net connector version is? 2.0 / 1.0..

    If you use 1.0, please update it first to the latest one [version 2.0].

    The answer for ur questions:

    1. Why can't you fill up the data to proxy?

    1.a. In your import parameter at RFC, use table parameter. If you use it, when you generate proxy in .NET, ZSAVEACTIVITYTable and ZSAVEACTIVITY

    will be generated automatically.

    This is my code in .NET:

    Dim objTblAct As New ZSAVEACTIVITYTable

    'its internal table in RFC - SAP.

    Dim ls_TblAct As New ZSAVEACTIVITY

    'its work area in RFC - SAP.

    ls_TblAct.Doc_Actno = strTbl(0)

    ls_TblAct.Doc_Actid = strTbl(1)

    objTblAct.Add(ls_TblAct)

    ls_TblAct = Nothing

    2. Is there a way to "easily" format the datagrid control according to the returned fields, that is, to show each field in a separate column?

    [NET]

    It's better you have to transport your internal table parameter from RFC to datatable in .NET.

    Dim dt as new datatable

    z_get_mat_desc.rfc_read_table (..., itab_table )

    dt = itab_table.ToADODataTable

    with this way u can monitor for it's column and easier to watch/debug.

    beside that, you also can transfer "dt" into datagrid in .NET .

    hopefully,

    it can help you.

    best regards,

    Niel

    <b>

    • rewart points if it helps you.</b>

    Add comment
    10|10000 characters needed characters exceeded