cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue from Invoice (Idoc - file) scenario

Former Member
0 Kudos

Dear All,

I am working on Idoc to File scenario and i have a requirement like..

INVOICE02

E1EDP01

E1EDP05

BETRG

E1EDP05

KSCHL

BETRG etc

condition :

If KSCHL not equals to space then map all BETRG's to a target field which is not mandatory. Sometimes E1EDP05 may not contain KSCHL and when i set the context to E1EDP05 level its not considering the BETRG values, it behaving lik taking up the condition part and summing part seperately.

It would be really great if anybody comes up with some ideas.

Thanks a lot

Hari

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I such cases..I prefer to raise the context of all the fields under E1EDP05 , pass them to a Java function...THen in the function use conditions to check string not empty etc...and for the appropriate condition store the other fields in array lists...

U can use these array lists to populate the target fields...

Of course this method is usefull when u have relatively few fields...

Regards,

Arvind R

Former Member
0 Kudos

Hi Arvind,

Thanks for your response.

I am not at all aware of JAVA functions could you please explain in detail?

Thanks a lot.

Hari

Former Member
0 Kudos

Hi, Hari:

Combine abhishek's solution and Alexis advise:


KSCHL ----> MapwithDefault(set default value as blank) 
                                             -----------------------> And ------->ifWithoutElse -------------> Target
KSCHL                                                                            Then(BETRG)
                 -------> equalS ---> Not
Constant(blank)

Regards.

Liang

former_member200962
Active Contributor
0 Kudos
KSCHL ----> exists
                                             -----------------------> And ------->ifWithoutElse -------------> Target
KSCHL                                                                            Then(BETRG)
                 -------> equalS ---> Not
Constant(blank)

Context of KSCHL should be above that of E1EDP05

I hope that Target node is repeating -


0...unbounded.

Regards,

Abhishek.

Former Member
0 Kudos

Hello Abhishek,

Thanks for your reply.

I already tried it by setting the context to top level node E1EDP01 but didn't work.

for ex : KSCHL exists only 3 times where as BETRG exists for 5 times and for both context set to E1EDP01.

queue length does not match here.

(Condition : Add all EDP05-BETRG if E1EDP05-KSCHL is not equal Space and map directly into target field.)

Regards

Hari

Former Member
0 Kudos

"queue length does not match here."

Have you tried using MapwithDefault function (and then apply the logic below)?

it should fill the empty fields with "" so the queues can match