cancel
Showing results for 
Search instead for 
Did you mean: 

Target tag is not getting generated

Former Member
0 Kudos

Dear All,

We are facing problem using One as Many Function.

In this scenario we want to pass value of LineId to LINE_NO.

Here hierarchy is like this :

InvoiceLineDetails      (0..Unbounded)

     -LineId               

     -PromotionInfo                                        

          -PromotionDetails (0..Unbounded)        - ZINVS16 

                                                                             - LINE_NO              

since context of LINE_NO is one tag lesser than LineId ,  so we have used one as many for repeating the tag as Promotion_Details tag

But issue is that..when PromotionDetails tag is not present for some InvoiceLineDetails tag ... LINE_NO is not gettign generated for successor tags.

Attaching the mapping and Queue values screenshot.

Please help.

Thanks !!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

I think you should do like this:

1) PromotionDetails -> exists -> createIf - ZINVS16

2) As suggested above, use mapwithdefault just after "PromotionDetails"  tag (before useoneasmany) and finally split by  value (each value) before Line_No.

Thanks

Amit Srivastava

Answers (4)

Answers (4)

Former Member
0 Kudos

It worked..

Thanks !!!

ambrish_mishra
Active Contributor
0 Kudos

Oops... .the screenshots did not appear...

although your problem is resolved...attaching them just for your learning.

many ways to achieve results:

test case:

Hope it helps!

Ambrish

Former Member
0 Kudos

Dear Abrish/Amit,

Now LINE_NO tag is getting created but...two other tags wcich have one two one mapping at the same level are not getting created properly.

Pl see below screen-shot for same.

former_member184681
Active Contributor
0 Kudos

Hi Lisin Dubey,

You might find it useful to review the basic concepts of queues and contexts in the mapping - have a look at my blog:

Then this mapping task should become easy for you to solve on your own

Regards,

Greg

Former Member
0 Kudos

Hello,

Change the context of "PromoId" and set it as "InvoiceLineDetails" and then try below mapping:

Thanks

Amit

ambrish_mishra
Active Contributor
0 Kudos

Lisin,

I would suggest the below:

Tested ok with following test case:

Once you understand queues and context, and learn to play with it, it will be easy.

Hope it helps!

Ambrish

ambrish_mishra
Active Contributor
0 Kudos

Hi Lisin,

Amit has already suggested mapping for ZINVS16.

However, PromotionDetails should be at context PromotionInfo and not higher which your screenshot shows. See below

I tested with a sample test:

Having said that, there a chance that the node PromotionInfo does not exists, then the above solution will fail and you will have to get PromotionInfo also in play to make it to work.

Do you want to check this possibility and revert back?

Hope it helps!

Ambrish

ambrish_mishra
Active Contributor
0 Kudos

Hi Lisin,

If you keep the context of PromotionDetails as InvoiceLineDetails level, then even the above chance is also taken care off.

Ambrish

rajasekhar_reddy14
Active Contributor
0 Kudos

use mapwith default function and split by value .