Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Programm Update-update

HI Gurus,

I need following details from table.... howt do it plz tell me..

Table: ANEP

Field Name: NAFAB: Ordinary dep on trasactions..

i want to get total dep posted upto current period.. for each asset wise... how to do it..

regards

JK

Tags:
replied

Hi Janardhan Rao,

Yes you can create FM_GET_ANEP.

What you have to do is :

1.Declare the variables and internal tables globally used in the latest code.

2.Copy the code into one perform FM_GET_ANEP.

DATA:

BEGIN OF t_total_depreciation OCCURS 0,

anln1 TYPE anep-anln1,

nafab TYPE anep-nafab,

END OF t_total_depreciation.

SELECT anln1 nafab

INTO TABLE t_total_depreciation

FROM anep

WHERE bzdat LE sy-datum.

WRITE:

/10 'Asset', 25 'Total Depreciation' ,/ .

ULINE.

IF sy-subrc EQ 0.

SORT t_total_depreciation BY anln1.

LOOP AT t_total_depreciation.

AT END OF anln1.

SUM.

WRITE:

/10 t_total_depreciation-anln1,

25 t_total_depreciation-nafab.

ENDAT.

ENDLOOP.

ENDIF.

3.if the anln1 nafab fields are not there in the final internal table and intermediate internal table process, Add those two fileds.

4.In the FM_PROCESS_DATA form use read table t_total_depreciation and and push the value into newly created field.

Regards,

Rama.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question