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

bdc

Former Member
0 Likes
394

how do u do in field validations in bdc? can any one help with suyntax? is there any diff. between bdc and bapi?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
368

When working with BDC, the validatoins are embeded into the transaction being call and the messages are passed back with the MESSAGES INTO <MessTab> addition of the CALL TRANSACTION statement. Either way, you should probably try to do the major validations before the program ever gets to that point. For example, if you are changing a material, using a BAPI or BDC, you should probably check the incoming material number against the data base before the program even gets to the point of executing the BAPI or BDC. Of course, you don't want to check every little thing(you will not get them all anyway), but certainly check the major inputs.

Hope this helps u!!

Shiv

3 REPLIES 3
Read only

Former Member
0 Likes
369

When working with BDC, the validatoins are embeded into the transaction being call and the messages are passed back with the MESSAGES INTO <MessTab> addition of the CALL TRANSACTION statement. Either way, you should probably try to do the major validations before the program ever gets to that point. For example, if you are changing a material, using a BAPI or BDC, you should probably check the incoming material number against the data base before the program even gets to the point of executing the BAPI or BDC. Of course, you don't want to check every little thing(you will not get them all anyway), but certainly check the major inputs.

Hope this helps u!!

Shiv

Read only

Former Member
0 Likes
368

Dear Sheik,

The program structure would look like this:

1. Fetch Data (Download/Read Dataset/Select from Tables)

2. Pre-validation

3. Pass valid data to BDC (Call Transaction/Session) or BAPI

4. In case of session method - session log is generated. In case of Call transaction you can use an internal table with structure BDCMSGCOLL to get messages. In case of BAPI the messages will be returned in return table (strcutre BAPIRET2/BAPIRETTAB).

Hence, prevalidation is same in either case.

Rewards if it's helpful to you.

Thanks and Regards,

Naveen.

Read only

Former Member
0 Likes
368

Dear Sheik,

Please close the thread if your query is resolved.

Regards,

Naveen.