Skip to Content
0
Former Member
May 21, 2014 at 02:00 PM

Problem with text in module pool

111 Views

Hello masters of abap development!

I'm having trouble with this screen 01, when I select a row and click on the edit button, I want a popup to appear (screen 02) and the coming of the text I had selected on the previous screen so I can edit it then OK to give that text to be updated on the screen 01.

Screen 01

Screen 02

problem:

Looking at the screens 01 and 02, we can analyze that when I click on a row to edit the popup opens correctly with the text I want to change, and when I click OK, this text should be updated on the screen 01 and then I click the SAVE button is done and saving the information.

The problem is when I go back to the screen 01 and want to edit another line ... The text that is displayed on the screen 02 is the line that I had chosen to edit earlier, see the screen 03 with the selection of another line:

Code to call popup passing the line that was selected:

t_score_out_aux[] = t_score_out[].

DELETE t_score_out_aux[] WHERE mark NE 'X'.

DESCRIBE TABLE t_score_out_aux LINES lv_lines.

IF lv_lines NE 1.

MESSAGE i135(ypcad) DISPLAY LIKE 'I'.

CLEAR sy-ucomm.

ELSE.

READ TABLE t_score_out_aux INTO e_score_out_aux WITH KEY mark = 'X'.

IF sy-subrc = 0.

MOVE-CORRESPONDING e_score_out_aux TO e_score_out.

CALL SCREEN '0302' STARTING AT 100 100.

ENDIF.

ENDIF.


Code that populates the text popup screen 02: (this code is in PROCESS BEFORE OUTPUT screen 02)


MODULE m_area_texto_descricao OUTPUT.

clear: lv_description.

CONCATENATE e_score_out-description e_score_out-description_cont INTO lv_description.

PERFORM f_exibe_area_texto.

ENDMODULE.


Code PERFORM f_exibe_area_texto. :


* Cria objeto para Container

IF o_container IS INITIAL.

CREATE OBJECT o_container

EXPORTING

container_name = 'CONT_DESCRICAO'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

OTHERS = 6.

ENDIF.

* Cria objeto para o texto a ser inserido na tela

IF o_text IS INITIAL.

CREATE OBJECT o_text

EXPORTING

parent = o_container

max_number_chars = 500

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

gui_type_not_supported = 5

OTHERS = 6.

IF sy-subrc EQ 0.

CALL METHOD o_text->set_wordwrap_behavior

EXPORTING

wordwrap_mode = '2'

wordwrap_position = '120'

wordwrap_to_linebreak_mode = 0

EXCEPTIONS

error_cntl_call_method = 1

OTHERS = 2.

CALL METHOD o_text->set_toolbar_mode

EXPORTING

toolbar_mode = 0.

CALL METHOD o_text->set_statusbar_mode

EXPORTING

statusbar_mode = 0.

CALL METHOD o_text->set_textstream

EXPORTING

text = lv_description

EXCEPTIONS

error_cntl_call_method = 1

not_supported_by_gui = 2

OTHERS = 3.

CALL METHOD cl_gui_cfw=>flush.

ENDIF.

ENDIF.


Big question:

I am passing the selected line right through the Debug, the CONCATENATE is also right and passes to the lv_description variable, but why is not updating the screen 02?

Sorry peopple, but I can not see the problem with that.

Attachments

screen_01.jpg (85.1 kB)
screen_02.jpg (88.0 kB)
screen_03.jpg (87.3 kB)