cancel
Showing results for 
Search instead for 
Did you mean: 

Changing combination in Combination Checks using Function Module

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

U can create a new record (By using collect statement) and edit the value u want to change. After that u can delete the old one but u can not change the existing characterstics value .

Thanks,

Debasish

Former Member
0 Kudos

You should not use combination check for this task.

Simply make user-exit planning function, run it after data save.

In this function you should check entered data and in case of errors repair them.