cancel
Showing results for 
Search instead for 
Did you mean: 

Check the value for Inbound field value and map other fields ..?

Former Member
0 Kudos

Hi

Scenario - File to IDOC, Occurance is only once.

What I want?

Souce fields: SOAKNUM, SOAFF1, SOAFF2, SOAFF3, SOAFF4

Target Idoc fileds: KLASH, DDNUM, DDDAT, DDVAL, DDCOUNT , CHKVAL

I'm generating an IDoc basing upon SOAKNUM.

Now I want to check the value of CHKVAL = DK and to map the field soaff1 --> DDNUM

check the value of CHKVAL = Dz and to map the field soaff2 --> DDVAL

Regards

S.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Souce FILE fields: SOAKNUM, SOAFF1, SOAFF2, SOAFF3, SOAFF4

Target Idoc fileds:

IDOC

SEGMENT1

-->KLASH

-->DDNUM

SEGMENT2

-->DDDAT

-->DDVAL

SEGMENT3

-->DDCOUNT

-->CHKVAL

Here CHKVAL is hardcoded with constant with the value DK.

source and target fields are mapped like SOAKNUM -- KLASH; SOAFF1-->DDNUM; SOAFF2 >DDDAT; SOAFF3>DDCOUNT this. Now I want to check If CHKVAL is DK and then map SOAFF1-->DDNUM.

I am not sure how to check this. Pls can some one explain how to check this condition.

Rgds

Swarna

Former Member
0 Kudos

Hi Swarna,

as you mentioed

"Here CHKVAL is hardcoded with constant with the value DK. " then why you need to check the field value of CHKVAL... everytime it is going to be "DK" only.as its constant. so you can directly map SOAFF1-->DDNUM... no need of condition

Thanks,

Bhupesh

Former Member
0 Kudos

Yes, you are true. But I have CHKVAL field values are many like DK, DX, DZ. So, Can I duplicate the target structure and provide these many values.

Former Member
0 Kudos

ok so do you mean to say "CHKVAL" belongs to SEGMENT3 and you want multiple occurrence of SEGMENT3

and need to provide different constant to field CHKVAL

and need to check field CHKVAL for mapping for field.. SOAFF1-->DDNUM then yes can do it..

first let me know

as DDNUM belongs to SEGMENT1 then in that case what is the occurrence of SEGMENT1 if this is also multiple then yes you can put condition by using if else.

on duplication of target structure..

if SEGMENT3 occurrence is multiple then yes in mapping only you can duplicate SEGMENT3 structure and map different constant to CHKVAL field..

Thanks,

Bhupesh

Former Member
0 Kudos

Hi,

>> Now I want to check If CHKVAL is DK and then map SOAFF1-->DDNUM.

Firstly u cannot check the value of a target field. With Variables (7.1 and above) forst you will have to assign a value and then use it (but this will not be part of target str).

Best Solution:

Right click on segment 3 and click duplicate subtree. Do it twice to have three subtrees(since one is already present) each for DK,DX and DZ

Now for each of these subtrees map the values of DDNUM accordingly. And assign constants to CHKVAL for each subtrees as DK, DX and DZ respectively.

This should solve your issue.

Cheers,

Souvik

Former Member
0 Kudos

Thanks to all. Done duplication of structures and assigned the values.

Closing.

Regrds

S.

stefan_grube
Active Contributor
0 Kudos

check this blog:

/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool

Former Member
0 Kudos

Hi,

You want to check value of Target field and then assign value to some other Target field .. ? you sure..

please explain your scenario..

Thanks,

Bhupesh

Former Member
0 Kudos

Mapping is source field to Idoc Target field. But, I want to check the value of an other field in Idoc (Inbound) before i send the data.

Former Member
0 Kudos

Two options..

1. Use Local variable to store value of target field and use that target field in condition for other field mapping.. check SDN for how to use local variable

2. anyways first target field you are filling thru one of the source field or constant only.. so even you can use that also in your condition to map it accordingly..

second option is more easy in case you have first target field value coming from one of the source field then use that field in condition to map other field..its logical solution..

Thanks,

Bhupesh