‎2006 Dec 13 12:18 PM
I am having four containers in a single screen.
I have created containers in PBO event.
I am trying to save the data entered in containers in PAI event.
When I am saving the data, only the last Container's data is getting stored. Is there any way / method to get all the container's and the respective data as well in PAI event? Also when the user wants to display the screen after saving he should be able to see the data in respective containers only.
‎2006 Dec 13 12:22 PM
problem with ur code itself , y only last record -->bcos its updating the header Area only.So u have to correct code.regards
Prabhu
‎2006 Dec 13 12:35 PM
‎2006 Dec 14 3:47 AM
CALL METHOD ls_editor->get_text_as_r3table
IMPORTING
table = i_texttable.
CLEAR wa_tdline-tdformat.
IF i_texttable IS NOT INITIAL.
LOOP AT i_texttable ASSIGNING <tdline>.
IF NOT <tdline> IS INITIAL.
l_text_vorh_lv = l_x_l.
wa_tdline-tdline = <tdline>.
APPEND wa_tdline TO ls_tline.
ENDIF.
ENDLOOP.
ENDIF.
IF NOT ls_tline[] IS INITIAL.
CLEAR ls_thead.
ls_thead-tdobject = 'ZPERNR'.
ls_thead-tdid = 'ZPA'.
IF fcode EQ 'UPD'.
CONCATENATE 'MYCONTAINER1' p9002-pernr INTO ls_thead-tdname.
CONDENSE ls_thead-tdname NO-GAPS.
ls_thead-TDSPRAS = sy-langu.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = ls_thead
INSERT = ' '
savemode_direct = l_x_l
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
lines = ls_tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE e246(zdsh01_pp1) WITH sy-subrc.
ENDIF.
ENDIF.
‎2006 Dec 14 4:25 AM
1. You should get the text / data from each container separately. Just like the way you get getting the text from ls_editor, you should get data from other controls as well.
2. Call COMMIT_TEXT followed by SAVE_TEXT.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Dec 14 4:28 AM
Hello Radha,
check demo programs..
SAPTEXTEDIT_DEMO_2_OLD
i hope this will help you..
regards,
Srini
‎2006 Dec 14 6:10 AM
Solved it on my by declaring separate objects and editors for each container and calling the same in the PAI also