2009 Jan 07 9:21 AM
HI,
I need to remove the selected line from the Table control on my screen.
The point is that the Internal table does not have any records,.
for example in the Customer Create screen,
while entering the bank details we will enter it in a tbale contraol.
but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
please guide me.
please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
regards
HI,
I need to remove the selected line from the Table control on my screen.
The point is that the Internal table does not have any records,.
for example in the Customer Create screen,
while entering the bank details we will enter it in a tbale contraol.
but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
please guide me.
please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
regards
2009 Jan 07 9:24 AM
Hi,
Whenever you are entering the details in the table control that details will be present in the internal table of that table control. write a code in the PAI based on the index to delete the record which you are selected by pressing the delete button.
2009 Jan 07 9:25 AM
hi,
check this program which will suite your requirement..
DEMO_DYNPRO_TABCONT_LOOP_AT
2009 Jan 07 9:41 AM
HI Gautham,
The scenario is that,
I will be entering the cvalues on the Table Control and then must save to the database.
in that scenario after entering the values I user press delete after placing the cursor in a line the line must get deleted from screen
I will not be having the display of values befor hand.
Hope you got it.
2009 Jan 07 9:42 AM
HI Gautham,
The scenario is that,
I will be entering the cvalues on the Table Control and then must save to the database.
in that scenario after entering the values I user press delete after placing the cursor in a line the line must get deleted from screen
I will not be having the display of values befor the .
Hope you got it.
2009 Jan 07 9:28 AM
hi
jus have a look at sample program RSDEMO_TABLE_CONTROL
this would definitely help you out
regards
Aakash Banga
2009 Jan 07 9:36 AM
Hi..
The solution to your problem - deleting values from table control.
Here: it_wizard is the internal table which is holding the value of table control.
wa_wizard is the work are of the internal table it_wizard.
it_delete is the internal table which holds the deleted record of table control.
wa_delete is the work area of the internal table it_delete
Also here the field ZSEL is the character field which is used to select the entire record in the table control.
LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
MOVE-CORRESPONDING wa_wizard TO wa_delete.
APPEND wa_delete TO it_delete.
delete table it_wizard from wa_wizard.
DELETE FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
ENDLOOP
if sy-subrc eq 0.
Message 'Delete Successful' type 'S'.
endif.The above code will delete the record from both the table control.internal table and the database table.
I think this will help you to great extent.
Ward regards,
Bhuvaneswari
Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM
2009 Jan 07 9:42 AM
HI Gautham,
The scenario is that,
I will be entering the cvalues on the Table Control and then must save to the database.
in that scenario after entering the values I user press delete after placing the cursor in a line the line must get deleted from screen
I will not be having the display of values befor hand.
Hope you got it.
2009 Jan 07 9:51 AM
Hi SAPLEARNER,
The above which I have given will solve this problem.
Even before saving the record you can delete them using that code.
In such cases use proper flags to give the appropriate message after deleting for user convenience.
Thanks,
Bhuvaneswari
Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:52 AM
2009 Jan 07 12:00 PM
Hi,
I did as u said
i couls delete the record
and the records are in i_details
But how to display in PBO
flow logic is as follows:
where bank_table is my table control
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL bank_table .
MODULE status_9005.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL bank_table .
CHAIN.
FIELD: /miga/org_bankdl-banks ,
/miga/org_bankdl-bankl,
/miga/org_bankdl-bankn,
/miga/org_bankdl-bkont,
/miga/org_bankdl-xezer,
/miga/org_bankdl-bkref,
/miga/org_bankdl-koinh.
MODULE delete_row.
ENDCHAIN.
ENDLOOP.
MODULE user_command_9005.
2009 Jan 07 12:07 PM
Hi,
I need to know whether you have created the table control with wizard or not?
2009 Jan 07 2:30 PM
Hi,
No I created without wizard.
Whats the point in creating?
it will be the same right in any method !!!!
regards
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |