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 program to va

Former Member
0 Likes
984

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
Read only

Former Member
0 Likes
934

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
Read only

Former Member
0 Likes
934

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

Read only

0 Likes
934

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

Read only

Former Member
0 Likes
934

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.

Read only

0 Likes
934

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

Read only

Former Member
0 Likes
934

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.

Read only

Former Member
0 Likes
935

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.

Read only

Former Member
0 Likes
934

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