Quantcast
Channel: SCN : Document List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 1574

For Beginners: Datasource Enhancement- LO Cockpit

$
0
0

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

1.jpg


MCVBAK is communication structure of VBAK table

 

2.jpg

3.jpg

 

4.jpg

5.jpg


Save and Activate

6.jpg

Field is added to the structure...

Now if look in communication structure from LBWE maintainace...


7.jpg


Now we have to write a code to populate that

Goto Tcode SE37

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

9.jpg

Double click on include

 

10.jpg

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

 

12.jpg

  13.jpg

14.jpg

 

15.jpg


Field Only should always be checked for enhanced fields...

 

16.jpg

17.jpg 

 

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

 

and check in RSA3 for data...

 

18.jpg

 

 

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


Viewing all articles
Browse latest Browse all 1574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>