Fcode in Table Control
Dear Friends,
I have developed a screen with table control with 1 column created pushbutton with function code PB%%.
But the problem when i click pageup or pagedown the fcode is reintialize with line number. For eg. for line 7th after page down is showing PB02 instead of PB07.
Kindly adivce.
Thanks
Praveen Lobo
Dear Friends,
I have developed a screen with table control having one column created pushbutton with function code PB%%.
But the problem when i click pageup or pagedown the fcode is reintialize with line number. For eg. for line 7th after page down is showing PB02 instead of PB07.
Kindly adivce.
Thanks
Praveen Lobo
Similar Messages
-
Using Insert and Delete icons in table control wizard.
Can anyone tell me how to perform a new row insertion or deletion in a table created using the table control wizard.
I see there is a form fcode_insert_row and fcode_delete_row, but dont know how to call them and what parameters to pass and all.
Since iam new to SAP-ABAP, some code samples will be a great help.
Thanks to all in advance.Hi Lavanya ,
You have to add the icons personally in the table control.. . Put fcode for addition button as INSE and delete as DELE ..coding will be already thr in the wizard no need to anything just add icons in the table control by selecting from f4 help on icons option of screen.
Thanks,
Vishnu . -
How to find out the selected line in the table control
Hi Guys,
i have a requirement like this. i have table control and the internal table for that table control as IT_CASE. this internal table i declared as CHECKBX, MATNR, QUANTITY. but when i am enter the values in the table control i am getting the values in MATNR and QUANTITY in the that internal table IT_CASE. but when iam selecting that that line iam not getting CHECKBOX as 'X' in that internal table IT_CASE. i declared the table control as CAS_CONTROL and in that i have given the "w/selcolum" property as IT_CASE-CHECKBOX. now i want to fill that CHECKBOX as 'X' inthat internal table IT_CASE whatever the lines we are selecting only for those lines i want to fill up as 'X' in that internal table.
Can you please suggest any one reg this.
Thanks in advance
RahulHello body,
You can give a name such as 'SEL' in w/selcol and declare SEL as char1. Then follow the coading.
in TOP.
data: sel type c.
PROCESS AFTER INPUT.
user_command_0011.
loop at <Your internal table>.
module get_data.
endloop.
Inside Module get_data.
if sy-ucomm = <Your Fcode>
if sel = 'X'.
<Your internal table>-<Field for checkbox> = 'X'.
append <Your internal table>.
endif.
endif.
I think your issue is resolved.
Regards.
S Mahanta. -
What are the uses of table control and tabstrip control
can anyone tell me the uses of table control and tabstrip control
Hi,
table control is more comfortable for customizing.scroll bars all possible in this.where as it is not possible in step loops.
check this example.
PROGRAM ZBHTCTRL.
TABLES: LFA1, EKKO.
DATA: OKCODE1 LIKE SY-UCOMM,
OKCODE2 LIKE SY-UCOMM.
CONTROLS TABC TYPE TABLEVIEW USING SCREEN 1001.
DATA: BEGIN OF ITAB OCCURS 0,
MANDT LIKE EKKO-MANDT,
EBELN LIKE EKKO-EBELN,
BSTYP LIKE EKKO-BSTYP,
BSART LIKE EKKO-BSART,
END OF ITAB.
MODULE USER_COMMAND_1000 INPUT.
CASE OKCODE1.
WHEN 'BACK'.
SET SCREEN 0.
WHEN 'NEXT'.
SET SCREEN 1001.
SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE
LIFNR = LFA1-LIFNR.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 INPUT
MODULE MOVE_DATA OUTPUT.
EKKO-MANDT = ITAB-MANDT.
EKKO-EBELN = ITAB-EBELN.
EKKO-BSTYP = ITAB-BSTYP.
EKKO-BSART = ITAB-BSART.
ENDMODULE. " MOVE_DATA OUTPUT
MODULE USER_COMMAND_1001 INPUT.
CASE OKCODE2.
WHEN 'BACK'.
SET SCREEN 1000.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 OUTPUT
MODULE STATUS_1001 OUTPUT.
SET PF-STATUS 'MENU'.
SET TITLEBAR 'TIT'.
ENDMODULE. " STATUS_1001 OUTPUT
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'DMENU'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_1000 OUTPUT
FORM ON_CTMENU_FORM1 USING CMENU TYPE REF TO CL_CTMENU.
CALL METHOD CMENU->LOAD_GUI_STATUS
EXPORTING
PROGRAM = ' ZBHTCTRL'
STATUS = 'CMENU'
MENU = CMENU.
CALL METHOD CMENU->ADD_FUNCTION
EXPORTING
FCODE = 'RX'
TEXT = 'RECIEVE'.
ENDFORM.
FLOW LOGIC:
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1001.
LOOP AT ITAB WITH CONTROL TABC CURSOR TABC-TOP_LINE.
MODULE MOVE_DATA.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1001.
LOOP AT ITAB.
ENDLOOP.
for more info check this link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
thanks
Ashu. -
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 -
Unable to Update data in Ztable (dbase) through Table Control.
Hi Experts.
I am able to pull dta from Ztable into table control and also able to insert a new line and delete a row from table control. But after trying a lot I am unbale to pass the same from Table control to Ztable.
Any ideas. Seems like here Update of Ztable needs some different treatment.
PLZ LOOK into the code in red only. rest are for reference.
The code on the Flow Logic Screen:
PROCESS BEFORE OUTPUT.
module init_100.
LOOP At it_auftrag1 with CONTROL tctrl1 cursor tctrl1-current_line.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT it_auftrag1.
Module modify_it_auftrag1.
ENDLOOP.
MODULE fcode_100.
MODULE USER_COMMAND_9000.
The code on main Screen (Mod. Pool Screen ) follows:
PROGRAM SAPMZDEMO_MPOOL_06.
TABLES: ZLT_Auftrag1, ZLT_Kunde.
DATA: fcode2(4), fcode(4). "OK_Code.
CONTROLS : tctrl1 type TABLEVIEW USING SCREEN '9000'.
DATA: col TYPE cxtab_column.
DATA: demo_cprop, demo_tprop.
DATA: Begin Of it_Auftrag1 occurs 20,
marked.
include structure ZLT_auftrag1.
DATA: END OF it_Auftrag1.
DATA: linno TYPE i.
DATA: fld(20).
DATA: off TYPE i.
module fcode_100 input.
endmodule. " fcode_100 INPUT
module modify_it_auftrag1 input.
modify it_Auftrag1 index tctrl1-current_line.
endmodule. " modify_it_auftrag1 INPUT
module init_100 output.
set pf-status 'ZSTATUS01'.
Describe Table it_auftrag1 lines tctrl1-lines. "TO add Scroll Bar to Table Control1
UPDATE ZLT_Auftrag1 From it_auftrag1.
endmodule. " init_100 OUTPUT
module USER_COMMAND_9000 input.
CASE sy-ucomm.
*To Populate Data into Kunde through Pushbuttons
When 'OK_GETK'.
IF ZLT_Kunde-K1 is NOT INITIAL.
SELECT SINGLE *
FROM ZLT_Kunde
Where K1 = ZLT_KUNDE-K1.
IF ZLT_Kunde-K1 is NOT initial.
Select *
From ZLT_Auftrag1
INTO Corresponding fields of TABLE it_auftrag1
Where A3 = ZLT_Kunde-K2.
ENDIF.
ELSE.
MESSAGE S000(8i) With 'Enter Kunde Name'.
ENDIF.
when 'DELL'.
* remove marked lines
delete it_auftrag1.
loop at it_auftrag1 where marked = 'X'.
UPDATE ZLT_Auftrag1 From it_auftrag1.
endloop.
if sy-subrc <> 0.
get cursor field fld line linno offset off.
set cursor field fld line linno offset off.
if fld cp 'IT_auftrag1*' and sy-subrc = 0.
linno = linno + tctrl1-top_line - 1.
delete it_auftrag1 index linno.
tctrl1-lines = tctrl1-lines - 1.
endif.
endif.
When 'INSL'.
* insert line above cursor position
get cursor field fld line linno offset off.
set cursor field fld line linno offset off.
if fld cp 'IT_auftrag1*' and sy-subrc = 0.
if linno >= 1.
linno = linno + tctrl1-top_line - 1.
clear it_auftrag1.
insert it_auftrag1 index linno.
tctrl1-lines = tctrl1-lines + 1.
else.
clear it_auftrag1.
append it_auftrag1.
tctrl1-lines = tctrl1-lines + 1.
endif.
endif.
When 'SAVE'.
loop at it_auftrag1 where marked = 'X'.
* Modify it_Auftrag1.
Modify ZLT_Auftrag1 From it_Auftrag1.
Endloop.
IF sy-subrc = 0.
MESSAGE s000(8i) With 'Data Saved'.
ENDIF.
When 'BACK'.
Leave Program.
When 'OK_CLEAR'.
Clear : ZLT_KUNDE, ZLT_AUFTRAG1, it_auftrag1.
ENDCASE.
endmodule. " USER_COMMAND_9000 INPUT
Looking forward for your advice,
Regards
ChandanHi Venkat,
Thanks again. I will try ur suggestion too. In the meanwhile I did the following changes in the code:
Purpose: After data is getting pulled from dbase table (ZLT_Auftrag1) into internal table it_auftrag1 then and just after I press the button delete ( i.e. When the user command starts: When 'DELL' )
then I delete all the contents reflecting in it_auftrag1 from ZLT_Auftrag1, Now the Ztable is empty but it_auftrag1 holds all values. futher when loop starts then the Marked line gets deleted. Now at this stage the it_Auftrag1 contains all data of ZLT_auftrag1 except the line that I want to delete. If I am able to MODIFY the ZLT_auftrag1 from it_Auftrag1 at this stage then ZLT_Auftrag1 will again be populated with all those data except the line that I want to delete.
Here goes the code that I modified ( ref the code in my 1st post in red to compare)
WHEN 'DELL'.
* remove marked lines
* If it_Auftrag1-Marked = 'X'.
DELETE from ZLT_Auftrag1 where A3 = ZLT_kunde-K2.
* ENDIF.
IF sy-subrc = 0.
loop at it_auftrag1 where marked = 'X'.
DELETE it_auftrag1.
* INSERT ZLT_Auftrag1 From TABLE it_auftrag1 accepting duplicate keys.
* UPDATE ZLt_auftrag1 from TABLE it_auftrag1.
* MODIFY ZLT_Auftrag1 From TABLE it_auftrag1.
endloop.
* INSERT ZLT_Auftrag1 From TABLE it_auftrag1.
* UPDATE ZLt_auftrag1 from TABLE it_auftrag1.
* MODIFY ZLT_Auftrag1 From TABLE it_auftrag1.
* If sy-subrc = 0.
* MESSAGE S000(8i) With 'Data Deleted from Database'.
* ENDIF.
ENDIF.
MODIFY ZLT_Auftrag1 from it_Auftrag1. ==> This modification doesn't works.
If sy-subrc = 0.
MESSAGE S000(8i) With 'Data Deleted from Database'.
ENDIF.
if sy-subrc <> 0.
get cursor field fld line linno offset off.
set cursor field fld line linno offset off.
if fld cp 'IT_auftrag1*' and sy-subrc = 0.
linno = linno + tctrl1-top_line - 1.
delete it_auftrag1 index linno.
tctrl1-lines = tctrl1-lines - 1.
endif.
endif.
Looking forward for your suggestions.
Regards
Chandan -
How to retrieve data from Table Control
Hi,
I am a Beginner to ABAP. I want to know how to fetch the selected rows from Screen table control.
Here is my scenario:
I am having one table control with selection field. Once i select some rows means the selected rows are going to be stored in one Internal Table.
If any body knows the thing means please reply me the logic as well as giving me some code sample.
Thankyou.Hi Mithun,
Try to implement this code in your requirement.
There will be some button on your screen and after selecting some or all the records from the table control you must be pressing some button for collecting the selected rows from the table control too your internal table.
Put Fcode of that button in WHEN condition in this CASE.
CONSTANTS: kc_sel_flag TYPE char01 VALUE 'X'.
CASE sy-ucomm.
WHEN kc_sel.
PERFORM f_sel_desel USING kc_sel_flag.
ENDCASE.
FORM f_sel_desel
USING p_sel_desel TYPE c.
Set the value
wa_cond_type-z_sel = p_sel_desel.
Update the Itab.
MODIFY it_cond_type
FROM wa_cond_type
TRANSPORTING z_sel
WHERE mandt EQ sy-mandt. "Where cond is only to specify all
ENDFORM. " f_sel_desel
After that all the selected records will be having 'X' in the internal table.
Regards,
Mueksh Kumar -
Reg:How to delete the column in table control also from database table.
Hi Experts,
Once again thank u all for giving the responses.
one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
With Regards,
Saroja.P.Hi,
If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
"This portion of code inside the LOOP...ENDLOOP.
IF sy-ucomm eq 'F_DELETE'.
gt_itab2-check = mark. " Store the MARK field status into your internal table's correspoding field 'check'
MODIFY gt_itab INDEX tabcontrol-current_line.
ENDIF.
iF sy-ucomm eq 'DELETE1'.
DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
ENDIF.
Now you can modify your database table using the MODIFY statement.
MODIFY ZDB FROM TABLE gt_itab. -
How to delete the row in table control with respect to one field in module pool programming?
Hi,
Can I know the way to delete the row in table control with respect to one field in module pool programming
Regards
Darshan MSHI,
I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
I have written this code,
module USER_COMMAND_9000 input.
DATA OK_CODE TYPE SY-UCOMM.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'DELETE'.
LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
APPEND LS_SOURCE TO LT_RESTORE.
DELETE TABLE LT_SOURCE FROM LS_SOURCE.
SOURCE-LINES = SOURCE-LINES - 1.
ENDLOOP.
But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
So I thought of doing with respect to the field. -
HAI FRIENDS,
I HAVE DISPLAYED THE VALUES IN THE TABLE CONTROL
I HAVE DEFINED 'CHECK' FOR SELECTING THE FIELDS OF TABLE CONTROL
THE ISSUE STARTS HERE
WHEN I CHECK TOP FIELDS OF TABLE CONTROL
THEN SCROLLED VERTICALLY, THE TABLE CONTROL TO SELECT I.E CHECK THE
BOTTOM FIELDS OF TABLE CONTROL.
THE TOP FIELDS WATEVER CHECK WHERE CHECKS DISPAPEARS FOR TOP FIELDS .
BY THIS I UNABLE TO SELECT THE FIELDS OF TABLE.
PLZ HELP ME URGENTLY NEEDED.
MY MONDAY I NEEDEDYou use an internal table for values in table control..
One of the fields( very first field) in that itab is used for check - uncheck..
u have make it 'X' when u click any row...
I think this might be the problem in ur case.. when u scroll PAI starts... in that PAI check the value of check box for that particular field...
Regards
Prax -
How to populate data in table control .
hi all,
i put matnr no. in screen no. 103
validation is done at that screen only.
now when i want to modify dat record
when i put matnr no. at screen 103
so how i will get all data of dat number to table control screen.Hi Darshan,
Here is a detailed description of how to update data in table controll.
Updating data in table control
The ABAP language provides two mechanisms for loading the table control with data from the internal table and then storing the altered rows of the table control back to the internal table.
Method 1: Read the internal table into the Table Control in the screenu2019s flow logic. Used when the names of the Table Control fields are based on fields of the internal table.
Method 2: Read the internal table into the Table Control in the module pool code. Used when the names of the Table Control fields are based on fields of the database table.
Method 1 (table control fields = itab fields)
In the flow logic we can read an internal table using the LOOP statement. Define the reference to the relevant able control by specifying WITH CONTROL <ctrl>
Determine which table entry is to be read by specifying CURSOR <ctrl>-CURRENT_LINE.
After the read operation the field contents are placed in the header line of the internal table. If the fields in the table control have the same name as the internal they will be filled automatically. Otherwise we need to write a module to transfer the internal table fields to the screen fields.
We must reflect any changes the user makes to the fields of the table control in the internal table otherwise they will not appear when the screen is redisplayed after PBO processing, (eg, after the user presses Enter or scrolls) However, this processing should be performed only if changes have actually been made to the screen fields of the table control (hence the use of the ON REQUEST)
PROCESS BEFORE OUTPUT.
LOOP AT ITAB_REG WITH CONTROL TCREG
CURSOR TCREG-CURRENT_LINE.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT ITAB_REG.
MODULE MODIFY_ITAB_REG.
ENDLOOP.
MODULE MODIFY_ITAB_REG INPUT.
MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
ENDMODULE.
Method 2 (table control fields = dict. fields)
If using a LOOP statement without an internal table in the flow logic, we must read the data in a PBO module which is called each time the loop is processed.
Since, in this case, the system cannot determine the number of internal table entries itself, we must use the EXIT FROM STEP-LOOP statement to ensure that no blank lines are displayed in the table control if there are no more corresponding entries in the internal table.
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL TCREG.
MODULE READ_ITAB_REG.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL TCREG.
CHAIN.
FIELD: ITAB_REG-REG,
ITAB_REG-DESC.
MODULE MODIFY_ITAB_REG
ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE READ_ITAB_REG OUTPUT.
READ TABLE ITAB_REG INDEX TCREG-CURRENT_LINE.
IF SY-SUBRC EQ 0.
MOVE-CORRESPONDING ITAB_REREG TO TCREG.
ELSE.
EXIT FROM STEP-LOOP.
ENDIF.
ENDMODULE.
MODULE MODIFY_ITAB_REG INPUT.
MOVE-CORRESPONDING TCREG TO ITAB_REG.
MODIFY ITAB_REG INDEX
TCREG-CURRENT_LINE.
ENDMODULE.
Updating the internal table
Method 1
PROCESS AFTER INPUT.
LOOP AT ITAB_REG.
CHAIN.
FIELD: ITAB_REG-REG,
ITAB_REG-DESC.
MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE MODIFY_ITAB_REG INPUT.
ITAB_REG-MARK = u2018Xu2019.
MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
ENDMODULE.
Method 2
PROCESS AFTER INPUT.
LOOP WITH CONTROL TCREG.
CHAIN.
FIELD: TCREG-REG,
TCREG-DESC.
MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE MODIFY_ITAB_REG INPUT.
MOVE-CORRESPONDING TCREG TO ITAB_REG.
ITAB_REG-MARK = u2018Xu2019.
MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
ENDMODULE.
Updating the database
MODULE USER_COMMAND_100.
CASE OK_CODE.
WHEN u2018SAVEu2019.
LOOP AT ITAB-REG.
CHECK ITAB_REG-MARK = u2018Xu2019.
MOVE-CORRESPONDING ITAB_REG TO TCREG.
UPDATE TCREG.
ENDLOOP.
WHEN u2026
u2026
ENDCASE.
ENDMODULE.
Hope this will solve your problem.
Regards,
Pavan.
Edited by: PAVAN CHANDRASEKHAR GANTI on Aug 3, 2009 12:48 PM -
Update internal table data from table control
Hi GURUS,
I need help regarding one of my requirement.
I need to display data from the internal table on the screen and when the user selects a record/multiple records from screen and clicks on approve button i need to update one of the field from N to Y in the corresponding Ztable. Once the record is updated from Ztable , that should no longer be visible for the user on the screen.
I am using table control wizard to display data. I am able to update the Ztable, but that record is not refreshing from the user screen. Any suggestions would be approved.
Also please let me know if table control is the best way to do this/ alv grid control??hi
REFRESH CONTROL Control-Name FROM SCREEN '0100' -> use this command to refresh the table control
to know more, read into
https://forums.sdn.sap.com/click.jspa?searchID=2934287&messageID=673474
Re: URGENT HELP REQ IN TABLE CONTROL WIZARD
if helpful, reward
Sathish. R -
Validação de campos em um Table Control
Boa tarde.
Gostaria de pedir um auxilio .
Tenho uma duvida, na seguinte situação. Estou construindo um programa de Module Pool
Neste programa vai ter um tabstrip, para atualizar duas tabelas Z
Na primeira u201CABAu201D, serão inseridos os registros da tabela pai e na segunda u201CABAu201D, os registros da tabela
Filho a relação será de 1 para N.
Na tabela filho os campos chaves serão um identificador próprio , mais o registro chave da tabela pai.
Na segunda a aba para inserir os registros da tabela filho, terei que usar um table Control.
O meu problema é que ao inserir os registros na tabela filho, terei que de forma automática preencher o campo que corresponde a chave da tabela pai. Ou seja o usuário na primeira u201Cabau201D digamos digite o código da tabela pai como 10 ao inserir na table Control um registro o campo correspondente a chave da tabela pai devera ser preenchido com o valor 10 e não permitir ao usuário efetuar qualquer manutenção neste campo.
Como eu faço isso???
Alguém tem algum exemplo????
Obrigado a todosOlá, bom dia!
Este é um dessenvolvimento bem específico, talvez por isso ninguem lhe respondeu ainda. Voce já deu uma olhada na seção de Wiki, buscando algum código de exemplo?
Vai alguns links que encontrei:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e?QuickLink=index&overridelayout=true
http://wiki.sdn.sap.com/wiki/display/sandbox/ModulePoolProgramming
O primeiro link traz um exemplo de como torna um campo ineditavel via codigo. Espero que possa ajudar.
Abraços,
Rodrigo Paisante -
Capture field name in table control on double click
Hi,
How can I capture the field name of internal table passed to table control on double click?
I have set function code as 'PICK' and applied 'Respond to double click' and used GET CURSOR statement. Here I can get the values like row number (line number), field value also. But I would like to capture on which field the cursor is (or on which column the cursor is)?
Thanks in advance.
Regards
Ramesh.Got it.
We can capture it by using the statement GET CURSOR only.
GET CURSOR field <field xx> .
Here the <field xx> is the field name where we have said double click. -
How to activate the Vertival Scroll Bar to Table control
Hi All,
I Have created a Module pool table control(Wizard) with Input control,where user can enter the values in the screen.
In my screen 15 lines are visible,once i enter all 15 rows,vertical scroll bar is active,but rest of all lines are in deactivate mode.
My requirement is:Once i enter all the visible lines,the remaining lines should be in activ mode(In put control).
I appreciate your response.
Best Regards,
SeshadriDATA : BEGIN OF IT_MARA OCCURS 1,
MATNR LIKE MARA-MATNR,
ERSDA LIKE MARA-ERSDA,
ERNAM LIKE MARA-ERNAM,
MTART LIKE MARA-MTART,
MBRSH LIKE MARA-MBRSH,
V_FLAG TYPE C,
END OF IT_MARA.
DATA : WA_MARA LIKE it_MARA .
CONTROLS TABLE TYPE TABLEVIEW USING SCREEN 100.
MODULE POPULATE_100 INPUT.
CASE SY-UCOMM.
WHEN 'DISP'.
SELECT MATNR
ERSDA
ERNAM
MTART
MBRSH FROM MARA INTO WA_MARA .
APPEND WA_MARA TO IT_MARA.
ENDSELECT.
DESCRIBE TABLE IT_MARA LINES V_TEXT.
TABLE-LINES = V_TEXT.
CLEAR IT_MARA.
Regards..
Balaji ( assign if this helps u ..)
Maybe you are looking for
-
How to find out the user who locked the record
i can't delete a particular record from a table while executing the delete command its showing an error specifying that "ORA-02049: timeout: distributed transaction waiting for lock" syntax i used delete from <table_name> where <column_name>='<value>
-
How can I convert a Gift Certificate from Canadian Store to US Store?
My sister, who lives in Canada, bought us an iTunes gift certificate for Christmas. We tried to redeem it, but because she bought it through her account in the Canadian store, it is not accepted. Anyone know what we can do so we can use this money? I
-
How to find out the end of the file in java
hi friends, I am reading a file char by char. So how can I check for end of the file. I va a integer of the character and a string which has hex value of the character. but when I execute the pgm, it shows out of memory error. overflow of the heap. c
-
What do you do with older versions of Logic?
I have owned Logic back since Platinum 6, and now i have that version and 6 Pro just sitting around, in their massive boxes with those bible sized reference manuals. I'd like to get rid of them somehow but after checking with ebay, I don't think sell
-
Set default to Classic style control/indicator
Is it possible to set default to "classic style" control/indicator so that when I create a control/indicator from the block diagram, I will have a classic style control/indicator on the front panel? Somehow, I still like the classic style control/ind