Adding new fields to the communication structure is called Datasource enhancement.

We have to append the standard business content data source 2LIS_11_VAITM with a field MTART (Material Type ) from MARA table .

First check if the field that you need to enhance is available in the communication structure. If it is there

1. Deactivate the datasource in LBWE & clear the delta queue (RSA7)
2. Drag the fields from the pool.
3. Activate the datasource..

This scenario requires no coding to populate the enhanced field.

But in our case the field MTART is not in MCVBAK and MCVBAP. So now the option is to append the extract structure and write a code to populate that.

Steps..

Goto Tcode SE11

/wp-content/uploads/2014/01/1_357951.jpg


MCVBAK is communication structure of VBAK table

/wp-content/uploads/2014/01/2_357952.jpg

/wp-content/uploads/2014/01/3_357962.jpg

/wp-content/uploads/2014/01/4_357963.jpg

/wp-content/uploads/2014/01/5_357964.jpg


Save and Activate

/wp-content/uploads/2014/01/6_357965.jpg

Field is added to the structure…

Now if look in communication structure from LBWE maintainace…


/wp-content/uploads/2014/01/7_357966.jpg

Now we have to write a code to populate that

Goto Tcode SE37

/wp-content/uploads/2014/01/8_357967.jpg


Transaction data       exit_saplrsap_001

Attributes,                  exit_saplrsap_002


Texts                           exit_saplrsap_003


Hierarchies                exit_saplrsap_004

In our case we are dealing with transaction data . so select exit_saplrsap_001

Click on display…

/wp-content/uploads/2014/01/9_357974.jpg

Double click on include

/wp-content/uploads/2014/01/10_357975.jpg

/wp-content/uploads/2014/01/11_357976.jpg

Insert the following code

Tables : MARA .

Data : L_S_VAITM LIKE MC11VA0ITM .         *MC11VA0ITM – extract structure of DS

case i_datasource.

When ‘2LIS_11_VAITM’.

Loop at C_T_DATA Into L_S_VAITM .

L_TABIX = SY-TABIX .

Select Single * From MARA where MATNR = L_S_VAITM-MATNR.

If sy-subrc = 0.

L_S_VAITM-MTART = MARA-MTART.

Modify C_T_DATA FROM L_S_VAITM INDEX L_TABIX.

Endif .

  1. Endloop.

Save and Activate Code..

Go to T-code LBWE and add the new field to extract structure

/wp-content/uploads/2014/01/12_357977.jpg

  /wp-content/uploads/2014/01/13_357978.jpg

/wp-content/uploads/2014/01/14_357979.jpg

/wp-content/uploads/2014/01/15_357986.jpg


Field Only should always be checked for enhanced fields…

/wp-content/uploads/2014/01/16_357988.jpg

/wp-content/uploads/2014/01/17_357992.jpg 

Now do the Statistical setup run( filling of setup tables) from SBIW

and check in RSA3 for data…

/wp-content/uploads/2014/01/18_357993.jpg

Material type (MTART)… the Enhanced field is available.

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply