Table control and a selection screen
Hi,
I have a requirement where I am supposed to be designing a screen that has a table control with fields
w/selection column label 1(non-editable) i/o field(from) i/o field(to)
w/selection column label 2(non-editable) i/o field(from) i/o field(to)
On searching the forum threads, I found related threads as to how to implement a selection screen (as the I/O fields are similar to select-options) in module pool programming. But mine requires the use of table control and a kind of selection screen embedded into it. Please guide me through this requirement.
Hi
If you need to implement a table control on selection screen u need to use a tabstrip as graphic element supports the table control.
So
1 - Step: define a tabstrip with 1 tab only:
SELECTION-SCREEN BEGIN OF BLOCK 3.
SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
DEFAULT SCREEN 100.
SELECTION-SCREEN END OF BLOCK MAX.
SELECTION-SCREEN END OF BLOCK 3.
2 - Step design the subscreen (in my sample the dynrpo 100) and insert the table control there:
PROCESS BEFORE OUTPUT.
MODULE INIT_CTRL.
LOOP WITH CONTROL T_CTRL.
MODULE DISPLAY_DATA.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL T_CTRL.
MODULE UPDATE_DATA.
ENDLOOP.
In the module DISPLAY_DATA and UPDATE_DATA u need to implement the code to transfer the data from internal table to table control and from table control to internal table, in order to display and update the data.
Max
Similar Messages
-
About table control in the selection screen
i want to create a table control in the selection screen of my report.i can create the table control using SE51.but how to program with the table control in the report.for example i should fetch the data for the personnel nos entered in the table control of the selection screen.how to do this.can any of u provide sample code for this.
thanks.Hi vadivel,
Create internal table and create table control using same internal table
e.g.
data : begin of it,
end of it.
start-of-selection.
call screen 100.
If you create table control using wizard then code automatically come here.
Now, Put one push button in same screen where table control is available. let's say push button Display report.
Now, use export <IT> to memory id <ID> and submit report <report name> and return. now, define same internal table in this submitted report and use import <IT> from memory id <ID>. Now, table control data is available in internal table, use that data and make code as per your requirement. If you dont want to use push button then use menu bar and at user-command event.
Hope this help
Regards,
Parag -
Table control on Tabbed selection-screen
Hi All,
My Requirement is: I have a tabbed selection-screen with 3 tabs.
On one of the tabs I have to include a Table control.
Currently I'm displaying Table control as Pop-up . But I want that on the screen itself.
Please suggest me how to do this.Once i have done this. but only table control was there on the screen.
design a screen and place one table control.
y will declare one default subscreen in the selection screen tab declaration,
and
At selection-screen.
change the value of the deflaut screen to ur designed screen.
below is one example
controls: tab type tableview using screen 201.
SELECTION-SCREEN BEGIN OF TABBED BLOCK object FOR 50 LINES.
SELECTION-SCREEN TAB (60) tab_cls USER-COMMAND ut_cls
DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (60) tab_rcp USER-COMMAND ut_rcp
DEFAULT SCREEN 200.
SELECTION-SCREEN END OF BLOCK object.
SELECTION-SCREEN BEGIN OF SCREEN 0101 AS SUBSCREEN NESTING LEVEL 2.
parameters: P_lifnr type lfa1-lifnr.
SELECTION-SCREEN END OF SCREEN 0101.
SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN NESTING LEVEL 2.
parameters: p_ebele type ekko-ebeln.
SELECTION-SCREEN END OF SCREEN 0200.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN 1000.
CASE sy-ucomm.
WHEN 'PUSH1'.
object-dynnr = 100.
WHEN 'UT_RCP'.
object-dynnr = 201.
WHEN OTHERS.
ENDCASE.
here the defualt screen is 200 but for table control purpose i changed it to 201 which has the table control in it. -
Table control in report selection screen
I have a selection screen with some fields. Now, below these fields, I need a table control in which i will have input parameters with 3 fields so that i can enter data in combinations and use the same while executing the report like an internal table.
1. I should be able to save it as a Variants.
2. I should be able to schedule a background job.
I found similar notes but they dont help me save variants and with job schedules.
Request your help in this regard.
Regards
KasiHi
In the selection-screen u can generated a tabstrip:
SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
DEFAULT SCREEN 100.
SELECTION-SCREEN END OF BLOCK MAX.
So the system'll generate a tabstrip in the selection-screen, here it'll load only the screen 100.
By screen painter u have to create a subscreen 100 where u insert your table control.
Max -
How to create table control and link in screen exit
Hi Friends,
I want to create table control in enhancement CONFPP07. The values entered in table control should be stored in ztable along with some other information.
But I want to know how to create table control in screen-exit and how and where to write code and how to link all.
Kindly send me step-by-step documentation or real time examble prg.
Kindly give ur answers for this problem only.
Thanks in Advance,
S.Senthil kumarIf u have a screen exit..then u will have a option to create a sub screen..in that sub screen u activate the pai and pbo events..it will show u where to write the code..
-
HI Gurus,
i have to following requirement,
i have to make a screen in which there would be four fields
name xxx
age x
date xx.xx.xx
time xx xx xx
the screen fields are to by filled by the user at the run time and this data should be saved in the data base table(say ztable)
so as far i have understood i need to create a screen with a table control and a database table to save the data of the table control (after the user press save buttom)
please help me how to create a table control
and also
help me with the logic of calling the screen(this screen with table control)
also the logic of save butoom too
please help as soon as possible
points will be surely awarded ..
thanks in advance
anujuse this eg to your requirement
PROGRAM YTABLEDML .
TABLES : KNA1.
DATA : ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.
CONTROLS : VCONTROL TYPE TABLEVIEW USING SCREEN '100'.
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'INSERT'.
MOVE KNA1 TO ITAB.
APPEND ITAB.
INSERT INTO KNA1 VALUES ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'INSERTED'.
ELSE.
MESSAGE E001(0) WITH 'NOTINSERTED'.
ENDIF.
WHEN 'UPDATE'.
MOVE KNA1 TO ITAB.
APPEND ITAB.
UPDATE KNA1 FROM TABLE ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'UPDATED'.
ELSE.
MESSAGE E001(0) WITH 'NOTUPDATED'.
ENDIF.
WHEN 'DELETE'.
MOVE KNA1 TO ITAB.
APPEND ITAB.
DELETE FROM KNA1 WHERE KUNNR = ITAB-KUNNR.
MESSAGE I000(0) WITH 'DELETED'.
IF SY-SUBRC = 0.
ELSE.
MESSAGE E001(0) WITH 'NOTDELETED'.
ENDIF.
ENDCASE.
ENDMODULE.
MODULE USER_EXIT INPUT.
CASE SY-UCOMM.
WHEN 'EXIT'.
CALL TRANSACTION 'SE38'.
ENDCASE.
ENDMODULE.
*PROCESS BEFORE OUTPUT.
*LOOP WITH CONTROL VCONTROL.
*ENDLOOP.
MODULE STATUS_0100.
*PROCESS AFTER INPUT.
*LOOP WITH CONTROL VCONTROL.
MODULE USER_COMMAND_0100.
ENDLOOP.
*MODULE USER_EXIT.
TCODE IS YDMLTAB. -
Use of loops in pbo and pai events when a table control is on the screen
asap.
Hi Feroz,
What is the very purpose of using table controls and tab strips in module pool programming.
Rgds,
kha -
How to deactivate the fields in a table control of a standard screen
Hi,
I have an requirement to deactivate the fields in a table control of a standard screen in ME22n transaction.I am using a BADI "ME_PROCESS_PO" and in item mathod i am looping at screen for the screen field name in the table control.But it is not working. Can anyone give me the possible solution . Thanx in advance.
With Regards,
Ajit.>
Vivek Joshi wrote:
> Hello Router ,
> I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
> I hope , I am clear now .
> Thanks for your help
> Regards
> Vivek
An yet you keep getting suggestions of how to set the focus. I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is. Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point. I can pass the requirement onto Product Definition, as the use case does seem interesting. Perhaps it is something we have even considered in the past.
But for now, there might be a better way to solve your problem. It will probably mean redesign the interaction. What exactly are your requirements? Do you need to be able to get the data in a particular cell of table when a button is clicked? Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work. Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table. -
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. -
Difference between At selection-screen and At selection-screen field
I need to know the difference between
Difference between At selection-screen and At selection-screen field
Regards
ShashiHi,
AT SELECTION-SCREEN is the event triggered in the PAI of the selection screen.
AT SELECTION-SCREEN on field field_name is the event specific to the field and is triggered when u press enter in that field.
AT SELECTION-SCREEN selscreen_event.
Effect
This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing.
Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program.
AT SELECTION-SCREEN is triggered at least twice during actions on selection screens that are linked into another selection screen as a subscreen - first for the linked selection screen itself, and then for the linking selection screens.
SELECTION-SCREEN FIELD SELECTION
FOR {NODE|TABLE} node [ID id].
Effect
This statement defines a node node in the structure of the logical database for field selection. If a node belongs to type T, you can use the TABLE addition instead of NODE. The statement cannot be used for type C nodes. .
If a node is defined for field selection, you can use an executable program linked to the logical database in the GET statement to control which fields in the node are to be read by the logical database. If you use the function module LDB_PROCESS, the FIELD_SELECTION parameter must be specified accordingly.
for more details check this link...
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
Regards,
Priyanka. -
How to insert row in table control and save the data in tables
Hi,
I have one table control i am displaying data into table control ,
my problem is : i want to display data into read mode in table control.
but when i click on insert button on the same screen i want one blank line should inserted into table control , then i want to insert some data into table control on that row , when i click the save button . the new data inserted into the table control is insert that data into ztable ,
please give me solution
main problen is how can know inserted line in table control and pass that data into ztable.Hi,
Follow the below logic,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
MODULE POPULATE_TABLE_CONTROL. --> Get the data from table store in
ITAB
LOOP AT GT_CTRL_LP_D516 INTO GS_WA_CTRL_LP_D516
WITH CONTROL CTRL_LP_D516
CURSOR CTRL_LP_D516-CURRENT_LINE.
The following module moves data to control
MODULE MOVE_TO_CONTROL.--> Move data from ITAB to table control
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT GT_CTRL_LP_D516.
ENDLOOP.
MODULE EXIT AT EXIT-COMMAND.
MODULE USER_COMMAND_0001. --> Here you have to take out the values from table control and update database table
Reward points if helpful.
Thanks and regards,
Mallareddy Rayapureddy,
Munich, Germany. -
How to call subscreen and provide selection screen in subscreen
Hi experts,
please anybody suggest me how to call subscreen in module pool screen and provide selection screen in that sub screen.
please tell me how to design this subscreen in module pool screen.
adevanced
thank you
regards
vijay krishnaHi,
If you need to have select-options in module pool then follow these steps:-
To implement select-options in module pool, first design two input/output fields (textboxes) for the low and high value of the field and name it as <field_name>-low and <field_name>-high.
Create a button next the high value textbox and keep its sutaible function code.
Now, to call the pop-up on this button click, we have to call the same pop-up as in standard select-options. For this we have to use the function module COMPLEX_SELECTIONS_DIALOG.
For this FM we have to pass the table name, field name and the range for the field whose range needs to fill when using the popup screen.
To pass the table name and field name details into the FM, we have to declare as:
DATA : tab TYPE rstabfield.
This structure comprises of table name and field name.
Pass these details in program as:-
u2003
*-- clear table and field details
CLEAR tab.
*-- append for range depending on the button clicked
* either for sales order or line item
CASE sy-ucomm.
WHEN 'VBELN'.
tab-tablename = 'VBAP'.
tab-fieldname = 'VBELN'.
*--To call the popup screen for the field use code:-
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
title = text-002 u201Ctitle text
text = ' '
signed = 'X'
search_help = v_shelp u201Csearch help if required
tab_and_field = tab u201Ctable and field name details
TABLES
range = r_vbeln u201Crange for the associated field
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5.
Hope this helps you.
Regards,
Tarun -
Adding a field to a table control of a standard screen
Hi,
I need to add a field to a table control of a standard screen (Transaction CAT2).
Could anybody please tell me how i could go about doing this?
Also, what customization would be required to display the field because there are way too many fields and only a few are being displyed as of now.
I will get the access(SSCR) key to modify the screen.
Regards,
Monica.Hi Monica,
Did you name you customer field also "FIELD1_W", because the field should get updated then without any modification as in screen 2100 a "move-corresponding" is performed from CATSDB to these fields.
Regards,
John. -
Problem in more than one table control in a BDT screen
HI gurus,
Please help, I have placed two table controls in a BDT screen (same screen), in Business Partner (BP). When I put only one table control then that is working fine but when I place two table controls then problem starts, table don't get scrolled may times, please suggest, its urgent.Hi,
Try to implement the notes
800369
789747
768803
768479
754237
And if this doesnt solve problem, then describe the problem in detail.
Smita. -
Highlight table control rows when select all button is clicked
Hi Experts,
I have a table control and filling up rows through user input and i have also created button such as Select All* , De-Select All, and Delete.
Now the issue is when i am pressing the select all button all the rows are marked for deletion(internal 'X' flag is set) but the rows are not highlighted(so that user will be able to know that all rows are selected).
Anything that i am missing, please guide......
Regards,
Abhijit G. BorkarOhh sorry there was some problem with the internet connect, that's why this duplicate happened.
Regards,
Abhijit G. Borkar
Maybe you are looking for
-
how can I save a page and all its component parts in a single file, like IE does as an MHT? It's much easier for mailing to people where page address not available?? (as in output from an airline booking site, for example) It is simply too painful to
-
Best Way to protect the SOA Suite from Malware
Please forgive my ignorance on this ubject but I have had a question raised from a colleague who has asked how we are going to protect our systems against malware? The type we are thinking about are SOAP attachments? We are currenlty looking to secur
-
JCO connection issue with MetaData
Hi all, I have created Jco connection...and while creating them i have used SSO method for creating application data and user/id method for Metadata...it works fine now...but my concerns is with MetaData. I have used user/id of an employee who is a u
-
Creating process chains in production environment..
Hi, We are planning to create process chains in our project , can we directly create process chains in the production environment? the data and the set up is very very small here so the number of chains and processess are very less , is it ok if we
-
AS3 How reload Movie Clip.
hi, 1,How reload Movie Clip...? 2,i think when we remove a Movie Clip,children and all instance object are also removed from stage but it still use memory of server..right..?