cancel
Showing results for 
Search instead for 
Did you mean: 

how to print address without address number

Former Member
0 Kudos

Hi experts,

If address numer is found in table t001w this is working fine.

user required custom address directly hardcode based plant and sorg which doen't contain record in table t001w.

I am not getting adrnr in table t001w , so I am writing hardcode but its not working , can you please tell me how to solve this issue.

This is ouput parameter &GV_ADDNR_VENDOR&

READ TABLE it_ekpo into wa_ekpo INDEX 1.

SELECT SINGLE * FROM t001w INTO ls_t001w

WHERE werks EQ wa_ekpo-werks.

if wa_ekpo-werks = '2000' and wa_ekpo-lgort = '5200'.

ls_t001w-NAME1 = 'Connors Bros'.

ls_t001w-STRAS = '2 King Street, 3rd floor'.

ls_t001w-ORT01 = 'San John'.

ls_t001w-REGIO = 'N.B.'.

ls_t001w-PSTLZ = 'E2L 1G2'.

ls_t001w-adrnr = '000012345'.

MOVE ls_t001w-adrnr TO gv_addnr_vendor.

else.

MOVE ls_t001w-adrnr TO gv_addnr_vendor.

ENDIF.

Thanks,

mahahe

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi mahahe,

You could do this checking first before you hardcoded it.

IF GV_ADDNR_VENDOR = ''

READ TABLE it_ekpo into wa_ekpo INDEX 1.

SELECT SINGLE * FROM t001w INTO ls_t001w

WHERE werks EQ wa_ekpo-werks.

if wa_ekpo-werks = '2000' and wa_ekpo-lgort = '5200'.

ls_t001w-NAME1 = 'Connors Bros'.

ls_t001w-STRAS = '2 King Street, 3rd floor'.

ls_t001w-ORT01 = 'San John'.

ls_t001w-REGIO = 'N.B.'.

ls_t001w-PSTLZ = 'E2L 1G2'.

ls_t001w-adrnr = '000012345'.

MOVE ls_t001w-adrnr TO gv_addnr_vendor.

else.

MOVE ls_t001w-adrnr TO gv_addnr_vendor.

ENDIF.

ELSE.

" Get it from table t001w.

ENDIF.

Answers (0)