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

regarding first 12 digits

Former Member
0 Likes
471

hey guys,

I want to compare JANCODE 12 digits from table mara

but i could not check..how to do this.i tried like this

but not working

ZTEMPJAN = p_ltab_jan+0(12).

SELECT SINGLE MATNR INTO P_MATNR FROM MARA

WHERE EAN11+0(12) = ZTEMPJAN.

In EAN11 i have to take first 12digits and want to compare with ZTEMPJAN and take MATNR.

how to do this.

ambichan.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
453

Hi Andreas ,

Thanks . that was a typo.

Cheers .

hey guys,

I want to compare JANCODE 12 digits from table mara

but i could not check..how to do this.i tried like this

but not working

ZTEMPJAN = p_ltab_jan+0(12).

SELECT SINGLE MATNR INTO P_MATNR FROM MARA

WHERE EAN11+0(12) = ZTEMPJAN.

In EAN11 i have to take first 12digits and want to compare with ZTEMPJAN and take MATNR.

how to do this.

ambichan.

3 REPLIES 3
Read only

Former Member
0 Likes
453

Hi

You cannot use WHERE EAN11+0(12) = ZTEMPJAN.

ZTEMPJAN = p_ltab_jan+0(12).

CONCATENATE ZTEMPJAN '%' INTO ZTEMPJAN .

SELECT SINGLE MATNR INTO P_MATNR FROM MARA

WHERE EAN11+0(12) LIKE ZTEMPJAN.

But it will select first MARA entry where first 12 chars matches p_ltab_jan+0(12).

Cheers.

EAN11 matches

Read only

0 Likes
453

Hi Sanijay,

i think you mean :

SELECT SINGLE MATNR INTO P_MATNR FROM MARA

WHERE <b>EAN11</b> LIKE ZTEMPJAN.

Andreas

Read only

Former Member
0 Likes
454

Hi Andreas ,

Thanks . that was a typo.

Cheers .