‎2006 Oct 12 3:21 PM
I have a 3 custom tables and a custom tab strip application linking to that table created in spwizard. I need to add the functionality of insert, delete, modify to the application. I created the icons already, just need the functionality. Were can I go to get some help or examples will be great.
thanks in advance!
‎2006 Oct 12 3:23 PM
Assign a FCode for the button. Write the code in PAI module of the screen.
PROCESS AFTER INPUT.
MODULE user_command_0100.
MODULE user_command_0100 INPUT.
CLEAR okcode.
MOVE sy-ucomm TO okcode.
WHEN 'MPAD'.
CLEAR okcode.
APPEND INITIAL LINE TO i_mprn .
ws_devloc_add = c_x.
WHEN 'MPSB'.
CLEAR okcode.
DELETE i_mprn WHERE select = c_x.
WHEN 'MPRN'.
CLEAR okcode.
PERFORM validate_mprn.
ENDMODULE. " USER_COMMAND_0100 INPUT
Regards,
Prakash.
‎2006 Oct 12 3:39 PM
i_mprn? is it an internal table or structure. In your perform validate_mprn, what are you validating? not sure your code. please elaborate!
‎2006 Oct 12 3:48 PM
Ervin,
I just copied the sample program.
You don't want to do the same thing.
Ofcoure i_mprn is an internal table. Also I have my own validation for the program which I added there.
WHEN 'MPAD'. This will insert a new row to the table control.
CLEAR okcode.
APPEND INITIAL LINE TO i_mprn .
ws_devloc_add = c_x.
WHEN 'MPSB'. This will delete the specified row from table control.
CLEAR okcode.
DELETE i_mprn WHERE select = c_x.
For deleting the specified row, first u want to declare a varibale in the table control exmple SEL type c. You have to give that field in the properties of the table control example I_MPRN-SEL. So whenever u select a line in table it will marked with 'X'. so this statement (DELETE i_mprn WHERE select = c_x. ) will delete the row whichever is selected.
Regards,
Prakash.
‎2006 Oct 12 4:05 PM
do you know if there is any sap programs that have tab strips with the functionality to add, delete, and modify the table so that I can have a good understanding of it.
‎2006 Oct 12 4:09 PM
Goto <b>ABAPDOCU</b> transaction.
In that ABAP User Dialogs -> Screens -> Processing screens & Complex screen Elements, have lot of programs on screens.
Regards,
Prakash.
‎2006 Oct 12 5:00 PM
I'm looking at the codes and there isn't any codes to add into the table. do you have a complete sample program so that i can look at!
‎2006 Oct 20 8:33 PM
so do any one out there have a full codes tab strip program where they are adding to a custom table?