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

help with address

Former Member
0 Likes
1,020

hi all,

i have a doubt, i want to display the address in my smartform, but i obtain that address of the table adrc, but when i use other purchase order i can't display the addrees. do you know in wich table is store that address that use the sapscript medruck?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
963

Hai

Go through the following Code

  • Description : SADR Table is obsolete

  • replace with F.M 'ADDR_GET'

  • SELECT SINGLE NAME1

  • NAME2

  • NAME3 * NAME4 * STRAS

  • ORT01

  • REGIO

  • PSTLZ

  • TELF1

  • INTO CORRESPONDING FIELDS OF X_CUSTADDR

  • FROM SADR

  • WHERE ADRNR EQ L_ADRNR.

DATA : X_ADR1_SEL TYPE ADDR1_SEL,

X_SADR TYPE SADR.

X_ADR1_SEL-ADDRNUMBER = L_ADRNR.

CALL FUNCTION 'ADDR_GET'

EXPORTING

ADDRESS_SELECTION = X_ADR1_SEL

IMPORTING

SADR = X_SADR

EXCEPTIONS

PARAMETER_ERROR = 1

ADDRESS_NOT_EXIST = 2

VERSION_NOT_EXIST = 3

INTERNAL_ERROR = 4

OTHERS = 5.

IF SY-SUBRC = 0.

MOVE-CORRESPONDING X_SADR TO X_CUSTADDR.

ENDIF.

Regards

Sreeni

Message was edited by: Sreenivasulu Ponnadi

hi,

thanks for the response, but i all the data that i have store in ekpo, it doesn't have nothing in ADRN2, so i want to know how is medruck sapscript obtein that address?

6 REPLIES 6
Read only

Former Member
0 Likes
963

for pourchase orders, the address number will be there in EKPO-ADRN2.

Pass that value to ADRC table to get the address details.

Regards,

Ravi

Read only

0 Likes
963

hi,

thanks for the response, but i all the data that i have store in ekpo, it doesn't have nothing in ADRN2, so i want to know how is medruck sapscript obtein that address?

Read only

Former Member
0 Likes
963

Hi Jose,

The address of purchase order used in MEDRUCK is gets from EKKO-ADRNR and it has query on SADR to get the address.

You can give this address number even to ADRC table and get the address.

Thanks,

Vinay

Read only

0 Likes
963

first i go to t001 and then obtein the address in adrc, but it doesn't apper like the medruck sapscript.

Read only

Former Member
0 Likes
963

Hi,

take ekko-lifnr -> lfa1-lifnr get lfa1-adrnr

pass lfa1-adrnr -> adrc to get adress

Regards

Amole

Read only

Former Member
0 Likes
964

Hai

Go through the following Code

  • Description : SADR Table is obsolete

  • replace with F.M 'ADDR_GET'

  • SELECT SINGLE NAME1

  • NAME2

  • NAME3 * NAME4 * STRAS

  • ORT01

  • REGIO

  • PSTLZ

  • TELF1

  • INTO CORRESPONDING FIELDS OF X_CUSTADDR

  • FROM SADR

  • WHERE ADRNR EQ L_ADRNR.

DATA : X_ADR1_SEL TYPE ADDR1_SEL,

X_SADR TYPE SADR.

X_ADR1_SEL-ADDRNUMBER = L_ADRNR.

CALL FUNCTION 'ADDR_GET'

EXPORTING

ADDRESS_SELECTION = X_ADR1_SEL

IMPORTING

SADR = X_SADR

EXCEPTIONS

PARAMETER_ERROR = 1

ADDRESS_NOT_EXIST = 2

VERSION_NOT_EXIST = 3

INTERNAL_ERROR = 4

OTHERS = 5.

IF SY-SUBRC = 0.

MOVE-CORRESPONDING X_SADR TO X_CUSTADDR.

ENDIF.

Regards

Sreeni

Message was edited by: Sreenivasulu Ponnadi