08-24-2009 10:40 AM
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
08-24-2009 12:41 PM
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.
08-24-2009 10:54 AM
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
08-24-2009 11:34 AM
will you suggest me with logic how to write and where i need to provide logic in BDC program
08-24-2009 11:35 AM
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.
08-24-2009 11:46 AM
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
08-24-2009 12:36 PM
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.
08-24-2009 12:41 PM
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.
08-24-2009 12:50 PM
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