Skip to Content
0
Former Member
May 31, 2005 at 04:50 PM

Exit Function not modifying any records

18 Views

I´m trying to do a unit conversion using an exit function. I´m not able to change the records, it says 1300 records read but 0 modified.

This is the code that I have, does someone know what I´m missing?

FUNCTION Z_BPS_UNIT_CONVERSION_I.

*"----

-


""Interfase local

*" IMPORTING

*" REFERENCE(I_AREA) TYPE UPC_Y_AREA OPTIONAL

*" REFERENCE(ITO_CHASEL) TYPE UPC_YTO_CHASEL OPTIONAL

*" REFERENCE(ITO_CHA) TYPE UPC_YTO_CHA OPTIONAL

*" EXPORTING

*" REFERENCE(ETH_CHAS) TYPE HASHED TABLE

*" CHANGING

*" REFERENCE(XS_CHAS) TYPE ANY OPTIONAL

*"----

-


  • TABLES: ...

TABLES: /BI0/PMAT_UNIT.

  • DATA: ...

DATA: lineref type ref to data,

tab type ref to data,

ls_chasel type UPC_YS_CHASEL,

lt_charng type UPC_YT_CHARNG,

ls_charng type UPC_Ys_CHARNG,

ls_area type UPC_Y_AREA.

  • FIELD-SYMBOLS: ...

field-symbols: type any.

  • TYPES: ...

TYPES:

begin of l_add,

0MATERIAL(1 type c,

0COPASLQTY type p,

ZINVCDQTE type p,

end of l_add.

DATA:

g_s_data TYPE l_add.

  • Create a line that looks like the output table

create data lineref like line of eth_chas.

assign lineref->* to to g_s_data.

  • Create output lines

SELECT SINGLE *

FROM /BI0/PMAT_UNIT

WHERE MATERIAL = g_s_data-0MATERIAL AND

MAT_UNIT = 'EMB'.

g_s_data-ZINVCDQTE = g_s_data-0copaslqty *

/bi0/pmat_unit-DENOMINTR

/ /bi0/pmat_unit-numerator.

move-corresponding g_s_data to into table eth_chas.

ENDLOOP.

Thanks a lot!!!

Theresa.