How to display a table data on Screen having a Table control
Hi ,
I am new to ABAP.I would like to display a table data (Eg: ZDemo) on a screen at run time.I have defined a Table control in screen. Now I want to populate data from ZDemo to table control.How can I do that?Please help moving forward in this regard.
Hi Gayatri,
After creating table control do the following steps.
1. In the flow logic section write the following code:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
LOOP AT I_LIKP WITH CONTROL LIKP_DATA CURSOR LIKP_DATA-CURRENT_LINE.
MODULE ASSIGN_DATA.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0200.
LOOP AT I_LIKP.
ENDLOOP.
I_LIKP is the internal table which is used to display table data in the table control.
2. In Process Before Output, in the module STATUS_0200 write the following code:
DESCRIBE TABLE I_LIKP LINES FILL.
LIKP_DATA-LINES = FILL.
In Process After Input, in the module USER_COMMAND_0200 write the following code:
CASE SY-UCOMM.
WHEN 'LIPS'.
READ TABLE I_LIKP WITH KEY MARK = 'X'.
SELECT VBELN
POSNR
WERKS
LGORT
FROM LIPS
INTO TABLE I_LIPS
WHERE VBELN = I_LIKP-VBELN.
IF SY-SUBRC = 0.
CALL SCREEN 200.
ENDIF.
WHEN 'BACK'.
SET SCREEN 200.
ENDCASE.
In Process Before Output and in the module ASSIGN_DATA which is there inside the loop write the following code:
MOVE-CORRESPONDING I_LIKP TO LIKP.
So, Totally your flow logic code should be like this.
TABLES: LIKP, LIPS.
DATA: BEGIN OF I_LIKP OCCURS 0,
VBELN LIKE LIKP-VBELN,
ERNAM LIKE LIKP-ERNAM,
ERZET LIKE LIKP-ERZET,
ERDAT LIKE LIKP-ERDAT,
MARK TYPE C VALUE 'X',
END OF I_LIKP,
BEGIN OF I_LIPS OCCURS 0,
VBELN LIKE LIPS-VBELN,
POSNR LIKE LIPS-POSNR,
WERKS LIKE LIPS-WERKS,
LGORT LIKE LIPS-LGORT,
END OF I_LIPS,
FILL TYPE I.
CONTROLS: LIKP_DATA TYPE TABLEVIEW USING SCREEN 200,
LIPS_DATA TYPE TABLEVIEW USING SCREEN 300.
DATA: COLS LIKE LINE OF LIKP_DATA-COLS.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'LIKP'.
SELECT VBELN
ERNAM
ERZET
ERDAT
FROM LIKP
INTO TABLE I_LIKP
WHERE VBELN = LIKP-VBELN.
IF I_LIKP[] IS INITIAL.
CALL SCREEN 200.
ENDIF.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module assign_data OUTPUT
text
MODULE ASSIGN_DATA OUTPUT.
MOVE-CORRESPONDING I_LIKP TO LIKP.
ENDMODULE. " assign_data OUTPUT
*& Module STATUS_0200 OUTPUT
text
MODULE STATUS_0200 OUTPUT.
DESCRIBE TABLE I_LIKP LINES FILL.
LIKP_DATA-LINES = FILL.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE USER_COMMAND_0200 INPUT.
CASE SY-UCOMM.
WHEN 'LIPS'.
READ TABLE I_LIKP WITH KEY MARK = 'X'.
SELECT VBELN
POSNR
WERKS
LGORT
FROM LIPS
INTO TABLE I_LIPS
WHERE VBELN = I_LIKP-VBELN.
IF SY-SUBRC = 0.
CALL SCREEN 200.
ENDIF.
WHEN 'BACK'.
SET SCREEN 200.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
Save and Activate the program along with the screen in which you have included table control.
Hope this will help you.
Regards
Haritha.
Similar Messages
-
How to display table data without using ALV and table element.
Hi,
Its possible to display table data without using ALV and table element.
Every time i am fetching data based on (customer,status) fields and displaying these data in my output using alv
(every time i am fetching single row data ),
But problem is alv occupying more space in the output , i want to display data part only i dont want field names,
settings and header data etc..things.
Give solution to display data part..
Regards,
Rakhi.Hi,
Does you mean that you need ALV without default Function Toolbar...? If this is the case, the easy solution would have been to use Table Element rather. But, if you need to use ALV only without Function Toolbar, you can do away with that as well.
In that case, after calling GET_MODEL, you need to add few more lines of codes to achieve your goal. Those lines are --
DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LV_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
* Standard Filter Function setting to FALSE
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_COMPLEX_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_COMPLEX_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_SETTINGS_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_HEADERCLICK_ALLOWED( ABAP_FALSE ).
LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED( ABAP_FALSE ).
* Standard Filter Function setting to FALSE Ends
Here as you can easily notice that LV_VALUE is instantiated on CL_SALV_WD_CONFIG_TABLE. Now, using this LV_VALUE, you set standard functions as False to dis-allow their display.
Hope this answers your query.
Thanks.
Kumar Saurav. -
How to display two grids in same screen using SALV Method
Hi Freinds,
Please let me know how to display two grids in same screen using SALV Method.
Thank you
Regards,
SDVUsing the same concept as described in How to dispaly Three Internal Table Data (One below another) in ALV OOPS .
All you need to add is passing your new containers as r_container parementer of factory method.
"1st one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_top_container
"2nd one
cl_salv_table=>factory(
EXPORTING
R_CONTAINER = g_bottom_container
Regards
Marcin -
How to display the header data on different position in alv report
hi all,
how to display the header data on different position in alv report.
for example ,
customer name
xxxx xxxx
vendor name street
xxxx xxxx xxxxx
pls help me .hi
as per my understanding you need to trnasfer header internal table data to pdf..
please check the following links for internal table to pdf..
Convertion of Internal table data to PDF
This link is related to ur issue
Re: how to insert the calling of the FM: OTF to PDF
Thanks -
How to display negative values in a screen field of a screen
Hi All,
Please let me know how to display negative values in a screen field of a screen.
thanksHi Kishore,
You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
I have created a field of CHAR of name say TEXT.
In the main program,
declare a variable of the same name ie. TEXT.
data: TEXT(5) TYPE C.
In PBO, just assign the negative values.
It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
Regards,
Sylendra. -
How to display logo in module pool screen
Hi,
I need to display a logo in the screen of module pool programming. I have already imported the logo image using transaction OAER.
Please suggest how to display the image in the screen..
Thanks and Regards,
Sayan GhoshYou can show the image using the calss
CL_DD_DOCUMENT
For reference how to use the class
check the example program
DD_ADD_PICTURE -
How to display the current date in the prompt value.
Hi,
How to display the current date in the prompt value. When the user runs the query he want the current date to be displayed in the prompt value and he should also be able to change the date if required ...... I am using web Intellegency BO XI3.0.
Thanks,
Shakthi.Please refer the below link.
Prompt with default date ( currentdate-1 and current date-8)
http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
Regards,
Bilahari -
How to display planned movement date and actual movement date together?
Hi, Professionals,
My purpose is to list delayed outbound deliveries.
Anyone could tell me how to display planned movement date and actual movement date?
Appreciate your help.Thanks Shiva.
I tried another way to do it. It works only for a short period of time.
By using VL06O, I list all outbound deliveries by limiting both planned goods movement dates and actual goods movements dates to the same week I would like to inspect. Say both from 7th/11 to 14th/11.
then I list outbound delivery list with planned goods movement date to 7th/11 but left out actual goods movements dates this time.
In excel, I compare those two lists and filter out those unique ones because those unique documents means delayed deliveries which cannot delivery according to planned date.
However, the "delayed" list generated by this method has some noises. Not all of documents are really delayed although most of them do.
I'm also looking for a way to list sales documents number of these delayed delivery documents so i can retrieve order details from it such as order value.
Help still needed. -
Displaying metadata, how to display ONLY the Date
I would like to display the Date below each image in Aperture 3. When I select "Date" in the Browser & Viewer Metadata window, the result is a very long string with the Date, the Time and the Time Zone. meaning that most of the time I see nothing because the string is much too long to be displayed...
How to display ONLY the Date ?
Thank you.
Olivierom28 wrote:
I will do that but still... if the Date could be ONLY the Date "without time and time zone", I would be able to display more information.. and it will look nicer.
I said at the top of my first response above: +Afaik, there is no way within Aperture to change the date format of the date metadata overlay.+
Send Aperture feedback to Apple via "Aperture→Provide Aperture Feedback"
In the past I used Expression Media and the config for displaying such info was better.
Aperture has a strange interface for it (and for other parameters), it does not behave at all like an Apple software (for the GUI), probably an external development team... but I agree it is more complex than iPhoto.
Aperture is 10x more complex than iPhoto.
If you want to see a rigid, boxed, "engineer"-style image database interface, take a look at Lightroom 3. It's a great program -- but it's a very different concept of information presentation and interaction.
Thanks again. -
How shall I delete the data from R/3 setup tables
Hi Experts,
How shall I delete the data from R/3 setup tables
Regards
SailekhaHi Sailekha , to delete the set up table in r/3 either u can go to tcode LBWG as already mentioned or u can also delete the same from tcode SBIW
Settings for Application-Specific DataSources (PI) -
Logistics -
Managing Extract Structures -
Initialization -
Delete the Contents of the Setup Tables .
Just click the clock there then u hace toi juct give the application component name like for Inventory 3 , then execute it , it will delete the set up table for inventory ..
Regards.. -
HT4689 How do I get out of full screen view in mission control?
How do I get out of full screen view in Mission control so IO can close the app?
Press the escape key, but, when you move the cursor to the top of the screen, doesn’t the menu bar reappear? It is supposed to.
-
How to display image and data in module pool screen?
Hi,
I want to display image and relevant data besides the image in module pool screen, I am using docking container to display the image.
Actually I am able to display image or data any one but not both.
one more thing I want to display multiple images and their data.
Please suggest some one if you have any idea.
Regards,
Dileep.You can try below way, I have used in report.
DATA: gc_docking TYPE REF TO cl_gui_docking_container, "#EC NEEDED "Docking Container
gc_split TYPE REF TO cl_gui_easy_splitter_container, "#EC NEEDED "Splitter
gc_top_container TYPE REF TO cl_gui_container, "#EC NEEDED "Top Container
gc_bottom_container TYPE REF TO cl_gui_container, "#EC NEEDED "Bottom Container
gc_document TYPE REF TO cl_dd_document, "#EC NEEDED "Document
gc_events TYPE REF TO lcl_event_class, "#EC NEEDED " Local Event Class
gc_grid TYPE REF TO cl_gui_alv_grid, "#EC NEEDED " ALV Class
" Creating Docking
CREATE OBJECT gc_docking
EXPORTING
ratio = c_95.
IF sy-subrc EQ 0.
* Splitting the Docking container
CREATE OBJECT gc_split
EXPORTING
parent = gc_docking
sash_position = c_10 "Position of Splitter Bar (in Percent)
with_border = c_1. "With Border = 1 Without Border = 0
ENDIF.
* Placing the containers in the splitter
gc_top_container = gc_split->top_left_container .
gc_bottom_container = gc_split->bottom_right_container .
* Creating Grid
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_bottom_container.
ELSE.
* Background job handling
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_docking.
ENDIF.
* Creating the document
CREATE OBJECT gc_document
EXPORTING
style = 'ALV_GRID'.
Regards,
Sameer -
How to display the current date witout chane anyone
Hi all
I have some problem in date field.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : S_INDATE TYPE SY-DATUM DEFAULT SY-DATUM.
SELECTION-SCREEN END OF BLOCK B1 .
This the code of selection screens. Normally default it will display the current date. But in my program it can change the user but I want to display the date and it cant be the change anybody.. How should I do it ??????????
Regards,
nawahi ,
Chk this.
SELECT-OPTIONS : s_kunnr for kna1-kunnr.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if (SCREEN-NAME EQ 'S_KUNNR-HIGH') OR (SCREEN- NAME EQ 'S_KUNNR-LOW').
SCREEN-input = 0.
MODIFY SCREEN.
ENDLOOP.
Rgds
Anver -
How to display previously entered data in TableModel
This post is continued from the last one. I was having problem displaying previously entered data into TableModel. someone suggested whether my TableModel is persistent.
I am sorry to say I am not sure how to make TableModel persistent. Can someone tell me what to do.
Following is my implementation of TableModel:
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.util.*;
import java.io.*;
public class UsersModel implements TableModel {
public static final String[] colNames ={
"Usernmae",
"Location"
public static final Class[] colClasses ={
String.class,
String.class,
public static final int
USERNAME_COL = 0,
LOCATION_COL = 1;
//used to hold a list of TableModelListeners
protected java.util.List tableModelListeners = new ArrayList();
protected java.util.List data = new ArrayList();
public static void main(String []args){
new UsersModel();
}//end main
public UsersModel(){
public void add(Users u){
data.add(u);
and when I need to add new users, I do it in the following way:
Users u= new Users(n,l);
model.add(u);
table.setModel(model);
I hope someone can helpPlease post the entire class, this certainly won't compile because it does not implement all the TableModel methods. Also, why not base it off of AbstractTableModel?
-
How to display webdynpro view data in PDF format.
Dear All,
Greetings!!!
scenario :
i am having five tabstrips in a table , first four for the different kinds of data
and fifth one is for to display all tabstrips data in a PDF format.
Kindly let me know how to acheive this .
is it possible with out ADLC..? any demo or article is available for similar requirement?
Thanks in Advance.
Best Regards,
Kranthikumar Palle.It's better to use the Adobe form to display your WD data. But you can choose Smartform as a PDF doc to display the WD data.
Check out the thread [Display a Smartform as PDF document in WD ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785] for more details.
Maybe you are looking for
-
What can I do? It keeps asking for a **** password and I enter my email. Password and it doesn't work And keeps sending me back to settings for my pop.3 Password!
-
Mountain Lion won't install because it says my Mac HD cannot be used to start up my computer?
I've tried redownloading Mountain Lion but that didn't work. I've also gone into start up disc in my settings and restarted my computer with my Mac HD. It isn't partitioned. Any help here?
-
Hi, I have created one internal order for AUC purpose.When i call Asset Under Construction option from the Internal order screen (KO02) it is taking me to AS01 asset creation screen.But here they system is taking the AUC asset class 4001 by default i
-
Hi Sapients, In a costing based Profitability analysis: What options do we have inorder to send values to COPA for any manual FI postings for Cost of Sales -Manual and Sales Manual? Assuming that Cost of Sales Manual account and Sales Manual account
-
Installing Different Versions of CS4
Hi, We have brought different versions of CS4 for different purposes ie design standard, design premium etc, the installers are now taking 20GB+. Is it possible to have a folder with every product (5GB) and deploy different versions.