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

makt_single_read

Former Member
0 Likes
1,621

Hi experts,

I am using makt_single_read function module.

I got a short dump error while executing this FM.

It point out the SPRAS parameter.

Pls any one give one example to use this function module.

Thanks.

Message was edited by:

Murugan Arumugam

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,390

Hi

pass the correct parameters

KZRFB = ' '

MAXTZ = 0

MATNR = MAKT-MATNR

SPRAS = SY_LANGU .

Why can't you simple write a single select statement to MAKT table in the where condition give where MATNR = ITAB-matnr and spras = sy-langu.

Reward points for useful Answers

Regards

Anji

6 REPLIES 6
Read only

former_member196280
Active Contributor
0 Likes
1,390

makt_single_read

Parameters

MATNR = 'R.gly' " Material

SPRAS = 'EN'

Reward points if useful.

Regards,

Sairam

Read only

Former Member
0 Likes
1,390

Hi Murugan,

Try this code.

TABLES : MARA, MAKT.

DATA : BEGIN OF I_DATA OCCURS 0,

MATNR LIKE MARA-MATNR,

END OF I_DATA.

DATA : LS_WMAKT LIKE MAKT.

SELECT MATNR FROM MARA INTO TABLE I_DATA.

LOOP AT I_DATA.

CALL FUNCTION 'MAKT_SINGLE_READ'

EXPORTING

  • KZRFB = ' '

  • MAXTZ = 0

MATNR = I_DATA-MATNR

SPRAS = SY-LANGU

IMPORTING

WMAKT = LS_WMAKT

EXCEPTIONS

WRONG_CALL = 1

NOT_FOUND = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

ENDIF.

*

WRITE : / LS_WMAKT-MAKTX .

ENDLOOP.

Thanks,

Reward If Helpful.

Read only

Former Member
0 Likes
1,390

use SY-langu in SPRAS.

regards

prabhu

Read only

Former Member
0 Likes
1,391

Hi

pass the correct parameters

KZRFB = ' '

MAXTZ = 0

MATNR = MAKT-MATNR

SPRAS = SY_LANGU .

Why can't you simple write a single select statement to MAKT table in the where condition give where MATNR = ITAB-matnr and spras = sy-langu.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
1,390

Hi

pass the correct parameters

KZRFB = ' '

MAXTZ = 0

MATNR = MAKT-MATNR

SPRAS = SY_LANGU .

Why can't you simple write a single select statement to MAKT table in the where condition give where MATNR = ITAB-matnr and spras = sy-langu.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
1,390

hi murugan,

just try this code,

CALL FUNCTION 'MAKT_SINGLE_READ'

EXPORTING

matnr = mchakey-matnr

spras = sy-langu

IMPORTING

wmakt = makt

EXCEPTIONS

OTHERS = 4.

it works,

regards,

seshu.