You are on page 1of 2
zavoarzats ‘SAP ABAP Table Control explained in eat BUILOAFREE WeesTe Plague! Ee OF YOUR OWNON sae eseemrcaneriret sy a e @TRIPOD ES pa pR0/con SAP PM & ABAP Code Niraj Visnoi SAP ABAP Table Control explained in detail ‘Table Control explained starting from concept.Runtime modification of Tabel Control using CXTAB_CONTROL structure . BasicConcepts Input Help Sepl.oop Table Contol ListBox SubSeren TabSt Artibutes& Creation. CTAB CONTROL, Modification TABLE CONTROL ‘These ae the screen elements uses to dlspay tabular data they can be calles as screen table like STEP LOOP). To use lable contol we have fo create It onthe sereen using SCREEN PAINTER(SES!) and declare conta variable of TYPE TABLEVIEW uting CONTROLS Statement in the ABAP program. We nave fo use LOOP .. ENDLOOP statement in both PBO and PAL wih or without AT inl_table parameter. IF AT int table parameter isnot used than we have ta place a MODULE cal tween the LOO.--ENDLOOP statement to fil the seroen table rove fram the AB program in PEO and program our awn seroling functions using OK_CODE fel Having a Baal! loopat screen table rows & Int table rows) by using parameter AT in table makes the ABAP code timate A special structure of type CXTAB_CONTROL is used to selget various atbtes of table contol a runtine Ike CURRENT_LINE ,TO?_LINE. ABAP declaration CONTROLS: tab_con TYPE TABLEVIEW USING SCREEN nonn Here tab_con is he same name we Used in soreen forthe table conto ‘This ABAP statement wil dsclare a contol variable that vil e used to access the tae contol. and sets various attributes Ike numberof fixed columns (ab_con-FIXED_COLS) total numberof fecorés it wil display(tab_cor-LINES) is oflype CXTAB_CONTROL and is a deep Stuctue(stuctire containing structures) REFRESH CONTROL tab_con FROM SCREEN nan “This ABAP statement wil tlie the fable carl on the screen nen to ts itil value. BO processing In PEO we have to use the screen LOOP ..ENDLOOP statement, wth o without intena abe, LOOP WITH CONTROL tab_con MODULE fil tat con ENDLOOP, Here @ module shoul be called between the lap endloop statement o transfer data from th ABAP program tothe screen table ough a stucture. This made shoud Ute the CURRENT LINE attibute ofthe table conl variable to get the Curent sereen fale record inex to read the data om the intemal able into @ werk area, 29 READ TABLE int table INDEX tab_con-CURRENT. LINE ‘The recor read il be placed in tha header ne of The sternal table and val be avalible to the similarly named screen fields orf these are ciferent k can be unten explicitly. ©. Screen fleld name = it table fel name. LOOP AT int table INTO workarea WITH CONTROL. tab_con CURSOR | FROM ni Tone ENDLOO?, re the module call snot Iype | intating wich absolute i should be the frst to splay on the table control FROM nt TO n2 can be used toresiret the starting ine and ending line number of the inlemal table, they are of type SY-TABIK creen table The CURSOR parameter Isa integer of In both cases before the LOOP stalement a module shouldbe called which is generally for seftng of status .n which we shoul fl the LINES atroute (tab con-LINES ) of to conto wth the ttal number of intemal table records doing tis ensures covet and automatic scrling ‘The ABAP statement DESCRIBE TABLE int table LINES lines can be used to'get the tia lines in arin table PAI Processing "We have fo use LOOP ... ENDLOOP in PAI so that data can transfer fro table control to ABAP program. Ie wort to write charges to te data we should tala marie betwwen the LOOP ... ENDLOOP. The MODULE cal to process user commands (SY- UUCOM) should be caled ater the ENDLOOP statement biipssapnirasripod como. 1” zavoar201s [SAP ABAP Table Control explained in eat 23 PROCESS AFTER INPUT [MODULE mod AT EXIT-COMMAND. LOOP ata 0° LOOP "depending on whether we are using AT int table MODULE modi ENDLOOP. MODULE User command Inthe MODULE eal fable we can use MODIFY in, table FROM workarea INDEX taly_cor-CURRENT_UINE ins Yablevield_rame = sereen fell name. To Favor inp sap na) pod com oogle Search [SAP ABAP Sue Code] © Search tp sap ni ipod com © Seach ww sarscogt xoaing_ SaPscrgt raplce ‘Slop Sawaniiey BaP Boks buon Pram To com Mra Vino!" MOIA* rl winaipeorautantcon RUM SaaTtaTaTeT Copy zoo a apa Tosewoe o BUILD A FREE WEBSITE OF YOUR OWN ON, ©TRIPOD. ipsap ia tripod comida nen

You might also like