Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Fetching a transaction's output in the report

Hi,

I have to calculate stock on a particular date my report.

Transaction MB5B calculates stock on a particular date.

How can i pass the mandatory parameters to MB5B and fetch its output in the report itself?

Message was edited by: Nishant Gupta

Tags:
replied

Hi !

There's a little more help.

These:

SELECTION-SCREEN BEGIN OF BLOCK Database-selection

WITH FRAME TITLE TEXT-001.

  • Text-001: Datenbankabgrenzungen

SELECT-OPTIONS: MATNR FOR MARD-MATNR MEMORY ID MAT

MATCHCODE OBJECT MAT1,

*{ INSERT PA9K013121 1

MFRPN FOR MARA-MFRPN MEMORY ID MPN

MATCHCODE OBJECT HTN,

*} INSERT

BUKRS FOR T001-BUKRS MEMORY ID BUK,

WERKS FOR T001W-WERKS MEMORY ID WRK,

LGORT FOR T001L-LGORT,

CHARG FOR MCHB-CHARG,

BWTAR FOR MBEW-BWTAR,

BWART FOR MSEG-BWART.

PARAMETERS SOBKZ LIKE MSEG-SOBKZ.

SELECTION-SCREEN SKIP.

SELECT-OPTIONS: DATUM FOR MKPF-BUDAT NO-EXTENSION.

  • Datumsintervall für Selektion

SELECTION-SCREEN END OF BLOCK Database-selection.

is the selection screen of the RM07MLBD.

All these parameters (i.e .MATNR, CHARG, BWART) can be passed with the submit command.

For example (where the p_... Parameters are parametes of YOUR report !).

SUBMIT RM07MLBD

with matnr in p_matnr

with bwart in p_bwart

with charg in p_cahrg

and return

exporting list to memory.

The import if the list is a bit more dificult.

It's basically like this:

DATA LISTTAB LIKE LISTOBJECT

OCCURS 1.

CALL FUNCTION 'LIST_FROM_MEMORY' TABLES LISTOBJECT = LISTTAB.

Then the list will be in the table LISOBJECT.

For more info see the docu of 'LIST_FROM_MEMORY'

Regards

Rainer

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question