Application Development and Automation 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: 
Read only

MPP and report

Former Member
0 Likes
1,338

when I click Display in MPP screen , I should get a interactive report which should display customer details and I should not get the Selection-Screen.

The KUNNR field should be taken from MPP and it should display the records pertaining to given customer number in MPP.

1 ACCEPTED SOLUTION
Read only

prasanth_kasturi
Active Contributor
0 Likes
1,164

hi,

create a tcode for the report and use the statemnt

CALL TRANSACTION <tcode> AND SKIP FIRST SCREEN for the display button.

and for transferring the value of kunnr use

SET PARAMETER ID 'KUN' FIELD databrowse-tablename.

the code under display looks like below

when 'DISPLAY'.

pass the screen value to selection screen

kna1-kunnr = <fld>

SET PARAMETER ID 'KUN' FIELD <FLD>.

CALL TRANSACTION <tcode> AND SKIP FIRST SCREEN .

regards

prasanth

when I click Display in MPP screen , I should get a interactive report which should display customer details and I should not get the Selection-Screen.

The KUNNR field should be taken from MPP and it should display the records pertaining to given customer number in MPP.

6 REPLIES 6
Read only

prasanth_kasturi
Active Contributor
0 Likes
1,165

hi,

create a tcode for the report and use the statemnt

CALL TRANSACTION <tcode> AND SKIP FIRST SCREEN for the display button.

and for transferring the value of kunnr use

SET PARAMETER ID 'KUN' FIELD databrowse-tablename.

the code under display looks like below

when 'DISPLAY'.

pass the screen value to selection screen

kna1-kunnr = <fld>

SET PARAMETER ID 'KUN' FIELD <FLD>.

CALL TRANSACTION <tcode> AND SKIP FIRST SCREEN .

regards

prasanth

Read only

0 Likes
1,164

Hi

Thanks for your reply.

I donot know the <fld>.

please explain.

I had written the Call transaction and skip first screen but the selection screen is still comming.

In report what should I write?.

Please explain.

kna1-kunnr = <fld>----


?

set parameter-id 'kun' field <fld>----


?

Read only

0 Likes
1,164

Hi

I donot know the <fld>.

please explain.

I had written the Call transaction and skip first screen but the selection screen is still comming.

In report what should I write?.

Please explain.

kna1-kunnr = <fld>----


?

set parameter-id 'kun' field <fld>----


?

Read only

0 Likes
1,164

Hello

For example:


SET PARAMETER ID 'KUN' FIELD itab-kunnr. " here of interest you Customer number
SET PARAMETER ID 'BUK' FIELD itab-bukrs. " here Company Code of Customer number
CALL TRANSACTION 'FD03' AND SKIP FIRST SCREEN.

Read only

Former Member
0 Likes
1,164

I have done what you have said.

but I am still getting the selection-screen and the list is not displaying.

when report is executed independently it is showing records.

Through MPP only selection-screen is displaying.

Please solve my problem

Read only

0 Likes
1,164

hi ughee reddy ,

i will give a sample code on MPP and report which satisy your requirement, you can extend this to your program.

in report create a simple report with a simple select statemnt ( Prog Name : zp_example)

REPORT


DATA : wa_kna1 TYPE kna1.

PARAMETERS : p_kunnr TYPE kna1-kunnr OBLIGATORY.

START-OF-SELECTION.

SELECT SINGLE * FROM kna1 INTO wa_kna1 WHERE kunnr = p_kunnr.

WRITE : wa_kna1-kunnr,
        wa_kna1-name1,
        wa_kna1-land1.

IN MPP.

create a screen and put just customer field from table KNA1 i.e KUNNR.

put a display button and exit button,

the flow logic and program code are as follows

FLOW LOGIC.


PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.

PROCESS AFTER INPUT.
 MODULE USER_COMMAND_0100.

CODE.


TABLES kna1.
DATA : fnam TYPE string, fval(10) TYPE n.
DATA : v_kunnr TYPE kna1-kunnr.

*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.

  CASE sy-ucomm.
    
        WHEN 'DISPLAY'.
           GET CURSOR FIELD fnam VALUE fval.
            v_kunnr = fvl.
            submit zp_example with p_kunnr = v_kunnr AND RETURN.  " Pass your report program name insted of zp_example

        WHEN 'EXIT'.
           LEAVE PROGRAM.

  ENDCASE.


ENDMODULE.                 " USER_COMMAND_0100  INPUT

regards

prasanth