Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

custom container

Former Member
0 Kudos

Hi friends,

I have problem, in custom container i make two custom containers from screen painter(se80), I am using cl_gui_textedit class ,made two editors 1st editor1 for 1st container mycontainer1 and other 2nd editor2 for 2nd container mycontainer2 when i make double click event on 1st container , want a file upload on 2nd container .I click on 1st container ,i made two local classes for each container i am not upload my file in 2nd container help me please:)

Thanks in advance.

Ankur.

2 REPLIES 2

Former Member
0 Kudos

For system event...........

Call this method in TOP.

class lcl_event implementation.

method catch_dblclick.

CALL METHOD cl_gui_cfw=>set_new_ok_code

EXPORTING

new_code = 'SHOW'

  • IMPORTING

  • RC =

.

And do ur coding in PAI for 'SHOW'

MODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'INS'.

IF flag1 = space.

DO 5 TIMES.

tab-line = text-001.

APPEND tab.

ENDDO.

flag1 = 'X'.

ENDIF.

CALL METHOD editor1->set_text_as_r3table

EXPORTING

table = tab[]

EXCEPTIONS

error_dp = 1

error_dp_create = 2

OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WHEN 'SHOW'.

if flag = space .

CALL METHOD editor1->get_text_as_r3table

  • EXPORTING

  • ONLY_WHEN_MODIFIED = FALSE

IMPORTING

TABLE = tab[]

  • IS_MODIFIED =

EXCEPTIONS

ERROR_DP = 1

ERROR_CNTL_CALL_METHOD = 2

ERROR_DP_CREATE = 3

POTENTIAL_DATA_LOSS = 4

others = 5

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL METHOD editor2->set_text_as_r3table

EXPORTING

TABLE = tab[]

EXCEPTIONS

ERROR_DP = 1

ERROR_DP_CREATE = 2

others = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

clear tab.

clear tab[].

CALL METHOD editor1->set_text_as_r3table

EXPORTING

TABLE = tab[]

EXCEPTIONS

ERROR_DP = 1

ERROR_DP_CREATE = 2

others = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

flag = 'X'.

endif.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

Former Member
0 Kudos

Hi Ankur,

Correct me if I am wrong in my assumptions...

The error you are facing is "when you click on first container, the data from a flat file is not getting filled in Textedit control.."

The steps you have to do are

1) First use 'GUI_UPLOAD' to upload the data from flat file to internal table.

2) Use the method set_text_as_r3table of the class CL_GUI_TEXTEDIT(assuming that you have created an object for the class) .

3) call the method flush of the class CL_GUI_CFW

May be you must have forgotten to do the last step.

You can refer this link for more details.

http://www.sapgenie.com/abap/controls/textedit.htm

<b>Close the thread once the problem is solved..</b>

Regards,

SP.