In reply to Ramakrishna Melgiri:
Because I do not know the ocp_transaction I can only guess.
My guessing is SCmdAccept is of type logic and also SResp.
randomize is defined on a class type. You are trying to randomize only one data memeber of this class.
Another question is what is your intention randomizing in the driver class?