cancel
Showing results for 
Search instead for 
Did you mean: 

Sample Code for MasterData Datasource Enhancement

Former Member
0 Kudos
299

Hi Experts,

Can anyone write a sample code to enhance Masterdata Datasource by adding 5 fields from std table to it. I am refering to the code going into "Include ZXRSAU02".

Thanks,

SB.

Accepted Solutions (1)

Accepted Solutions (1)

former_member496813
Active Participant
0 Kudos

You may check this - Enhancing LO Datasource Step by Step with screen shot and code:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0af763b-066e-2910-a784-dc673166...

assign points if it helps.

Edited by: Moderator on Mar 19, 2008 3:34 PM

  • Please don't ask for points on forum replies

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sid,

Go through this code.

Data Declaration starts

DATA : l_biw_knvv_s LIKE biw_kna1_s.

DATA : zz1payer LIKE knvp-kunn2, zz1pcc_area LIKE knkk-kkber,

zz1pind_cd2 LIKE kna1-bran2,zz1pterm LIKE knvv-zterm,

zz1pcustgrp LIKE knvv-kdgrp.

Logic to be added

when '0CUSTOMER_ATTR'.

clear i_counter.

loop at i_t_data into l_biw_kna1_s.

Selection of Payer against “Sold to” of Customer

select * from knvp

where kunnr = l_biw_kna1_s-kunnr

and VKORG = l_biw_kna1_s-vkorg

and VTWEG = l_biw_ kna1_s-vtweg

and SPART = l_biw_kna1_s-spart

and parvw = 'RG' .

if sy-subrc eq 0.

l_biw_kna1_s-zz1payer = knvp-kunn2.

Else

l_biw_kna1_s-zz1payer = l_biw_kna1_s-kunnr.

Endif

In the similar way you will enhance the extractor

Regards

Karthik

Former Member
0 Kudos