Skip to Content
author's profile photo
Former Member

How to access a udf in po

Hi experts,

In my add on i need to copy value of a filed of my form into one udf attached in po so i need to access that udf of po form..

Kindly help me

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on May 04, 2011 at 09:39 AM

    Well, it depends - and I am assuming you want to use UI.

    If the UDF is in a matrix, it's very easy:

    ((SAPbouiCOM.EditText)oMatrix.Columns.Item("U_UDF").Cells.Item(0).Specific).Value = "Test";

    If it's a header level UDF, it's more difficult. There are two options:

    One is to access the UDF form attached to your system form - there are many posts on the forum describing this but it is not the easiest of tasks; Essentially it depends on your B1 version, it is easier to do in 8.8.

    The second option is to add a text field to your system form, bind it to the UDF in question and set the value to it normally; this is also covered in many posts on the forum but you just add an item to the form of type edittext, use setbound to bind it to the UDF on the PO header and set your value to it through code. You can also hide the field so the user doesn't even see it.

    -


    Just in case you are using DI, it very easy

    oPO.UserFields.Item("U_UDF").Value = "test";

    Add comment
    10|10000 characters needed characters exceeded