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

How to get State Description base on the code ?

Former Member
0 Likes
6,528

Hi,

I am quite new in the ABAP world, could you help how to get the descrition on the state code ?

is there any BAPI ready ?

like my code NY ---> New York (how to get this New York) ?

Thank you and Best Regards

Fernand

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,458

Hi,

Actually, i am looking for region description after calling BAPI "BAPI_BUPA_ADDRESS_GETDETAIL'".

There is REGION code under ADDRESSDATA export.

so i want to get the region description. Please advise me.

Thank you and Best Regards

Fernand

6 REPLIES 6
Read only

Former Member
0 Likes
3,458

hi

find the database table where all state code defined by u getting stored, there u find another field which will have description , write a select query to pick description based on state code.

reward if helpful.

Read only

Former Member
0 Likes
3,458

Chk the tables.

T005S Taxes: Region (Province) Key

T005U Taxes: Region Key: Texts

Read only

Former Member
0 Likes
3,459

Hi,

Actually, i am looking for region description after calling BAPI "BAPI_BUPA_ADDRESS_GETDETAIL'".

There is REGION code under ADDRESSDATA export.

so i want to get the region description. Please advise me.

Thank you and Best Regards

Fernand

Read only

0 Likes
3,458

You can use: IGN_REGIONNAME_GET

Read only

RemiKaimal
Active Contributor
0 Likes
3,458

Hi,

The Text for a state is maintained in the Table T005U.

For the FM : BAPI_BUPA_ADDRESS_GETDETAIL,

Exporting ADDRESSDATA LIKE BAPIBUS1006_ADDRESS

You must have noticed the check table for REGION in the structure BAPIBUS1006_ADDRESS,

to be T005S. And the Text table (Goto->Text Table) in turn to be : T005U

So, basically, if your requirement is based on passing the key of the State and getting the Description, you just need to write a Select statement to pick the value from the Table :


DATA l_state TYPE string.
SELECT SINGLE bezei FROM T005U
              INTO l_state
              WHERE bland = 'NY' AND spras = sy-langu.

Or else if are specific in using FM, create one based on this query with

an Importing parameter for BLAND and Exporting the value BEZEI .

Cheers,

Remi

Read only

Former Member
0 Likes
3,458

Hiii...

If you need a FM you need to define a Customize FM...where You have used atleast for more than 15 times other wise waste of creating a FM.

r else if u r using it to get for once use this....

where description is t005t-landx and citycode is T005G-LAND1

select single landx from t005t into DESCRIPTION where land1 = CITYCODE .

this work fine ...

regards,

sg