Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Opening balance...

Former Member
0 Likes
329

hi experts,

1. First i need to define fisycal year from jan to december.

please tell me how we will define a ficycal in my program.

2. I need to calculate opening balance.

in my selection screen i having the date field BSIS-BUDAT.

if customer will give the date from 1st April 2006 to 31st September2006 in selection screen

then i have to calculate opening balance from 1st jan 2006 to 31st March2006 and

debit and credit amounts for 1st April2006 to 31st september2006.

how can i calculate this.

please suggest me if possible please send me code for that defining fisycal year and calculations.

please help me it is very urgent to me.

Thanks in advance,

Regards,

sudharsan.

1 ACCEPTED SOLUTION
Read only

kiran_k8
Active Contributor
0 Likes
306

Sudharsan,

Depending on the given date in the selection screen the following code with fetch you the fiscal year.

START-OF-SELECTION.

IF s_budat IS NOT INITIAL.

IF s_budat-high IS NOT INITIAL.

WHILE s_budat-low LE s_budat-high.

i = s_budat+7(2).

IF i > 3.

s_gjahr = s_budat+3(4).

APPEND s_gjahr.

ELSE.

c = s_budat+3(4).

s_gjahr = c - 1.

APPEND s_gjahr.

ENDIF.

s_budat-low = s_budat-low + 1.

ENDWHILE.

ELSE.

i = s_budat+7(2).

IF i > 3.

s_gjahr = s_budat+3(4).

APPEND s_gjahr.

ELSE.

c = s_budat+3(4).

s_gjahr = c - 1.

APPEND s_gjahr.

ENDIF.

ENDIF.

ENDIF.

K.Kiran.

hi experts,

1. First i need to define fisycal year from jan to december.

please tell me how we will define a ficycal in my program.

2. I need to calculate opening balance.

in my selection screen i having the date field BSIS-BUDAT.

if customer will give the date from 1st April 2006 to 31st September2006 in selection screen

then i have to calculate opening balance from 1st jan 2006 to 31st March2006 and

debit and credit amounts for 1st April2006 to 31st september2006.

how can i calculate this.

please suggest me if possible please send me code for that defining fisycal year and calculations.

please help me it is very urgent to me.

Thanks in advance,

Regards,

sudharsan.

1 REPLY 1
Read only

kiran_k8
Active Contributor
0 Likes
307

Sudharsan,

Depending on the given date in the selection screen the following code with fetch you the fiscal year.

START-OF-SELECTION.

IF s_budat IS NOT INITIAL.

IF s_budat-high IS NOT INITIAL.

WHILE s_budat-low LE s_budat-high.

i = s_budat+7(2).

IF i > 3.

s_gjahr = s_budat+3(4).

APPEND s_gjahr.

ELSE.

c = s_budat+3(4).

s_gjahr = c - 1.

APPEND s_gjahr.

ENDIF.

s_budat-low = s_budat-low + 1.

ENDWHILE.

ELSE.

i = s_budat+7(2).

IF i > 3.

s_gjahr = s_budat+3(4).

APPEND s_gjahr.

ELSE.

c = s_budat+3(4).

s_gjahr = c - 1.

APPEND s_gjahr.

ENDIF.

ENDIF.

ENDIF.

K.Kiran.