Text underlined in table control
Hello all,
In TC Co03 there is a table control for operations. The field short text is "click-sensitiv".
So the short text is underlined.
But - for some users this short text is underlined and for some users they are not.
My question: How can I define wether click-sensitive fields are underlined or not ? We have SapGui 6.20...
I found nothing...
Thanks for every answer - I fall in deep depression ((-;
Simone
Hi simone falk,
Generally it will not be at user level for co03
are they using screen variants ??
OR why don't you upgrade to SAP GUI 710... Try to upgrade it and check out...
We are not facing any such problems here and we are using SAP GUI 710...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
Similar Messages
-
Dynamic Table control header text
Hi everyone,
I need to change the column header texts of a table control dynamically.
There are 32 columns in my table control. I got the information that I have to use I/O fields for every columns as the column header texts to change it dynamically.
But it didn't work as the I/O box goes into the body of the table control instead of being placed in the header area. So I checked w/title and tried to drag and drop the I/O boxes on the header text place of table control. But it allowed only one I/O box to be there in the header area..
Please suggest me any idea to place the 32 I/O boxes in the header area as the corresponding column headers in the table control..
Thanks in advance,
Sheeba.Resolved the issue..
-
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 -
hi
In BDC how to transfer the data to table controlhi
what ever the data that u want to trnasfer to table ctrl, put it in a flat file.
create an internal able that can occupy those datas.
then transfer from internal table to table control.
ex: for me41/.
REPORT YELS_ME41_BDC_V NO STANDARD PAGE HEADING LINE-SIZE 255.
INCLUDE BDCRECX1.
INTERNAL TABLE DECLARATION.
DATA : BEGIN OF ITAB OCCURS 0,
V_NUM(3) TYPE C,"SERIAL NUMBER
EMATN LIKE EKPO-EMATN,
TXZ01 LIKE EKPO-TXZ01,
ANMNG(13) TYPE C,
MEINS(3) TYPE C,
LPEIN LIKE RM06E-LPEIN,
EEIND LIKE RM06E-EEIND,
MATKL LIKE EKPO-MATKL,
END OF ITAB.
VARIABLE DECLARATION
DATA : V_LASTNUM(3) TYPE C,
V_TEMPVAR(15),
V_PAGES(3) TYPE C VALUE '10',
V_COUNT TYPE I,
V_CTR TYPE I,
V_TCTR(2) TYPE C,
V_TEST TYPE C VALUE 0,
ITEM LIKE RM06E-EBELP.
*DATA: BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.
BEGIN OF PROGRAM.
START-OF-SELECTION.
PERFORM GET-DATA.
SORT ITAB BY NUM EEIND.
PERFORM OPEN_GROUP.
*DATA TRANSFERRED FROM INTERNAL TABLE TO IST 2ND SCREEN FIELDS(HEADER
*DATA)
LOOP AT ITAB.
IF ITAB-V_NUM NE V_LASTNUM.
" HEADER DATA EXECUTES FOR ONLY ONE TIME FOR ONE RFQ GENERATION
WHEN SNO IS NOT EQUAL TO LASTNUMBER. THEN PROCEED.
V_TEST = 0.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0300'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EKKO-ANGDT'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RM06E-ASART'
'AN'. "RFQ TYPE.
PERFORM BDC_FIELD USING 'EKKO-SPRAS'
'EN'. " LANGUAGE KEY.
PERFORM BDC_FIELD USING 'RM06E-ANFDT'
'19.07.2007'."RFQ DATE.
PERFORM BDC_FIELD USING 'EKKO-ANGDT'
'29.07.2007'."QUOTATION DEAD LINE.
PERFORM BDC_FIELD USING 'EKKO-EKORG'
'3000'."PURCHASE ORGANISATION.
PERFORM BDC_FIELD USING 'EKKO-EKGRP'
'003'."PURCHASE GROUP.
PERFORM BDC_FIELD USING 'RM06E-LPEIN'
'T'.
IIND SCREEN.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0301'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EKKO-SUBMI'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'BU'.
PERFORM BDC_FIELD USING 'EKKO-EKGRP'
'003'.
PERFORM BDC_FIELD USING 'EKKO-PINCR'
'10'." ITEM INTERVAL.
PERFORM BDC_FIELD USING 'EKKO-SUBMI'
'1'." COLL NO.
PERFORM BDC_FIELD USING 'EKKO-SPRAS'
'EN'.
PERFORM BDC_FIELD USING 'EKKO-UPINC'
'1'." SUB ITEM INTERVAL.
PERFORM BDC_FIELD USING 'EKKO-ANGDT'
'29.07.2007'.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0301'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EKKO-EKGRP'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'EKKO-EKGRP'
'003'.
PERFORM BDC_FIELD USING 'EKKO-PINCR'
'10'.
PERFORM BDC_FIELD USING 'EKKO-SUBMI'
'1'.
PERFORM BDC_FIELD USING 'EKKO-UPINC'
'1'.
PERFORM BDC_FIELD USING 'EKKO-ANGDT'
'29.07.2007'.
**********tab ctrl*********************************************
IIIRD SCREEN
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0320'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RM06E-EEIND(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'EKKO-ANGDT'
'29.07.2007'.
DATA MOVED FROM INTERNAL TABLE TO TABLE CONTROL
V_CTR = 0.
"FOR ONE RFQ , MORE ITEMS WILL BE THERE. COUNT STARTS HERE.
LOOP AT ITAB WHERE V_NUM = ITAB-V_NUM." CHECK THE SNO IS EQUAL .
V_CTR = V_CTR + 1." COUNT IS INCREMENTED BY 1.
MY TAB CTRL CAN HAVE ONLY 20 RECORDS.
IF COUNT IS LESS THAN OR EQUAL TO 20 ASSIGN THIS VALUE TO TCTR VAR
IF V_CTR <= 20.
V_TCTR = V_CTR.
ENDIF.
*IF COUNT IS GREATER THAN 20 ASSIGN THIS VALUE TO TCTR VAR
IF V_CTR > 20.
V_TCTR = '20'.
ENDIF.
IF COUNT IS LESS THAN OR EQUAL TO 10 BLANK SPACE IS ALLOTTED TO TEST
VAR.
IF V_CTR >= 10.
V_TEST = ''.
ENDIF.
WHEN COUNT IS LESS THAN 20 THEN ITEM (PAGES) WILL BE 10.
IF V_CTR < 20.
V_PAGES = 10.
PERFORM BDC_FIELD USING 'RM06E-EBELP'
V_PAGES.
ENDIF.
WHEN COUNT IS GREATER THAN 20 THEN ITEM (PAGES) WILL BE INCREMENTED BY
10 FOR EVERY ENTRY..
IF V_CTR >= 20.
V_PAGES = V_PAGES + 10.
PERFORM BDC_FIELD USING 'RM06E-EBELP'
V_PAGES.
ENDIF.
CONCTAENATION IS DONE TO GET A PATTERN LIKE EKPO-EMATN(01).
UPLOAD EMATN FIELD INTO TABLE CONTROL
CONCATENATE 'ekpo-ematn(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING V_TEMPVAR ITAB-EMATN.
UPLOAD SHORT TEXT FIELD INTO TABLE CONTROL
CONCATENATE 'ekpo-txz01(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING V_TEMPVAR ITAB-TXZ01.
UPLOAD QUANTITY FIELD INTO TABLE CONTROL
CONCATENATE 'rm06e-anmng(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING V_TEMPVAR ITAB-ANMNG.
UPLOAD UNIT OF MEASURE FIELD INTO TABLE CONTROL
CONCATENATE 'ekpo-meins(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING V_TEMPVAR ITAB-MEINS.
UPLOAD DATE FORMAT FIELD INTO TABLE CONTROL
CONCATENATE 'rm06e-lpein(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING V_TEMPVAR ITAB-LPEIN.
UPLOAD DATE FIELD INTO TABLE CONTROL
CONCATENATE 'rm06e-eeind(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING V_TEMPVAR ITAB-EEIND.
UPLOAD MATERIAL GROUP FIELD INTO TABLE CONTROL
CONCATENATE 'EKPO-MATKL(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING V_TEMPVAR ITAB-MATKL.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0320'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EKKO-ANGDT'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=LS'.
PERFORM BDC_FIELD USING 'EKKO-ANGDT'
'29.07.2007'.
*AFTER INSERTING ONE ROW OF DATA PRESS ENTER .CURSOR SHOULD BE AT DEAD
*LINE DATE.
CONCATENATE 'ekpo-ematn(' V_TEST V_TCTR ')' INTO V_TEMPVAR.
CONDENSE V_TEMPVAR NO-GAPS.
PERFORM BDC_FIELD USING 'BDC_CURSOR' V_TEMPVAR.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
ENDLOOP.
*************************vendor addr*******************
V_LASTNUM = ITAB-V_NUM.
*******ENTER VENDOR NUMBER AND SAVE.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0140'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EKKO-LIFNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'EKKO-LIFNR'
'9054'." VENDOR NUMBER.
PERFORM BDC_DYNPRO USING 'SAPLMEXF' '0100'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTE'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RM06E-SPRAS'.
PERFORM BDC_FIELD USING 'BUTTON_INIT'
'X'.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0140'.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0140'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EKKO-LIFNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BU'.
PERFORM BDC_FIELD USING 'EKKO-LIFNR'
'9054'.
PERFORM BDC_FIELD USING 'ADDR1_DATA-NAME1'
'tttt'.
PERFORM BDC_FIELD USING 'ADDR1_DATA-SORT1'
'TT'.
PERFORM BDC_FIELD USING 'ADDR1_DATA-COUNTRY'
'AZ'.
PERFORM BDC_DYNPRO USING 'SAPLSPO1' '0300'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=YES'.
PERFORM BDC_TRANSACTION USING 'ME41'.
REFRESH BDCDATA.
ENDIF.
ENDLOOP.
PERFORM CLOSE_GROUP.
*& Form get-data
UPLOAD FLAT FILES TO INTERNAL TABLE.
FORM GET-DATA.
*TRANSFER DATA FROM FLAT FILE TO INTERNAL TABLE.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = ' '
FILETYPE = ' '
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "get-data
reward if useful -
Table control list box. different values in each row of the list box
Hi all,
i have a requirement to display text box in table control. Each row of list box should contain different values.
i tried with the below code but the values are not getting populated in list box. please give your ideas.
I tried with list box which is having same values in all rows, it is working fine.
loop at itab.
select vbeln from ZSD_PS_BLAWB into ZSD_PS_BLAWB-vbeln
where BLAWBNO = itab-BLAWBNO and
BLAWBDT = itab-BLAWBDT and
CTRNO = itab-CTRNO.
if sy-subrc = 0.
index = 1.
list3-key = index.
list3-text = ZSD_PS_BLAWB-vbeln.
append list3 to list2.
index = index + 1.
endif.
endselect.
clear index.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'ITAB-VBELN'
VALUES = list2
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
modify itab.
endloop.
Thanks in advance.Hi,
this is code example for listbox
TYPE-POOLS vrm .
DATA: lt_vrm_values TYPE TABLE OF vrm_value.
DATA: wa_vrm_values TYPE vrm_value.
PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
wa_vrm_values-key = 'Key1'.
wa_vrm_values-text = 'Value1'.
APPEND wa_vrm_values TO lt_vrm_values.
wa_vrm_values-key = 'Key2'.
wa_vrm_values-text = 'Value2'.
APPEND wa_vrm_values TO lt_vrm_values.
wa_vrm_values-key = 'Key3'.
wa_vrm_values-text = 'Value3'.
APPEND wa_vrm_values TO lt_vrm_values.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_LIST'
values = lt_vrm_values
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
Manas M.
P.S.: This is very easy question, you should use search ... -
Table Control Text fields problem , help plz
Hello Anand , Rich , John & All
I hav problem with Text 3 fields( type c)(either L or R aligned ) , it is not geting updated , otherwise everything else is perfectly fine(scrolling,sorting etc ....) .
Fields giving problem are
1. Status(20) type c
2. Fdat type date
3. Remark(100) type c
All numerical fields are working fine .
<u><b> My yahoo messenger-id is [email protected]</b></u>
<b>Any light on this will be awarded plz .</b>
FLOW LOGIC
PROCESS BEFORE OUTPUT.
MODULE SET_STATUS.
LOOP AT ITAB
WITH CONTROL TCL1
CURSOR TCL1-CURRENT_LINE .
MODULE SET_LINE_COUNT .
ENDLOOP.
PROCESS AFTER INPUT.
MODULE UPD_OK_COD.
MODULE EXIT_COMAND AT EXIT-COMMAND.
MODULE SCROLL_SORT.
LOOP AT ITAB.
MODULE UPDATE_ITAB.
ENDLOOP.
MODULE UPDATE_TABLE.
REPORT ZSD_REP_ORDER_BANK_CHANGE NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES: VBAK,VBAP,VBRK,ZSD_TABL_ORDBANK,MARA,KONV.
CONTROLS: TCL1 TYPE TABLEVIEW USING SCREEN 0200.
DATA: ITAB LIKE ZSD_TABL_ORDBANK OCCURS 0 WITH HEADER LINE,
WA_ITAB LIKE ZSD_TABL_ORDBANK,
OK_CODE LIKE SY-UCOMM,
SAVE_OK_CODE LIKE SY-UCOMM,
UPD_OK_CODE LIKE SY-UCOMM,
ANSWER TYPE C,
I LIKE SY-LOOPC ,
J LIKE SY-LOOPC,
V_LINES LIKE SY-LOOPC,
LINE_COUNT LIKE SY-LOOPC,
STS TYPE N,
EMGRP LIKE MARA-EXTWG,
QTY LIKE ZSD_TABL_ORDBANK-QTY,
UPRICE LIKE ZSD_TABL_ORDBANK-UPRICE,
TOT LIKE ZSD_TABL_ORDBANK-TOT,
INO LIKE VBAP-POSNR,
COL TYPE CXTAB_COLUMN,
COPIED_ONCE ,
FLDNAME(100),HELP(100).
FIELD-SYMBOLS:
<FS_ITAB> LIKE LINE OF ITAB,
<FS_TCL1> LIKE LINE OF TCL1-COLS.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECT-OPTIONS: S_CCODE FOR ZSD_TABL_ORDBANK-CCODE
NO INTERVALS NO-EXTENSION OBLIGATORY,
S_SORG FOR ZSD_TABL_ORDBANK-SORG
NO INTERVALS NO-EXTENSION OBLIGATORY,
S_DCHAN FOR ZSD_TABL_ORDBANK-DISTCHAN,
S_DIV FOR ZSD_TABL_ORDBANK-DIV,
S_MATNO FOR ZSD_TABL_ORDBANK-MATNO,
S_CUSTNO FOR ZSD_TABL_ORDBANK-CUSTNO ,
S_QTNO FOR ZSD_TABL_ORDBANK-QTNO,
S_QTDAT FOR ZSD_TABL_ORDBANK-QTDAT,
S_QTVDAT FOR ZSD_TABL_ORDBANK-QTVALDAT,
S_SONO FOR ZSD_TABL_ORDBANK-SONO.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT * FROM ZSD_TABL_ORDBANK
INTO TABLE ITAB
WHERE CCODE IN S_CCODE
AND SORG IN S_SORG
AND DISTCHAN IN S_DCHAN
AND DIV IN S_DIV
AND MATNO IN S_MATNO
AND CUSTNO IN S_CUSTNO
AND QTNO IN S_QTNO
AND QTDAT IN S_QTDAT
AND QTVALDAT IN S_QTVDAT
AND SONO IN S_SONO .
IF SY-SUBRC EQ 0.
REFRESH ITAB.
CLEAR COPIED_ONCE.
CALL SCREEN 0200.
ELSE.
MESSAGE E012(ZQOTBANK) .
ENDIF.
*& Module SET_STATUS OUTPUT
* text
MODULE SET_STATUS OUTPUT.
SET PF-STATUS '0200'.
SET TITLEBAR '0200'.
IF COPIED_ONCE IS INITIAL.
SELECT * FROM ZSD_TABL_ORDBANK
INTO TABLE ITAB
WHERE CCODE IN S_CCODE
AND SORG IN S_SORG
AND DISTCHAN IN S_DCHAN
AND DIV IN S_DIV
AND MATNO IN S_MATNO
AND CUSTNO IN S_CUSTNO
AND QTNO IN S_QTNO
AND QTDAT IN S_QTDAT
AND QTVALDAT IN S_QTVDAT
AND SONO IN S_SONO .
IF SY-SUBRC EQ 0.
DESCRIBE TABLE ITAB LINES V_LINES.
TCL1-LINES = V_LINES.
ENDIF.
COPIED_ONCE = 'X'.
REFRESH CONTROL 'TCL1' FROM SCREEN '0200'.
ENDIF.
LOOP AT ITAB.
QTY = ITAB-QTY.
UPRICE = ITAB-UPRICE.
TOT = QTY * UPRICE .
ITAB-TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-CGL_QTY.
UPRICE = ITAB-CGL_UPRICE.
TOT = QTY * UPRICE .
ITAB-CGL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-BHEL_QTY.
UPRICE = ITAB-BHEL_UPRICE.
TOT = QTY * UPRICE .
ITAB-BHEL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-ALSTOM_QTY.
UPRICE = ITAB-ALSTOM_UPRICE.
TOT = QTY * UPRICE .
ITAB-ALSTOM_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-SIEMENS_QTY.
UPRICE = ITAB-SIEMENS_UPRICE.
TOT = QTY * UPRICE .
ITAB-SIEMENS_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-TELK_QTY.
UPRICE = ITAB-TELK_UPRICE.
TOT = QTY * UPRICE .
ITAB-TELK_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-OTH_QTY.
UPRICE = ITAB-OTH_UPRICE.
TOT = QTY * UPRICE .
ITAB-OTH_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
MODIFY ITAB.
ENDLOOP.
ENDMODULE. " SET_STATUS OUTPUT
*& Module SET_LINE_COUNT INPUT
* text
MODULE SET_LINE_COUNT OUTPUT.
LINE_COUNT = SY-LOOPC.
ENDMODULE. " SET_LINE_COUNT INPUT
*& Module UPD_OK_CODE INPUT
* text
MODULE UPD_OK_COD INPUT.
IF OK_CODE = 'SAVE'.
UPD_OK_CODE = OK_CODE.
* CLEAR OK_CODE.
ENDIF.
ENDMODULE. " UPD_OK_CODE INPUT
*& Module EXIT_COMAND INPUT
* text
MODULE EXIT_COMAND INPUT.
SAVE_OK_CODE = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK_CODE.
WHEN 'BACK'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Order Bank Entry'
TEXT_QUESTION = 'Do you want to Go BacK ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE TO SCREEN 0.
ELSE.
ENDIF.
WHEN '%EX'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Order Bank Entry'
TEXT_QUESTION = 'Do you want to Exit ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE TO SCREEN 0.
ELSE.
ENDIF.
ENDCASE.
ENDMODULE. " EXIT_COMAND INPUT
*& Module UPDATE_MOD INPUT
* text
MODULE UPDATE_ITAB INPUT.
MODIFY TABLE ITAB FROM ITAB.
ENDMODULE. " UPDATE_MOD INPUT
*& Module SCROLL INPUT
* text
MODULE SCROLL_SORT INPUT.
SAVE_OK_CODE = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK_CODE.
WHEN 'P--'.
TCL1-TOP_LINE = 1.
WHEN 'P-'.
TCL1-TOP_LINE = TCL1-TOP_LINE - LINE_COUNT.
IF TCL1-TOP_LINE LE 0.
TCL1-TOP_LINE = 1.
ENDIF.
WHEN 'P+'.
I = TCL1-TOP_LINE + LINE_COUNT.
J = TCL1-LINES - LINE_COUNT + 1.
IF J LE 0.
J = 1.
ENDIF.
IF I LE J.
TCL1-TOP_LINE = I.
ELSE.
TCL1-TOP_LINE = J.
ENDIF.
WHEN 'P++'.
TCL1-TOP_LINE = TCL1-LINES - LINE_COUNT + 1.
IF TCL1-TOP_LINE LE 0.
TCL1-TOP_LINE = 1.
ENDIF.
WHEN 'SORTUP'.
READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY SELECTED = 'X'.
IF SY-SUBRC = 0.
SPLIT <FS_TCL1>-SCREEN-NAME AT '-' INTO HELP FLDNAME.
SORT ITAB ASCENDING BY (FLDNAME).
ENDIF.
WHEN 'SORTDN'.
READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY SELECTED = 'X'.
IF SY-SUBRC = 0.
SPLIT <FS_TCL1>-SCREEN-NAME AT '-' INTO HELP FLDNAME.
SORT ITAB DESCENDING BY (FLDNAME).
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND INPUT
*& Module TABL_UPD INPUT
* text
MODULE UPDATE_TABLE INPUT.
CASE UPD_OK_CODE.
WHEN 'SAVE'.
UPDATE ZSD_TABL_ORDBANK FROM TABLE ITAB .
IF SY-SUBRC EQ 0.
MESSAGE I002(ZQOTBANK) .
CLEAR UPD_OK_CODE.
ELSE.
MESSAGE E003(ZQOTBANK) .
ENDIF.
ENDCASE.
ENDMODULE. " TABL_UPD INPUT
Thnx
moni<b></b><b></b>
Message was edited by: md monirujjaman
Message was edited by: md monirujjamanHi Moni,
The problem as I had replied in your earlier post is with the MODIFY statement.
MODIFY TABLE ITAB FROM ITAB. This statement will do the modifications based on the table key. When you have character fields as editable, then some problems are to be anticipated. In such a scenario, you must update the internal table based on the <i>index</i>, rather than based on <i>key</i>.
So consider using
MODIFY ITAB FROM ITAB INDEX TCL-CURRENT_LINE.
Where TCL is the name of the Table Control. Also observe the difference in syntax here, don't use the TABLE keyword for the MODIFY statement.
Please try it out and let me know.
Regards,
Anand Mandalika. -
Upload text file from PC to table control
Hi Experts,
I realize that this question was posted many times in SDN, but I am not able to find a clear answer. I have uploaded the file into internal table using GUI_UPLOAD function module (PAI module - MODULE UPLOAD_FROM_PC - I have created a push button using screen painter and included the logic based of fcode). Now, I want to append this internal table to the internal table linked to the table control. But I am not able to find the internal table which is linked to the table control. The EXTRACT is not an internal table. So, could you tell me how I could accomplish this logic.
PROCESS BEFORE OUTPUT.
MODULE LISTE_INITIALISIEREN.
LOOP AT EXTRACT WITH CONTROL TCTRL_ZKK_EXAMPLE1 CURSOR NEXTLINE.
MODULE LISTE_SHOW_LISTE.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE LISTE_EXIT_COMMAND AT EXIT-COMMAND.
MODULE LISTE_BEFORE_LOOP.
LOOP AT EXTRACT.
MODULE LISTE_INIT_WORKAREA.
CHAIN.
FIELD ZKK_EXAMPLE1-ANLKL .
MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
ENDCHAIN.
FIELD VIM_MARKED MODULE LISTE_MARK_CHECKBOX.
CHAIN.
FIELD ZKK_EXAMPLE1-ANLKL .
MODULE LISTE_UPDATE_LISTE.
ENDCHAIN.
ENDLOOP.
MODULE UPLOAD_FROM_PC.
MODULE LISTE_AFTER_LOOP.
Thanks
SriHi
First of all convert excel or text file into tabular format
(meanse same as we use in BDC).
here table I_EXCL structure is same as your table control structure.
for ex.
yr table control structure is
u can write down this coding in yr button press event.
data:begin of extract occurs 0,
matnr like matnr,
maktx like maktx,
end of extract.
data:i_excl like extract occurs 0 with header line.
GET THE FILE PATH
DATA:W_FILENAME LIKE RLGRAP-FILENAME.
CLEAR:W_FILENAME,extract[].
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = ' '
MASK = ' '
CHANGING
FILE_NAME = W_FILENAME
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF W_FILENAME IS NOT INITIAL.
CONVERT EXCEL FILE INTO INTERNAL TABLE
CLEAR:I_EXCL.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = W_FILENAME
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = I_EXCL
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
After this in PBO module u can write
process before output
MODULE TAB_ENTRY_CHANGE_TC_ATTR.
MODULE TAB_ENTRY_CHANGE_TC_ATTR.
loop at i_excl.
extract-matnr = i_excl-matnr.
extract-maktx = i_excl-maktx.
append extract.
endloop.
endmodule.
I hope this is helpfull to solve yr problem.
Edited by: Pavan Gajjar on Mar 26, 2008 9:57 AM -
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,
MattHi 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... -
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... -
Dynamic text in module pool table control
Hi ,
Can we have dynamic header text in module pool table control. Like dynamic header text in ALV report.
Thanks,
Prem.Hi,
Populate an internal table with the header text that you want.
Replace the headers with I/O fields.
Populate the Headers in the PBO. -
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 -
Dear All,
is there way to wrap the text in Table control.
regardsBasically, no. Can you elaborate a little more on your need.
Regards -
Change Table control Column Header text dynamically
Hi,
I have an requirement to change table control column header text dynamically.
i.e. I have about 10 columns in table control, out that need to change 5 columns header text. These header texts are stored in an internal table.
I had looked into the below link but could not get exactly how to do it.
Dynamic headers in table control
Could you please tell me how to do that.
Thanks in Advance.Hi Saba,
What you will need to do is this.....
1. First replace the column Header Text box by I/O Fields and name them accordingly.
Say for example we will consider the same example which i had explained in the link.
there in the column header we want the header to change when some dates and entered into two fields which are out of table control say
Start Date: 01.01.2010 to End Date: 06.01.2010
Now we want the header to look like this,
Column No. - 1 2 3 4 5 6
Header label - 01/FRI 02/SAT 03/SUN 04/MON 05/TUE 06/WED
Header name - SPOTS1 SPOTS2 SPOTS3 SPOTS4 SPOTS5 SPOTS6
then you go as per the instructions in the link......
Let me know if you need further help,
Hope this solves your problem....
Regards,
Abhijit G. Borkar -
How to define Column Header text table control
Hi All,
I have to create a function in which user will pass Field Name, Field Description.
I have to show that field description in Table Control Columns as Text for columns.
Like if a user pass Material , PLant etc, then first column header text will be Material and so on and in rows it will show the data.
One more thing, is it possible to define the technical attributes like length based on field passed through function.
Please help me to find out the solution.
Thanks
Piyush MathurHi Piyush,
here are the some components of the screen . you can change tehm at run time in your code.
components: name,input,output,required,length,active,invisible,intensified,group1,group2...etc.
at ruin time you modify these attributes..
your requirement is to change the name attribute.
regards,
sateesh -
Problem while saveing in Table Control.
Hi
I am geting error while saving data in table control.
This table contol is pop up window at end of screen .
user enter qty & uom in TC..
Error i am getting is...
Field symbol has not been assigned.
Error analysis
The system tried to access an anasigned field symbol (data segment
number 32772).
The field symbol is no longer assigned, because a Unicode program
previously tried to set the field symbol using an ASSIGN statement with
an offset/length declaration. The memory addressed in this offset/length
declaration, however, no longer lay within the valid range.
Information on where terminated
The termination occurred in the ABAP program "SAPLOMCV" in
"CONVERSION_EXIT_MATN1_INPUT".
i Have coded like this..
MODULE USER_COMMAND_0112 INPUT.
CASE OKCODE.
WHEN 'BACK' or 'CANCEL'.
SET SCREEN 0.
This iti is contain data which diplay in TC
when 'DISPLAY'.
LOOP AT ITI.
read table iti with key ingr_code = iti-ingr_code
ingr_desc = iti-ingr_desc.
wka1-ingr_code = iti-ingr_code.
wka1-ingr_desc = iti-ingr_desc.
wka1-conc = iti-conc.
wka1-quantity = iti-quantity.
wka1-uom = iti-uom.
append wka1 to itf.
ENDLOOP.
WHEN 'SAV'.
loop at itf where check = 'x' .
update zacg_ns
set ingr_code = itf-ingr_code
col_name = itf-ingr_desc
conc = itf-conc
quantity = itf-quantity
UOM = itf-UOM
ru = itf-ru
where ingr_code = itf-ingr_code
and col_name = itf-ingr_desc.
zacg_ns-ingr_code = itf-ingr_code.
zacg_ns-col_name = itf-ingr_desc.
zacg_ns-conc = itf-conc.
zacg_ns-quantity = itf-quantity.
zacg_ns-UOM = itf-UOM.
update zacg_ns.
endloop.
leave program.
ENDCASE.
ENDMODULE. " USER_COMMAND_0112 INPUT
MODULE read_table_control INPUT
MODULE read_table_control INPUT.
MODIFY itf INDEX tc-current_line.
ENDMODULE. "read_table_control INPUT
*& Include ZACG_NS_2 *
*& Module STATUS_0111 OUTPUT
text
MODULE STATUS_0111 OUTPUT.
SET PF-STATUS 'ZNEWSHADE'.
SET TITLEBAR 'ZNS'.
ENDMODULE. " STATUS_0111 OUTPUT
*& Module STATUS_0112 OUTPUT
text
MODULE STATUS_0112 OUTPUT.
SET PF-STATUS 'ZTC'.
SET TITLEBAR 'xxx'.
DESCRIBE TABLE itf LINES lines.
tc-lines = lines.
ENDMODULE. " STATUS_0112 OUTPUt
PROCESS BEFORE OUTPUT.
MODULE STATUS_0112.
LOOP at itf WITH CONTROL TC CURSOR tc-current_line.
MODULE TC_PBO .
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP at itf .
module read_table_control.
ENDLOOP.
MODULE USER_COMMAND_0112.
Can any one help me..Hi,
Did you enter that filed later after creating the table control?
You check in the element list whether for that element u have an entry or not..
Regards,
Nishant
Maybe you are looking for
-
When I first imported music from my CDs onto my iTunes library, all the songs appeared, but those with the album artist and guest/additional artists they appeared in their own album under the same album name. After searching through iTunes help and s
-
IPhone photos not showing in places on iPad
If I take photo on iPhone it shows ok in my iPad photostream but does not appear in places. Shows ok in places on iPhone. If I take photo on iPad it shows ok in places on iPad but not iPhone. This was working ok, noticed it stopped about a week ago.
-
Can't edit outlook email in HTML- whole message replaced with "undefined".
In editing the html of messages in Outlook using Firefox browser, I click on options -> edit in HTML and whether or not I do anything to change the email whilst in the HTML editing option, as soon as I click on Rich Text to check the formatting etc t
-
hi! i currently have in my system, a running apache working hand in hand with OC4J. I'm trying to distribute the webserver load of my system by limiting all the static elements (eg, html, images) to apache and leaving all dynamic elements (servlets,
-
How can i travers the rows of JTable?
Hi all; i have Jtable with check box column,the user can check the checkbox of the rows he need to delete & then click on the delete button my problem is to know the selected rows. can anyone help me?