cancel
Showing results for 
Search instead for 
Did you mean: 

regarding IDoc Context handling

former_member207622
Contributor
0 Kudos

Hi Folks ,

I have Single as well as multiple Idocs coming in from ECC into PI . now in every  IDoc I have E1EDPO1 -- 1-UNBOUNDED

INSIDE E1EDP01 I have E1EDP05  as 1- unbounded

For every occurence of KSCHL FIELD having value  ZMFX  in E1EDP05  I have to pass BETRG  ( E1EDP05) value to target .

I have to suppress the target in case of any other values of KSCHL

Also sometimes the KSCHL field doesnot come at all in some segments causing values gets jumbled when the queue is build .

Please let me know how to achieve this with UDf or any node function

Thanks

Ninad Sane

Accepted Solutions (0)

Answers (3)

Answers (3)

santosh_k3
Active Participant
0 Kudos

Hi Ninad,

To remove suppress values from source filed.

Try creating an UDF  for that:

UDF to delete SUPPRESS values.

public void RemoveSuppress(String[] a,ResultList result,Container container){

for (int i=0; i<a.length;i++)

{

if (!a[i].equalsIgnoreCase(ResultList.SUPPRESS))

{

result.addValue(a[i]);

}

}

then include this UDF in mapping explained by Laxmi.

put KSCHL( the context of E1EDP05) in mapping

Hope fully should solve your problem.

Thanks

Sai

former_member184681
Active Contributor
0 Kudos

Hi,

I believe you only want to create the whole E1EDP05 segment, if KSCHL = "ZMFX", is that right? If so, the design described by Laxmi Bhushan Jha will NOT work well for you. Instead, you should design it as follows:

KSCHL -> mapWithDefault(space) -> equalsS( constant(ZMFX) ) -> createIf -> E1EDP05 - to control the creation of the E1EDP05 segment, add SUPPRESS where required, and handle nodes with non-existent KSCHL field.

BETRG -> BETRG - straight 1:1 mapping for the field, since you control the creation of the whole node with the previous mapping.

Hope this helps,

Greg

Former Member
0 Kudos

Hi,

This can be done using graphical mapping as defined below.

KSCHL  equelS  ZMFX  exits

                                ifwithoutelse------ Target

      BETRG

hopefully this will solve your problem.

Regards

Laxmi Bhushan