‎2018 Aug 07 8:09 AM
Dear Experts,
I have created the function module with the type 'UPDATE MODULE - START IMMEDIATE' Option in attribute tab of the function module.
To handle the data base operation INSERT and DELETE in a single SAP LUW to have the database consistency for the updates.
But this function module should have the IMPORT parameter dynamic to update the tables. Since in the program flow only the table name for which INSERT or DELETE have to be taken place will be decided.
In the import tab it is not allowing the generic type declaration (ex. TYPE any or table).
1) Is there any other work around possible to achieve this scenario using the function modules - update module - start immediate ?
2) Any other concept available to achieve the requirement.
Thanks in Advance.
‎2018 Aug 07 8:53 AM
There are many ways to achieve such tasks but you need some ABAP skills.
E.g., your IMPORT parameter could be an XSTRING to which you EXPORT or serialize everything you need and you IMPORT or deserialize it in the FM from that data cluster again. Then, you create your internal tables from that data.
‎2018 Aug 08 4:16 PM
Dear Keller,
Yes i have tried as you suggested by passing as XSTRING in the IMPORT parameter.
Whenever i try in debugging it is updating the table. But if i execute it is not updating the table.
‎2018 Aug 07 11:08 AM
I think i found a blog which does similar to what Keller said.
https://blogs.sap.com/2012/02/23/abap-objects-model-processing-luw-via-update-task/
‎2018 Aug 07 6:14 PM
Hi, Consider TYPE REF TO Data as well as field-symbols (Standard Table) to assign it
in FM as below example.
...
*Interface Parameter
it_table TYPE REF TO data
...
*ABAP Statements
FIELD-SYMBOLS: <lfs_table> TYPE STANDARD TABLE.
ASSIGN it_table->* TO <lfs_table>.
...
Regards