Even I had come across this situation in one of my previous project. I have been asked to insert 100k code combinations using the data loader. First I tried data loader only. It took 3 hrs to insert 3k records :( But finally I decided to write an API which will insert all these code combinations in 5-10 mins. Then I get to know this API fnd_flex_keyval.validate_segs.
This API will return a boolean value 'TRUE' or 'FALSE'. This API is there in R12 instance also. Here is the sample call to this API which I used in my code,
SELECT chart_of_accounts_id
INTO l_coa_id
FROM gl_sets_of_books
WHERE set_of_books_id = fnd_profile.VALUE ('GL_SET_OF_BKS_ID');
l_keyval_status := fnd_flex_keyval.validate_segs ('CREATE_COMBINATION', 'SQLGL', 'GL#', l_coa_id, gl_code_rec.concatenated_segments, 'V', SYSDATE, 'ALL', NULL, NULL, NULL, NULL, FALSE, FALSE, NULL, NULL,NULL );
This is just an example how I used in my code and gl_code_rec.concatenated_segments is the altual code combination needs to be inserted.
I am not sure this information is really informative. But thought of sharing.
No comments:
Post a Comment