If you want to give a cyclic loading in workbench, first insert force from static structural. Then select function from the drop down list instead of constant when you are about to input the value. Also, make sure that the unit for angle is in degrees and not radians otherwise it won't take functional loading. Then in magnitude enter the function you want like 5*sin(wt) or something.
In ansys apdl, you have to define the function, save it and then when you are defining load, instead of putting a constant value, you can call the saved function. Here is a reference video for your perusal.