Application Development 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: 

Add FIELDS (NO MSEG or MKBF) TO Layout MB51

Former Member
0 Kudos
1,914

Hello Guys,

I saw a lot of discussions concerning this issue.
But no one helped me out.

I have to add 2 fields MAterial belonging to ORDER and the description of this material (MAKT)

I see everywhere you have to use Enhancement Spot ES_RM07DOCS.
Buit when  i look in program RM07DOCS i see many of these spots..

\PR:RM07DOCS\EX:RM07DOCS_01Dynamic Enhancement Point
EventAT SELECTION-SCREEN
\PR:RM07DOCS\EX:RM07DOCS_02Static Enhancement Point
Before First UnitN->RM07DOCS
\PR:RM07DOCS\EX:RM07DOCS_03Static Enhancement Point
Before First UnitN->RM07DOCS
\PR:RM07DOCS\EX:RM07DOCS_04Dynamic Enhancement Point
EventINITIALIZATION
\PR:RM07DOCS\EX:RM07DOCS_05Dynamic Enhancement Point
EventAT SELECTION-SCREEN OUTPUT
\PR:RM07DOCS\EX:RM07DOCS_06Dynamic Enhancement Section
SubroutinePROCESS_LIST
\PR:RM07DOCS\EX:RM07DOCS_07Dynamic Enhancement Point
SubroutineBUILD_FIELDCATALOG
\PR:RM07DOCS\EX:RM07DOCS_08Static Enhancement Point
Before First UnitN->RM07DOCS
\PR:RM07DOCS\EX:RM07DOCS_10Dynamic Enhancement Point
SubroutinePROCESS_LIST
\PR:RM07DOCS\EX:RM07DOCS_11Dynamic Enhancement Section
SubroutinePROCESS_LIST
\PR:RM07DOCS\EX:RM07DOCS_O1Dynamic Enhancement Point
EventINITIALIZATION
\PR:RM07DOCS\EX:RM07DOCS_G4Static Enhancement Point
Before First UnitN->RM07DOCS
\PR:RM07DOCS\EX:RM07DOCS_G5Dynamic Enhancement Point
Before First UnitN->RM07DOCS
\PR:RM07DOCS\EX:RM07DOCS_G6Static Enhancement Point
Before First UnitN->RM07DOCS
\PR:RM07DOCS\EX:RM07DOCS_G7Dynamic Enhancement Point
Before First UnitN->RM07DOCS

Could someone explain me clearly which steps i have to perform to get these 2 fields filled in the layout of MB51

Thanx in advance.

1 ACCEPTED SOLUTION

bryan_cain
Contributor
0 Kudos
578

Using implicit enhancements you can add fields to the structure ITAB and populate the fields in form DATA_SELECTION.  Both are in include RM07DOCS_GENERATED.

6 REPLIES 6

eduardo_hinojosa
Active Contributor
0 Kudos
578

Hi Frank

Please, see SAP Note 357187 - MB51: Fields in field catalog / selection screen.

I hope this helps you

Regards

Eduardo

0 Kudos
578

Hi Eduardo,

I saw you have given this oss-note in more discussions about this.
But this issue is only about mseg and mkbf lfields not over fields form oter tables.

Gr., Frank

bryan_cain
Contributor
0 Kudos
579

Using implicit enhancements you can add fields to the structure ITAB and populate the fields in form DATA_SELECTION.  Both are in include RM07DOCS_GENERATED.

0 Kudos
578

how are you able to add fields to ITAB?

You can create a table using

CALL METHOD cl_alv_table_create=>create_dynamic_table

but you still cannot modify ITAB and add entries to them using enhancemts or field symbols.

In other words, SAP doesn't allow you modify internal tables created during runtime...

please me know.

thanks

0 Kudos
578

Implicit enhancements will allow you to add fields to any declared structure.  My code looks like this:

...

data: XBLNR type MKPF-XBLNR .

data: ZEILE type MSEG-ZEILE .

ENHANCEMENT Z_MB51_ENH.    "active version

INCLUDE type z_mb51_enhanced=>extra_fields.

ENDENHANCEMENT.

data: end of itab.

Former Member
0 Kudos
578

Frank, have you gotten this figured out? some insight would be appreciated.

thanks