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

Report for interest payable

Former Member
0 Likes
421

Hi I am in new abap programming .below is the specification I am unable to write a code for this . I have written a bit code. Can any one help in this.its very urgent. Please help me.

Interest calculation Report

Table : BSIS

Variable we have to take: int1 interest payable,

If (Document type) BLART = ZL, BSCHL = 40 and valut (value date less then r equal to enter in selection screen)

VAR(no of days) = BLDAT – VALUT

Int1 = WRBTR * (VAR/360)* (XBLNR/100)

Selection Screen:

Company Code :

Value date from …….to …….

Output format: it has come according to date

GLAccount Accounting Doc No Amount Currency Interest payable

HKONT BELNR WRBTR WAERS INT1

Code which i have writen:

<b></b>

&----


*& Report ZFIINSTR0021

*&

&----


REPORT ZFIINSTR0021 LINE-SIZE 1022.

====================================================================

  • TABLES *

====================================================================

TABLES : BSIS.

DATA: BEGIN OF IT_FINAL OCCURS 0,

HKNOT LIKE BSIS-HKONT,

BELNR LIKE BSIS-BELNR,

WRBTR LIKE BSIS-WRBTR,

WAERS LIKE BSIS-WAERS,

BLDAT LIKE BSIS-BLDAT,

VALUT LIKE BSIS-VALUT,

BSCHL LIKE BSIS-BSCHL,

END OF IT_FINAL.

DATA INTVAL TYPE P DECIMALS 2.

======================================================================

  • SELECTION SCREEN *

======================================================================

SELECTION-SCREEN: BEGIN OF BLOCK ONE WITH FRAME TITLE text-001.

PARAMETER : P_BUKRS LIKE T001-bukrs.

SELECT-OPTIONS: S_VALUT FOR BSIS-VALUT OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK ONE.

START-OF-SELECTION.

PERFORM EXTRACT_DATA.

&----


*& Form EXTRACT_DATA

&----


FORM EXTRACT_DATA .

Select

ENDFORM. " EXTRACT_DATA

Thanks

Hi I am in new abap programming .below is the specification I am unable to write a code for this . I have written a bit code. Can any one help in this.its very urgent. Please help me.

Interest calculation Report

Table : BSIS

Variable we have to take: int1 interest payable,

If (Document type) BLART = ZL, BSCHL = 40 and valut (value date less then r equal to enter in selection screen)

VAR(no of days) = BLDAT – VALUT

Int1 = WRBTR * (VAR/360)* (XBLNR/100)

Selection Screen:

Company Code :

Value date from …….to …….

Output format: it has come according to date

GLAccount Accounting Doc No Amount Currency Interest payable

HKONT BELNR WRBTR WAERS INT1

Code which i have writen:

<b></b>

&----


*& Report ZFIINSTR0021

*&

&----


REPORT ZFIINSTR0021 LINE-SIZE 1022.

====================================================================

  • TABLES *

====================================================================

TABLES : BSIS.

DATA: BEGIN OF IT_FINAL OCCURS 0,

HKNOT LIKE BSIS-HKONT,

BELNR LIKE BSIS-BELNR,

WRBTR LIKE BSIS-WRBTR,

WAERS LIKE BSIS-WAERS,

BLDAT LIKE BSIS-BLDAT,

VALUT LIKE BSIS-VALUT,

BSCHL LIKE BSIS-BSCHL,

END OF IT_FINAL.

DATA INTVAL TYPE P DECIMALS 2.

======================================================================

  • SELECTION SCREEN *

======================================================================

SELECTION-SCREEN: BEGIN OF BLOCK ONE WITH FRAME TITLE text-001.

PARAMETER : P_BUKRS LIKE T001-bukrs.

SELECT-OPTIONS: S_VALUT FOR BSIS-VALUT OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK ONE.

START-OF-SELECTION.

PERFORM EXTRACT_DATA.

&----


*& Form EXTRACT_DATA

&----


FORM EXTRACT_DATA .

Select

ENDFORM. " EXTRACT_DATA

Thanks

2 REPLIES 2
Read only

Laxmana_Appana_
Active Contributor
0 Likes
384

Hi Hussain,

i have written some sample code without system ,check this , if it is not working tell me the error then i will correct the code and tell you.

*&---------------------------------------------------------------------*
*& Report ZFIINSTR0021
*&
*&---------------------------------------------------------------------*

REPORT ZFIINSTR0021 LINE-SIZE 1022.

*====================================================================*
* TABLES *
*====================================================================*

TABLES : BSIS.


DATA: BEGIN OF IT_FINAL OCCURS 0,
HKNOT LIKE BSIS-HKONT,
BELNR LIKE BSIS-BELNR,
WRBTR LIKE BSIS-WRBTR,
WAERS LIKE BSIS-WAERS,
BLDAT LIKE BSIS-BLDAT,
VALUT LIKE BSIS-VALUT,
BSCHL LIKE BSIS-BSCHL,
XBLNR LIKE BSIS-XBLNR,
NODAYS type i,
INTVAL like BSIS-WRBTR,
END OF IT_FINAL.



DATA INTVAL TYPE P DECIMALS 2.

*======================================================================*
* SELECTION SCREEN *
*======================================================================*
SELECTION-SCREEN: BEGIN OF BLOCK ONE WITH FRAME TITLE text-001.
PARAMETER : P_BUKRS LIKE T001-bukrs.
PARAMETER: p_VALUT FOR BSIS-VALUT OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK ONE.

START-OF-SELECTION.
PERFORM EXTRACT_DATA.
*&---------------------------------------------------------------------*
*& Form EXTRACT_DATA
*&---------------------------------------------------------------------*

FORM EXTRACT_DATA .
Select HKNOT BELNR WRBTR WAERS BLDAT VALUT BSCHL XBLNR from bsis
      into table IT_FINAL 
where  BLART = 'ZL' and
          BSCHL = 40 
         valut le p_valut.

if not IT_FINAL[] is initial.
   loop at it_final.
      it_final-nodays = it_final-BLDAT – p_valut. 
      modify it_final transporting nodays.
  endloop.

  loop at it_final.
      it_final-INTVAL = it_final-WRBTR * (it_final-nodays/360)* (it_final-XBLNR/100) 
      modify it_final transporting intval.
  endloop.

write :/ 'GLAccount', 'Accounting Doc No' ,'Amount Currency' ,'Interest payable'.
  loop at it_final.
    write :/ it_final-HKONT ,it_final-BELNR,it_final-WRBTR it_final-WAERS,it_final-INTVAL. 
 endloop.
endif. 

ENDFORM. " EXTRACT_DATA

Regards

Appana

Read only

Former Member
0 Likes
384

Hi Hussain,

There is no value in table BSIS for this condition

BLART = ZL, BSCHL = 40 thts y u r nt getting the

reqd o/p.

Hope this helps.

Regards,

Seema.