cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion - Key Field Value

Former Member

Hi Experts,

I am using File to Idoc scenario for my mapping. In the receiver Communication channel, I am using File Content Conversion. My scenario is as follows :

I have a recordset with Header and Line items with Key Field Indicator as 'H' and 'L'. In some cases, the value for this Key Field is coming in as something other than 'H' and 'L'. I need to throw an exception when this Key Field is not 'H' or 'L'.

In the 'Content Conversion' tab, my attributes are as:

Header_Structure.keyFieldValue = 'H' and Line_Structure.keyFieldValue = 'L'. Is there any more attributes that I need to add ?

Please advise. Thanks a lot.

Regards,

Freddy.

Accepted Solutions (0)

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>I have a recordset with Header and Line items with Key Field Indicator as 'H' and 'L'. In some cases, the value for this Key Field is coming in as something other than 'H' and 'L'.

You can declare as "Key Field" only if that field value stick to the requirement. If not, then you cannot even declare as key field. I would recommend sending system to provide valid data for PI to process. You cannot handle this situation using fcc configuration. You might want to use java mapping to check whether the value of the key field H or L available or not. If the value exist let PI to process it. Otherwise not even use it for processing.

Former Member
0 Kudos

Thanks guys. You've been helpful.

Is it possible to have multiple key field values in FCC configuration i.e Line_Structure.keyFieldValue = H or L. That means that it should recognize L or A as a line item ..

Can keyFieldInStructure (add, ignore) parameter help me in this case ?

Former Member
0 Kudos

>>multiple key field values in FCC configuration i.e Line_Structure.keyFieldValue = H or L

AFAIK it is not possible but lets wait for other experts to comment on this...

>>Can keyFieldInStructure (add, ignore) parameter help me in this case ?

No. this parameter is only used when you want to include key filed in ur XML structure(add) or not (ignore)...

Chk this:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

KennethEriksen
Participant
0 Kudos

Hi,

I dont know how you want to handle the exception, but I think PI will throw an exception automatically if the keyFieldValue contains unknown values. You should see this exception in RWB message monitoring and communication channel monitoring.

-Kenneth

Former Member
0 Kudos

Hi,

Thanks for your responses.

The scenario that occurs now - The header indicator is coming in as 'H' and the line indicator is coming as 'A'. This is not throwing any exception in PI runtime workbench

How to throw an exception at PI mapping level ?

Any help will be appreciated..

Regards,

Freddy.

Shabarish_Nair
Active Contributor
0 Kudos

is the L line a mandatory line item in your file?

In this case you can declare the occurrence as H,1,L,1 and try

Former Member
0 Kudos

No, Line Item indicator 'L' is not a mandatory field. The occurance is '0..1'. It is not being mapped to any target IDOC structure also. It is only used as an indicator in PI to identify header and line items.

Shabarish_Nair
Active Contributor
0 Kudos

in this case, you will have to write an adapter module to check for the unwanted value and then handle the requirement.

There is no other standard way.

Former Member
0 Kudos

Hi,

I don't think so you can handle this issue with content conversion.

One option is to write a java module at your sender file adapter to check the records.

Or could raise an exception at mapping level.

Regards,

Manjusha