Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TAXES

Former Member
0 Likes
1,074

Hi expert,

I need get taxes in smartforms as

tax-rate-amount.

I wrote code like below

DATA ws_tabline TYPE z_tax.

LOOP AT gt_konv INTO gs_konv WHERE kappl = 'TX'.

IF gs_konv-kschl = 'XR1'.

ws_tabline-tax = 'GST'.

ELSEIF gs_konv-kschl = 'XR2'.

ws_tabline-tax = 'HST'.

ELSEIF gs_konv-kschl = 'XR3'.

ws_tabline-tax = 'QST'.

ELSEIF gs_konv-kschl = 'XR4'.

IF g_region = 'BC'.

ws_tabline-tax = 'BC PST'.

ELSEIF g_region = 'ON'.

ws_tabline-tax = 'ON PST'.

ELSE.

ws_tabline-tax = 'PST'.

ENDIF.

ENDIF.

IF NOT ws_tabline-tax IS INITIAL.

ws_tabline-rate = gs_konv-kbetr / 10.

ws_tabline-kwert = gs_konv-kwert.

APPEND ws_tabline TO g_z_tax.

ENDIF.

ENDLOOP.

CLEAR gs_konv.

..............................

I assign g_z_tax as <ct>.

When I do debug I values are passing.

But in out put I am getting only last pst tax but that is also 0.00.

Please help me.

Hi expert,

I need get taxes in smartforms as

tax-rate-amount.

I wrote code like below

DATA ws_tabline TYPE z_tax.

LOOP AT gt_konv INTO gs_konv WHERE kappl = 'TX'.

IF gs_konv-kschl = 'XR1'.

ws_tabline-tax = 'GST'.

ELSEIF gs_konv-kschl = 'XR2'.

ws_tabline-tax = 'HST'.

ELSEIF gs_konv-kschl = 'XR3'.

ws_tabline-tax = 'QST'.

ELSEIF gs_konv-kschl = 'XR4'.

IF g_region = 'BC'.

ws_tabline-tax = 'BC PST'.

ELSEIF g_region = 'ON'.

ws_tabline-tax = 'ON PST'.

ELSE.

ws_tabline-tax = 'PST'.

ENDIF.

ENDIF.

IF NOT ws_tabline-tax IS INITIAL.

ws_tabline-rate = gs_konv-kbetr / 10.

ws_tabline-kwert = gs_konv-kwert.

APPEND ws_tabline TO g_z_tax.

ENDIF.

ENDLOOP.

CLEAR gs_konv.

..............................

I assign g_z_tax as <ct>.

When I do debug I values are passing.

But in out put I am getting only last pst tax but that is also 0.00.

Please help me.

9 REPLIES 9
Read only

Former Member
0 Likes
1,037

Hi Rahul,

Your <b>internal table g_z_tax</b> with all Taxes, their rates and amounts need to be passed to your smartform.

Regards,

Raj

Read only

0 Likes
1,037

Hi rajashekar,

Yes i am passing g_z_tax as out/in put parameter.

Still i am not getting.

Read only

Former Member
0 Likes
1,037

Hi,

At the call of smartform, are you able to see all the records of your internal table, and passing it under TABLES to your smartform?

Can you paste your call of Smartform and how you are writing the data in SF.

Regards,

Raj

Read only

0 Likes
1,037

Hi,

In global inter defination:

<b>global data </b> [<b>u]types</u></b>

types: Begin of Z_TAX,

tax type char10,

g_z_tax type table of z_tax rate type kbetr,

kwert type kwert,

end of Z_TAX.

In text element:

&<CT>-TAX& &<CT>-RATE&% &<CT>-KWERT&</>

Read only

0 Likes
1,037

sorry,

global data:g_z_tax type table of z_tax

Read only

Former Member
0 Likes
1,037

Hi Rahul,

Can you paste the Smartform call?

And, Form Interface(Tables) of your smartform.

Regards,

Raj

Read only

0 Likes
1,037

Form interface tables:

it_vbdpa like vbdpa

it_vbdpau like vbdpau.

Read only

Former Member
0 Likes
1,037

Hi Rahul,

Can you paste the Smartform call?

And, Form Interface(Tables) of your smartform.

Regards,

Raj

Read only

Former Member
0 Likes
1,037

If your form interface (Tables) has only these two tables, then how are you passing internal table with taxes?

Can you paste your code... not able to figure out where you are ging wrong.

Regards

Raj