Application Development 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: 

Help reqd to display the addresses from ADRC table thru MT001W

Former Member
0 Kudos

Hi abappers,

i want to print the Delivery address with all name street& pincode...in my PO form...the name of the Delivery(as in PO:me23n) is available in the <b>MT001W</b> table (DB view)...but the corresponding fields for addresses are available in <b>ADRC</b> table....so far...im displaying the name field from MT001W...

how can i match the table fields thru primary key to join the two tables of MT001W and ADRC....

FYI (coding)

*********

select name2 from MT001w into g_name2 where WERKS = g_xekpo-werks.

endselect.

if sy-subrc = 0.

*move g_name2 to g_add.

*endif.

select house_num1 street post_code1 from adrc into (g_house , g_street , g_pcode)

where name2 = g_name2 and langu = 'E'.

endselect.

endif.

************************

it displaying the field text of g_name2 but not diplaying the field records from ADRC.....

Pls do the needful to solve my issue...

thanks & regards

sankar

5 REPLIES 5

Former Member
0 Kudos

CHK DATA TYEP NAME2 LENGH.

CHK SY-SUBRC

select house_num1 street post_code1 from adrc into (g_house , g_street , g_pcode)

where name2 = g_name2 and <b>langu = SY-LANGU.</b>

endselect.

endif.

0 Kudos

Hi Karthikeyan,

i've checked the length and datas...its correct.

and what u've edited on the code part is not working out...

thanks

sankar

Former Member
0 Kudos

Hi Sankar,

Get ERNAM from EKKO table.

Get PERSNUMBER, ADDRNUMBER from USR21 by giving ERNAM.

Get FIRST NAME & LAST NAME from ADRP by giveing PERSNUMBER.

GET TEL_NUMBER from ADR2 by giving PERSNUMBER & ADDRNUMBER.

Get Fax Number from ADR3 by giving PERSNUMBER & ADDRNUMBER.

Get Email from ADR6 by giving PERSNUMBER & ADDRNUMBER.

Pass all these values to Smartform form interface parameters.

Reward Points if it helps,

Satish

0 Kudos

Hi Satish Panakala ,

i want to display the Delivery addresses instead of Personal details...or the person who created the object.

like example....in my PO the delivery address contains of Plant details...like if the delivery area is at Chennai...then my address contains...

Name as : Chennai Plant

Street : 10, T-Nagar,

Pincode: 600017.

These above records available in ADRC where only name field will be there is MT001W table without address number filed key...

hope u understood....

Pls revert back ur replies...

thanks

sankar

Former Member
0 Kudos

THANKS A LOT TO ALL

DONE IT THRU TBALE T001W.

REGARDS

SANKAR