Application Development 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: 

Reg: Mandatory fields updation with BAPI

Former Member
0 Kudos

Hi..

We are working on BDC using BAPI. In this if flat files contians only 4 fields and the mandatory fields in the application are seven then system needs to through error message. But with BAPI the program is updating the database without throwing error eventhough all mandatory fileds are not filled up with data.. Where exactly we need to do modifications to get error message when mandatory fields are not filled up with input.

Regards

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

Before calling your BAPI, you can put your validations to check for ALL 7 fields with the appropriate data.

Regards,

Naimesh Patel

2 REPLIES 2

naimesh_patel
Active Contributor
0 Kudos

Before calling your BAPI, you can put your validations to check for ALL 7 fields with the appropriate data.

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi Verendra

Sometimes the function modules/BAPI's used by SAP do a direct update on the database tables. In such scnearios the entries are created in the system even though if the mandatory entries are not filled.

If the number of mandatory fields are small, then before the BAPI call, check if all the mandatory fields are filled or not;throw error in case of empty fields & bypass the BAPI call.

In case the mandatory fields are too high, then in that case, please use BDC recording to update the data.

Regards

Chetan

PS:Reward points if you find this helpful.