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

MARA_EAN11

Former Member
0 Likes
2,654

Hello SAPPERS!

I have to check EAN-nrs (that I get from our client).

The numbers have to be checked in combination with their EAN Category.

I´ve debugged MM02, and I´m pretty sure I have to use the function Module 'MARA_EAN11'.

Unfortunately there is no documentation to this FM...

I can´t get the FM to run because (whilst debugging) I came across some very weird entries in the tables-section of the FM. I have no idea why the entries are what they are, and not something else.

Has anybody used this FM yet?

Some explanation on the inport/exportand tables -section would be very appreciated!!!!

PS: To Debug MM02, you can just enter a material in Basic Data 1, start the debugger (/H) and enter a different EAN-Number than the one that was there before...

Thanx!!!!!!

Kind Regards,

Pieter

10 REPLIES 10
Read only

Former Member
0 Likes
2,305

Hi,

Try the following:

call function 'MARA_EAN11'

exporting

p_matnr = /eur/xreqmath_s-matnr

p_numtp = <fs_numtp>

p_ean11 = <fs_ean11>

p_meinh = <fs_meins>

ret_ean11 = i_ean11

ret_numtp = i_numtp

binpt_in = sy-binpt

p_message = 'N'

sperrmodus = ' '

importing

p_numtp = i_numtp

p_ean11 = i_ean11

msgid = i_msgid

msgty = i_msgty

msgno = i_msgno

msgv1 = i_msgv1

msgv2 = i_msgv2

msgv3 = i_msgv3

msgv4 = i_msgv4

tables

marm_ean = lt_marm_ean

exceptions

ean_error = 1

others = 2

regards

Aveek

Read only

Former Member
0 Likes
2,305

Hello Pieter,

You have not mentioned what exactly you want to do with the EANs and MATNRs. What will be the data that you can provide as Input and what is the data you need as output.

There are a lot of other function modules for EAN which might just suit your purpose (i.e., the crux of the logic may be the same for a lot of these function modules), even if they are not used in the MM02 transaction.

Regards,

Anand Mandalika.

Read only

0 Likes
2,305

Hey Mandalika!

I have a MATNR, an EAN-Type (MARA-NUMTP = 'HE') and I have a EAN11-number.

Normally the EAN-Type and EAN-Number are enough to check if the EAN11-Number given to me is correct or not.

If the number is incorrect for a certain EAN-Category (in my case 'HE') the FM MARA_EAN11 will give out a message that the check digit for this EAN-Number is incorrect...

I actually don´t care what function I use, I just need a FM that can check if an EAN11-number is correct for a certain EAN-Type (HE), or not.

Thanks a lot!

Kind Regards,

Pieter

Read only

0 Likes
2,305

Hi,

Check this function module MARA_SPECIAL_CHECK_GEN.In that they are using MARA_ENA1.Use where used list to get more programs using MARA_ENA1.

Read only

0 Likes
2,305

Hi Pieter,

The master table for the EAN categories is TNTP. The EAN numbers assignment to the EAN Category (via a material) can be obtained from the table MEAN.

You can actually use a select statement directly in this case. All function modules that you seek will do this same thing. But they also do a lot of other things for which they were designed.

So I recommend that you simply query on this table. You do not have to worry about accidentally getting incorrect information in this case.

Regards,

Anand Mandalika.

Read only

0 Likes
2,305

Hey Mandalika!

Thanx for the reply!

Unfortunately, I don´t think a simple select will do..

I´m not checking if these EAN11-numbers already exist, I´m trying to check if they are correct...

This means that the Check-digit algorithm for the EAN category (in my case 'HE') should 'run' over the EAN-number to check if it is correct.

And that is, only possible with a Function Module in which this process is integrated, such as MARA_EAN11.

So we´re back at where we started...

I really appreciate all the help though!

Kind Regards!

Pieter

Read only

0 Likes
2,305

Hello Mandalika!

I forgot to specify what fields I would like to use

Input-Fields: - NUMTP (Ean-Type = 'HE')

- EAN11 (EAN-Number)

Output: - A Boolean -> Correct, not Correct

Cheers!

Pieter

Read only

0 Likes
2,305

Huy Guys!

I finally worked out how to fill the FM!

Here is the code...

select * from marm

into corresponding fields of table i_MARM_EAN

where MATNR = WA_ZORDERDIORPOS-ZARTIKEL2 and

EAN11 = WA_ZORDERDIORPOS-ZME.

select * from mean into corresponding fields of table i_mean

where MEINH = WA_ZORDERDIORPOS-ZME and

EAN11 = WA_ZORDERDIORPOS-ZEAN and

EANTP = h_numtp.

i_ME_tab-MEINH = WA_ZORDERDIORPOS-ZME.

append i_ME_tab.

h_ean11 = WA_ZORDERDIORPOS-ZEAN.

h_matnr2 = WA_ZORDERDIORPOS-ZARTIKEL2.

CALL FUNCTION 'MARA_EAN11'

EXPORTING

P_MATNR = h_matnr2

P_NUMTP = h_numtp

P_EAN11 = h_ean11

P_MEINH = WA_ZORDERDIORPOS-ZME

RET_EAN11 = h_RET_EAN11

RET_NUMTP = h_RET_NUMTP

BINPT_IN = SY-BINPT

P_MESSAGE = 'N'

SPERRMODUS = ''

  • KZ_MEAN_TAB_UPD = ' '

  • KZ_TEST = ' '

  • ERROR_FLAG = 'X'

  • P_HERKUNFT = 'A'

IMPORTING

  • VB_FLAG_MEAN =

P_NUMTP = h_numtp

P_EAN11 = h_ean11

  • MSGID =

  • MSGTY =

  • MSGNO =

  • MSGV1 =

  • MSGV2 =

  • MSGV3 =

  • MSGV4 =

TABLES

MARM_EAN = i_MARM_EAN

MEAN_ME_TAB = i_mean

ME_TAB = i_ME_tab

YDMEAN = i_YDMEAN

  • MEINH =

EXCEPTIONS

EAN_ERROR = 1

OTHERS = 2.

Enjoy!

Thanx to evrybody that tried to help!!

Greeeeeetz!

Pieter

Read only

0 Likes
2,305

Hello Pieter,

I have a problem using about Function Mara_Ean11. Maybe you can help me.

I have a screen about material create. I want to create EAN number with MARA_EAN11 Function. In your program, you are creating

"TABLES

MARM_EAN = i_MARM_EAN

MEAN_ME_TAB = i_mean

ME_TAB = i_ME_tab

YDMEAN = i_YDMEAN"

like that.

Would you please a give me a example about this ?

In fact, I understood i_marm_ean and i_mean. But I did not understand i_ydmean.

Regards,

Tanju

Read only

krzysztof_konitz4
Contributor
0 Likes
2,305

Hi,

I don't know which exactly information ypu need but EAN numbers for materials are stored in MEAN table.

Krzys