Skip to Content
0
Former Member
Jan 13, 2007 at 01:53 AM

Changing combination in Combination Checks using Function Module

27 Views

Hi people,

I am using FM to check the correct combination and it works, but I don't want to send an error message. I need to change the wrong value of characteristic to a specific one (e.g. If characteristic is #, change to 'VID'). I have got a Dump because the variable content is protected. Does it have any other way to do that?

There is my code - simplified version ;o)

FUNCTION ZFBP_VERIFICACAO_ATIV.

*"----

-


""Interface local:

*" IMPORTING

*" REFERENCE(I_AREA) TYPE UPC_Y_AREA

*" REFERENCE(ITO_CHA) TYPE UPC_YTO_CHA

*" REFERENCE(ITO_CHASEL) TYPE UPC_YTO_CHASEL

*" REFERENCE(IS_CHAS) TYPE ANY

*" EXCEPTIONS

*" INVALID

*"----

-


field-symbols: .

  • ....

assign component 'ZTI_UNNEG' of structure is_chas to = 'VID'. -

-


This line cause the Dump

  • It not so simple in original version. I have to select the correct value of <unneg>

  • in a table and consider others rules to find the correct code, so i think FOX

  • cannot helps me.

ENDIF.

ENDIF.

ENDFUNCTION.

Dump message: MOVE_TO_LIT_NOTALLOWED_NODATA

The program tried to assign a new value to the field "" even though

it is protected against changes.

...

Thanks in advance.

Regards

Márcio

Message was edited by:

Márcio Costa