‎2008 Apr 24 12:14 PM
Hi There
I am trying to get a month by month alv grid from the data held in function module 'Consumption_Read_For_MM'
I know how to create an ALV grid but how do I get the data from this function module to display it?
Thanks
‎2008 Apr 24 12:18 PM
Hi,
1st create an internal table and append all the entries to that internal table which you are getting and finally pass that internal table to that ALV Function Module.
Thanks
Ganesh
‎2008 Apr 24 12:31 PM
Create an Internal Table with all the fields u want and use the function module by giving three parameters : matnr =
werks =
perkz =
periv =
Create an internal table like SVERBTABA to get total consumption and use Move-corresponding to get all the info into u r final inetrnal table and display using ALV funcyion modules.
‎2008 Apr 24 12:49 PM
That is a great help!
In the function module do I reference the internal table fields like this?
call function 'CONSUMPTION_READ_FOR_MM'
IMPORTING
MATNR = S_MATNR.
werks = S_MATNR.
perkz = tbl_SVERBTABA-ERTAG
periv = tbl_SVERBTABA-VBWRT.
TABLES
SVERBTABA = tbl_sverbtaba
EXCEPTIONS
program_error = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
I would imagine something like this is needed so the fields correspond to my internal table?
‎2008 Apr 24 1:27 PM
Hi,
No. Lopp at your internal table & pass a single value of matnr at a time . Same is applicable for werks as well.
I hope this helps,
Regards
Raju Chitale