cancel
Showing results for 
Search instead for 
Did you mean: 

address window in purchase order

Former Member
0 Kudos

hi all

i m creating one smrtforms for purchase order .it was working fine.

but now our company has 3 address so the requirement is depends upon the purchase order the delivery address should change....

i m not able to write the code means where to write and how to write ??

i only know the table ll T001w that i have already defined but it is giving shortdump error.

points ll rewarded..

thanks well in advance...

Message was edited by:

soumya shekhar

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

done

Former Member
0 Kudos

Hi,

Create the address window in the samrtform, in the attributes, give the addess number, then based on the address number it will print the address,

if you want to pass the address number dynamically, then declare a variable and place this variable in the Address number, and before this window pass the address number to the field

Along with this in the conditions tab place the required conditions.

Thanks,

Nethaji.

Former Member
0 Kudos

hey shiva

i have write the code like this

***For intra-company Stock Transfer Order *****

IF L_XEKPO-werks = '1100' OR

L_XEKPO-werks = '1200' OR

L_XEKPO-werks = '1400' .

select single name1 ort01 pstlz regio ADRNR land1 into

(dname,dcity1,dpostcode,dregion,dadrnr,dcountry) from t001w where

werks = L_XEKPO-werks.

select single street city2 into (dstreet,dcity2) from adrc where

ADDRNUMBER = dadrnr.

select single bezei into dstate from t005u where bland = dregion

and land1 = dcountry and spras = sy-langu.

select single TEL_NUMBER FAX_NUMBER into (dtelph,dtelfx)

from adcp where ADDRNUMBER = dadrnr.

ELSEIF not l_xekpo-EMLIF IS INITIAL.

select single name1 ort01 ort02 stras regio pstlz telf1 telf2 telfx

land1 adrnr into

(dname,dcity1,dcity2,dstreet,dregion,dpostcode,dtelph,dtelph1,dtelfx,

dcountry,dadrnr) from lfa1 where lifnr = l_xekpo-EMLIF.

select single bezei into dstate from t005u where bland = dregion

and land1 = dcountry and spras = sy-langu.

ELSEIF not l_xekpo-KUNNR IS INITIAL.

select single name1 ort01 ort02 stras regio pstlz telf1 telf2 telfx

land1 adrnr into

(dname,dcity1,dcity2,dstreet,dregion,dpostcode,dtelph,dtelph1,dtelfx,

dcountry,dadrnr) from KNA1 where KUNNR = l_xekpo-KUNNR.

select single bezei into dstate from t005u where bland = dregion

and land1 = dcountry and spras = sy-langu.

ENDIF.

here it is showing no errror. it is activated also. but when i use in me23n. it is giving short dump error.

can u tell me wot is the error???

Former Member
0 Kudos

Hi

Write code based some on the requirement either plant. get the ADRNR then use the same and goto adrc fetch all the fields which are required by

If you use address window then it will display the title also if it is maintained

Regards

Shiva

Former Member
0 Kudos

USE THE CONDITION NODE IN SMARTFORM FOR THIS ALONG WITH PROGRAM LINES NODE.................

U MUST USE adrc TABLE TO FETCH THE ADDRESES ......USE THE ADDRESS WINDOW TRIGGERING WITH CONDITION NODE

Former Member
0 Kudos

Hi,

Create the address window in the samrtform, in the attributes, give the addess number, then based on the address number it will print the address,

if you want to pass the address number dynamically, then declare a variable and place this variable in the Address number, and before this window pass the address number to the field

Regards

Sudheer