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: 

BDC program to va

Former Member
0 Kudos

Hi all,

i am doing BDC program.the problem is i have a language field in my application, it should take only EN, FI, DE, ES and FR languages.if other than these languages are in flat file and updating into application,it should consider as error records (even though it is correct according to SAP languages) and it should go to log file. how can i do it?

Thanks

Mythily

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Before appending the records in bdcdata table put a check for language if the language is correct then append this records into bdcdata table else move this records into error log table.

example

loop at itab.

if itab-language = 'EN'.

append records in BDCDATA table.

call transaction "ABC' using g_t_bdcadta(tablelike BDCDATA).

else.

move records to the error table.

endif.

This is only the sample code if you are using the BDC session method then change the code accordingly.

Hope this will help u.

7 REPLIES 7

Former Member
0 Kudos

Hi,

Give the validation for the languages EN, FI, DE, ES and FR. Other then these languages, create an internal table for error messages and send this log to the server.

Regards

Raghu

0 Kudos

will you suggest me with logic how to write and where i need to provide logic in BDC program

Former Member
0 Kudos

Hi,

Try to write search help exit for H_T002 . Where you can restrict the list of languages that you need as per your requirement.

But make sure that in your search help exit your condition is applicable for the transaction whcih you are recording.

Regards,

Rajitha.

0 Kudos

HI,

The validation of the fields will happen even before u call the BDC perform. Initially check the application only for these languages adn send only those for the BDC recording.

Other records send to the error log file.

Alternative:

While you enter the language field for the recording in BDC, at that point add to the error log and send only files with valid languages.

rgds,

swetha

Former Member
0 Kudos

i did not get get useful information.

when i am running bdc program, if language field(in the application) finds other than 'EN,FI,DE,ES,FR and IT' should go to error logfile.

Former Member
0 Kudos

Before appending the records in bdcdata table put a check for language if the language is correct then append this records into bdcdata table else move this records into error log table.

example

loop at itab.

if itab-language = 'EN'.

append records in BDCDATA table.

call transaction "ABC' using g_t_bdcadta(tablelike BDCDATA).

else.

move records to the error table.

endif.

This is only the sample code if you are using the BDC session method then change the code accordingly.

Hope this will help u.

Former Member
0 Kudos

Before filling up the BDC table have validation on the file data. Unless and untill all the data in file is correct for BDC upload do not begin Bdc OR create a error file for the records which have incorrect language and proceed with rest of the records for BDC