cancel
Showing results for 
Search instead for 
Did you mean: 

How mandatory field check for IDOC in PI

Former Member
0 Kudos

hi all,

i am doing idoc mapping,i have some of the fiellds mandatory and some of the fields optional,my requirement is, If mandatory field is empty in the IDOC then this transaction would be rejected at PI,for this where i need to maintain the condition.

Thanks in advance,

AVR

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all,

solved my problem.

Thanks & Regards,

AVR

madhusudana_reddy2
Contributor
0 Kudos

Hi AVR,

Your requirement is very simple, try developing with sample mapping and proceed like below....

make all your target structure fields(which are mandatory) occurance as 1..1. and map the source fields to these target fields(which occurance is 1..1) after checking empty or not. For checking empty or not simply use Boolean function if

Thanks,

madhu

Former Member
0 Kudos

Hi

As per understanding you dont want to post the IDOC if any Mandatory field is missing. If so you can write an UDF and map it to Root node of the target structure.

1. Pass all Mandatory fields in UDF and check any field is empty.

2. If not empty use the Createif node function to create the target structure.

If not please ealborate your sceanrio.

Regards

Ramg

Former Member
0 Kudos

hi ram kumar,

my data structure is

Idoc header

mandatory progarm run date

Mandatory Runidentification

optional vendorcity

mandatory house bank

optional postalcode

Idoc advice

optional payment location

optional invoicedate

here my requirement is under IDOC Header any one of mandatory field is empty ,the transaction have to reject at pi

can u give me the UDF code

thanks ,AVR

Former Member
0 Kudos

Hi,

Yes u can do also with an UDF....

But u dont need 1 for this requirement.

Just make the field as mandatory for those which u want to check as mandatory... (occurence 1)

Now if the field is nt cmng means it will throw exception.

Babu

Former Member
0 Kudos

any inputs on this

thanks,

AVR

Former Member
0 Kudos

For mandatory fields at target side if they are not mapped (if source field is missing) then mapping itself will fail.

Just be careful that your mapping should not add the empty value to mandatory fields in case of your source data is missing otherwise it will pass the mapping without any problems.

Put a condition to check if source field is not empty then only map to target fields. This will ensure to fill the mandatory fields with some values else mapping will fail.