‎2007 Dec 24 7:21 AM
Hi,
This is my situation.
In my table control if i select a row and click modify it wil go to another screen with all the fields of te selected row in input/output field. My query is in which variable will the contents of the selected row be held? How to populate the records in the next screen. Kindly help me on this.
‎2007 Dec 24 9:07 AM
Hi Harini ,
The answer to your querry is :The selected records values will be stored in the header ( if u have used an itab with header line ) or any workarea to fill the table control . If you have not refreshed this record at the end of programming for the screen1 , the values will be stored in the workarea itself and you can use the same to fill the next screen field values .
If you need further clarification then you can revert to me .
Regards,
Ranjita
‎2007 Dec 24 9:05 AM
hi,
u ned to make one module in PAI....
LOOP AT itab.
CHAIN.
FIELD itab-xblnr.
FIELD itab-bldat.
FIELD itab-rmwwr.
field itab-cputm.
ENDCHAIN.
FIELD itab-mark
MODULE tab1_mark ON REQUEST.
*module itab_modify
.* ENDLOOP.
MODULE itab_modify INPUT.
GET CURSOR FIELD xblnr VALUE bill_no.
ENDMODULE. " itab_modify INPUT
MODULE user_command_1000 INPUT.
CASE ok_code.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
WHEN 'SV'.
WHEN 'INFO'.
CALL SCREEN 1001.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
here i am calling another screen for displaying data of selected row...
and in PBO make one module...
PROCESS BEFORE OUTPUT.
module fetch_data1.
module fetch_data1 output.
SELECT SINGLE xblnr bldat rmwwr cputm FROM rbkp INTO
corresponding fields of itab2
WHERE xblnr = bill_no.
APPEND itab2.
endmodule. " fetch_data1 OUTPUT
reward if useful...
‎2007 Dec 24 9:07 AM
Hi Harini ,
The answer to your querry is :The selected records values will be stored in the header ( if u have used an itab with header line ) or any workarea to fill the table control . If you have not refreshed this record at the end of programming for the screen1 , the values will be stored in the workarea itself and you can use the same to fill the next screen field values .
If you need further clarification then you can revert to me .
Regards,
Ranjita
‎2007 Dec 24 10:50 AM
hi,
i tried as u said...
but was unable to get the output.
is there anyother way to get the cursor position.?
‎2007 Dec 24 11:00 AM
hi,
i think in module pool u can get cursor value only by get cursor.....
I have same report and i ma getting output...
Can u explain me whta u have done in ur report?
‎2007 Dec 24 11:11 AM
i have populated the values of a database table in my table control. when the user selects a row and clicks on modify button it call another screen where all the values are populated in an input output box. and the user can modify the value and click save . the vales are then populated in the database.
i want to read the selcted row which am unable to do.
‎2007 Dec 24 11:23 AM
‎2007 Dec 24 11:30 AM
‎2007 Dec 24 11:40 AM
it should display the value which u select......
have u put it into loop endloop in PAI?
and one other option with get cursor is
GET CURSOR LINE line_no.
here u will get selected line so u can use this line_no...
‎2007 Dec 27 9:54 AM
GET CURSOR LINE l_line .
Now read the table which is populated in table control with INDEX,l_line.
Edited by: Bushara Bai on Dec 27, 2007 11:05 AM
‎2007 Dec 24 10:31 AM
hi i tried using the line
READ TABLE itab INDEX table-current_line
but by default only the last line in the table control gets stored in the current_line.
what should i do to get the selected line?
‎2007 Dec 24 10:42 AM
‎2007 Dec 24 10:47 AM
no am yet to try.....
isnt there any other way to find the cursor position?
‎2007 Dec 27 4:04 PM
Hello Harini,
If you set the selColumn attribute in the layout editor of the table control you can easily identify which row was selected. For example I have a screen with a financial projection table and in the control I added the selColumn option and set the field equal to flag. Flag is a field that is in the internal table definition. I then loop at the table where Flag = 'X' and call the next screen to modify passing only those values.
Regards.
Jereme
Edited by: Jereme Ebaugh on Dec 27, 2007 11:19 AM