Hi Asad,
Did you configure the physical and logical file paths from Basis Customizing (or transaction code FILE)?
You also have to do "Assignment of Physical Paths to Logical Path" in the configuration.
Also check if you have defined the variant correctly with other configuration before you run the write program for archiving.
You can follow this link, this can be helpful.
SAP archiving process-Simple steps
Please let us know if this works for you.
Regards,
Sujit.