cancel
Showing results for 
Search instead for 
Did you mean: 

Solution Required in message mapping

0 Kudos

Hi,

Interface source is "|" deli metered  file and it has multiple records in a file. Below attached the source field for reference.

VNT102-NAVN
VNT102 – ORGANISASJONS_NR
VNT102 – KUNDE_STATUS
VNT102 – EFAKTURA_AVTALE
VNT104-LOKAL_ADRESSE
VNT104-CITY_NAME
VNT103-CITY_NAME
VNT104-POST_NR
VNT101-NAVN
VNT101 – FODSELS_NR
VNT101 – KUNDE_STATUS

VNT101 – EFAKTURA_AVTALE

VNT101 is marked as "Person" and VNT102 is marked as "Organization". If VNT101 is populated VNT102 wont populate.

In case both fields are present then I have to suppress that record from file and process the rest of records.

same time If VNT101 filled then VNT103-CITY_NAME field would be copied to target field else VNT104-CITY_NAME

Is it possible without UDF? If we required UDF please provide the code to build

Please let me know the solution and reply if more details required.

Thanks & Regards

Arun

Accepted Solutions (0)

Answers (3)

Answers (3)

suman_saha
Contributor
0 Kudos

Hi,

You can do like this:

Suman

0 Kudos

Hi Suman,

Thanks for the response.

Is it possible? In case both VNT101 and VNT102 present, error-ed out the file and do not pass to target without UDF.

Or suppressed record can collect and send to target with separate message?

Please give your suggestion.

Thanks & Regards

Arun

Muniyappan
Active Contributor
0 Kudos

yes. it is possible without udf.


VNT101 is marked as "Person" and VNT102 is marked as "Organization". If VNT101 is populated VNT102 wont populate.

In case both fields are present then I have to suppress that record from file and process the rest of records.

you can check both the fields using exists and put AND condition. sample logic. you may need to modify below as per your context.

VNT101-->exists

                                   --> AND-->Not-->createif--record.


VNT102-->exists




same time If VNT101 filled then VNT103-CITY_NAME field would be copied to target field else VNT104-CITY_NAME

use if else condition . you are through.

0 Kudos

Hi,

Thanks for the response.

Is it possible? In case both VNT101 and VNT102 present, error-ed out the file and do not pass to target without UDF.

Thanks & Regards

Arun

Muniyappan
Active Contributor
0 Kudos

in that case i would suggest perform this valiation at receiver determination.

you need to simulate the condition in such a way it will error out when both the fields are available.

http://wiki.scn.sap.com/wiki/display/XI/Xpath+Condition+in+Receiver+Determination?original_fqdn=wiki...

i wiould suggest share the input payload here so that you will get the correct xpath from others.

azharshaikh
Active Contributor
0 Kudos

Hi Arun,

Is your input having multiple records...header repeats multiple times?

AFAIK - Receiver Determination will check only for the 1st value (if there are multiple)...

Do you want to fail entire file (with multiple records) if Both these VNT101 and VNT102 are present (or only the specific records from entire file)?

Regards,

Azhar

0 Kudos

Hi Azhar,

Yes, I have Multiple records in my source structure.

If I can send the suppressed record in to separate message is also good.

How to do it?

Regards

Arun

azharshaikh
Active Contributor
0 Kudos

Hi Arun,

It will depend on your requirement..what actions / logic you need to define:

1. Do you want the Entire file to fail if it contains that 2 fields?

---> If yes, you can do it in Message Mapping / Receiver Determination condn check

2. Do you just want to Suppress the Records having those 2 fields and process the rest?

--> If yes, you can achieve this in Message Mapping as suggested above

3. Do you want to pass the records with that 2 fields into a separate message?

---> If yes, you can achieve this using Receiver Determination and pass those records to some other Receiver / Interface based on the conditions

Hope it helps

Regards,

Azhar

Muniyappan
Active Contributor
0 Kudos

if you have mutliple records then you better go with multimapping.

it i will create only allowed records.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1...

Harish
Active Contributor
0 Kudos

Hi Arun,

Please provide more detail about your problem. do you want to convert source flat file to target structure? or you have XML in source?

What is the adapter use in sender side?

regards,

Harish

0 Kudos

Hi Harish,

Yes, I have to convert. Source is "|" deli metered file and am using file adapter at source.

I have one more requirement, In case both VNT101 and VNT102 present, error-ed out the file and do not pass to target.

Target am splitting the file. Am clear about 1:n concept.

Please let me know for more details.

Thanks & Regards

Arun