cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Problem

Former Member
0 Kudos

Hi Experts,

I want to supress MessageType in Message Mapping. How can i do this?

Description : I am doing IDOC to File (XML) Scenario. I need to apply a condition inthe mapping. Thre is a segment called E1EDP01and there is a field called KTEXT. If this segment exists and KTEXT value ends with ^ symbol then only i need to genearate message from message Mapping. Otherwise i need to supress total message and produce nothing in message mapping.

that means, i need to supress total messge (i.e. Messge Type). How can i achive this .

Thaks,

Subbu

Accepted Solutions (0)

Answers (4)

Answers (4)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

I'm not sure if I correctly interpreted your question. You can use this mapping:



KTEXT --> UDF --> equalsS --> ifWithoutElse --> removeContext --> TargetStructure(0..1 or 0..unbounded)
     constant:^--> /           /
KTEXT ----------------------->/

UDF type is queue, input argument is: input 

code is:

for (int a=0;a<input.length;a++){
input[a]=input[a].substring(input[a].length()-1,input[a].length());
result.addValue(input[a]);
}

Hope this helps,

Edited by: Mark Dihiansan on May 26, 2009 12:43 PM

Former Member
0 Kudos

Hi All,

Just with Graphical mapipng i could manage to supress entire message.

Actually i am collecting IDOCs for 1 minute time and procesing in to XMLs. i used multimapping in this . But for only one specific case it is failing.

Failed case : Suppose only one IDOC with E1EDP01 and KTEXT with out value ^ at end is coming from R3, In the BPM, i have error saying that Receiver determination is found.

Yes, this is true and correct becuase, we should get some mesage created in mapping, and the error describes receiver determination from BPM to Thirdparty system (File System) is not available.

Please tell me how to supress messages in PI depending on certain conditoin?? example in the idoc if some value is there, then only out put should be creaed. Otherwise not.

Thanks,

Subbu

Former Member
0 Kudos

Hi,

I am just confused with your message..., What I understood from your message is you want to suppress the message where KTEXT value doesnt end with ^ symbol ..right???

then do canonical mapping

In interface mapping do mappings as

1 . Idoc to Idoc (to the same idoc, and filter the idocs here itself with the condition so

you will get the idocs where your condition satisfies )

2. As part of the canonical mapping ,handle the second mapping as your normal mapping....... (in the first steps Idocs filtered so here you will be getting only idocs which can form the target)

so handle the rest in normal way as you can.......

Cheers,

Prasad.

Former Member
0 Kudos

How to use this option in Receiver File Adapter with out content convertion.

This below opton was availeble in Procesing tab of File Adatper. How can we use Igone option.

Select Empty Message Handling:

○ Ignore

No file is put in the target directory.

Thank,

Subbu

Shabarish_Nair
Active Contributor
0 Kudos

>

> How to use this option in Receiver File Adapter with out content convertion.

> This below opton was availeble in Procesing tab of File Adatper. How can we use Igone option.

>

> Select Empty Message Handling:

>

> ○ Ignore

>

> No file is put in the target directory.

>

> Thank,

> Subbu

that options works without content conversion also

Former Member
0 Kudos

Hi Shabarish,

What we need to do inorder to use that option (Empty Message Handling: Ignore)?

Thnx,

Subbu

Former Member
0 Kudos

Hello,

Yes you can sort out your issue with help of condition editor in receiver determination.

Go to receiver determination and call codition editor in left part choose your KTEXT field from E1EDP01 then (IMPORTANT!) thoose operation like u2248 CP (contain pattern) and in the right part enter just *^.

More info about using condition editor you can find on help.sap.com :

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm

BR,

Dzmitry

Former Member
0 Kudos

Hi Rama,

try this UDF it will work

if((KTEXT<i>.endsWith("^")))

{

absTrace.addDebugMessage("^ is found. Hence failing mapping transformation");

throw new RuntimeException("^ is found. Hence failing mapping transformation");

}

}

Thanks

Sampath

Former Member
0 Kudos

if the segment and the value doesnot exist you can fail the mapping so that the message results in error

what do u expect by suppress whole message type