‎2006 Aug 10 7:59 AM
Hi!
I am new to abap and I´m having some syntax problem.
I want to call a function ABAP_FUNCTION that takes a tables parameter TABLE type SOME_TYPE with one field TABLE_ID.
1. Can you show me how to, inside my program, define a table of type SOME_TYPE and populate the field TABLE_ID with some value.
and
2. Show me how to call the ABAP_FUNCTION with my created table.
thanks in advance,
regards
Baran
‎2006 Aug 10 8:10 AM
Hi,
You can use pattern pushbutton inside your program to include a call function statement.
Then double click on the function you want to call and copy the table type used there.
Come back to your program and declare an internal table with the same data declaration as in function module.
Rgds,
HR
‎2006 Aug 10 8:10 AM
Hi,
You can use pattern pushbutton inside your program to include a call function statement.
Then double click on the function you want to call and copy the table type used there.
Come back to your program and declare an internal table with the same data declaration as in function module.
Rgds,
HR
‎2006 Aug 10 8:22 AM
Thank you, that takes care of the call function part.
Could you please show me how to declare an internal table of type SOME_TYPE and populate the field TABLE_ID in the internal table?
regards
B
‎2006 Aug 10 8:28 AM
data: itab type some_type occurs 0,
wa_itab type some_type.
wa_itab-table_id = 11.
append wa_itab to itab.
clear wa_itab.
regards,
Naimesh
Message was edited by: Naimesh Patel
‎2006 Aug 10 8:30 AM
hi,
to declare a table of some type.
DATA: itab type standard table of some_type.
SELECT * FROM table
INTO itab.
CALL FUNCITON 'Your_function'
TABLES
some_table = itab.
REgards,
HRA
Reward if helps
‎2006 Aug 10 8:35 AM
Hi Baran,
Just see this sample...
data : user1 type user value 'xyz',
udate type sydatum,
udate1 type sydatum.
data itab like ZTODE occurs 0 with header line.
select fileds into table itab from requiredtable.
CALL FUNCTION 'ZABAP_USER'
EXPORTING
USERNAME = user1
UDATE =
UDATE1 =
TABLES
ITAB =
ITAB_TODE = itab
.
loop at itab.
write:/ itab.
endloop.
Regards,
Sridhar
‎2006 Aug 10 8:53 AM