Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select statement

Former Member
0 Likes
403

I have to update an uinternal table like below..

loop at T_Shipto.

SELECT

EKUNDE EEQUNR E1EQKTX EMATNR ESERNR EINVNR IEQFNR IANLNR

INTO table T_Equip

FROM EQUI as E inner join EQUZ as Z

On EEQUNR = ZEQUNR

Inner join ILOA as I

On IILOAN = ZILOAN

Inner Join EQKT as E1

On E1EQUNR = EEQUNR

  • For All Entries in T_SHipto

WHERE KUNDE = T_Shipto-KUNN2.

If SY-SUBRC <> 0.

T_output-KUNNR = T_Shipto-KUNNR.

T_Output-KUNN2 = T_Shipto-KUNN2.

T_Output-Status = 'N'.

Append T_Output.

Clear T_Output.

Else.

T_output-KUNNR = T_Shipto-KUNNR.

T_Output-KUNN2 = T_Shipto-KUNN2.

Append T_Output.

Clear T_Output.

Endif.

clear T_EQUIP.

Endloop.

If I give this.. For first shipto customer its uopdating values in internal table...for 2nd its not adding as new line..its modifying the previous value...

2 REPLIES 2
Read only

Former Member
0 Likes
368

Hi,

Use

<b>refresh: T_EQUIP. clear: T_EQUIP.</b>

Regards,

Raj

Read only

Former Member
0 Likes
368

in Select statement instead of inton table T_Equip

I gave appending Table T_Equip..

Now its working fine