2008 Jun 12 10:26 AM
Hi,
I need to modify matnr. Is this code OK,
or do I have to use another LT_TABLE
and then append wa_lqua to new LT_TABLE?
LOOP AT lt_lqua INTO wa_lqua.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
EXPORTING
input = wa_lqua-matnr
IMPORTING
output = wa_lqua-matnr.
MODIFY lt_lqua FROM wa_lqua INDEX sy-tabix.
ENDLOOP.
tnx..Adibo.
2008 Jun 12 10:28 AM
2008 Jun 12 10:28 AM
2008 Jun 12 10:29 AM
2008 Jun 12 10:29 AM
2008 Jun 12 10:30 AM
2008 Jun 12 10:30 AM
Hi,
This code is OK, it works fine.
No need of tab index number, if u still use it no problem. It is better to use transporting field for better performance.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 7:02 PM
2008 Jun 12 10:31 AM
hii
simply use following code
just take that matnr in one variable.
w_matnr LIKE mara-matnr, " Material Number
lt_drad-objecttype = 'MARA'.
w_matnr = ls_data-matnr.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = w_matnr
IMPORTING
output = w_matnr
EXCEPTIONS
length_error = 1.
lt_drad-objectkey = w_matnr.
APPEND lt_drad.
<REMOVED BY MODERATOR>
thx
twinkal
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 7:03 PM
2008 Jun 12 10:31 AM
hi ,
you have the code right .
just i would like to add one addtion.
LOOP AT lt_lqua INTO wa_lqua.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
EXPORTING
input = wa_lqua-matnr
IMPORTING
output = wa_lqua-matnr.
MODIFY lt_lqua FROM wa_lqua INDEX sy-tabix transporting matnr.
ENDLOOP.
the transporting addittion will have affect only the specified field.
2008 Jun 12 10:32 AM
replace
MODIFY lt_lqua FROM wa_lqua INDEX sy-tabix.
with
MODIFY lt_lqua FROM wa_lqua TRANSPORTING matnr.
because the FM call might change the value of SY-TABIX.
Thomas.
2008 Jun 12 10:37 AM
Hi,
1.It's enough for the removing leading zeroes.
Refer this:
https://forums.sdn.sap.com/click.jspa?searchID=12818061&messageID=3229017
Regards,
Shiva Kumar
2008 Jun 12 10:37 AM
Hi All !! tnx!
LOOP AT lt_lqua INTO wa_lqua.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
EXPORTING
input = wa_lqua-matnr
IMPORTING
output = wa_lqua-matnr.
MODIFY lt_lqua FROM wa_lqua TRANSPORTING matnr.
ENDLOOP.