The content you are trying to access is permanently deleted.
‎2008 Aug 22 8:03 AM
Hi ,
I am new to ABAP. Can you please give a simple example program to extract the data from a table using Function module.
Thanks for your help in advace.
Regards,
Vishnu
‎2008 Aug 22 8:04 AM
‎2008 Aug 22 8:30 AM
hi vishnu,
See the following Sample Program;
REPORT demo_mod_tech_fb_read_spfli.
PARAMETERS carrier TYPE s_carr_id.
DATA: jtab TYPE spfli_tab,
wa LIKE LINE OF jtab.
CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
EXPORTING
id = carrier
IMPORTING
itab = jtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
CASE sy-subrc.
WHEN 1.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
WHEN 2.
MESSAGE e888(sabapdocu) with 'Error in function module'.
ENDCASE.
LOOP AT jtab INTO wa.
WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
ENDLOOP.Also you can find example programs for all in tcode ABAPDOCU in your SAP system itself, explore ABAPDOCU to find more sample programs....
Regards
Karthik D
‎2008 Aug 22 8:36 AM
Simpal. just call fm in your report like
REPORT ZTEST.
tables:vbrk.
data:BILLINGDOCUMENTDETAIL type BAPIVBRKOUT,
RETURN TYPE BAPIRETURN1.
select single * from vbrk.
CALL FUNCTION 'BAPI_BILLINGDOC_GETDETAIL'
EXPORTING
billingdocument = vbrk-vbeln
IMPORTING
BILLINGDOCUMENTDETAIL = BILLINGDOCUMENTDETAIL
RETURN = RETURN
.see values in BILLINGDOCUMENTDETAIL.
‎2008 Aug 22 8:46 AM
Hi,
I want to create my own function module. i will give the table name in the program and read the data from function module.
Regards,
vishnu
‎2008 Aug 22 8:52 AM
Read the help, and search this forum, on subjects such as "dynamic programming", "dynamic SQL" "RTTI", and ABAP keyword FIELD-SYMBOLS, CREATE DATA.
What you are trying to achieve cannot really be described as simple. This is not a simple programming task. However, if you persist, then once you've made an attempt, and have specific problems and issues, then post them here. You will learn far more effectively if you attempt to do things yourself, and find things out yourself, than if you allow yourself to be spoon fed.
matt
‎2008 Aug 22 8:53 AM
Go to SE37
Create a FM starting with Z..
In the Import parameter take a table name
In the Tables parameter take a table name type (the table which you want to fetch)
IN the Source code write a SELECT to fetch the data.
Now activate and check this FM
Now you can call this FM in the report.
Hope this helps!
Regards,
Prashant
‎2008 Aug 22 8:37 AM
‎2008 Oct 23 8:22 AM