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

How to compare 2 table values

Former Member
0 Likes
547

Hi all,

i have one internal table contains all records created in SD. but i need only records created for J_3avasso..

so i am comparing the first internal table (it_cdtemp1) records with values in j_3avasso and moving to another internal table (it_cdtemp2)

Please find the code for below.

select vbeln posnr etenr into corresponding fields of table it_cdtemp2

from j_3avasso for all entries in it_cdtemp1

where belnr = it_cdtemp1-vbeln and posnr = it_cdtemp1-posnr and

etenr = it_cdtemp1-etenr.

i could see the final internal table (it_cdtemp2) contains only 0 records.

please suggest a solution for this

Regards

Bala

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
496

Hi Bala,

Use CONVERSION_EXIT_ALPHA_INPUT FM for VBELN and convert all the entries of it_cdtemp1 with the leading zeros before the selection. Also make sure that there are entries in the table with the given selection criteria

Regards,

PSK

Hi all,

i have one internal table contains all records created in SD. but i need only records created for J_3avasso..

so i am comparing the first internal table (it_cdtemp1) records with values in j_3avasso and moving to another internal table (it_cdtemp2)

Please find the code for below.

select vbeln posnr etenr into corresponding fields of table it_cdtemp2

from j_3avasso for all entries in it_cdtemp1

where belnr = it_cdtemp1-vbeln and posnr = it_cdtemp1-posnr and

etenr = it_cdtemp1-etenr.

i could see the final internal table (it_cdtemp2) contains only 0 records.

please suggest a solution for this

Regards

Bala

2 REPLIES 2
Read only

MarcinPciak
Active Contributor
0 Likes
496

Looks fine for me. Did you check table j_3avasso directly in data browser (se16n) ? Maybe there are really no entries fullfillng this query.

Regards

Marcin

Read only

Former Member
0 Likes
497

Hi Bala,

Use CONVERSION_EXIT_ALPHA_INPUT FM for VBELN and convert all the entries of it_cdtemp1 with the leading zeros before the selection. Also make sure that there are entries in the table with the given selection criteria

Regards,

PSK