cancel
Showing results for 
Search instead for 
Did you mean: 

Print one time customer Name.

Former Member
0 Kudos

Dear All,

When we create a sales order for one-time customer, we get a address pop-up, there we enter the name of the customer. But when we take print of the order, the name which is stored in KNA1 table is printing on the out-put. I want to print the Name which I entered on the sales order header.

As per my knowledge, the name in order is getting stored in VBPA table and the ADDRNUM is generated which has entries with name details in ADRC table.

NOw in my smartform it is taking from KNA1 table, what chages I have to do to rpint the name from Order Header.

Present program to print name is :

Select SINGLE KUNNR from VBAK INTO lv_kunnr

WHERE vbeln EQ IS_VBDKA-VBELN.

*data: lv_ctcd type land1.

data: lv_adrnr type adrnr,

lv_namec type ad_name1,

lv_name type ad_name_co,

lv_str_suppl1 type ad_strspp1,

lv_street type ad_street,

lv_pstcd type ad_pstcd1,

lv_city type ad_city1,

lv_ctcd type land1,

lv_ctnm type landx.

break navin.

select single adrnr from Kna1

into lv_adrnr

where kunnr = lv_kunnr.

select single name1

name_co str_suppl1 street

post_code1 city1 country

from adrc

into (lv_namec,lv_name,lv_str_suppl1,lv_street,

lv_pstcd,lv_city,

lv_ctcd)

where addrnumber = lv_adrnr.

*

select single landx from t005t

into gv_ctnm

where land1 = lv_ctcd and

spras = 'D'.

gv_name1 = lv_namec.

gv_name2 = lv_name.

gv_str_suppl1 = lv_str_suppl1.

gv_street = lv_street.

gv_pstcd = lv_pstcd.

gv_city = lv_city.

*gv_ctnm = lv_ctnm.

please advice the changes to be made to print the name.

-Chinna

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Duplicate