Skip to Content
author's profile photo
Former Member

UDF for this mapping rule

Hi Friends,

I have one difficult issue which have one mapping rule to write user defined function. I am sending mapping rule Please give me java coding to create udf for this mapping rule which is following below:

CRFT.COSTR = M_ORD_01 and

CRFT.CRID = CRHE.CRID and

CRFV.FTNO = CRFT.FTNO and

CRFV.ATNAM = ZPPI_ORDER_SCHED_EN_DATE

And

CRFT.COSTR = M_ORD_01 and

CRFT.CRID = CRHE.CRID and

CRFV.FTNO = CRFT.FTNO and

CRFV.ATNAM = ZPPI_ORDER_SCHED_EN_TIME

From ATWRT of ZPPI_ORDER_SCHED_EN DATE+ ATWRT of ZPPIORDER_SCHED_EN_TIME

In format yyyy-MM-ddTHH:mm:ss

using this mapping rule, ATWART field can map with target field "End Time" i think.

Actually source field is CALCULATE but this field is not in Source structure

target field is "End Time" this field is in Target Structure.

I will wait for ur response

Thanks adn regards

Sai

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Posted on Aug 20, 2007 at 06:48 AM

    Hi Sai,

    Could you please make your requirement more clear.

    Just give source and target nodes and fileds with occurrences and what conditions need to check to generate target elements/nodes.

    Cheers,

    Jag

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Jagadish,

      This RFC is CONTROL_RECIPE_DOWNLOAD

      in this RFC, i want to map ATWRT field to Target field "End Time" with mapping rule which i had already given.

      In Graphical mapping, i am doing . but i can not get it because mapping condition is difficult. if you have any idea in graphical mapping give me early

      before that i have to give explantion about this is date value and time value passed through this ATWRT field as different records.

      i am doing as a condition ie first i have taken date condition. from that condition, first two fields CRFT.COSTER and M_ORD_01 has given to "equals" funtion like that have done remaining fileds then the output of those "equals" functions given to "and" functions finally i get one output of "and" function. while sending DATE values from RFC this output of "and " function.

      Like this, for Time condtion i have done mapping same way and giving a TIME values from RFC as Second record then output of this "and" function while sending second record with time value.

      here mainly i am getting problem is .....

      here i am taking source field ATWRT( in this field i am sending date format adn time format as different records) with the outputs of the mapping conditons as input vaules of another function. i dont have any idea for another function why because is first date record should be wait until the time record comes in this function.after then both vaules should concat .

      now here whenever you send date value through this field ATWRT as first record and after satishfy the date condition form mapping rule, The date value of ATWRT should go to input of concat function. next i will send time value like date value through ATWRT as second record . It should go to another input of concat function. Then here both date value and time value concat with T and should be come output in the format yyyy-MM-ddTHH:mm:ss and this will go to Target field "End Time".

      I will be wait for ur possitive reply

      thanks for giving response

      Thanks adn regards

      sai

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 07:05 AM

    Hi Sai,

    In ATWRT field, how many values (records) will come? What I mean is does it contain the data as follows?

    Date1

    Time1

    Data1

    Date2

    Time2

    Data2

    .

    .

    .

    .

    Daten

    Timen

    Datan

    If this is the case, Write one UDF and take ATWRT as a queue.

    In UDF, use for loop and increment counter as 3 to access date and time.

    For Date, start counter at 0.

    For Time, start counter at 1.

    Now You can do what ever you want.

    If that is not the case, let me know clearly.

    Regards,

    Jyothi.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI jyoti,

      thanks for giving good response.

      you have given two java codes which are for date value and time value. but i think you didn't consider mapping conditions for those. where you store date value until you will get time value. After getting both value we have to concate in format

      yyyy-MM-ddTHH:mm:ss

      So for storing date adn time values in one function give me java code.

      Thanks and regards

      sai