Skip to Content

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

additional fields in me2n is showing blank value if we run program RM06EN00

Hello All,

I have added Vendor material number (IDNLF) and Requisitioner Name (AFNAM) in the report ME2n using below logic.

  1. 1)      For ME2N and ME2 report, we need to do implicit enhancement in the include LMEREPD02.
  2. 2)      To add the fields AFNAM(Requisitioner) and IDNLF (Vendor Material Number) , we need to add these fields into structure (MEREP_OUTTAB_PURCHDOC) via Append Structure .

Field names in structure should start with zz.

  1. 3) Now if you run ME2N and ME2L , you can see the AFNAM and IDNLF fields in these reports.
  2. 4) To display the values in these fields , we need to do Implicit Enhancement.
  3. 5)      Go to se38-à Enter the Include Name
  4. 6)      Check for method BUILD_BASE_LIST and double click on this method.
  5. 7)      Then click on spiral icon(Enhance Button) and then Goto EDITà Enhancement Operations -à show Implicit Enhancement.

  1. 8)      Go to ENDMETHOD statement of this method.

  1. 9)      Right click on Doted line and Goto Enhancement Operations à Create Implementation
  2. 10)   Then system will ask you for Type of Enhancement. We need to select the “Code” option.
  3. 11)   Then one popup will come wherein we need to enter the “Enhancement Name”.
  4. 12)   Then write the below code into this Enhancement.

  TYPES: BEGIN OF TY_EKPO,
EBELN
TYPE EBELN,
AFNAM
TYPE AFNAM,
IDNLF
TYPE IDNLF,
EBELP
TYPE EBELP,
END OF TY_EKPO.

DATA : IT_EKPO TYPE STANDARD TABLE OF TY_EKPO,
WA_EKPO
LIKE LINE OF IT_EKPO.

IF SY-TCODE = 'ME2N' OR SY-TCODE = 'ME2L'.


SELECT EBELN AFNAM IDNLF EBELP FROM EKPO
INTO TABLE IT_EKPO
WHERE EBELN = IM_EKPO-EBELN.

IF SY-SUBRC = 0.
READ TABLE IT_EKPO INTO WA_EKPO WITH KEY EBELP = IM_EKPO-EBELP.
re_outtab_purchdoc
-ZZAFNAM  = WA_EKPO-AFNAM.
re_outtab_purchdoc
-ZZIDNLF  = WA_EKPO-IDNLF.
ENDIF.

ENDIF.

If i run ME2N report then i can see these two fields in the report with value.

But if i run standard program if ME2N (RM06EN00) then i can not see value in these two fields.

Include LMEREPD02 which contains the enhancement is not getting called in the report RM06EN00.

Please help.

Regards,

Anuja Dhondge

Former Member
Former Member replied

Hi anuja,

This is because,in your code you have added if sy-tcode = "me2n" or "me2l",

when you execute through se38, sy-tcode will be "se38".

Put the condition accordingly.

Maybe add if sy-rapid = RM06EN00 too in the condition.

Regards,

Sriram

0 View this answer in context

Helpful Answer

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