cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Adding Additional field in MB51 Report

Mahil
Participant
0 Kudos
394

Hello Everyone,

Requirement is to add BRGEW, NTGEW, GEWEI field to MB51 Report. I add the those fields to MSEG table using append structure like ZBRGEW, ZNTGEW, ZGEWEI. I implement the implict enhancement in RM07DOCS.  But in mb51 output those fields are not shown. Here with i share the implict enhancement for reference.

In RM07DOCS Static Enhancement Point Section  PR:RM07DOCS DA:LIST SE:END EI  - wrote the logic like

DATAZBRGEW TYPE MARA-BRGEW,
      ZNTGEW TYPE MARA-NTGEW,
      ZGEWEI TYPE MARA-GEWEI.

RM07DOCS Dynamic Enhancement Point Section  PR:RM07DOCS FO:OUTPUT_LIST SE:BEGIN EI  - wrote the logic like

TYPESBEGIN OF TY_T1,
       BRGEW TYPE BRGEW,
       NTGEW TYPE NTGEW,
       GEWEI TYPE GEWEI,
       END OF TY_T1.
DATAIT_MAT TYPE TABLE OF TY_T1.

FIELD-SYMBOLS<LFS_MAT> TYPE TY_T1.

DATA:  lt_itab1 LIKE list[].
FIELD-SYMBOLS <lfs_itab> like LINE OF lt_itab1.
lt_itab1[] list[].
if lt_itab1 is NOT INITIAL.
  SELECT BRGEW NTGEW GEWEI from mara INTO TABLE IT_MAT FOR ALL ENTRIES IN lt_itab1
    WHERE matnr lt_itab1-matnr.
     if sy-subrc eq 0.

  LOOP at lt_itab1 ASSIGNING <lfs_itab>.
     <lfs_itab>-ZBRGEW <lfs_MAT>-BRGEW.
     <lfs_itab>-ZNTGEW <lfs_MAT>-NTGEW.
     <lfs_itab>-ZGEWEI <lfs_MAT>-GEWEI.
    ENDLOOP.
       ENDIF.
  ENDIF.

RM07DOCS Dynamic Enhancement Point Section PR:RM07DOCS FO:FIELDS_FOR_SELECTION SE:END EI - wrote the logic like

APPEND 'MSEG~ZBRGEW' TO g_t_fields.
  APPEND 'MSEG~ZNTGEW' TO g_t_fields.
  APPEND 'MSEG~ZGEWEI' TO g_t_fields.
*
  APPEND 'MSEG~ZBRGEW' TO g_t_fields_new.
  APPEND 'MSEG~ZNTGEW' TO g_t_fields_new.
  APPEND 'MSEG~ZGEWEI' TO g_t_fields_new.

RM07DOCS Dynamic Enhancement Point Section PR:RM07DOCS FO:BUILD_RUNTIMETABLE SE:END EI - wrote the logic

rx'MSEG ZBRGEW                          00 00'.
  rx'MSEG ZNTGEW                          00 00'.
  rx'MSEG ZGEWEI                          00 00'.

Advance Thanks.

 

Accepted Solutions (0)

Answers (2)

Answers (2)

RaymondGiuseppi
Active Contributor

Seems you added the field twice ?

Mahil
Participant
0 Kudos
Sir, receive (The enhancement option is switched off. Do you want to create the implementation anyway?) this Popup message in form Build_fieldcatalog
Mahil
Participant
0 Kudos

Hi sir,

In debug mode list have my zfields & and their respective values. Issues in catalog only. Herewith I attach my build_catalog values for reference. 

   if rtt-fieldname 'ZZBRGEW'.
    fc_flat-seltext_m 'Gross Weight'.
    fc_flat-tabname 'LIST'.
    fc_flat-ref_fieldname 'ZZBRGEW'.
    fc_flat-no_out 'X'.
    ENDIF.
 

Advance Thanks

RaymondGiuseppi
Active Contributor

You didn't use the bu_fc form, so you must provide enough data :

  • Either a ddic reference with ref_tabname and ref_fieldname
  • or the minimal required data for ALV field catalog with inttype, outputlen and texts

Ref Generating the Field Catalog Manually 

 

Dominik_Tylczynski
SAP Champion
SAP Champion

Hello @Mahil 

Have you checked the following configuration of MB51 - SPRO: Materials Management -> Inventory Management and Physical Inventory -> Reporting -> Define Field Selection for Material Document List:
Dominik_Tylczynski_0-1762243794152.png

It looks like you can select any MKPF, MSEG field there. I have not verified if that works with custom fields though. 

It might be a way to avoid implicit enhancements in RM07DOCS.

Best regards

Dominik Tylczynski

Mahil
Participant
0 Kudos
Thank you so much for valuable reply, sir. Its not works for me. I add the my zfield in spro . Dump error occurs like ZBRGEW already exists.
Dominik_Tylczynski
SAP Champion
SAP Champion
0 Kudos
The dump might be caused by a conflict between SPRO configuration and your implicit enhancements.