Application Development 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: 

Compare the int table with Z-table

Former Member
0 Kudos

Hi

i want to compare one Internal table with one Z-Db table

help me with coding..

thank you

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sunny,

Instead of asking for whole code you would have tried with some logic and if you are unable to make it after trying then post your code someone will help you rather waiting for someone to code for you.

Anyways compare in the sence can you be bit more clear in what way you want to compare.

Cheers!!

Venkat

4 REPLIES 4

Former Member
0 Kudos

Hi Sunny,

Instead of asking for whole code you would have tried with some logic and if you are unable to make it after trying then post your code someone will help you rather waiting for someone to code for you.

Anyways compare in the sence can you be bit more clear in what way you want to compare.

Cheers!!

Venkat

0 Kudos

Hi,

ok,i want compare one internal table contents with one Z-table contents.

thank you

0 Kudos

Hi Sunny,

Check this code.

DATA: BEGIN OF LINE,

COL1 TYPE I,

COL2 TYPE I,

END OF LINE.

DATA: ITAB LIKE TABLE OF LINE,

JTAB LIKE TABLE OF LINE.

DO 3 TIMES.

LINE-COL1 = SY-INDEX.

LINE-COL2 = SY-INDEX ** 2.

APPEND LINE TO ITAB.

ENDDO.

MOVE ITAB TO JTAB.

LINE-COL1 = 10. LINE-COL2 = 20.

APPEND LINE TO ITAB.

IF ITAB GT JTAB.

WRITE / 'ITAB GT JTAB'.

ENDIF.

APPEND LINE TO JTAB.

IF ITAB EQ JTAB.

WRITE / 'ITAB EQ JTAB'.

ENDIF.

LINE-COL1 = 30. LINE-COL2 = 80.

APPEND LINE TO ITAB.

IF JTAB LE ITAB.

WRITE / 'JTAB LE ITAB'.

ENDIF.

LINE-COL1 = 50. LINE-COL2 = 60.

APPEND LINE TO JTAB.

IF ITAB NE JTAB.

WRITE / 'ITAB NE JTAB'.

ENDIF.

IF ITAB LT JTAB.

WRITE / 'ITAB LT JTAB'.

ENDIF.

And my suggestion is better you go to the website where the above code is present and helpful for basics.

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3841358411d1829f0000e829fbfe/content.htm

Cheers!!

Venkat

0 Kudos

thank you