Dynamic header text in table control - Dialog programming
Hi All,
I have a table control on one of my dialog screens. I need to dynamically change the column header texts on this control in my PBO. Does anyone know how to do this? I have found all kinds of ways to modify the other characteristics of the fields at run time in the PBO (active, input/output, invisible, etc.) - but not to change the header text! Any help is appreciated.
thanks,
Matt
Hi Hymavathi,
I appreciate your help! This didn't solve the issue, however,...I have used the method you'd mentioned before (many times) for setting it inside the loop at screen:
%_<screenname>_%_APP_%-TEXT = <text something>.
- but only in ABAP reports. It doesn't seem to recogize it (the table control column header text) within a dialog program. I keep getting a compile error. (saying that the %_<screenname>_%_APP_%-TEXT doesn't exist.
I tried the suggestion that you stated below (from lateesh) - yet it only let me place i/o field in title text area (not the column header text). Am still searching...
Similar Messages
-
I am Using table control wizard.once user click on button data will be populated in Table control from datatabase table
once after getting data the lines which doesnot have data are disabled but
user should be allowed to enter and Update and delete data once after clicking
ENTER Key that data should be updated in the data base table.
i am sending my program.
SCREEN DESIGN .
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TAB1'
MODULE TAB1_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TAB1_CHANGE_COL_ATTR.
LOOP AT IT_TAB3
INTO WA_TAB3
WITH CONTROL TAB1
CURSOR TAB1-CURRENT_LINE.
MODULE TAB1_GET_LINES.
*&SPWIZARD: MODULE TAB1_CHANGE_FIELD_ATTR
ENDLOOP.
* MODULE STATUS_1002.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
LOOP AT IT_TAB3.
CHAIN.
FIELD WA_TAB3-VBELN.
FIELD WA_TAB3-POSNR.
MODULE TAB1_MODIFY ON CHAIN-REQUEST.
endchain.
FIELD WA_TAB3-SP1
MODULE TAB1_MARK ON REQUEST.
ENDLOOP.
* MODULE TAB1_BUTTON.
MODULE TAB1_BUTTONIP.
MODULE TAB1_USER_COMMAND.
*&SPWIZARD: MODULE TAB1_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TAB1_CHANGE_COL_ATTR.
* MODULE USER_COMMAND_1002.
PROGRAM Z_VI_TABL2.
TYPES: BEGIN OF TY_TAB3,
SP1(2) TYPE C,
VBELN TYPE VBELN_VL,
POSNR TYPE POSNR_VL,
END OF TY_TAB3.
TYPES: BEGIN OF TY_FILL,
OBJKY TYPE OBJKY,
END OF TY_FILL.
DATA : IT_TAB3 TYPE STANDARD TABLE OF TY_TAB3,
WA_TAB3 TYPE TY_TAB3,
IT_FILL TYPE STANDARD TABLE OF TY_FILL,
WA_FILL TYPE TY_FILL,
G_VBELN TYPE VBELN_VL,
G_POSNR TYPE POSNR_VL.
*&SPWIZARD: DECLARATION OF TABLECONTROL 'TAB1' ITSELF
CONTROLS: TAB1 TYPE TABLEVIEW USING SCREEN 1002.
*&SPWIZARD: LINES OF TABLECONTROL 'TAB1'
DATA: G_TAB1_LINES LIKE SY-LOOPC.
DATA: OK_CODE LIKE SY-UCOMM.
*&SPWIZARD: OUTPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
MODULE TAB1_CHANGE_TC_ATTR OUTPUT.
DESCRIBE TABLE IT_TAB3 LINES TAB1-lines.
ENDMODULE. "TAB1_CHANGE_TC_ATTR OUTPUT
*&SPWIZARD: OUTPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GET LINES OF TABLECONTROL
MODULE TAB1_GET_LINES OUTPUT.
G_TAB1_LINES = SY-LOOPC.
ENDMODULE. "TAB1_GET_LINES OUTPUT
*&SPWIZARD: INPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MODIFY TABLE
MODULE TAB1_MODIFY INPUT.
* MODIFY IT_TAB3
* FROM WA_TAB3
* INDEX TAB1-CURRENT_LINE.
WA_TAB3-POSNR = 10.
APPEND WA_TAB3 TO IT_TAB3.
ENDMODULE. "TAB1_MODIFY INPUT
*&SPWIZARD: INPUT MODUL FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MARK TABLE
MODULE TAB1_MARK INPUT.
DATA: g_TAB1_wa2 like line of IT_TAB3.
if TAB1-line_sel_mode = 1
and WA_TAB3-SP1 = 'X'.
loop at IT_TAB3 into g_TAB1_wa2
where SP1 = 'X'.
g_TAB1_wa2-SP1 = ''.
modify IT_TAB3
from g_TAB1_wa2
transporting SP1.
endloop.
endif.
MODIFY IT_TAB3
FROM WA_TAB3
INDEX TAB1-CURRENT_LINE.
* TRANSPORTING SP1.
ENDMODULE. "TAB1_MARK INPUT
*&SPWIZARD: INPUT MODULE FOR TC 'TAB1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: PROCESS USER COMMAND
MODULE TAB1_USER_COMMAND INPUT.
OK_CODE = SY-UCOMM.
PERFORM USER_OK_TC USING 'TAB1'
'IT_TAB3'
'SP1'
CHANGING OK_CODE.
SY-UCOMM = OK_CODE.
ENDMODULE. "TAB1_USER_COMMAND INPUT
* INCLUDE TABLECONTROL_FORMS *
*& Form USER_OK_TC *
FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME
CHANGING P_OK LIKE SY-UCOMM.
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA: L_OK TYPE SY-UCOMM,
L_OFFSET TYPE I.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
*&SPWIZARD: Table control specific operations *
*&SPWIZARD: evaluate TC name and operations *
SEARCH P_OK FOR P_TC_NAME.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
L_OFFSET = STRLEN( P_TC_NAME ) + 1.
L_OK = P_OK+L_OFFSET.
*&SPWIZARD: execute general and TC specific operations *
CASE L_OK.
WHEN 'INSR'. "insert row
PERFORM FCODE_INSERT_ROW USING P_TC_NAME
P_TABLE_NAME.
CLEAR P_OK.
WHEN 'DELE'. "delete row
PERFORM FCODE_DELETE_ROW USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
CLEAR P_OK.
WHEN 'P--' OR "top of list
'P-' OR "previous page
'P+' OR "next page
'P++'. "bottom of list
PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
L_OK.
CLEAR P_OK.
* WHEN 'L--'. "total left
* PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
* WHEN 'L-'. "column left
* PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
* WHEN 'R+'. "column right
* PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
* WHEN 'R++'. "total right
* PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
WHEN 'MARK'. "mark all filled lines
PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
WHEN 'DMRK'. "demark all filled lines
PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
* WHEN 'SASCEND' OR
* 'SDESCEND'. "sort column
* PERFORM FCODE_SORT_TC USING P_TC_NAME
* l_ok.
ENDCASE.
ENDFORM. " USER_OK_TC
*& Form FCODE_INSERT_ROW *
FORM fcode_insert_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA L_LINES_NAME LIKE FELD-NAME.
DATA L_SELLINE LIKE SY-STEPL.
DATA L_LASTLINE TYPE I.
DATA L_LINE TYPE I.
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <LINES> TYPE I.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
ASSIGN (L_LINES_NAME) TO <LINES>.
*&SPWIZARD: get current line *
GET CURSOR LINE L_SELLINE.
IF SY-SUBRC <> 0. " append line to table
L_SELLINE = <TC>-LINES + 1.
*&SPWIZARD: set top line *
IF L_SELLINE > <LINES>.
<TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
ELSE.
<TC>-TOP_LINE = 1.
ENDIF.
ELSE. " insert line into table
L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
ENDIF.
*&SPWIZARD: set new cursor line *
L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
<TC>-LINES = <TC>-LINES + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE L_LINE.
ENDFORM. " FCODE_INSERT_ROW
*& Form FCODE_DELETE_ROW *
FORM fcode_delete_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: delete marked lines *
DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
IF <MARK_FIELD> = 'X'.
DELETE <TABLE> INDEX SYST-TABIX.
IF SY-SUBRC = 0.
<TC>-LINES = <TC>-LINES - 1.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " FCODE_DELETE_ROW
*& Form COMPUTE_SCROLLING_IN_TC
* text
* -->P_TC_NAME name of tablecontrol
* -->P_OK ok code
FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
P_OK.
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA L_TC_NEW_TOP_LINE TYPE I.
DATA L_TC_NAME LIKE FELD-NAME.
DATA L_TC_LINES_NAME LIKE FELD-NAME.
DATA L_TC_FIELD_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <LINES> TYPE I.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
ASSIGN (L_TC_LINES_NAME) TO <LINES>.
*&SPWIZARD: is no line filled? *
IF <TC>-LINES = 0.
*&SPWIZARD: yes, ... *
L_TC_NEW_TOP_LINE = 1.
ELSE.
*&SPWIZARD: no, ... *
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
ENTRY_ACT = <TC>-TOP_LINE
ENTRY_FROM = 1
ENTRY_TO = <TC>-LINES
LAST_PAGE_FULL = 'X'
LOOPS = <LINES>
OK_CODE = P_OK
OVERLAPPING = 'X'
IMPORTING
ENTRY_NEW = L_TC_NEW_TOP_LINE
EXCEPTIONS
* NO_ENTRY_OR_PAGE_ACT = 01
* NO_ENTRY_TO = 02
* NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 0.
ENDIF.
*&SPWIZARD: get actual tc and column *
GET CURSOR FIELD L_TC_FIELD_NAME
AREA L_TC_NAME.
IF SYST-SUBRC = 0.
IF L_TC_NAME = P_TC_NAME.
*&SPWIZARD: et actual column *
SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
ENDIF.
ENDIF.
*&SPWIZARD: set the new top line *
<TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
ENDFORM. " COMPUTE_SCROLLING_IN_TC
*& Form FCODE_TC_MARK_LINES
* marks all TableControl lines
* -->P_TC_NAME name of tablecontrol
FORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
*&SPWIZARD: EGIN OF LOCAL DATA-----------------------------------------*
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: mark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = 'X'.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Form FCODE_TC_DEMARK_LINES
* demarks all TableControl lines
* -->P_TC_NAME name of tablecontrol
FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: demark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = SPACE.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Module TAB1_BUTTON INPUT
* text
MODULE TAB1_BUTTONIP.
CASE SY-UCOMM.
WHEN 'DELI'.
REFRESH IT_TAB3.
SELECT OBJKY
INTO TABLE IT_FILL
FROM DRAD
WHERE DOKNR = 'T-F122' AND
DOKOB = 'LIPS'.
IF SY-SUBRC = 0.
LOOP AT IT_FILL INTO WA_FILL.
wa_tab3-vbeln = WA_FILL-OBJKY+0(10).
wa_tab3-posnr = WA_FILL-OBJKY+10(4).
APPEND wa_tab3 TO IT_TAB3.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM IT_TAB3.
ENDIF.
ENDCASE.hi Sonarali,
this FM is of no use to you.
in your PAI you have to loop at the table control table and put a method here you read the lines and save it.
if you use wizard to create a table control it will automatically give the code to you... -
Hi all,
Can i have two lines in the header text of a table control.
for example:.
valid (1st line)
date time (2nd line)
(column1)(column2)
Please send ur suggestions,
Rajesh.hi rajesh,
it is not possible.
just look on ALV.
sometimes it may have that option.
rgds
anver -
Regarding Table controls dialog programming
Hello Experts-
I have a requirement in which I need to identity the record selected on the table control.This is similar to At line slection.Can anyone help me out.Thanks in advance.
With regards,
Swarna..Hi Swarna,
Make use of CRIT_TABCNTRL-current_line to get the current line of the table control where CRIT_TABCNTRL is table control name.
Have A Good Day
Chaitanya. -
Dynamic field labels in table control
Hi experts,
My requirement is to display dynamic field labels in table control can we do this. I am much aware
that we can do it in alv_grid. Please let me know.
Thanks in advance.
SriHi Anubhab,
Thanks. With your help i could able to solve the problem. Let me put this in some
more detail.
When we are pulling the field from a table to table control we need to make sure the fields should have a data elements. After pulling all the fields to a table control ,we need to drag out and delete the current table control column headings and then drop in the (new) I/O fields into their place. I then set the text on these new fields within the PBO. If we try to drop the (new) I/O fields on top of the existing ones with out deleting it won't work.
Thanks & Regards.
Srikanth -
Dear All,
is there way to wrap the text in Table control.
regardsBasically, no. Can you elaborate a little more on your need.
Regards -
Dynamic Hide column in table control
I want to hide colum of table control in program, and then it can invisible,but others is visible.
how should i do?Hello All,
I am trying to implement the above solution. I am facing some issues.
I have used a table maintenance generator. So Depending on the Fields I have choosed, screen is automatically generated with table control : TCTRL_FSH_SOFN_V.
Now, I have to declare a work area to store the values of the above type.
How do i do it??
The highlighted portion gives an syntax error as the table control is not defined.
data: wa_FSH_SOFN_V_cols type LINE OF TCTRL_FSH_SOFN_V-COLS.
loop at TCTRL_FSH_SOFN_V-COLS to wa_FSH_SOFN_V_cols."into .
if sytabix = 4.
wa_FSH_SOFN_V_cols-INVISIBLE = 1.
MODify TCTRL_FSH_SOFN_V-COLS from wa_FSH_SOFN_V_cols.
endif.
endloop. -
How to ADD dynamic header text to Right hand Corner of IDR -FPM OVP/OIF
Hi,
How can we add dynamic header text to right hand side corner in FPM OVP?
I know we can handle left hand side.. but i do need simultaneously right hand side..
ANy thoughts??
Rgds
TarunI am not sure how it is arranged in 7.02, in 7.01 IDR layout is flow layout so you cannot have layouts other than that. I thought that this has been changed in 7.02 to accommodate the matrix layout. I am not sure about it. If this was true then you can try to play with the layout to fit right hand side. It is not easy though.
-
Long Text Box in a dialog program
Hi
I have a requirement to have a long text box ( which can typically hold 1000 characters ) on a dialog screen. I do not want to use table control .Is there any other way we can have a long text box .
Thank you
KrishCheck this standard program. saptextedit_demo_3
this will explain how to create and use the TextEdit Control
regards
Muthu -
Table Column Header Text - Refresh Table
Hi. A question about programmatically changing the Header Text property of a Table Component.
I've added code, in the backing bean Setter for the Table component, to change the header text as required.
The problem is that when the page is rendered, the header changes are not displayed initially. Only after a PPR is performed (on a different component) does the table render with my property changes displayed.
Am I doing the header text manipulation in the wrong place? Is there a way to refresh the table programmatically prior to it rendering initially (e.g. after the RENDER_RESPONSE phase?)?
Cheers.Hi Bala,
After following your invaluable advice I now have the table displaying more or less as a I need. The labels are set correctly (from the Attribute Hint that I set in the AttrDefImpl), and the Rendered property for each column is now derived from Expression Language pointing to the same AttributeHints...
However, I'm still struggling with the DisplayIndex for the table columns. I'm attempting to set the DisplayIndex column property using EL that gets a value from the VO binding FieldOrder control attribute (which contains a numeric value). However, this does not resolve properly and in the column Property Inspector the DisplayIndex doesn't seem to display correctly itself...
I'm wondering if this is because the FieldOrder control attribute is a String while the DisplayIndex takes an Integer. Is there a way to perform some conversion on this in the EL itself? Or maybe that is not the problem.
Thanks again for all your assistance! -
Hi SDN, Rich Please respond ..! <b>ITS VERY URGENT</b>
i need a longtext in one of the table contol of my customised screen. the purpose of the screen is to create RFQ's where in user can enter LT ( just like the transaction IW32 - > Operations Tab - > LT Column. actually the LT in that table control is a button, pressing on which will take the user to an editor like SAP Script editor )
<b>how do i save this into my customised tables so taht i display the LT in the display screen for RFQ's</b>
This same LT created in RFQ Creation screen should be displayed to the users in another customised screens of RFQ Display / Change where the same functionality is needed.
Please help me in achieving this, i have been struggling from past few days, and this is very urgent.
i have been tryin the same with the fm's edit_text and read_text, but am not clear on these fm's related to HEADER in the importing parameters of the fm.
is this wrong? or is there any other way to achieve my requirement?
Please HELP
PratyushaHi,
Check this code..To display the text in a text editor control..
First you have to create a custom control in your screen painter and name it as CONTAINER1..
Then apply this code..
TYPES: BEGIN OF type_text,
line(70),
END OF type_text.
DATA: t_texttable1 TYPE STANDARD TABLE OF type_text.
DATA: custom_container TYPE REF TO cl_gui_custom_container,
editor TYPE REF TO cl_gui_textedit,
repid LIKE sy-repid.
repid = sy-repid.
CALL SCREEN '0100'.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
PERFORM delete_container.
*- Container franchise codes
IF editor IS INITIAL.
repid = sy-repid.
CREATE OBJECT custom_container
EXPORTING
container_name = 'CONTAINER1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CREATE OBJECT editor
EXPORTING
parent = custom_container
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
wordwrap_position = '38'
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
*- Eliminate toolbar
PERFORM toolbar.
ENDIF.
PERFORM load_data.
Load TextEdit control with texts
CALL METHOD editor->set_text_as_r3table
EXPORTING table = t_texttable1.
IF sy-subrc > 0.
Display an error message
EXIT.
ENDIF.
CALL METHOD cl_gui_cfw=>flush.
ENDMODULE. " STATUS_0100 OUTPUT
FORM delete_container *
FORM delete_container.
IF NOT editor IS INITIAL.
CALL METHOD editor->delete_text.
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
OTHERS = 1.
IF sy-subrc > 0.
Errormessage: Error in flush
ENDIF.
ENDIF.
ENDFORM. " delete_container
FORM toolbar *
FORM toolbar.
DATA: lv_toolbar_mode TYPE i VALUE 0.
CALL METHOD editor->set_toolbar_mode
EXPORTING
toolbar_mode = lv_toolbar_mode.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc > 0.
Errormessage: Error in flush
ENDIF.
ENDFORM. " toolbar
*& Form LOAD_DATA
text
--> p1 text
<-- p2 text
FORM load_data.
DATA: gwa_line TYPE type_text.
gwa_line-line = 'HELLO HOW ARE YOU!!!!!'.
APPEND gwa_line TO t_texttable1.
ENDFORM. " LOAD_DATA
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
DATA: T_SAVE_TEXT TYPE STANDARD TABLE OF TLINE.
DATA: S_SAVE_tEXT TYPE TLINE.
DATA: S_TEXT TYPE TYPE_TEXT.
Load TextEdit control with texts
CALL METHOD editor->get_text_as_r3table
IMPORTING table = t_texttable1.
ENDMODULE. " USER_COMMAND_0100 INPUT
Hope this helps...
Thanks,
Naren -
Hide The Table in Table-Control Dialogue Programming
Hi all,
How to hide the TABLE itself (not the columns only but the whole table completely) in table-control in dialog-programming.can any one please help me.....
Regards,
BiswajitHi,
use the screen table.
delclare as a "table" for the group properties of that table element.
LOOP AT SCREEN.
if screen-goupt1 = "table"
if the pushbutton = 'HIDE'
screen-required = 0.
screen-invsible = 0.
screen-input = 0.
MODIFY SCREEN.
ELSEIF the pushbutton = 'SHOW'
screen-required = 0.
screen-invsible = 1.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
endif.
ENDLOOP.
it solves your problme.
Thanks -
Dynamic pushbotton-icon in table control
Hello,
in my table control i have a pushbutton.
i want to display it with a dynamic icon
is this possible ?
thanks very much for your answers
HelmutHi Anubhab,
Thanks. With your help i could able to solve the problem. Let me put this in some
more detail.
When we are pulling the field from a table to table control we need to make sure the fields should have a data elements. After pulling all the fields to a table control ,we need to drag out and delete the current table control column headings and then drop in the (new) I/O fields into their place. I then set the text on these new fields within the PBO. If we try to drop the (new) I/O fields on top of the existing ones with out deleting it won't work.
Thanks & Regards.
Srikanth -
Dynamic Tool TIP in Table Control
Dear Friends,
Thanks in Advance.
How to implement Dynamic Tool TIP in the Table Control for Particularly One Columnn.
i.e rows in that Column.
Note : Column contains Currency Type Data
For that column, i am calculating the Quantity Multiplied with the Exchange Rate.
That Calculation should be visible in the Tool TIP.
Regards:
Sridhar.JHi
Take Text Element Radio button there and give any number and activate.
If the Visible lenght of the Table Control Field is less than actual length of the Content, it automatically displays the Tool Tip.
I just did it.
Hope this serves your purpose.
Get it fram Sam
" Hey Sreedhar, Let us know how can we do it , it will be helpful.
Cheers
Ram
Edited by: Ramchander Krishnamraju on Jan 2, 2010 4:06 AM -
Long text in table control lines
If i put long text buttons on the table control coulum, when the line is deleted from the table, the text for tha line are permenantly deleted before the screen is saved in the user command. how do i correct the problem ?
regards
RendaniUse the FM for text delete when u press save button and not at table control delete command.
physically delete the line from table control and put it in internal table which can be used for deletion purpose at time of actual deletion...
Maybe you are looking for
-
Octroi is not calculating on Freight value
Hello, We are maintained all the conditions in PO conditions tab. Inclucding of Frieght conditions. here Octroi is not calculating on Freight value. If suppose the frieght vendor is different then it is ok to calculted Octri without frieght, If supp
-
Problems with xsl transformation
Hi, I have an XSL to transform an XML to HTML code. I want my HTML to be ACCESSIBLE. All is working ok, but the <html> tag have two or three attributtes that make de code no ACCESSIBLE. This is a part of the XSL code: <?xml version="1.0" encoding="UT
-
Missing Interfaces in Intergration Process in Configuration
Hi everybody I am facing a serious problem. I creat currently a more or less complex scenario. In my integration process I added a synchronous Interface. I created all necessary interfaces: abstract - async, abstract sync and so on. But If I would li
-
How to IMPLE SMD/Wily?
Hi Need some information 1.what are the OSS Notes which say SMD is required for troubleshooting for SAP components like, PI 7.1, Netweaverr 7.1, Netweaver 7.0 or any specific component like AS Java 7.0 troubleshooting. 2.How to findout which version
-
Export to GIF cuts off corners
hey folks i have the attached PNG (CS5 - 11.1.0.205), when i export it to a transparent GIF, the top corners from the rectangles are made straight. i assume i am not using the corrent export settings from the optimize panel. can someone give me a han