cancel
Showing results for 
Search instead for 
Did you mean: 

enhancement of 2lis_02_acc datasource..

Former Member
0 Kudos

Hi,

i want to enhance 2lis_02_acc datasource. basically this data source based on EKKO,EKKN AND EKPO. i want to add PSPNR from PROJ Table and where EKKN.PRCTR = PROJ.PRCT.

please provide me the step by step solution for this. after adding the field to the datasource i want to extract the data for this field from PROJ.

regards

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182346
Active Contributor
0 Kudos

Hi

data : begin of it_proj,

PRCTR like PROJ-PRCTR,

PSPNR like PROJ-PSPNR,

end of it_proj.

data : <FS_PROJ> like table of PROJ.

select PRCTR PSPNR from PROJ into corresponding fields of table it_proj

for all entries in ct_data where PRCT = ct_data-PRCTR.

loop at ct_data

read table it_proj with key PRCTR = ct_data-PRCTR.

if sy-subrc = 0.

move it_proj-PSPNR to <FS_PROJ>-PSPNR

endif.

Hope this ll be helpful.

Thank-You.

Regards

Vinod.

mansi_dandavate
Active Contributor
0 Kudos

Hi,

You need to append a structure and add the field first in the datasoruce and then write code to populate it..

Chk this article..

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/302d4b15-5847-2a10-93bb-9c45d9f0...

Former Member
0 Kudos

hi experts,

please tell me how to write ABAP Code to populate data for PSPNR field.

sample code please.

regards

Former Member
0 Kudos

Hi,

select PSPNR from PRJ into corresponding fields of table <itab>

for all entries in <source_itab> where PRCT = EKKN~PRCTR.

thnks.