Table Control - Dinamic Height or show all lines
Hello experts,
I have a table control and I want to show all items of the internal table linked to the table control without any scroll.
There is a field in the table control option (SE51) call height where you can modify the lines in the table control.
My question is how can I control it dynamically deleting the scroll by the program?
Or as well if there is a possibility to make the table control make itself bigger depending on the number of lines are in the internal table?
Hi,
When u r entering the records in a table control. After teh entering 4or 5 records(it depends on u r transaction) when u want to move the pagedown. U have to write the code for automatically page down.
if it's for bdc. U have to write
perform bdc_insert using bdc_okcode p+.
This may not be correct syntax. slight variation will be there.
Rewardpoints if useful.
Regards
(YUGANDHAR.P)
Similar Messages
-
All of a sudden my mission control stopped showing all of the open applications. is there a button i hit by mistake? It only shows dashboard and the home screen.
Connect the iPod to your computer and let it charge for a couple of hours. The try to backup the iPod
iOS: How to back up and restore your content
Then
Photos
- If they are in an iPod backup then restore an iPod, iPhone or iPad from that backup. See the restore topic of:
iOS: How to back up
- If they are in the iTunes backup then get them from the backup by:
Recover iPhone, iPad or iPod photos from backups with Picturescue
or
iPhone Backup Extractor for Windows and Mac
- If you used PhotoStream then try getting them from your PhotoStream. See that topic of:
iOS: Importing personal photos and videos from iOS devices to your computer
To try to make your iPod work see the following. It may end up erasing the iPod:
Try:
- iOS: Not responding or does not turn on
- Also try DFU mode after try recovery mode
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
- If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
- Try on another computer
- If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar -
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... -
Hi,
I have a proble in table control where my table control have 3 lines and when i enter three records i can see the records in table control scrren and when i want to add a 4 th line i need to press a BUTTON.when i press the button a new line inserted but i need to scroll to see the fourth record,but my req ments is to see the 4th record in the 3 rd line of the table control and 3 rd will be seen in the 2 nd line of the table control. Is there any good soultions to achieve this.
Thanks,
DeesanthHi Deesanth,
In the PBO of the screen just add code:-
tab_ctrl-lines = tab_ctrl-lines + 10. "tab_ctrl is name of table control
This will insert 10 extra line in the table control.
You can see these empty line when you scroll the vertical scroll bar of the table control.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir -
Issue with selecting a line on table control
Hello Experts,
We have a table control and using w/ SelColumn for selecting the highlighted line on a table control. It's working fine sometimes but not working in other cases. It's really wierd.
On this screen, under the Table Control, we have provided Bottons do some functionality.
When the users select a row and click on this push button, it has to call another pop-up screen.
We have the code like this:
PROCESS BEFORE OUTPUT.
MODULE INIT_0600.
LOOP AT T_qacomp_prt INTO qacomp_prt WITH CONTROL TC_qacomp_prt.
module fill_part_number.
MODULE Gray_Parts.
FIELD T_qacomp_prt-MARK.
module highlight_lines.
MODULE LINES_0600.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL_600 AT EXIT-COMMAND.
LOOP AT T_qacomp_prt.
FIELD T_qacomp_prt-MARK.
MODULE READ_TABLE_CONTROL_600.
ENDLOOP.
MODULE USER_COMMAND_0600.
In User-Command the code is like this:
MODULE USER_COMMAND_0600 INPUT.
when 'ADD'.
if t_qacomp_prt-mark = 'X'.
get cursor line lin.
call screen 0615 starting at 30 15.
else.
message i999(zxx) with 'Please select a line'.
endif.
For eg, When there are 5 lines on the table control, If I select the 2nd line and click on "ADD", it is calling the pop-up correctly.
However, If I select the 4th line and click on "ADD" button, it is giving the message "Please select the line".
PS: PBO, PAI code already exists, I only added the "USER-COMMAND" code.
Can you please let me know what went wrong? I greatly appreciate your help.
Thanks.Hi,
Provide a Check box for that table control. Declare that Check box field as Type c in Main program. Go to screen PAI module write code for deleting that lines by clicking one button using sy-ucomm. Delete it where is_chk = 'X'..like try -
Can Table Control alternate on line color?
Is it possible to change line color on Table Control? I would like the lines on the Table Control to alternate in color as to make it easier to read the data. I tried using screen-intensifed but that changes the color on a column, I need to make every other row stand out.
Thanks
Edited by: Gary Morman on Mar 11, 2010 9:17 PMALV Grid is editable if using the CL_GUI_ALV_GRID class. See programs which start with BCALV_EDIT*
Regards,
Rich Heilman -
How to edit and update table control into database?
I am doing table control. Here are my codes:
*& Report ZHERA_TABLE2
REPORT ZHERA_TABLE2.
***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'ZTABLE_CONTROL'
*&SPWIZARD: DEFINITION OF DDIC-TABLE
TABLES: ZHERA.
*&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'ZTABLE_CONTROL'
TYPES: BEGIN OF T_ZTABLE_CONTROL,
NAME LIKE ZHERA-NAME,
AGE LIKE ZHERA-AGE,
END OF T_ZTABLE_CONTROL.
*&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'ZTABLE_CONTROL'
DATA: G_ZTABLE_CONTROL_ITAB TYPE T_ZTABLE_CONTROL OCCURS 0,
G_ZTABLE_CONTROL_WA TYPE T_ZTABLE_CONTROL. "work area
DATA: G_ZTABLE_CONTROL_COPIED. "copy flag
*&SPWIZARD: DECLARATION OF TABLECONTROL 'ZTABLE_CONTROL' ITSELF
CONTROLS: ZTABLE_CONTROL TYPE TABLEVIEW USING SCREEN 1000.
START-OF-SELECTION.
CALL SCREEN 1000.
*&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE_CONTROL'. DO NOT CHANGE THIS LI
*&SPWIZARD: COPY DDIC-TABLE TO ITAB
MODULE ZTABLE_CONTROL_INIT OUTPUT.
IF G_ZTABLE_CONTROL_COPIED IS INITIAL.
*&SPWIZARD: COPY DDIC-TABLE 'ZHERA'
*&SPWIZARD: INTO INTERNAL TABLE 'g_ZTABLE_CONTROL_itab'
SELECT * FROM ZHERA
INTO CORRESPONDING FIELDS
OF TABLE G_ZTABLE_CONTROL_ITAB.
G_ZTABLE_CONTROL_COPIED = 'X'.
REFRESH CONTROL 'ZTABLE_CONTROL' FROM SCREEN '1000'.
ENDIF.
ENDMODULE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE_CONTROL'. DO NOT CHANGE THIS LI
*&SPWIZARD: MOVE ITAB TO DYNPRO
MODULE ZTABLE_CONTROL_MOVE OUTPUT.
MOVE-CORRESPONDING G_ZTABLE_CONTROL_WA TO ZHERA.
ENDMODULE.
Screen 1000 codes:
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'ZTABLE_CONTROL'
MODULE ZTABLE_CONTROL_INIT.
*&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_COL_ATTR.
LOOP AT G_ZTABLE_CONTROL_ITAB
INTO G_ZTABLE_CONTROL_WA
WITH CONTROL ZTABLE_CONTROL
CURSOR ZTABLE_CONTROL-CURRENT_LINE.
*&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_FIELD_ATTR
MODULE ZTABLE_CONTROL_MOVE.
ENDLOOP.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'ZTABLE_CONTROL'
LOOP AT G_ZTABLE_CONTROL_ITAB.
CHAIN.
FIELD ZHERA-NAME.
FIELD ZHERA-AGE.
ENDCHAIN.
ENDLOOP.
*&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_COL_ATTR.
MODULE USER_COMMAND_1000.
Please show me where to put my codes to edit(edit directly on table control fields) and update my table control(using the 'save' button)?Hi,
You have to put the following code in the PBO of screen 1000.This code would make the fields editable to make changes in the table control fields directly.
Here there are 3 transactions.For create and change transactions, the fields will be in editable mode and for display transaction,they will be non editable mode.
DESCRIBE TABLE tb_line LINES lin. " tb_line is the name of the internal table for the table control
tcl_item-lines = lin. '' lin hold the number of lines of the internal table
CASE sy-tcode.
WHEN 'ZCREATE09' OR 'ZCHANGE09'.
***Checking if the table control is empty or not***
IF lin NE 0.
LOOP AT SCREEN.
***To make the screen editable****
screen-input = 1.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-name CS 'TB_LINE'.
****To make the screen non-editable if no values are present in the
***table control****
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Once the fields are edited and the save button is pressed,the entered values have to be populated into the Z tables.The code has to written in the PAI of the screen 1000.Here the values from the work area of the internal table are moved into the Z Table. The code will be.
LOOP AT tb_line.
ztm09_ekpo-ebeln = ztm09_ekko-ebeln. "ztm09_ekko and ztm09_ekpo are the names of the Z Tables.
ztm09_ekpo-ebelp = tb_line-ebelp.
ztm09_ekpo-matnr = tb_line-matnr.
ztm09_ekpo-menge = tb_line-menge.
ztm09_ekpo-meins = tb_line-meins.
ztm09_ekpo-netpr = tb_line-netpr.
ztm09_ekpo-waers = tb_line-waers.
*****Update the entries into item table*****
MODIFY ztm09_ekpo.
ENDLOOP.
Reward if helpfull
Thanks,
Kashyap -
REFRESH OF TABLE CONTROL.
HI GURUS,
I AM USING TWO TABLE CONTROLS AND WANT TO SHOW THE SELECTED RECORDS IN THE SECOND TABLE CONTROL,
ACTUALLY FOR THE FIRST TIME IF I SELECT RECORDS IT IS SHOWING CORRECTLY IN THE SECOND TABLE CONTROL BUT
WHEN I AM BACK TO FIRST TABLE CONTROL AND AGAIN SELECT THE RECORDS,AFTER CLICK OK BUTTON THE SECOND
TABLE CONTROL IS NOT SHOWING THE FRESH ONE,EVERY TIME IT REQUIRES TO EXIT FROM THE PROGRAM,THEN IT WORKS PROPERLY.
I AM GIVING THE CODE FROM FLOW LOGIC OF TWO SCREENS AND INTERNAL TABLE USED FOR TABLE CONTROL.
<< Moderator message - please do not use ALL CAPS when posting - it makes your question harder to read. >>
FLOW LOGIC OF FIRST SCREEN
PROCESS BEFORE OUTPUT.
MODULE STATUS_2500.
LOOP AT x_ekpo WITH CONTROL tabcon CURSOR
tabcon-current_line.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE select_material.
loop at x_ekpo .
MODULE UPDATE_TAB.
endloop.
MODULE USER_COMMAND_2500.
IN SE38
MODULE user_command_2500 INPUT.
WHEN 'OKAY'.
LOOP AT x_ekpo WHERE check = 'X'.
APPEND x_ekpo TO x_ekpo3.
ENDLOOP.
ENDMODULE.
MODULE update_tab INPUT.
LOOP AT x_ekpo.
IF x_ekpo-check = 'X'.
MODIFY x_ekpo INDEX sy-stepl TRANSPORTING check.
ENDIF.
ENDLOOP.
ENDMODULE. " UPDATE_TAB INPUT
FLOW LOGIC FOR SECOND SCREEN.
PROCESS BEFORE OUTPUT.
MODULE STATUS_2501.
LOOP AT x_ekpo3 WITH CONTROL tabcon2501 CURSOR
tabcon2501-current_line.
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_2501.
LOOP.
ENDLOOP.
Edited by: Rob Burbank on Jan 2, 2010 5:08 PMHi,
As per my understanding, you need to display the 2nd Table Control with fresh data every time you click the OK Command Button. So, you need to REFRESH the Table Control in the 2nd screen every time the PBO is triggered based on the OK Command Button. You can use the following code to Refresh the Table Control.
Syntax :
REFRESH CONTROL contrl FROM SCREEN dynnr.
Have a look at the following link from SAP HELP.
http://help.sap.com/abapdocu_70/en/ABAPREFRESH_CONTROL.htm
Hope this helps.
Thanks,
Samantak. -
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 -
How to change the colums of a table control scrollable?
Hi Guys,
I have one table control in my webdynpro component. Datais are filling to the table dynamically . Fields also may vary depending on the requirement.if some 20 or 30 fields are filling into my table in the run time, then i need to scroll the fields. Each field should be scrollable. Using which property of the table i can achieve this.??
Can u people help me in this.
Thanks
SubinHi
Thanks for ur reply. Actually i am using this table control for search help. the same table control is using for the all search helps. if some 20 fields are there in th search result all the fields it is showing in my table control. eg. one costcentre field is there in my resultin table control. But it s showing only 'costcen' instead of 'costcentre.' It is not showin the resulting costcentre value also fully. for this i need to scroll the particular field alone for seeing the full value. This is my requirement.
If i am giving scrllable col count as 1 it is showing only one field. this is not wt i ws expecting.
Please try to give me a solution.
Thanks
Subin -
Query about screen as a structure used in table control.
hi all,
plz explain the fields in screen(structure).
when and how it is used.
specialy i/o, o/p,active,
plz give example.hi,
The screen elements text field, input/output field, status icon, group box, radio button, checkbox, and
pushbutton all have general attributes, Dictionary attributes, program attributes, and display attributes.
The elements subscreen, tabstrip control, and table control have general attributes, and special
attributes relating to the respective type.
We can divide the attributes of an element into:
Statically definable attributes that cannot be changed dynamically
Statically definable attributes that can be changed dynamically
Attributes that can only be changed dynamically
At the beginning of the PBO, the runtime system reads the statically-created and dynamically-modifiable
attributes of each screen element on the current screen into a system table with the line type SCREEN.
Dynamic changes to the attributes of screen elements are temporary.
Using this technique to modify the attributes of a screen element (for example, to change whether an
input/output field is ready for input), you can replace long sequences of separate screens, which are
more costly in terms of both programming time and runtime.
The system table with line type SCREEN will be called SCREEN system table in the following unit.
When a screen is processed, the SCREEN system table contains an entry for each element created in
the Screen Painter for that screen.
The system table SCREEN is initialized at the start of the PBO event for the current screen. To do this, a
system program copies the statically defined attributes of the individual screen elements into the table.
You can then change the dynamically-modifiable attributes of the elements on the screen in a module at
PBO using the following statements: LOOP AT SCREEN.
MODIFY SCREEN.
ENDLOOP.
To do this, you use the structure SCREEN, which is created automatically by the system, and filled with
the values of each successive line of the system table in the loop. Set attributes have the value '1',
attributes that are not set have the value '0'. To change the system table, use MODIFY SCREEN. within
the loop.
To find the element whose attributes you want to modify, you can use a LOOP on the SCREEN table,
and query one of the following fields: SCREEN-NAME, SCREEN-GROUP1 to SCREEN-GROUP4.
You can change the attributes of several screen elements simultaneously at runtime, by including them
in a modification group in the Screen Painter. Assign all elements that will be changed within a single
processing step to a group in the Screen Painter.
To do this, enter a group name for each of the relevant elements in one of the fields GROUP1
GROUP4.
You can include each element in up to four modification groups. You can choose any three-character
sequence for the group name. You can assign elements to a modification group either in the element list
or the layout editor in Screen Painter.
You must program your screen modifications in a module that is processed during the PROCESS
BEFORE OUTPUT processing block.
You use a loop through the table SCREEN to change the attributes of an element or a group of
elements. (LOOP AT SCREEN WHERE . . . and READ TABLE SCREEN are not supported).
To activate and deactivate attributes, assign the value 1 (active) or 0 (inactive), and save your changes
using the MODIFY SCREEN statement.
Note that elements you have defined statically in the Screen Painter as invisible cannot be reactivated
with SCREEN-ACTIVE = 1. Instead, use the statement SCREEN-INVISIBLE = 0. However, elements
that you have statically defined as visible in the Screen Painter can dynamically be made invisible. This
has the same effect as the three statements SCREEN-INVISIBLE = 1, SCREEN-INPUT = 0, SCREENOUTPUT
= 0.
There are three steps involved in displaying buffered data from the internal table in the table control:
The system loops through the lines of the table control on the screen. The lines of the screen table are
processed one by one. For each line, the system carries out the following steps:
The current line of the internal table is placed in the work area of the internal table. (Note that it is
possible to scroll in the table on the screen).
The data from the work area of the internal table is copied into the relevant line of the table control.
When you use table controls on a screen, the automatic field transport sequence changes.
In the PBO processing block, data is transferred from the ABAP program to the screen after each loop
pass in the flow logic. The rest of the screen fields are filled, as normal, at the end of the PBO.
In the flow logic, the loop statement
LOOP AT <itab> INTO <wa_itab> WITH CONTROL <tc_name>
starts a loop through the screen table, and reads the line of the internal table corresponding to the
current line of the screen table, placing it in <wa_itab>.
<itab> is the name of the internal table containing the data, <wa_itab> is the name of the work area for
the internal table, and <tc_name> is the name of the table control on the screen.
If the fields in your table control have the same structure and name as those in the work area <wa_itab>,
the system can transport data between the ABAP program and the screen automatically (step 3).
If you are not using the same structure for the table control fields and the work area of the internal table,
you must call a module between LOOP and ENDLOOP that moves the data from the work area
<wa_itab> into the screen fields (MOVE-CORRESPONDING <wa_itab> TO ) .
The system calculates the value of <ctrl>-TOP_LINE when you scroll, but not when you scroll a page at
a time outside the table control.
In order to transfer changed values from the table control back to the internal table the following three
steps must be carried out:
The system loops through the lines of the table control. The lines of the screen table are processed
one by one. For each line, the system carries out the following steps:
The data from the current line of the table control is copied into the header line of the internal table.
The data in the work area must then be placed in the line of the internal table corresponding to the
line of the table control that is being processed. (Note that it is possible to scroll in the table on the
screen).
In the PAI processing block, all screen fields that do not belong to a table control and that are not listed
in a FIELD statement are transported back to the work fields in the ABAP program first.
The contents of the table control are transported line-by-line to the corresponding work area in the ABAP
program in the appropriate loop.
As usual, the fields that occur in FIELD statements are transported directly before that statement.
The structure of the screen tables contain.
NAME
GROUP 1
GROUP 2
GROUP 3
GROUP 4
OUTPUT
REQUIRED
LENGTH
INTENSIFIED
INVISIBLE
ACTIVE
Hope this helps, Do reward.
Edited by: Runal Singh on Mar 13, 2008 10:41 AM -
Dynamic rows increment according to user input in Table Control Module Pool
HI All,
I'm doing a Table Control module pool Program. Now suppose there are two fields - MATNR & MAKTX.
Our requirement is while weu2019ll give the material No (MATNR field), material desc. will be populated in corresponding field (MAKTX field),
Now the problem is, while we are entering Material No. in 1st row it is Material Desc. coming in to corresponding field but while the data is given to next row it replaces the 1st rows data .
eg - ............................... ........ MATNR.............................MAKTX
1st entry in 1st row ..................... 23................................... XXX --after pressing 'ENTER' mat desc XXX comes. now 2nd entry in 2nd row 24 .............................. YYY --after pressing 'ENTER'
1st row details like MATERIAL NO(23) & Desc(XXX) got deleted & that is replaced by 24 YYY
We can not extend that no. of rows of Table Control Table more than one row.
If you kindly help me how it is possible to increase the no. of rows of that table dynamically without replacing the previous row it will be very helpful for me.
Thanks & Regards,
BiswajitHi Biswajit,
This probably means that the table control PAI is modifying the first line always in the internal table instead of current line
eg: we wite the code
loop at screen and then modify the internal table with current line
table_control => name of table control as given on screen
in PAI of the screen
loop at internaltable.
modify internaltable index table_control-current_line .
put a break point here and see*
it will always be updating the first record because of some reason - logic error or coding error*
endloop.
Also in PBO we can see that the internal table will be having just one record after the action mentioned above....it is a case of overwrite
To simply increment the number of lines
table_control-lines = table_control-lines + 1. in PAI
Pls check and revert
Hope it helps
Regards
Byju -
Adding quantity field for the same material number in Table control
Hello Experts,
I have an requirement, where I need to add the quantity field when the material number is repeated in a table control.
Here I show the pop-up message "Material already exists, do you want to add the quantity". If the user clicks on Yes I need to add the quantity.
I created the pop-up message using the FM " POPUP_TO_CONFIRM" and tried to add the quantity filed using COLLECT statement but I couldn't because my non-numeric field value will be different and it will insert new entry with same material in my internal table.
I have a z data base table & internal table with the below fields in it.
Best Regards,
Manihi deepthi,
chk a sample one which will help u. <b><i>f4 hlp in table control</i></b>
* Screen flow logic........
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD EKPO-EBELP MODULE help_ekpo.
* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*& Module help_responsibility INPUT
* text
MODULE help_ekpo INPUT.
**Transport values to table dynpro/screen table control
DATA: l_stepl LIKE sy-stepl,
l_indx LIKE sy-stepl.
DATA: dynpfields LIKE dynpread OCCURS 5 WITH HEADER LINE.
* Adjust for scroling within table control
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = l_stepl
EXCEPTIONS
stepl_not_found = 0
OTHERS = 0.
l_indx = tc_ekpotable-top_line + l_stepl - 1.
"tc_ekpotable should already have been declared
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'EKPO-EBELN'.
dynpfields-fieldvalue = '00010' "wa_ekpo-ebeln.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'EKPO-EBELP'.
dynpfields-fieldvalue = '00020' "wa_ekpo-ebelp.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'SAPLZZ_EKKO' "Program name
dynumb = '0100' "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
ENDMODULE. " help_ekpo INPUT
rgds
Anver
<b><i>if hlped kindly mark points</i></b> -
Modifying table control in MIGO
Hi,
I'm trying to modify MIGO transaction, and I found the MB_MIGO_BADI Badi, but I have no idea how to modify the central table control, They want to show new column on it. If anybody had done this stuff before I will be very grateful.
Thanks in advance.
JanoHi,
They do not want to modify the lines, They wants to put another field on the table control, I'm seeing the sap sample (CL_EXM_IM_MB_MIGO_BADI) in the method line_modify it just to modify the line data just in case you want to change any data, am I wrong?
Thanks -
Hi All can someone tell me how to design the complete layout of a table control.
please tell me step-by-step process.
reward points for all useful anshi,
Step 1 (Create new structure for table control)
Type is name of structure (ZTC_EKKO) and press create
Step 2 (Create Program)
Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
Enter your program name, please ensure that is begins with SAPMZ as this is a module pool (dialog program).
Press enter to create, and press yes!
Ensure that you create a top include, and press Enter.
Accept the name created for the top include.
Press Enter.
Press Save
Step 3 (Create TOP include)
Double click on the top include and enter following ABAP code:
Tables: ZTC_EKKO.
controls: tc100 type tableview using screen 100.
data: ok_code type sy-ucomm.
data: it_ekko type standard
table of ZTC_EKKO initial size 0,
wa_ekko type ZTC_EKKO.
data: ok_code type sy-ucomm.
Press Save and Activate
Step 4 (Create screen)
Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
Step 5 (Create table control)
Press the Layout button to bring up the screen painter editor.
Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
Step 6 (Populate table control )
Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the Get from Dict button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
Step 7 (Create flow control )
Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
module data_retrieval.
loop at it_ekko into wa_ekko with control TC100.
module populate_screen.
endloop.
PROCESS AFTER INPUT.
loop at it_ekko.
endloop.
MODULE USER_COMMAND_0100.
Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
***INCLUDE MZ_TCONTROL_DATA_RETRIEVALO01 .
*& Module data_retrieval OUTPUT
text
MODULE data_retrieval OUTPUT.
select data from ekko table
SELECT ebeln bukrs bstyp bsart
bsakz loekz statu aedat
UP TO 10 ROWS
FROM ekko
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDMODULE. " data_retrieval OUTPUT
Double click the module populate_screen to create. Now move the values in this loop from the wa_ekko into the Table Control with the move-corresponding statement.
MODULE populate_screen OUTPUT.
DATA: ld_line TYPE i.
Set which line of table is a top of displayed table control
IF sy-stepl = 1.
tc100-lines =
tc100-top_line + sy-loopc - 1.
ENDIF.
move fields from work area to scrren fields
MOVE-CORRESPONDING wa_ekko TO ztc_ekko.
ENDMODULE. " populate_screen OUTPUT
Step 8 (Create transaction )
Now create a transaction to test the table control program. Right click the Program and select create-> transaction.
Step 9 (Execute transaction )
Execute transaction ZTC
but table contro wizrd automatically generates the code. try it
reward if its useful.
Maybe you are looking for
-
Can't Connect to WVC54GC wired or wireless
I'v e had this camera for year and had no issues until I changed my router from a Belkin F5D7231-4 to D-Link DIR-825. Ive reset camera to default but can't ping 192.168.1.115. I turn off my Firewall and still no luck. Any help would be greatfull!
-
Odd Problem with iTunes store-buying an album
I'm trying to buy the Deluxe edition of Straight Outta Lynwood, but when I click on "Buy Album," it says I already bought it, and says to click "Ok" so I can download it. However, it doesn't download. I clicked on "Check for Purchases" in the menu, a
-
How can i set the focus to the first editable cell in a JTable?
-
Use of button throughout movie
Hey, I'm fairly new to Adobe Flash and I've been looking around for an answer to this question so it's either really simple, or I did find something that's hard to answer. I am trying to create an interactive map of the computer lab I work in. Right
-
DW CS3 for Vista and Mac OS compatibility
Hi I use Dreamweaver CS3 on Windows Vista. I also have a Mac OS laptop. I am thinking of Running the MAc version of Dreamweaver on the Laptop. Would the files between the two systems be interchangeable. In other words, if I created a site on the Vist