Hello Venkatramesh.
You should not loop through individual material of the same production order and call BAPI.
Instead append all materials into GOODSMVT_ITEM internal table and call BAPI once to generate one Material document for a production order.
Regards.