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

I can save changed datas but can't save deleted datas bellow.

Hi, Friends!

I can save changed datas but can't save deleted datas bellow.

Please help me.

Thanks.

method ondatacheck .

DATA: node_V5_PROGRAMR type ref to if_wd_context_node,

elem_V5_PROGRAMR type ref to if_wd_context_element,

ITB type IF_V5_RESULT=>elements_V5_PROGRAMR.

DATA: BEGIN OF WA,

ZMODULE TYPE ZKXI_NAVI_HELP-ZMODULE,

ZPRGID TYPE ZKXI_NAVI_HELP-ZPRGID,

ZIF_NAME TYPE ZKXI_NAVI_HELP-ZIF_NAME,

END OF WA.

  • save data only if no error has occured

check r_param->t_error_cells is initial.

  • navigate from <CONTEXT> to <V5_PROGRAMR> via lead selection

node_V5_PROGRAMR

= wd_context->get_child_node( name = `V5_PROGRAMR` ).

  • get data from context node <V5_PROGRAMR>

node_V5_PROGRAMR->get_static_attributes_table(

importing table = ITB ).

  • save data to database

LOOP AT ITB INTO WA.

MODIFY ZKXI_NAVI_HELP FROM WA.

ENDLOOP.

COMMIT WORK.

  • Create success message

DATA: l_current_controller type ref to if_wd_controller,

l_message_manager type ref to if_wd_message_manager.

l_current_controller ?= wd_this->wd_get_api( ).

call method l_current_controller->get_message_manager

RECEIVING

message_manager = l_message_manager.

  • report message

call method l_message_manager->report_success

EXPORTING

message_text = 'Data was successfully saved.'.

endmethod.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 04:29 AM

    hi chang......

    a solution for you:

    1) get all the records from the database that is going to be updated.

    2) have it in an internal table itab.

    3) now you have the new set of values in itb.

    4) compare all the values of itab and itb.

    5) now you can get the values that are going to be deleted.

    --regards,

    alex b justin

    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.