cancel
Showing results for 
Search instead for 
Did you mean: 

my select query does not fetch the data from database table in module pool programming.

former_member809080
Participant
0 Kudos
*&---------------------------------------------------------------------*
*& Module Pool ZYY_MPP_2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
PROGRAM zyy_mpp_2.

TABLES: MARA.

TYPES: BEGIN OF st_mara,
matnr TYPE mara-matnr,
ernam TYPE mara-ernam,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF st_mara.


DATA: wa_mara TYPE st_mara.
* data: it_mara TYPE TABLE OF st_mara.
DATA: in_matnr TYPE matnr.


*&---------------------------------------------------------------------*
*& Module STATUS_0101 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0101 OUTPUT.
SET PF-STATUS 'BACK'.
* SET TITLEBAR 'xxx'.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0101 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0101 INPUT.



CASE sy-ucomm.

WHEN 'BACK'.
LEAVE PROGRAM.

WHEN 'DISPLAY'.

SELECT SINGLE matnr
ernam
mtart
matkl FROM mara INTO wa_mara
WHERE matnr = in_matnr.


IF SY-SUBRC = 0.
CALL SCREEN 201.
ELSE.
MESSAGE 'DATA NOT FOUND' TYPE 'I'.
ENDIF.

ENDCASE.


ENDMODULE.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0201 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0201 INPUT.

CASE sy-ucomm.
WHEN 'BACK'.
CALL SCREEN 101.
ENDCASE.

ENDMODULE.
former_member809080
Participant
0 Kudos

i used reference for module pool

Sandra_Rossi
Active Contributor
0 Kudos

What do you see in debug?

former_member809080
Participant
0 Kudos

in debug mode i am see like this

raymond_giuseppi
Active Contributor
0 Kudos
  1. Your break-point is just before the select execution, continue to next statement
  2. Did you define the field IN_MATNR with ddic reference in the first dynpro (no conversion-exit?
Marissa
Advisor
Advisor
0 Kudos

We helped you to accept the answer, since there were no updates after 7 days.

You can unaccept it anytime if you have further questions.

Accepted Solutions (1)

Accepted Solutions (1)

TarunTakshak
Participant
0 Kudos

Hi Deepak,

Once check Display name which is present on the report should be same name as Function Code(i.e,Display button) in module pool and check Wheather the fields have been taken from program or DataDictonary

Thanks

TarunTakshak

former_member809080
Participant
0 Kudos

i am taking fields from program

TarunTakshak
Participant
0 Kudos

Hi Deepak,

Have you looked at the Module Pool's Display button name (F.C)?

former_member809080
Participant
0 Kudos

yes i looked

f.c is = DISPLAY

TarunTakshak
Participant

Take in_matnr as parameter and try

former_member809080
Participant
0 Kudos

Thanks sir

Answers (0)