Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to call standard program from customize report program

0 Kudos
714

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.

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos
166

Look at syntax of CALL TRANSACTION statement and available options to pass parameters in online help.

But, you are in a LOOP so better look at transactions like FBL*N and the FM FI_ITEMS_DISPLAY behind, and try to guess how to call it.

Regards,
Raymond

0 Kudos
166

ok will try