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.
cancel
Showing results for 
Search instead for 
Did you mean: 

FM for country code from country text

Former Member
0 Kudos

Hi All,

     I wanted to know if there is a function module to get country code from country text... I'm avoiding quering the tables because of performance issues.

thanks and regards

thanuja kb

7 REPLIES 7

michael_kozlowski
Active Contributor
0 Kudos

I would read table T005T directly into an internal table, because for each language there lower than 300 entries for countries.

0 Kudos

Hi Michael,

   the scenario is I will be getting each address as a http response and I have to convert the country text to country key and update the address tables. So for each response I will have to fill the internal table which is as good as select queries to T005T.

Former Member
0 Kudos

Hi,

HRWPC_RFC_MOLGA_TEXT_GET

Try this FM

Regards

Sidharth

0 Kudos

Hi

   Importing parameter should be country text .

thanga_prakash
Active Contributor
0 Kudos

Hello Thanuja,

Try with Function module "/SAPNEA/SMAPI_COUNTRY_GETLIST".

Where u have to pass Importing parameter LANDX (Country text) and the you will get the output in tables E_T005T as shown below.

Regards,

Thanga

Former Member
0 Kudos

Any FM will have to do a SELECT anyway, so there's no reason to use a FM. I would just read the entire table (depending on language) into a sorted table and then just read the entry you need. The table is very small.

Rob

raymond_giuseppi
Active Contributor
0 Kudos

I'm avoiding quering the tables because of performance issues.

Check technical options of table T005T, this table is already buffered by the system (generic area), so if you use primary key, no performance problem will be raised by multiple SELECT SINGLE. Don't buffer it yourself in an internal table, that would be pointless.

For performance, don't expect some miracle from a generic SAP function module (SAP too must read database from disks at least once, outside of HANA of course, and even with HANA server must start)

Regards,

Raymond