Skip to Content
0
Nov 04, 2016 at 05:55 AM

how to call standard program from customize report program

280 Views

Hi all

I have an requirement from client that , there is standard transaction fb03 , in that we enter document number ,company code , and year . on that basis we get the data of that document number like acoount number , desrcription, amount etc. But one time one document can be viewed and printed .They want range of documents to be entered(multiple documents) in fb03 screen and rest of the screen will be same . So for that sake i just made customize zfb03 screen ,but after that how to call that standard program SAPMF05L which includes all details is not getting. please can anyone help in this task.

My code is as follows.

REPORT ZFB03_NEW.

TABLES : BKPF , BSEG.

TYPES : BEGIN OF TY_BKPF ,
BELNR TYPE BKPF-BELNR,
BUKRS TYPE BKPF-BUKRS,
GJAHR TYPE BKPF-GJAHR,
END OF TY_BKPF.

DATA : IT_BKPF TYPE TABLE OF TY_BKPF,
WA_BKPF TYPE TY_BKPF.



SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
SELECT-OPTIONS : T_DOCNO FOR BKPF-BELNR.
PARAMETERS : T_BUKRS LIKE BKPF-BUKRS.
PARAMETERS : T_YEAR LIKE BKPF-GJAHR.

SELECTION-SCREEN END OF SCREEN 400.


CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'DOC'.
* SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'DISPLAYDOC'.
* SET TITLEBAR 'xxx'.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.

SELECT BELNR BUKRS GJAHR FROM BKPF INTO TABLE IT_BKPF WHERE BELNR IN T_DOCNO AND BUKRS = T_BUKRS AND GJAHR = T_YEAR.


***
*** LOOP AT IT_BKPF .
***
***
***
***
***
***
*** ENDLOOP.
*****





ENDMODULE.