Skip to Content
avatar image
Former Member

userdefined function

hi,

while creating the userdefined function, i want to know where to use the value, context and container?

could you explain in detail.

regards,

sasi.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Sep 04, 2008 at 08:10 AM

    Hi,

    > value

    if you want to write for example a udf that is a special substring function with one input value and one output value.

    > context

    Input is a complete context for example with boolean values. If you want to know if at least one of them is true then return true else return false.

    > queue

    Input is the complete queue. For example if you need to create your own context segments.

    http://help.sap.com/saphelp_nw04/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/frameset.htm

    Regards

    Patrick

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 08:11 AM

    Working with Contexts, Queues or Value.

    http://help.sap.com/saphelp_nw04/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/content.htm

    value -


    > is a value for the input parameter. Values will comes one by one.

    Queue -


    > it is an entire instance of XML message. That means, all the data will come at once.

    Context ---> There will be a context change in the coming XML data.

    http://help.sap.com/saphelp_nw04/helpdata/en/d2/58cd3b11571962e10000000a11402f/frameset.htm

    There are 2 types of UDF - Simple and Advanced.

    Simple UDFs uses Value, wherein we can manipulate only one value (input is one String). Therefore a single string is expected as input and the output would also b a single string.

    Advanced UDFs uses Context or Queue, where you manipulate many values (input is an array of Strings).

    Refer this link:

    http://help.sap.com/saphelp_nw04/helpdata/en/40/7b8e40496f6f1de10000000a1550b0/content.htm

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 08:12 AM

    Hi..

    While if u need to pass only the arguments where in u will be declaring the return variable inside the function and will be returnig the value but where as when u go with context the argument options itself will change .. there we need to pass arguments as well with Resultlist which is of java type.. that carries the result of the function..

    regards

    Kishore

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 09:28 AM

    Hi,

    Check this thread

    advanced UDF

    Add comment
    10|10000 characters needed characters exceeded