Skip to Content
0

how to call standard program from customize report program

Nov 04, 2016 at 05:55 AM

89

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Nov 04, 2016 at 07:33 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Abhijeet Tayade Nov 04, 2016 at 07:54 AM
0

ok will try

Share
10 |10000 characters needed characters left characters exceeded