cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding UDF in Mapping

Former Member
0 Kudos

Hi Experts,

Here Iam doing IDOC To File cenario

I have Source Structure As Follows

FILES -


0....UN

HEADER GROUP -


1..1

RECORD_TYPE

CREATION DATE

CURRENT TIME

GLN_CODE

DETAIL GROUP----


0....UN

RECORD_TYPE

MATERIAL NO

BATCH_CODE

QUALITY

QUANTITY

BATCH_STATUS

FOOTERGROUP----


1....1

RECORD_TYPE

RECORD_COUNT

Here I Should Satisfy the Condition if the RECORD_TYPE = 'xxxx' then

the Sourece File Should move to the Target Application

Here How Can i Do this Check.

Please Let me Know Your Helpful and Precious Answers

Regards

Khanna

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

<i>Here I Should Satisfy the Condition if the RECORD_TYPE = 'xxxx' then

the Sourece File Should move to the Target Application</i>

>>

in this case your receiver is based on your message. hence utilize XPATH in receiver determination.

Check if RECORD_TYPE = 'xxxx', then provide the receiver.

in the corresponding interface determination you will have the mapping which will create the file

Further reference;

Receiver Det- Xpath:

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

XPATH in Interfce Det:

/people/suraj.sr/blog/2006/01/05/multiple-inbound-interfaces-within-a-service

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Rajesh,

If you need to do a simple check on the source field , as you have specified , then thr is no need for a UDF ( with a code for checking the value on that field) .

Solution : Do a check on the source field , in the reciever determination.

Regards,

Sushil Hadge.

Former Member
0 Kudos

Hi,

Thanks for ur reply

But i want to raise the exception also if in the case of the condition fails.

Please let me know

Regards

Khanna

Former Member
0 Kudos

Hi,

Do you have any else condition? if not go for 'If without else' or go for 'IF'

IF -> RECORD_TYPE = XXX (Constant) - then Target.

Can you be more clear, it seems in your structure, you have Record_Type in Header, Body and Footer, on which Record_Type you are checking the condition?

regards

Former Member
0 Kudos

Hi ,

If Record_type=='xxxx' then the source file wil be passed to target Application

Else I want to raise the Exception.How to Raise the Exception

Can u help me out in this please

Regards

Khanna

Former Member
0 Kudos

Hi

Use createIf function in Node functions. Try specifying condition if Record_type=='xxxx' before createIf function. and assign output of create to root node

Meaning, create target only if the condition is true.

Regards

Former Member
0 Kudos

Use equalsS standard function for this. You dont need any UDF for this.

Regards,

Jai Shankar