‎2006 Jun 22 10:58 AM
Hi
1.how to know the selected record in a table control ?
2. is it possible to create a session with only through call transaction method?
thanks n regards,
kiran.m
‎2006 Jun 22 11:05 AM
1.
SY-STEPL
Index of current row in a screen table (table control). Is set at every loop pass. Outside a loop, for example during the POV event for a table row, SY-STEPL is not set appropriately.
2. I dont think it is possible to create session only with call transaction
‎2006 Jun 22 11:03 AM
Hi Kiran,
If you are talking about doing a BDC,
then the selected row of a table control will have an index.
Suppose the 4th row has been selected,
then the screen field for that selection,say
rs_selkz(04) = 'X'.
Do a recording for any tcode with a table control. You will see for yourself.
YOu can either do a BDC session or a call transaction.NOt one using the other.
Firstly call the BDC_OPEN Function MOdule.
All the BDC recording will be same for the BDC session method.
YOu only need to pass the bdcdata internal table to the
BDC_INSERT function module
Finall call the BDC_CLOSE FM.
Regards,
Ravi
‎2006 Jun 22 11:05 AM
1.
SY-STEPL
Index of current row in a screen table (table control). Is set at every loop pass. Outside a loop, for example during the POV event for a table row, SY-STEPL is not set appropriately.
2. I dont think it is possible to create session only with call transaction
‎2006 Jun 22 11:09 AM
Hai Kiran
Go through the following Document
1) Screen tables
A table can be created in transaction. These tables, when designed on the screen are called as SCREEN TABLES.
These are of two types.
Table Controls and Step loops
These tables are treated as Loops.
2)Features of Table Controls
Data is displayed in the form of table.
Table control gives user the feeling of an actual table.
You can scroll through the table vertically as well as horizontally.
You can select rows and columns.
You can resize the with of columns.
You can have separator lines between rows and columns.
Automatic resizing of the table when the user resizes the window.
You can update information in the table control and it can be updated in the database table by writing code for it.
3)Steps for creating table control
Declaration of table control in module pool program.
Designing of table controls on the screen.
Passing data to table control in flow logic.
4)Declaration of TC in MPP
syntax:
controls <name of table control> type tableview using screen <screen no.>.
5)Designing Table control on screen
Click on Table in Control bar and place it on the screen. You can adjust the length and width of the Table Control.
Name the table control.(same name as given in data declaration).
From dictionary object OR from program fields select the fields and place them in the table control
6)Passing data to table control
Usually transfer of data from program to screen is automatic.
In case of TC, you need to explicitly transfer the data to table control.
ABAP/4 provides Loop statement, which is associated with flow logic to transfer the data.
7)Passing of data contd.
PBO.
Loop at <name of internal table> with control <name of table control> cursor <scroll variable>.
module .
Endloop.
PAI.
Loop at < name of internal table>.Endloop.
8)Scroll variables
Top_line : the row of table where the screen display starts.
Current_line : the row currently being processed inside a loop.
9)Transfer of data from prg to TC.
With Loop at statement, the first row is placed in the header of internal table.
If any module is specified between Loop and End loop, it will be executed. In this module, generally we will be assigning this internal table fields to table control screen fields.
The row in internal table is transferred to the TC as stated in the Loop at .. statement.
The system encounters the Endloop statement and control is passed back to the next line of internal table.
In the same way all the records of the internal table are passed to the TC.
Thanks & Regards
Sreenivasulu P
‎2006 Jun 22 11:14 AM
Hi you can get the selected line by opening the properties of table control and check on the property 'W/SelColumn' and mention a internal table field of type char and size 1 this field will now work for you as flag when a row will be selected in table control this field of the internal table row will be 'X'.
Regards,
Wasim Ahmed
‎2006 Jun 22 11:15 AM
Hi,
1) Use tcl-current_line,tcl-LINE_SELECTOR
to know the record selected.
2) Session method can be created using
Fm BDC_open_group,BDC_INSERT,BDC_close_group.
Regards
Amole
‎2006 Jun 22 11:34 AM
Hi
in the table control output if i select one material i want to call the mm03 transcaction and the pass that material how to know the selected field in a table control
thanks,
kiran.M
‎2006 Jun 22 11:45 AM
Hi Kiran,
While creating the table control in the Screen Painter Attributes, right at the bottom there are a set of radio buttons for Line Sel. You can select either Single or Multiple. Right after that you have got a checkbox saying w/SelCoumn. Select that check box and give a field of the table you have given for the Table Control. You have to create a field (type C) in the internal table you have given for the Table Control. Once you execute the program, you will be able to select either one or many fields of the table control and if you check in the PAI, the field of type C which was created will be set to X. This is also one method to find out the selected rows.
Regards,
Tushar
Pls close this issue if found satisfying.
‎2006 Jun 23 8:08 AM
Hi
for standard transactions how to know the selected record in a table control.