2006 Sep 08 4:36 PM
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?
2006 Sep 08 8:47 PM
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?
2006 Sep 08 4:40 PM
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
2006 Sep 08 4:44 PM
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?
2006 Sep 08 4:47 PM
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
2006 Sep 08 5:02 PM
first i go to t001 and then obtein the address in adrc, but it doesn't apper like the medruck sapscript.
2006 Sep 08 4:55 PM
Hi,
take ekko-lifnr -> lfa1-lifnr get lfa1-adrnr
pass lfa1-adrnr -> adrc to get adress
Regards
Amole
2006 Sep 08 8:47 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |