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: 

Adding Customer Field to VA14L

michael_pearson2
Discoverer
0 Kudos

I need to add a new field to VA14L (the "Documents Blocked for Delivery" report SDLIEFSPE). The field I need to add is Customer Name.

Is there a way I can do this without copying and modifying the SAP code?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Unfortunately, there is no way (in 4.6C at least) to add a new field without making a copy of the SAP program. The good news is that the change to your copy would be fairly simple:

Step 1: Add Customer Name to the field catalog

In form FIELDCAT_INIT, insert a block similar to this:


  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME   = 'NAME1'.
  LS_FIELDCAT-REF_FIELDNAME = 'NAME1'.
  LS_FIELDCAT-REF_TABNAME = 'KUAGV'.
  LS_FIELDCAT-DDICTXT     = 'S'.
  LS_FIELDCAT-SP_GROUP    = 'A'.
  APPEND LS_FIELDCAT TO U_LF_FIELDCAT.

Step 2: Include some code to select the Customer Name into internal table L_SPETAB which already contains a field for NAME1. This can probably be added near the bottom of form TAB_FUELLEN inside the loop at l_spetab. You can read NAME1 from table KNA1 with a select single using the KUNNR = L_SPETAB-KUNNR.

Take a look at the new options available for making these types of changes at these links:

<a href="/people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners Enhancements Blog</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=/library/webas/abap/introducingEnhancementFramework.doc">New Enhancements Document</a>

Cheers!

- James Gaddis

2 REPLIES 2

Former Member
0 Kudos

Unfortunately, there is no way (in 4.6C at least) to add a new field without making a copy of the SAP program. The good news is that the change to your copy would be fairly simple:

Step 1: Add Customer Name to the field catalog

In form FIELDCAT_INIT, insert a block similar to this:


  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME   = 'NAME1'.
  LS_FIELDCAT-REF_FIELDNAME = 'NAME1'.
  LS_FIELDCAT-REF_TABNAME = 'KUAGV'.
  LS_FIELDCAT-DDICTXT     = 'S'.
  LS_FIELDCAT-SP_GROUP    = 'A'.
  APPEND LS_FIELDCAT TO U_LF_FIELDCAT.

Step 2: Include some code to select the Customer Name into internal table L_SPETAB which already contains a field for NAME1. This can probably be added near the bottom of form TAB_FUELLEN inside the loop at l_spetab. You can read NAME1 from table KNA1 with a select single using the KUNNR = L_SPETAB-KUNNR.

Take a look at the new options available for making these types of changes at these links:

<a href="/people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners Enhancements Blog</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=/library/webas/abap/introducingEnhancementFramework.doc">New Enhancements Document</a>

Cheers!

- James Gaddis

michael_pearson2
Discoverer
0 Kudos

Thank you, James.

This solved the problem.

I'm sure I can't be the first person to have to do this. Everybody must want to see the Customer Name on this screen.