Skip to Content
author's profile photo Former Member
Former Member

Changing combination in Combination Checks using Function Module

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 09:19 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 10:54 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.