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

Displaying HTS number based on Date field.

Former Member
0 Kudos

Hi Sap Gurs


                       I am having an internal table which consits 2 HTS numbers and 1 HTS number is Classification period is from 01/01/2004 to 10/14/2014(MM/DD/Year), And another HTS number classification period is from 10/15/2013 (MM/DD/Year) To 12/30/9999.

     Now i am not getting the HTS number in output screen which was active now that is from 10/15/2013. i am getting old HTS number only,

  What condition should i write to get latest HTS number based on classification period.


Former Member
0 Kudos

Please help me i am great need of these answer.

0 Kudos

Hi Rakesh

If you look at your input date you will find two valid number but if you want latest do as follow. Assumption is lates one will have higher number.

Lets says your itab has three field HTS number from and to date

sort itab by hts number ascending.

loop at itab where from_date GE input_date and to_date LE input_date

lv_hts = itab-hts.


will give you correct number


Former Member
0 Kudos

Hi nabheet madan


                             We cannot do HTS number sorting.

0 Kudos

hi Rakesh

How will you find the latest one then according to your data two HTS numbers are valid in this date range