0% found this document useful (0 votes)
48 views2 pages

Budget Return

This document contains code for a report that performs a budget transfer in SAP. It defines a data structure for the budget transfer information, populates it with sample data for two transfers, and calls a function to externally update the budget control data, passing the budget transfer table and returning any errors.

Uploaded by

maheshkumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views2 pages

Budget Return

This document contains code for a report that performs a budget transfer in SAP. It defines a data structure for the budget transfer information, populates it with sample data for two transfers, and calls a function to externally update the budget control data, passing the budget transfer table and returning any errors.

Uploaded by

maheshkumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

*&---------------------------------------------------------------------*

*& Report ZBAPI_BUDGET_TRANSFER


*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZBAPI_BUDGET_TRANSFER.

DATA : IT_BPAK TYPE TABLE OF BPAK,


WA_BPAK TYPE BPAK,
IT_RETURN TYPE TABLE OF BAPIRET2.

WA_BPAK-E_OBJNR = 'PR00000082'. ""Reciver Object Number


*WA_BPAK-S_OBJNR = 'PR00000080'. ""Sender Object Number
WA_BPAK-WERT = '100'. ""Amount
WA_BPAK-TWAER = 'USD'.
WA_BPAK-S_GJAHR = ''. ""Sender Year
WA_BPAK-E_GJAHR = ''. """Reciver Year
WA_BPAK-BLDAT = ''. ""Document Date
WA_BPAK-SGTEXT = '' . ""Text of the Document Item
WA_BPAK-E_GES = 'X'. ""
WA_BPAK-S_GES = 'X'.
*WA_BPAK-S_VORGA = 'KBN0'.
*WA_BPAK-E_VORGA = 'KBN0'.
WA_BPAK-E_PROFIL = 'YD0001'.
WA_BPAK-S_PROFIL = 'YD0001'.

APPEND WA_BPAK TO IT_BPAK.


*WA_BPAK-E_OBJNR = 'PR00000082'. ""Reciver Object Number
*WA_BPAK-S_OBJNR = 'PR00000080'. ""Sender Object Number
*WA_BPAK-WERT = '1000'. ""Amount
*WA_BPAK-TWAER = 'USD'.
*WA_BPAK-S_GJAHR = ''. ""Sender Year
*WA_BPAK-E_GJAHR = ''. """Reciver Year
*WA_BPAK-BLDAT = ''. ""Document Date
*WA_BPAK-SGTEXT = '' . ""Text of the Document Item
*WA_BPAK-E_GES = '1000'. ""
**WA_BPAK-E_PROFIL = 'YD0001'.
**WA_BPAK-S_PROFIL = 'YD0001'.
*
*APPEND WA_BPAK TO IT_BPAK.

CALL FUNCTION 'KBPP_EXTERN_UPDATE_CO'


EXPORTING
I_BUDGET_ACTIVITY = 'KBR0'
* I_BUDGET_ACTIV_SUP_RET = 'X'
* I_BUDGET_DISTRIBUTION_ALLOWED = ''
I_COMMIT_DATA = 'X'
* I_DELTA_AMOUNTS = 'X'
I_ROLLUP_DATA = ''
I_CHECK_PLAN_DATA = 'X'
I_APPLICATION = 'P'
* I_COMMIT_ALL = 'X'
* IMPORTING
* E_ERRORS_FOUND =
TABLES
IT_BPAK = IT_BPAK
IT_RETURN = IT_RETURN
EXCEPTIONS
NO_UPDATE = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

You might also like