ABAP code to get address from KUNNR (customer number) :
SELECT SINGLE tsad3t~title_medi AS title, but000~name_org1, but000~name_org2,
but000~name_org3, but000~name_org4, adrc~po_box, adrc~street,
adrc~post_code1, adrc~city1, adrc~tel_number
FROM but000
LEFT OUTER JOIN tsad3t ON tsad3t~title = but000~title " Get the title (and
AND tsad3t~langu = @sy-langu " not the code)
INNER JOIN but020 ON but020~partner = but000~partner
INNER JOIN adrc ON adrc~addrnumber = but020~addrnumber
INTO @DATA(ls_customer)
WHERE but000~partner = @lv_kunnr. " <== Specify customer number
About the author