Skip to Content
author's profile photo Former Member
Former Member

how to print address without address number

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 03:01 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.