You've obviously added some code to your infoset and are calling this FM once for each material so why not just add a check to make sure that the material actually does have a BOM before calling the FM. For example:
SELECT SINGLE COUNT(*) FROM mast
WHERE matnr = itab1-matnr AND
werks = 'PGDM' AND
stlal = '01'.
IF sy-subrc = 0.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PP01'
datuv = sy-datum
ehndl = '1'
* FBSTP = 'X'
mehrs = 'X'
mmory = '1'
mtnrv = itab1-matnr
stlal = '01'
stpst = 0
werks = 'PGDM'"nwerks
* IMPORTING
* TOPMAT =
* DSTST =
TABLES
stb = bomdat
EXCEPTIONS
no_bom_found = 5
.
IF sy-subrc = 5.
*sy-msgty = 'I'.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.