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

Need to get tax description from TTXJT based on costing sheet KALSM field

Former Member
0 Likes
515

Hi,

I want to get description of tax from table TTXJT, the field is TEXT1. This is pooled table whic has KALSM field which is also in KOMK and KOMG tables. But when I am doing below code , nothing is coming in komk-txjcd. How can I retrieve data from komk structure? Please help me with this.

if komk-txjcd ne space and komk-kappl = 'TX'.

if ttxjt-kalsm ne komk-kalsm or ttxjt-txjcd ne komk-txjcd.

clear ttxjt.

select single * from ttxjt where spras = sy-langu.

and kalsm = komk-kalsm

and txjcd = komk-txjcd.

endif.

if sy-subrc = 0.

ttxjt-text1 = ttxjt-text1 .

endif.

endif.

Thank you very much in advance.

2 REPLIES 2
Read only

Former Member
0 Likes
380

Hi,

Use the follwoing table T683 To get the kappl, and KALSM based on your selection criteria.

select single kappl

kalsm

from T683

into (v_kappl , v_kalsm)

where kalsm = selection criteiral

or kappl = selection criteiral .

if sy-subrc = 0.

select single text1 from TTXJT

v_text1 where kalsm = v_kalsm

and spras = sy-langu.

if sy-subrc = 0.

v_text1 = v_text1.

endif.

endif.

Can you please check like this insted of using the structure komk and komg.

Read only

0 Likes
380

Hi Venkat,

Thank you so much for your reply. I need to get TTXJT-TEXT1

based on field TTXJT-TXJCD. As I am seeing in table TTXJT has KALSM common for Canada like TAXCAJ etc. So based on TXJCD field i need to get TEXT1. But table T683 doesn't have field TXJCD.

Can you please tell me which table i can use to get this from TTXJT?

Thank you.