‎2007 Jan 22 5:48 PM
Hi,
how is it possible to insert some values into a Table-Parameter. In my FM I defined:
*" TABLES
*" GLOB_STRUC STRUCTURE ZCMSRMXMEAR
Then I fill the structure:
DATA wa_glob_data TYPE zcmsrmxmear.
wa_glob_data-descr = 'TEST'.
APPEND wa_glob_data to glob_struc.
But there is no data in my glob_struc.
regards,
sharam
Message was edited by:
Sharam Pourmir
‎2007 Jan 22 6:01 PM
I don't see what the problem is with the code that you provided, it looks ok from here.
Have you check this in debugger? There is no row in the GLOB_STRUC after executing the APPEND statement? Or is your problem that the data is not coming back from the function call? If the latter, lets see the call to the function module.
Regards,
Rich Heilman
‎2007 Jan 22 6:14 PM
Hello Rich,
after the append statement I try:
WRITE: 'DESCR: ', glob_struc-descr. => no result!
I have always check this in debugger. I think the problem is that the structure of glob_struc contains more then 10 fields, I only fill the first field. I don't need all the values of the structure. Is it possible to fill only some important fields of a Table-Parameter (structure). And how can I do this?
regards,
Sharam
‎2007 Jan 22 6:19 PM
‎2007 Jan 22 6:32 PM
Hello Rich,
I want to insert the structure below into the Table-Parameter of my FB. So I can't use your code because it's not a table.
*" TABLES
*" GLOB_STRUC STRUCTURE ZCMSRMXMEAR
DATA wa_glob_data TYPE zcmsrmxmear.
regards,
Sharam
‎2007 Jan 22 9:01 PM
Hi,
I think we are not getting your problem correctly.
If you want the tables parameter in your FM, go to TABLES tab, and define the variable GLOB_STRUC in parameter name,
LIKE or TYPE in Type Spec.
and ZCMSRMXMEAR in reference Type.
Regards
Subramanian
‎2007 Jan 22 9:48 PM
Let us say your function module name is ZZZTEST. So in your ZZZTEST code, you put the code as you mentioned to append the TABLES parameter.
You write another test program ZZTEST in which you call this function and pass an internal table of the same structure to the function call. After the call, you simply loop at this internal table and write the contents of the record fields. I am not sure where you have your write statements to test it.