Dividend is declared as a percent on the face value of the share. For example if a share has a face value of Rs 100 and dividend is declared @20% then for every share held with you will get Rs 20/-
Dividend Yield is calculated on the price you bought the share.
So if you buy a 100 rupee face value share for 700 rupees from market and get a dividend @ 20 percent,
Your actual dividend is Rs 20 per share.
But dividend yield is 20/700 x 100 = 2.85 % only.
In the present case, as in the displayed chart the face value of HPCL is not shown. But I gather that the FV of HPCL share is Rs10/-
The dividend received per share (as per chart) is Rs 34.5. But the market price is 540.6. So yield is calculated as 34.5/540.6 x100=6.38. The dividend are given to all shares , but to the shareholder whose name recorded in the books of the company as on record date. Record dates are announced well in advance. During book closure period the company does not accept change of names even if the trade has happened. Usually the market price of the share increases and decreases after the book closure date.
Usually dividends are declared and passed annually at the AGM. However some companies declare 'interim dividend ' when they are sure to be able to give a certain percentage of dividend and even surpass it later.
Now in your case we cannot predict what will be the value of the share when you go for purchasing.
Let us imagine the price is going to be 500 when you buy. So for Rs 100000/ you may get 200. You may have to pay the statutory dues and the charges separately. Now suppose subsequently after a few months, the dividend is declared @150% . You are still keeping the shares as on the record date.. Then as the FV of the share is Rs10, each share gets an amount of Rs15). As you have 200 shares you will get a dividend of Rs 3000. The yield is (15/500)X100 = 3%. ( It can be calculated as on your total investment Rs100000. i.e 3000/100000x100 =3%