cancel
Showing results for 
Search instead for 
Did you mean: 

Routine for update rules?

Former Member
0 Kudos

Hi all,

I <b>extracted 0material from Product ID</b>, but <b>0material has different length than product ID</b> so I need to create a routine in the update rules.

I don't have ABAP background. Can someone provide advice soon <b>what statement should be in the routine</b> in my scenario. Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi John,

the very best is to use a standard function module to convert the material no. to the correct value. Check out which conversion exit is assigned to 0material in the infoobject maintenance screen and use the following:

call function 'CONVERSION_EXIT_XXXXX_INPUT'

exporting input = <your field name>

importing output = result.

(XXXXX = name of conversion exit in the infoobject maintenance)

in a routine to your material no.

regards

Siggi

Former Member
0 Kudos

Hi John,

Can you give an example of your Product ID and the 0material value which you want to get from your Product ID? I will construct the ABAP routine/Formula for you Also, if you can give me the fild name (from comm structure tab) for your Product ID that would help.

0 Kudos

dear John,

take a look following sample code, assume material length is 18 (standard)

hope this helps.

data : lv_material(18) type c value '000000000000000000',

lv_length type i.

RESULT = TRAN_STRUCTURE-[fieldname].

lv_length = 18 - strlen( RESULT ).

if lv_length > 0 and lv_length < 18.

shift RESULT right by lv_length places.

RESULT(lv_length) = lv_material(lv_length).

endif.