cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in writing UDF..

Former Member
0 Kudos

Hello,

based on source segment EIEDP01 count target field need to mapp.

check BASRT value is INVO then check count 001 then pass 40 else check BASRT value CRME then check count 001 then pass 50    else

check BASRT value is INVO then check count 002 then pass 60 else check BASRT value CRME then check count 002 then pass 70

regards,

Chinna

Accepted Solutions (1)

Accepted Solutions (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi Chinna,

Here is your solution....

Target field is at the item level.... This is a generic solution and will work with any number of line item segments (E1EDP01).

BSART is a header field so you would need to use useOneAsMany for the mapping.

Hope it answers your query!

Ambrish

Former Member
0 Kudos

Thank you Ambrish,

its working, if i have to pass string instead of numeric values then i cant use index  right?

kindly provide me logic if i need to pass string.

regards,

chinna

ambrish_mishra
Active Contributor
0 Kudos

Hi Chinna,

Index function works on context. Even in the solution provided above, it is not working on numeric values. We are passing E1EDP01 as a parameter and eventually context comes into play. Inside index functin we have specified the initial value and the increment value.

Coming back to your question on string,if you can specify in which scenario would you want to pass string, I can think it over.

Cheers,

Ambrish

Former Member
0 Kudos

Hi Ambrish,

the solution you provided is working and many thanks for it.

same question as above and if we have to pass string in it.

based on source segment EIEDP01 count target field need to mapp.

check BASRT value is INVO then check count 001 then pass H else check BASRT value CRME then check count 001 then pass S   else

check BASRT value is INVO then check count 002 then pass X else check BASRT value CRME then check count 002 then pass Z

thank you.

regards,

chinna

Former Member
0 Kudos

Hello experts,

your inputs on above logic.

regards,

Chinna

ambrish_mishra
Active Contributor
0 Kudos

Hi Chinna,

the above can be achieved by simple if then else but this requirement need clarity.What if the count of E1EDP01 is 3 ?

Ambrish

Former Member
0 Kudos

thanks for the reply,

present the line items for 1 and 2 only the mapping.

regards,

Chinna

ambrish_mishra
Active Contributor
0 Kudos

Hi Chinna,

Found a simple solution to the requirement.

Hope it answers your question!

Ambrish

Former Member
0 Kudos

Excellent, thank you Ambrish

Former Member
0 Kudos

Hi Ambrish,

need small help in mapping.

at source side line item occurrence is 1 then target side i need two line items .

is this possible.

Source E1EDP01 line item 1 then target side E1FISEG line item 2

regards,

Chinna

ambrish_mishra
Active Contributor
0 Kudos

Use duplicate subtree option for E1FISEG segment.This will generate one additional E1FISEG..map to E1EDP01.

Hope it helps!

Ambrish

Answers (0)