Question: There are 2 files

1. Testcase/feature1.robot
2. POM/feature2.robot

feature1.robot
==============

```
*** Settings ***
Library  SeleniumLibrary
Resource  ../POM/feature2.robot

*** Variables ***
${username}  xxxxxxxx
${password}  xxxxxxxx

*** Keywords ***
Login in DataRPM
    #[Arguments]   ${username}  ${password}
    Input Text   ${email_id}  ${username}

```

feature2.robot
==============

```
*** Settings ***
Documentation    This contains all the locaters of Login Page

*** Variables ***
${email_id}  xxxxxxxx

```

---

But here I don't want to use the `email_id` locator to be mentioned in the variable section. If I am mentioning the `${email_id}` in this feature file I am able to go ahead without any error. I want to use the locator in the feature2.robot file which is under my POM directory. Then I want to call the variable from feature2.robot.

I have mentioned the path in the feature1.robot but still I am getting error.

> 
> [ ERROR ] Error in file feature1.robot': Resource file 'path' contains
>  a test case table which is not allowed.
> 
> 
>

Answer: 
The error is pretty descreptive, while you not showing use you probably have test cases implemented in **feature2.robot** and in that case it is a **suite file**.

But you are trying to use **feature2.robot** as a **resource file**, and as the error message states, resource files are not allowed to have test case table.

You should create a third file like **POM/locators.robot**:

```
*** Settings ***
Documentation    This contains all the locaters of Login Page

*** Variables ***
${email_id}  xxxxxxxx

```

and use this in both **feature1.robot** and **feature2.robot** like:

```
Resource  ../POM/locators.robot

```

---

```
Resource  locators.robot

```

From Robot Framework 3.1 [`*.resource`](https://github.com/robotframework/robotframework/blob/master/doc/releasenotes/rf-3.1.rst#new-resource-extension-for-resource-files) file extension is supported, so if you have version 3.1, you should use **locators.resource** to be more explicit about that this file is a resource file and not a test suite.
your question is not clear, However , i would try to show an error free example using your code only, with slight modification.

**feature1.robot**

```
*** Settings ***
Resource  ../Data/Feature2.robot

*** Variables ***
${username}  pankaj
${password}  xxxxxxxx

*** Test Cases ***
Login
    Login in DataRPM

*** Keywords ***
Login in DataRPM
    #[Arguments]   ${username}  ${password}
    log to console   ${email_id}
    log to console   ${username}

```

**Feature2.robot**

```
*** Settings ***
Documentation    This contains all the locaters of Login Page

*** Variables ***
${email_id}  pankajigec26@gmail.com

```

if you run **feature1.robot** you will not get into any error .

In your case , please check if you are running the same code which you have pasted here.