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

Mandatory fields in BDC

former_member267445
Participant
0 Likes
1,559

Hello Gurus,

Working BDC for transaction ME11 and ME12. The requirement is if the plant is not exist in the flat file then plant should be mandatory. But in transaction level plant is not mandatory field. If they set plant is mandatory then it will effect other BDC programs, so I need to validate in BDC program and if plant does not exist then that particular row should be in error record. Please help me on this.

Thanks and Regards,

Muralikrishna Peravali

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,259

Why don't you

  • Check it in  the wrapper report (if you don't need to correct and later import the value in database)
  • Set a false (even an impossible) value in plant when initial in the received file to raise an error?

Regards,

Raymond

Read only

0 Likes
1,259

Hello Raymond,

Thank you for reply. Sorry I didn't get your solution, can you please elaborate?

Thanks and Regards,

Muralikrishna Peravali

Read only

roberto_vacca2
Active Contributor
0 Likes
1,259

Hi.

I suggest you to separate execution.

Two tables:

- 1 with plant that exist;

- 2 with plant that doesn't exist.

After you can launch BDC 1 in background mode with errors registration and BDC 2 in foreground with dynpro selection.

Or you can create an enhancement for ME11/ME12 to manage mandatory field Only for your report.

Hope to help

Bye

Read only

0 Likes
1,259

Hello Roberto,

Thank you for your reply. I will try to implement your suggestion.

Thanks and Regards,

Muralikrishna Peravali

Read only

former_member267445
Participant
0 Likes
1,259

Hello Gurus,

I have managed to skip the record by using CONTINUE statement in BDC loop if there is no entry for mandatory field. Is this approach correct or any suggestion on this?

Thanks and Regards,

Muralikrishna Peravali

Read only

0 Likes
1,259

Hi Muralikrishna,

Just dont skip the record. Capture that Record as well in the type of BDCMSGCOLL and later you can add that in your BDC Session Messages. You need to know which records you have not proceesed.

Cheers,

Kripa Rangachari.

Read only

0 Likes
1,259

I would create two batch input sessions - one with the records that are not in error. This one would be processed normally. The other one would contain the records with no plant. This one would not be processed automatically, but would have to be processed by the user who would then fix the plant.

Rob