‎2008 Mar 25 11:36 AM
Hi
I am trying to execute a report with the selection-screen via a FM,by passing the values to report screen through the import para of FM,which i m initilizating through the initilization even in Report,but after that report is not executing itself,i hv to execute it each time,than its reutrning the EXP param.
Please tel me how to make it execute,or how shd i initilized the screen values...other than initilization event,if its creating any prob?
FUNCTION zmm_stock_value_matnr.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(I_MATNR) TYPE MARA-MATNR
*" REFERENCE(I_WERKS) TYPE MARC-WERKS
*" REFERENCE(I_DATE) TYPE CDHDR-UDATE
*" EXPORTING
*" REFERENCE(O_STOCK) TYPE MSEG-MENGE
*"----
DATA : zmatnr(18),
zwerks(4),
zdate(8),
pstock(13).
SET PARAMETER ID 'ZMATNR' FIELD i_matnr.
SET PARAMETER ID 'ZWERKS' FIELD i_werks.
SET PARAMETER ID 'ZDATE' FIELD i_date.
submit zhzlmm_closing_stock via selection-screen and return.
GET PARAMETER ID 'ZSTOCK' FIELD pstock.
MOVE pstock TO o_stock.
ENDFUNCTION.
&----
*& INITIALIZATION
&----
INITIALIZATION.
GET PARAMETER ID 'ZDATE' FIELD so_budat-low.
APPEND so_budat.
GET PARAMETER ID 'ZMATNR' FIELD so_matnr-low.
APPEND so_matnr.
GET PARAMETER ID 'ZWERKS' FIELD p_werks.
regds
‎2008 Mar 25 11:40 AM
Hi,
Replace the submit statement as follows:
Submit <Report_program_name> and return.
If you use VIA SELECTION-SCREEN addition it will prompt you to go for the selection-screen of the report.
Regards,
Sankar.
‎2008 Mar 25 11:40 AM
*submit zhzlmm_closing_stock via selection-screen and return.
submit zhzlmm_closing_stock and return.Edit it like this
‎2008 Mar 25 11:40 AM
Hi,
Replace the submit statement as follows:
Submit <Report_program_name> and return.
If you use VIA SELECTION-SCREEN addition it will prompt you to go for the selection-screen of the report.
Regards,
Sankar.
‎2008 Mar 25 11:41 AM
Hi
In your FM, use the SUBMIT keyword along the report program name, so that the control is transferred to the report program.
Thanks
Vijay
‎2008 Mar 25 11:44 AM
Hi,
FUNCTION zmm_stock_value_matnr.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(I_MATNR) TYPE MARA-MATNR
*" REFERENCE(I_WERKS) TYPE MARC-WERKS
*" REFERENCE(I_DATE) TYPE CDHDR-UDATE
*" EXPORTING
*" REFERENCE(O_STOCK) TYPE MSEG-MENGE
*"----
DATA : zmatnr(18),
zwerks(4),
zdate(8),
pstock(13).
SET PARAMETER ID 'ZMATNR' FIELD i_matnr.
SET PARAMETER ID 'ZWERKS' FIELD i_werks.
SET PARAMETER ID 'ZDATE' FIELD i_date.
submit zhzlmm_closing_stock and return.
GET PARAMETER ID 'ZSTOCK' FIELD pstock.
MOVE pstock TO o_stock.
ENDFUNCTION.
&----
*& INITIALIZATION
&----
INITIALIZATION.
GET PARAMETER ID 'ZDATE' FIELD so_budat-low.
APPEND so_budat.
GET PARAMETER ID 'ZMATNR' FIELD so_matnr-low.
APPEND so_matnr.
GET PARAMETER ID 'ZWERKS' FIELD p_werks.
Try the modified coding.
Regards,
Balakumar.G
Reward Points if helpful.