2007 Jun 07 7:03 AM
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
2007 Jun 07 7:09 AM
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
2007 Jun 07 7:06 AM
makt_single_read
Parameters
MATNR = 'R.gly' " Material
SPRAS = 'EN'
Reward points if useful.
Regards,
Sairam
2007 Jun 07 7:06 AM
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.
2007 Jun 07 7:07 AM
2007 Jun 07 7:09 AM
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
2007 Jun 07 7:11 AM
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
2007 Jun 07 7:12 AM
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.