05-31-2013 9:23 PM
I had a requirement to create custom tab for Tcode IE01 . Inside the Custom Tab, I had a Table Control with 4 columns. During save , i need to update ZTABLE from the values entered in table control of custom tab.
All the logic to add custom tab and then Table control inside the custom tab is done.
Enhancements used for
Custom tab is ITOB0001
SAVE : IEQM0003
But my problem is, After entering data in Custom tab(inside table control) during IE01/IE02, I am capturing data into internal table, but not saving in ZTABLE immediately, because, unless user press save, i don't want to save in ZTABLE.
So I found Userexit for SAVE.
During save IEQM0003(EXIT_SAPMIEQ0_001 )is the UserExit that gets triggered, but my internal table values of Custom Tab(User exit) are not available here. I even tried to get them using Assign Statement; but it is not successful. I don't want to use Memory Statements .
Any Suggestions ...
Thanks in Advance..
06-01-2013 10:28 AM
Hi Micheal,
Create a New Z Function Group and 3 FMs in it.
1. Read Value for Z Table from Database
Call this FM where your data is displayed
2. Pass the updated data with an update flag [Which is GLOBAL in your FG].
Call this FM in the Screen where your data is changed
3. Update FM to update the Value.
Check the Global update flag if set update it.
SAP uses the same methodology in most exits.
I hope it helps
BR
06-01-2013 11:16 AM
Hi Michael,
As suggested by Yakub, you can create a Function Module in the same Function group where you have done all the coding and have only a tables parameter in that with type of your Z table.
Now code something like this in your exit (EXIT_SAPMIEQ0_001 ),
CALL FUNCTION 'Z_TAB_EXP'
TABLES
t_ztab = <Name of your Internal Table which you are populating via Table Control>
Please refer screenshot for understanding the code.
Regards,
Ankit.
06-01-2013 2:04 PM
Hi,
you can just get the function code of save and write a code
in PAI / module User_command for that screen.