Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    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 a comment
    10|10000 characters needed characters exceeded

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.