How to Use a UDF in PLD?

I want to use a user defined field in a PLD of a marketing document. Can anybody tell me how to access this UDF because its not in the column of the respective table.
Thx

Hi,
Where is UDF located ? You actually could include the UDF in the PLD of marketing document.
I have a customer that want to print a certain UDF that used to record driver of container truck, it is UDF in the title of marketing document. They want to use it in the delivery print out. I suggest them to create database type field, select related table and seek the UDF description in the column not the UDF code (you do this in the properties windows). Don't forget that you must use description of UDF instead of UDF code to seek it in the column.
Rgds,
JM

Similar Messages

  • How to use charindex function in PLD...

    Hi all,
    Anyone can help me in how can I using charindex function in PLD. I want to get a character position in the PLD, but didn't know how.
    Thanks in advance.
    Nghia

    f you run the next query you will understand what I want to do:
    SELECT 'one-two' AS 'together',SUBSTRING('one-two',0,charindex('-', 'one-two')1)AS 'first', SUBSTRING('one-two',charindex('-', 'one-two')1,LEN('one-two')) AS 'second'
    SUBSTRING(Fieldname, CHARINDEX(0,7),
    SUBSTRING(FieldName, CHARINDEX('-', FIELDNAME) + 1,3),
    SUBSTRING(FieldName, CHARINDEX('-', FIELDNAME) + 4,3)
    Example below will return "4018795"
    Based On Purchase Orders 4018795.
    SUBSTRING(T0.Comments, CHARINDEX('Based On Purchase Orders', T0.Comments) + 25, 7)

  • How to use stored Procedure in PLD

    Hi All,
    I have create a procedure for converting number to words in SQL. I want to call this procedure in PLD. Is this possible?
    Thanks & Regards,
    Sheetal

    Hi,Sheetal Sarode
    First Create 2 funtions in SQL server: and apply trigger for system filed you can get data automatically amount in words when ever user is adding Outgoing payment.
    1.set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    select dbo.AmountToWords (4980)
    ALTER function dbo.AmountToWords
    @InNumber Numeric(18,2)
    --Returns the number as words.
    returns VARCHAR(2000)
    as
    BEGIN
    --SEt NoCount ON
    Declare @Num Varchar(20)
    Declare @Dec Varchar(3)
    Declare @Return Varchar(2000)
    Set @Dec = SubString(Convert(Varchar(20),@Innumber),Len(Convert(Varchar(20),@Innumber))-2,3)
    Set @Num = SubString(Convert(Varchar(20),@Innumber),1, Len(Convert(Varchar(20),@Innumber))-3)
    Declare @Hundred Char(8)
    Declare @HundredAnd Char(12)
    Declare @Thousand Char(9)
    Declare @Lakh Char(5)
    Declare @Lakhs Char(6)
    Declare @Crore Char(6)
    Declare @Crores Char(7)
    Set @Hundred = 'Hundred '
    Set @Thousand = 'Thousand '
    Set @Lakh = 'Lakh '
    Set @Lakhs = 'Lakhs '
    Set @Crore = 'Crore '
    Set @Crores = 'Crores '
    Set @HundredAnd = 'Hundred '
    if Len(@Num) = 1 -- One
    Begin
    Set @Return = dbo.GetTextValue(@Num)
    End
    Else if Len(@Num) = 2 -- Ten
    Begin
    Set @Return = dbo.GetTextValue(@Num)
    End
    Else if Len(@Num) = 3 -- Hundred
    Begin
    Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Hundred
    IF SubString(@num,2,2) '00'
    Set @Return = @Return + ' '
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2))
    End
    Else if Len(@Num) = 4 -- thousand
    Begin
    Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Thousand
    If SubString(@Num,2,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,1)) + @Hundred
    IF SubString(@num,3,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2))
    End
    Else if Len(@Num) = 5 -- Ten Thousand
    Begin
    Set @Return = dbo.GetTextValue(SubString(@Num,1,2)) + @Thousand
    If SubString(@Num,3,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,1)) + @Hundred
    IF SubString(@num,4,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2))
    End
    Else if Len(@Num) = 6 -- Lakh
    Begin
    If SubString(@Num,1,1) = '1'
    Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Lakh
    Else
    Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Lakhs
    If SubString(@Num,2,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2)) + @Thousand
    If SubString(@Num,4,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,1)) + @Hundred
    IF SubString(@num,5,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2))
    End
    Else if Len(@Num) = 7 -- Ten Lakhs
    Begin
    Set @Return = dbo.GetTextValue(SubString(@Num,1,2)) + @Lakhs
    If SubString(@Num,3,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2)) + @Thousand
    If SubString(@Num,6,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,1)) + @Hundred
    IF SubString(@num,6,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2))
    End
    Else if Len(@Num) = 8 -- Crore
    Begin
    Set @Return = dbo.GetTextValue(SubString(@Num,1,1)) + @Crore
    If SubString(@Num,2,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2)) + @Lakhs
    If SubString(@Num,4,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2)) + @Thousand
    If SubString(@Num,6,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,1)) + @Hundred
    IF SubString(@num,7,2) '00'
    Set @Return = @Return + ' '
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,2))
    End
    Else if Len(@Num) = 9 -- Ten Crore
    Begin
    Set @Return = dbo.GetTextValue(SubString(@Num,1,2)) + @Crores
    If SubString(@Num,3,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2)) + @Lakhs
    If SubString(@Num,5,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2)) + @Thousand
    If SubString(@Num,7,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,1)) + @Hundred
    IF SubString(@num,8,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,2))
    End
    Else if Len(@Num) = 10 -- Hundred Crore
    Begin
    Set @Return = dbo.GetTextValue(Substring(@Num,1,1)) + @Hundred
    IF Substring(@Num,2,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,2,2))
    Set @Return = @Return + @Crores
    If SubString(@Num,4,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2)) + @Lakhs
    If SubString(@Num,6,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2)) + @Thousand
    If SubString(@Num,8,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,1)) + @Hundred
    IF SubString(@num,9,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,9,2))
    End
    Else if Len(@Num) = 11 -- Thousand Crore
    Begin
    Set @Return = dbo.GetTextValue(Substring(@Num,1,1)) + @Thousand
    IF SubString(@Num,2,1) '0'
    Set @Return = @Return + dbo.GetTextValue(Substring(@Num,2,1)) + @Hundred
    IF Substring(@Num,3,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,3,2))
    Set @Return = @Return + @Crores
    If SubString(@Num,5,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2)) + @Lakhs
    If SubString(@Num,7,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,2)) + @Thousand
    If SubString(@Num,9,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,9,1)) + @Hundred
    IF SubString(@num,10,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,10,2))
    End
    Else if Len(@Num) = 12 -- Ten thousand Crore
    Begin
    Set @Return = dbo.GetTextValue(Substring(@Num,1,2)) + @Thousand
    IF SubString(@Num,3,1) '0'
    Set @Return = @Return + dbo.GetTextValue(Substring(@Num,3,1)) + @Hundred
    IF Substring(@Num,4,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,4,2))
    Set @Return = @Return + @Crores
    If SubString(@Num,6,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2)) + @Lakhs
    If SubString(@Num,8,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,2)) + @Thousand
    If SubString(@Num,10,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,10,1)) + @Hundred
    IF SubString(@num,11,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,11,2))
    End
    Else if Len(@Num) = 13 -- Lakh Crore
    Begin
    Set @Return = dbo.GetTextValue(Substring(@Num,1,1)) + @Lakh
    If Substring(@Num,2,2) '00'
    Set @Return = @Return + dbo.GetTextValue(Substring(@Num,2,2)) + @Thousand
    IF SubString(@Num,4,1) '0'
    Set @Return = @Return + dbo.GetTextValue(Substring(@Num,4,1)) + @Hundred
    IF Substring(@Num,5,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,5,2))
    Set @Return = @Return + @Crores
    If SubString(@Num,7,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,7,2)) + @Lakhs
    If SubString(@Num,9,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,9,2)) + @Thousand
    If SubString(@Num,11,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,11,1)) + @Hundred
    IF SubString(@num,12,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,12,2))
    End
    Else if Len(@Num) = 14 -- Ten Lakh Crore
    Begin
    Set @Return = dbo.GetTextValue(Substring(@Num,1,2)) + @Lakhs
    If Substring(@Num,3,2) '00'
    Set @Return = @Return + dbo.GetTextValue(Substring(@Num,3,2)) + @Thousand
    IF SubString(@Num,5,1) '0'
    Set @Return = @Return + dbo.GetTextValue(Substring(@Num,5,1)) + @Hundred
    IF Substring(@Num,6,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,6,2))
    Set @Return = @Return + @Crores
    If SubString(@Num,8,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,8,2)) + @Lakhs
    If SubString(@Num,10,2) '00'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,10,2)) + @Thousand
    If SubString(@Num,12,1) '0'
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,12,1)) + @Hundred
    IF SubString(@num,13,2) '00'
    Set @Return = @Return + ''
    Set @Return = @Return + dbo.GetTextValue(SubString(@Num,13,2))
    End
    If @Dec '.00'
    Set @Return = @Return + ' And ' + dbo.GetTextValue(SubString(@Dec,2,2)) + 'Paise'
    Return @return
    END
    2.This is for Get texl vavlue funtion:
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER function dbo.GetTextValue
    @num varchar(20)
    returns VARCHAR(2000)
    as
    BEGIN
    Declare @Return varchar(2000)
    Declare @temp char(1)
    Declare @tempZero char(1)
    Declare @Zero char(1)
    Declare @One char(4)
    Declare @Two char(4)
    Declare @Three char(6)
    Declare @Four char(5)
    Declare @Five char(5)
    Declare @Six char(4)
    Declare @Seven char(6)
    Declare @Eight char(6)
    Declare @Nine char(5)
    Declare @Eleven char(7)
    Declare @Twelve char(7)
    Declare @Thirteen char(9)
    Declare @Fourteen char(9)
    Declare @Fifteen char(8)
    Declare @Sixteen char(8)
    Declare @Seventeen char(10)
    Declare @Eighteen char(9)
    Declare @Nineteen char(9)
    Declare @Ten char(4)
    Declare @Twenty char(6)
    Declare @Thirty char(7)
    Declare @Forty char(6)
    Declare @Fifty char(6)
    Declare @Sixty char(6)
    Declare @Seventy char(8)
    Declare @Eighty char(7)
    Declare @Ninety char(7)
    set @tempZero = '0'
    set @Zero = ''
    set @One = 'One '
    set @Two = 'Two '
    set @Three = 'Three '
    set @Four = 'Four '
    set @Five = 'Five '
    set @Six = 'Six '
    set @Seven = 'Seven '
    set @Eight = 'Eight '
    set @Nine = 'Nine '
    set @Eleven = 'Eleven '
    set @Twelve = 'Twelve '
    set @Thirteen = 'Thirteen '
    set @Fourteen = 'Fourteen '
    set @Fifteen = 'Fifteen '
    set @Sixteen = 'Sixteen '
    set @Seventeen = 'Seventeen '
    set @Eighteen = 'Eighteen '
    set @Nineteen = 'Nineteen '
    set @Ten = 'Ten '
    set @Twenty = 'Twenty '
    set @Thirty = 'Thirty '
    set @Forty = 'Forty '
    set @Fifty = 'Fifty '
    set @Sixty = 'Sixty '
    set @Seventy = 'Seventy '
    set @Eighty = 'Eighty '
    set @Ninety = 'Ninety '
    IF Len(@num) = 2
    Begin
    If SubString(@num,2,1) '0'
    Begin
    Set @temp = SubString(@num,1,1)
    Set @Return = dbo.GetTextValue(@temp+@tempZero)
    Set @Return = @Return + dbo.GetTextValue(SubString(@num,2,1))
    End
    END
    If @num = 0
    Begin
    set @Return = @Zero
    End
    Else if @num = 1
    Begin
    set @Return = @One
    End
    Else if @num = 2
    Begin
    set @Return = @Two
    End
    Else if @num = 3
    Begin
    set @Return = @Three
    End
    Else if @num = 4
    Begin
    set @Return = @Four
    End
    Else if @num = 5
    Begin
    set @Return = @Five
    End
    Else if @num = 6
    Begin
    set @Return = @Six
    End
    Else if @num = 7
    Begin
    set @Return = @Seven
    End
    Else if @num = 8
    Begin
    set @Return = @Eight
    End
    Else if @num = 9
    Begin
    set @Return = @Nine
    End
    Else if @num = 10
    Begin
    set @Return = @Ten
    End
    Else if @num = 11
    Begin
    set @Return = @Eleven
    End
    Else if @num = 12
    Begin
    set @Return = @Twelve
    End
    Else if @num = 13
    Begin
    set @Return = @Thirteen
    End
    Else if @num = 14
    Begin
    set @Return = @Fourteen
    End
    Else if @num = 15
    Begin
    set @Return = @Fifteen
    End
    Else if @num = 16
    Begin
    set @Return = @Sixteen
    End
    Else if @num = 17
    Begin
    set @Return = @Seventeen
    End
    Else if @num = 18
    Begin
    set @Return = @Eighteen
    End
    Else if @num = 19
    Begin
    set @Return = @Nineteen
    End
    Else if @num = 20
    Begin
    set @Return = @Twenty
    End
    Else if @num = 30
    Begin
    set @Return = @Thirty
    End
    Else if @num = 40
    Begin
    set @Return = @Forty
    End
    Else if @num = 50
    Begin
    set @Return = @Fifty
    End
    Else if @num = 60
    Begin
    set @Return = @Sixty
    End
    Else if @num = 70
    Begin
    set @Return = @Seventy
    End
    Else if @num = 80
    Begin
    set @Return = @Eighty
    End
    Else if @num = 90
    Begin
    set @Return = @Ninety
    End
    Return @Return
    END
    3. Create trigger for OCHO table:
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    =============================================
    Author: <Author,,Name>
    Create date: <Create Date,,>
    Description: <Description,,>
    =============================================
    ALTER TRIGGER AmountToWordsTrigger
    ON dbo.OCHO
    AFTER INSERT,UPDATE
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    UPDATE dbo.OCHO
    SET TotalWords = dbo.AmountToWords (LinesSum)+'Only'
    WHERE CheckKey IN ( SELECT CheckKey From Inserted)
    END
    it will update exisitng filed i.e.,Amount in words. call this field in your PLD.it will help you to get Amount in words through PLD
    Regds,
    sampath kumar devunuri..

  • HTTP url parameters to pass the target side how handle using udf and source is not mapped to target

    HI Gur's.
    I have a requirement HTTP -post -Proxy.
    Post will send the data in URL. we have written the udf for handling the to receive the  data  we are not mapping with source structure to target structure .Url data  display in SOAP header only.how to store the soap header  data ECC using in proxy receiver.

    thank you shahcsanjay for your reply
    but I think that web.showDocument can not be used by ordinary java web application ..
    I think it can be used only with with "oracle forms" Am I right ?
    If no can you please tell me where can I find a useful document about how to use web.showDocument ...
    thanks again
    Saleem

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • Error in while calling a Soap Adapter using the UDF

    hi,
    i am trying to make a call to Soap Adapter using a UDF.
    The code of the UDF is as follows :
    InputStream isPayloadStream = null;
    AbstractTrace trace= container.getTrace();
    String sService="Business Component";
    String sChannelName="Soap Channel(Sender)";
    SystemAccessor accessor=null;
    trace.addInfo("entered UDF");
    StringBuffer sb = new StringBuffer(" ");
    trace.addInfo("creating the reference file");
    sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
    sb.append("<ns0:MT_123082_UDF xmlns:ns0=\"http//infosys.com/pi/projects/png/n1\">\n");
    sb.append("<INTERCHANGECONTRLNOS>" + var1 + "</INTERCHANGECONTRLNOS>");
    sb.append("<PGPARTNERID>"var2"</PGPARTNERID>""\n""</ns0:MT_123082_UDF>");
    trace.addInfo("trigerring the SOAP channel ");
    try{
    Channel channel = LookupService.getChannel(sService,sChannelName);
    accessor = LookupService.getSystemAccessor(channel);
    isPayloadStream = new ByteArrayInputStream((sb.toString()).getBytes());
    trace.addInfo("creating the xml payload ");
    XmlPayload payload = LookupService.getXmlPayload(isPayloadStream);
    Payload result=accessor.call(payload);
    catch (Exception e){
    trace.addInfo(e.getMessage());
    finally{
    if ( accessor !=null) {
    accessor.close();
    return " ";
    The above code is throwing an error while end to end testing.
    the scenario is such,while graphical mapping a UDF will be used, which will create an Xml payload, and send this payload to another SOAP to file scenario.
    The error in the sxmb_moni is:  "Error when calling an adapter by using the communication channel CC_123085_UDF_SOAP_OUT (Party: , Service: BC_123082_REMADV_D96A, Object ID: fa9c6ee15efc30c68ec34b08034d87d1) XI AF API call failed. Module exception: 'failed to set up the channel fa9c6ee15efc30c68ec34b08034d87d1'. Cause Exception: 'Channel stopped by administrative task.'."
    Please can anyone suggest how this error can be rectified.
    regards,
    Meenakshi

    Hi,
    i have checked the communication channel and the XML. The following error occurs everytime i try to run the scenario.
    Error:
    Error when calling an adapter by using the communication channel CC_123082_UDFRECEIVER_SOAP_IN (Party: , Service: BC_123082_REMADV_D96A, Object ID: 2a895589066d30d4b2686e9d3a8d4c8d) XI AF API call failed. Module exception: 'SOAP Error'. Cause Exception: 'SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request'
    Please let me know how this error can be resolved.
    Regards,
    Meenakshi

  • How to use attributes in variable substitution???:(

    Hi all,
    Could you please help me out in how to use attributes in variable substitution....
    Regards,
    Sundar

    Hi,
    Use Adapter Specific Identifiers , instead of Variable Name substitution.
    Sender File adapter --> Adapter Specific Attributes --> Select File Name
    Reciver File Adapter -->Adapter Specific Attributes --> Select File Name
    In the mapping , use this code in an UDF to change the filename to what you want,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String filename="YOURFILENAME";
    String rSourceFileName = conf.put(key,filename);
    Regards,
    Bhavesh

  • SAP PI7.31 : Mail with multiple attachments - how to process via UDF

    Hi
    wondering how I can approach this problem.   I have to read an Email with any number of attachments  - it can have between 1 and 4 or maybe more of different types (CSV,XLS,PDF,ZIP).  I need to read this email and extract the attachments to a folder.
    Just to let you know I have done this OK for an email that I know only has 2 attachments ! Works perfectly - just no good for ?n? attachments !
       Mail Sender has AF_Modules/MultipartHeaderBean to add payload Attributes
       The message is sent to 2 Receivers
       Each Receiver File adapter then uses AF_Modules/DynamicConfigurationBean and AF_Modules/PayloadSwapBean
    Problem is that when I do not know how many attachments there are.  So I will have to write a Java UDF mapping, perhaps using the classTransformationInput.
    My question is : To create a Java UDF what should be structure of a sent Email message Type look like so I can feed that into a UDF to check what payload attachments there are etc ?.

    As long as you use java mapping, you can have any dummy structures for your interfaces.
    But, if you prefer to use graphical mapping with UDF, then you should have some valid structures for your mail and file interfaces. e.g., mail pack XSD for mail interface as metioned by Indrajit Sarkar
    and again the same structure for the file interface as well so that you can have one to one mapping an then make use of UDF code from the article. Use payload swap bean in the receiver file channel to replace xml payload with Zipped attachments and then finally use script to unzip this zip file.
    Rgds,
    Praveen Gujjeti

  • How to use a user defined function in XI

    Hi Experts,
    I would like learn how to use a user defined function  in Xi during mapping . Is there any step by step on that.
    Besides during when me make communcaton channels I see the following tabs...Paramters ..Identifiers ...Module...
    The module that is given here ...where and how it is used.

    Hi,
    You can write UDFs in java in Graphical mapping to enhance your XI Graphical mapping functionality
    The steps for doing it would be:
    1. Click on Create New function Button found on Bottom left corner on your XI Mapping window.
    2. Write your java code.
    3. Run the Mapping Test as usual.
    >>The module that is given here ...where and how it is used.
    The adapters in the Adapter Framework convert XI messages to the protocols of connected external systems and the other way around. When doing so, some
    functionality might need to be added specific to a situation which is possible with the use of custom modules.
    Typical example would be validation of file content when using a File Adapter or modification of the message payload to a common content structure which is not supported by any of the standard SAP modules.
    An Adapter module is developed as an Enterprise Java Bean and is called locally by the Adapter.
    An example on modules :
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805">How to develop a module for reading file name in a sender file adapter XI 3.0</a>
    Cheers,
    Chandra

  • Using a UDF in query select

    I am using CF8 and MS Sql Server. I am getting an error on "select Str, CapFirst(Str) ..." when trying the following:
    <cffunction name="CapFirst" returntype="string" output="false">... </cffunction>
    <cfquery name="query" dbtype="query">
    select Str, CapFirst(Str) as CapStr from SampleTable
    </cfquery>
    Thanks for your help

    You can't run a UDF like that in any <cfquery> SQL string, be it a QoQ or any other DB's driver.
    If one wants to use a UDF in the SQL string, then one needs to call it like one would anywhere else: #myFunctionHere()#.  However this won't help you because all the CF calls are resolved before the resultant string is sent to the DB driver.
    And the string that goes to the driver needs to be valid SQL.
    So you cannot do what you're wanting to do via this approach.
    I presume the original data is coming from a DB?  Why don't you run an equivalent function on the DB before passing it back to CF, so the results are already how you want them to be?
    Adam

  • Is the SAP HANA Predictive Analysis Library used within UDF?

    Hello Everyone,
    I am an intern at SAP Belfast currently looking at UDF and DDF, and I was wondering if you could answer a few questions for me?
    Is the HANA Predictive Analysis Library (PAL) used within UDF? I know that UDF uses regression analysis, and I know that the PAL has functionality for regression analysis, but are they used together? and if so, which algorithm within PAL exactly is used?
    I know that the UDF is an Application Function Library. How many of these Application Function Libraries are there within HANA, as I have only come across the AFL which contains the Predictive Analysis Library?
    Thanks a lot in advance,
    Claire Burn

    Hi Anu,
    First double check your own heart. If you really have the passion, then go back to SAP and do what ever you want to do. You will definitely succeed. However if your motivation is primarily influenced by other than (your love for subject), then the question is how far and how long you will be able to stay before those thoughts come back and push you to switch to something else. The key is where your heart is. Only you can help yourself.Good luck.
    Regards,
    Sam

  • Catching Mapping error at runtime using a udf

    Hi AlL,
    I read some blog where it was discussed.. we can catch runtime error ? Is it possible?
    how will we be able to catch the runtime error say during the mapping we got an error and we want to catch that error and log it somewhere or throw user defined exception?
    I guess at runtime all the runtime details are stored in SMPPMAP3 table. which is the field which contain the any runtime error?

    Hi,
    you cannot do it using an UDF as a uDF will only work on fields that
    are in the message
    you can throw exceptions from UDF but not catch
    to catch you can use an exception branch of a block stpe in an intgration process BPM
    Regards,
    michal

  • Way to use Prompts , UDFs in Derived table

    Hi guys,
    In our org we have been using prompts in the derived tables. Derived table would return Single final select statement. Now that report requirements are complex we would have to use table variables, UDFs, and many select, delete, update statements. How should we handle many such statements in a derived table to return a result set for the report?
    If we cannot handle many selects in a derived table, I am hoping to use Table-Valued Function in the derived table something like this:
    create myFunction()
    Returns Table as (......)
    select * from myFunction()
    But then I should be able to use the user input prompts in the syntax: @PROMPT('test1','A',Multi,,). The user would input 5 such prompts from the report.
    Any ideas from anyone who has used Prompts, UDFs in a derived table?
    Environment: BO X1r2, Crystal x1r2, sql server 2005
    Thanks !

    In the past, I have opted to create complex logic in a server-side procedure, complete with prompts.  The prompt are passed to and presented in Crystal.  This way, instead of splitting the logic between UDFs, derived tables and prompts, you can keep the logic in a relatively tidy procedure.

  • How to use .addContextChange?

    hi all,
    can someone please explains me how to use the method .addContextChange.
    also i have a child node which can occurs unbounded times, i want to know how to use .addContextChange to replicate this child node.
    thanks in advance.

    Hi,
    For using it properly you need to understand what a context is how does it influence the output structure and what all ways are there to add it.
    What a Context Change is
    Message mapping in XI works by means of queues. A queue contains an entire XML instance of the source message. Depending on the hierarchy in the source message, different nodes and elements can be categorized into different contexts. All the nodes and elements that belong to the same parent node are said to be in the same context. Hence, the nodes and elements that belong to different parent nodes have to be separated by a context change.
    Refer http://www.riyaz.net/blog/xipi-introduction-to-context-handling-in-message-mapping/
    what all ways are there to add it.
    1. By standard mapping functions Splitbyvalue,
    2. For removing context collapsecontext and removecontext.
    3. By UDF (as you mentioned)
    Context is needed to align the output, so if you a correct output you need to handle the context
    Regards
    Suraj

  • How to use one email adress for multiple recipients

    Hello,
    I'd like to know how to use one email adress for multiple recipients. 
    this would be very useful or projects. for example;
    if i send one mail to [email protected], all people in this project get an email.
    I will add the people in this project myself. 
    I know it is possible, but I don't know how to do it ;-)
    please help me! 

    Hope this help.
    _http://technet.microsoft.com/en-us/library/cc164331(v=exchg.65) .aspx

Maybe you are looking for

  • Enhancement of Employee Self-Service Shop by an own Catalogue (ABAP)

    Hello SRM-Development-Experts I enhanced the /SAPSRM/WDC_DODC_SC_GAF_C-WD-Component of Employee Self-Service Shop with an own ActionLink to an own WD-Component. Details The own WD-Component uses the interfaces /SAPSRM/WDI_L_FPC_GENERAL, /SAPSRM/WDI_L

  • Unable to create subfolders in Automator

    Hi! I'm trying to create a workflow which would basically create a new website project folder structure with a single click. I have an htdocs folder in which I'd like to create a new project folder with a number of subfolders. htdocs --prj1 --prj2 --

  • How can I use a class like this?

    public class Test<N, T extends Test<N, T>> { public static void main(String[] args) { Test<String, Test<String, Test>> test = null; //compile failed... }

  • Firefox crashes when I load pages with Flash content

    Whenever I load a page that uses the Flash player plugin, Firefox crashes. When I disable the plugin, the browser works fine. I am also unable to install version 3.6.6. The update downloads, but when I restart the browser, either says "the partial up

  • MSN Messenger and Yahoo download problems

    I am new to Macs so I hope this questiong isnt rediculous... I have tried to download MSN messenger and Yahoo messenger and both of them will download to my computer but when I open them they appear on the dock for a second and then dissapear without