cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform_issue urgent

Former Member
0 Kudos

HI ALL,

Here is the code which i had copied down .

the issue is Tax Exempt reason : field is not printing in Production but it is printing in Devlopment and Quality if any can say why it is not priniting what will be the cause?

i will reward u with more points.

Thanks,

  • Get the Sales Tax Code from KONV

data:

lv_mwsk1 like konv-mwsk1,

lv_j_1arfz like j_1arztx-j_1arfz.

select mwsk1 from konv into lv_mwsk1 up to 1 rows

where knumv eq vbrk-knumv.

endselect.

if sy-subrc is initial and not lv_mwsk1 is initial.

select j_1arfz from j_1arztx into lv_j_1arfz up to 1 rows

where mwskz eq lv_mwsk1.

endselect.

if sy-subrc is initial and not lv_j_1arfz is initial.

select single text30 from j_1arfzt into gv_tax_exempt_reason

where spras eq is_nast-spras and j_1arfz eq lv_j_1arfz.

if sy-subrc <> 0.

select single text30 from j_1arfzt into gv_tax_exempt_reason

where spras eq 'E' and j_1arfz eq lv_j_1arfz.

endif.

  • Get the extended tax exempt reason from the cross ref table

data: lv_varname like ztxa_varnames-varname

value 'TAX_EXEMPT_REASON_DESC',

lt_xref type table of ztxa_xref,

ls_xref type ztxa_xref.

call function 'ZXA_GET_XREF_VALUES'

exporting

varname = lv_varname

tables

xref_tab = lt_xref

exceptions

no_values_found = 1

invalid_variable_name = 2

others = 3.

if sy-subrc is initial.

read table lt_xref into ls_xref with key value1 = lv_j_1arfz.

if sy-subrc = 0 and ls_xref-active = 'X'.

  • Concatenate the tax exempt reason & the extended TER

concatenate gv_tax_exempt_reason ls_xref-value2

into gv_tax_exempt_reason_ext separated by space.

endif.

endif.

if gv_tax_exempt_reason_ext eq space.

move gv_tax_exempt_reason to gv_tax_exempt_reason_ext.

endif.

endif.

endif.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

before select

clear the into fields.

also check if there are records

some time MWSK1 may not be maintained

so check only sy-subrc after select.