cancel
Showing results for 
Search instead for 
Did you mean: 

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

anuja_gdhodnge
Participant
0 Kudos

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. 😎      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

Accepted Solutions (1)

Accepted Solutions (1)

anuja_gdhodnge
Participant
0 Kudos

client is scheduling mail for this report.

To schedule client is using program RM06EN00.

but above program does not contain the include LMEREPD02 where in actual logic is written.

Please help me.

Regards,

Anuja Dhondge

sriram_ramesh
Participant
0 Kudos

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

anuja_gdhodnge
Participant
0 Kudos

Hi Shiram,

I have done the change as per your suggestion and it is working also.

If i run the report RM06EN00 and RM06EL00  seperatly  then i can see the Requisitioner and vendor material number fields with value.


client is scheduling background job for this report then these two fields are blank with no value.

Please help.


Regards,

Anuja Dhondge

sriram_ramesh
Participant
0 Kudos

Hi Anuja,

If a program is run in background, sy-binpt will be 'X'.

Add that in your condition.

Regards,

Sriram

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

The Include LMEREPD02 is there in the main program RM06EN00 FM 'ME_REP_COUNT_TABLE_LINES'.

That include only contain local class definition.

So put the break-point at your code in that include and check whether its stopping there or not.

If its stopping there, then try with removing sy-tcode check.

Regards,

.