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

FM ADDR_GET

Former Member
0 Likes
3,884

HI

CALL FUNCTION 'ADDR_GET'

EXPORTING

address_selection = search_address

IMPORTING

sadr = sadr

EXCEPTIONS

parameter_error = 1

address_not_exist = 2

version_not_exist = 3

internal_error = 4.

i am using above FM in a subroutine where search_address has some value. decalred tables: sadr. but the fields are not getting populated in sadr..when i checked executing FM and giving search_address value it is fine.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
2,302

I guess SADR is obsolute now... search for some other function module.

HI

CALL FUNCTION 'ADDR_GET'

EXPORTING

address_selection = search_address

IMPORTING

sadr = sadr

EXCEPTIONS

parameter_error = 1

address_not_exist = 2

version_not_exist = 3

internal_error = 4.

i am using above FM in a subroutine where search_address has some value. decalred tables: sadr. but the fields are not getting populated in sadr..when i checked executing FM and giving search_address value it is fine.

8 REPLIES 8
Read only

Former Member
0 Likes
2,302

are you sure that, search_address structure has correct value in the field address number(ADDNUMBER)?

Read only

0 Likes
2,302

search_address has type char 10 and the value in it is correct

Read only

former_member156446
Active Contributor
0 Likes
2,303

I guess SADR is obsolute now... search for some other function module.

Read only

0 Likes
2,302

one more thing..

u have to pass the address number with zeros added before the address number..

like if the address number is 22480 u have to pass it as 0000022480

for that u can use conversion routines : CONVERSION_EXIT_ALPHA_INPUT

Read only

alex_m
Active Contributor
0 Likes
2,302

Even now I executed the ADDR_GET FM and I am getting the correct output, please make sure you are passing the address number to ADDR1_SEL-ADDRNUMBER or may be you can try the FM SD_ADDRESS_GET.

Read only

Former Member
0 Likes
2,302

Read the Function module documentation it will give more hints.

and if you want to read the address then you can use this function module also

ADDRESS_INTO_PRINTFORM

Read only

viquar_iqbal
Active Contributor
0 Likes
2,302

Hi

try like this.

data:

search_address type ADDR1_VAL,

sadr type sadr.

search_address-ADDRNUMBER = 'adress number '.

CALL FUNCTION 'ADDR_GET'

EXPORTING

address_selection = search_address

IMPORTING

sadr = sadr

EXCEPTIONS

parameter_error = 1

address_not_exist = 2

version_not_exist = 3

internal_error = 4.

This would surely get you the adress info in sadr table.

Thanks & Regards,

Viquar Iqbal

Read only

Former Member
0 Likes
2,302

Hi Ganesh,

I used the following piece of code

  • Declaration

DATA: GET_SELECTION LIKE ADDR1_SEL.

get_selection-addrnumber = vbpa-adrnr.

CALL FUNCTION 'ADDR_GET'

EXPORTING

address_selection = get_selection

  • READ_SADR_ONLY = 'X'

IMPORTING

sadr = sadr

EXCEPTIONS

OTHERS = 01.

Hope this is helpful

Regards,

Sravanthi Chilal.