Mohammad,
You need to REALLYreview thatyour code, is notcool thisselectwithin theloop, this isa straightpunchonSAPperformance.WhatI suggestyouis to carry outthisconsultationCDPOSout of the loop, andinside itmakea READTABLE of thisinternal table.
Ahhh, adding more... Thank youfor participating in theSCN, I ask you toalsocheck out the linksbelow tobetter use andapproachhere.
How to close a discussion and why
Warm regards,
Raphael Pacheco.