Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

IDOC Segment Mandatory Fields.

0 Likes
1,200

Hi,

I created one segment with 21 fields and calling from Zprogram.

in that segment some fields are Mandatory.

if i gave segment is Mandatory it is not validating fields.

Where i need to validate this Mandatory fields and how?

Thanks in Adv.

3 REPLIES 3
Read only

Former Member
0 Likes
481

Hi,

You cant set the mandatory setting to fields of a segment. You can only set the segment as mandatory. Even if one fields of a mandatory segment is filled, it means the segment is filled.

You can check whether the field is populated or not in your code. I hope you are doing a outbound IDOC from SAP. In your case, you need to check whether field was populated in your Z program before generating the IDOC.

Cheers

~Niranjan

Read only

0 Likes
481

Thanks for reply,

s its an outbound.

check the table and no data we will drop that records or any solution

Read only

0 Likes
481

Hi,

Your approach is correct.

Check the table (or check the field in the segment). If initial/blank, drop the record.

Cheers

~Niranjan