diff --git a/libpldmresponder/fru.hpp b/libpldmresponder/fru.hpp
index da19d00..20bc509 100644
--- a/libpldmresponder/fru.hpp
+++ b/libpldmresponder/fru.hpp
@@ -1,6 +1,8 @@
 #pragma once
 
 #include "fru_parser.hpp"
+#include "libpldmresponder/pdr_utils.hpp"
+#include "oem_handler.hpp"
 #include "pldmd/handler.hpp"
 
 #include <libpldm/fru.h>
@@ -59,13 +61,16 @@
      *  @param[in] entityTree - opaque pointer to the entity association tree
      *  @param[in] bmcEntityTree - opaque pointer to bmc's entity association
      *                             tree
+     *  @param[in] oemFruHandler - OEM fru handler
      */
     FruImpl(const std::string& configPath,
             const std::filesystem::path& fruMasterJsonPath, pldm_pdr* pdrRepo,
             pldm_entity_association_tree* entityTree,
-            pldm_entity_association_tree* bmcEntityTree) :
+            pldm_entity_association_tree* bmcEntityTree,
+            pldm::responder::oem_fru::Handler* oemFruHandler) :
         parser(configPath, fruMasterJsonPath),
-        pdrRepo(pdrRepo), entityTree(entityTree), bmcEntityTree(bmcEntityTree)
+        pdrRepo(pdrRepo), entityTree(entityTree), bmcEntityTree(bmcEntityTree),
+        oemFruHandler(oemFruHandler)
     {}
 
     /** @brief Total length of the FRU table in bytes, this includes the pad
@@ -188,6 +193,14 @@
      */
     std::vector<uint8_t> tableResize();
 
+    /* @brief set FRU Record Table
+     *
+     * @param[in] fruData - the data of the fru
+     *
+     * @return PLDM completion code
+     */
+    int setFRUTable(const std::vector<uint8_t>& fruData);
+
   private:
     uint16_t nextRSI()
     {
@@ -211,6 +224,7 @@
     pldm_pdr* pdrRepo;
     pldm_entity_association_tree* entityTree;
     pldm_entity_association_tree* bmcEntityTree;
+    pldm::responder::oem_fru::Handler* oemFruHandler;
 
     std::map<dbus::ObjectPath, pldm_entity_node*> objToEntityNode{};
 
@@ -240,8 +254,10 @@
     Handler(const std::string& configPath,
             const std::filesystem::path& fruMasterJsonPath, pldm_pdr* pdrRepo,
             pldm_entity_association_tree* entityTree,
-            pldm_entity_association_tree* bmcEntityTree) :
-        impl(configPath, fruMasterJsonPath, pdrRepo, entityTree, bmcEntityTree)
+            pldm_entity_association_tree* bmcEntityTree,
+            pldm::responder::oem_fru::Handler* oemFruHandler) :
+        impl(configPath, fruMasterJsonPath, pdrRepo, entityTree, bmcEntityTree,
+             oemFruHandler)
     {
         handlers.emplace(
             PLDM_GET_FRU_RECORD_TABLE_METADATA,
@@ -258,6 +274,11 @@
             [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
             return this->getFRURecordByOption(request, payloadLength);
         });
+        handlers.emplace(
+            PLDM_SET_FRU_RECORD_TABLE,
+            [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) {
+            return this->setFRURecordTable(request, payloadLength);
+        });
     }
 
     /** @brief Handler for Get FRURecordTableMetadata
@@ -309,6 +330,17 @@
     Response getFRURecordByOption(const pldm_msg* request,
                                   size_t payloadLength);
 
+    /** @brief Handler for SetFRURecordTable
+     *
+     *  @param[in] request - Request message
+     *  @param[in] payloadLength - Request payload length
+     *
+     *  @return PLDM response message
+     */
+    Response setFRURecordTable(const pldm_msg* request, size_t payloadLength);
+
+    using Table = std::vector<uint8_t>;
+
   private:
     FruImpl impl;
 };
