Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

regarding fetching Address from ADRC

Hey guys,

Can you please tell me how to fetch ADRC street,name1,city1,city2,post_code1 for

LIKP-KUNNR(Sold to party) and LIKP-KUNAG(Ship to party).

Please confirm whether one of my query is correct or not

<b>FORM SELECT_ADDRC USING P_TW_MAPP_AKUNNR.(LIKP-KUNNR)</b>

DATA : V_ADRNR TYPE ADRC-ADDRNUMBER.

DATA : V_NAME1 LIKE ADRC-NAME1,

V_POST_CODE1 LIKE ADRC-POST_CODE1,

V_STREET LIKE ADRC-STREET,

V_CITY1 LIKE ADRC-CITY1,

V_CITY2 LIKE ADRC-CITY2,

V_TEL_NUMBER LIKE ADRC-TEL_NUMBER.

<b>SELECT SINGLE ADRNR FROM KNA1 INTO V_ADRNR

WHERE ( KUNNR = P_TW_MAPP_AKUNNR ).</b>

<b>SELECT NAME1 POST_CODE1 STREET CITY1 CITY2 TEL_NUMBER

FROM ADRC INTO (V_NAME1, V_POST_CODE1, V_STREET, V_CITY1, V_CITY2, V_TEL_NUMBER )

WHERE ADDRNUMBER = V_ADRNR.</b>

MOVE V_NAME1 TO TW_OUTTAB-S_NAME1.

MOVE V_POST_CODE1 TO TW_OUTTAB-S_POSTCODE1.

MOVE V_STREET TO TW_OUTTAB-S_STREET.

MOVE V_CITY1 TO TW_OUTTAB-S_CITY1.

MOVE V_CITY2 TO TW_OUTTAB-S_CITY2.

MOVE V_TEL_NUMBER TO TW_OUTTAB-S_TEL_NUM.

ENDSELECT.

ENDFORM. " SELECT_ADDRC

Thanks.

Chandra.

Tags:
Not what you were looking for? View more on this topic or Ask a question