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

BAPI_GL_GETGLACCBALANCE

Former Member
0 Likes
1,703

Hi,

I have got a great problem.

I would like to use this bapi, but it does not work. I dont know, where the mistake is. To my mind, the bapi does not return the data.

Here is my code. thanks:

REPORT Z_BAPI_TEST_LEDGER .

DATA: MY_RET TYPE BAPIRETURN.

DATA BEGIN OF MY_TEXT OCCURS 1.

INCLUDE STRUCTURE BAPI1028_3.

DATA END OF MY_TEXT.

CALL FUNCTION 'BAPI_GL_GETGLACCBALANCE' DESTINATION 'DM06'

EXPORTING

companycode = '1000'

glacct = '1000'

fiscalyear = '1997'

currencytype = '10'

  • IMPORTING

ACCOUNT_BALANCE = MY_TEXT

RETURN = MY_RET

.

LOOP AT MY_TEXT.

WRITE: / MY_TEXT-Currency.

WRITE : / MY_TEXT-BALANCE.

WRITE : / MY_TEXT-COMP_CODE.

WRITE : / MY_TEXT-GL_ACCOUNT.

WRITE : / MY_RET-MESSAGE.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,487

hi,

Keep this Function module statement after the the calling of your bapi function module.

'BAPI_TRANSACTION_COMMIT'. There is nothing to export and import to this FM.

I hope this helps you.

Regards,

Gopi.

Hi,

I have got a great problem.

I would like to use this bapi, but it does not work. I dont know, where the mistake is. To my mind, the bapi does not return the data.

Here is my code. thanks:

REPORT Z_BAPI_TEST_LEDGER .

DATA: MY_RET TYPE BAPIRETURN.

DATA BEGIN OF MY_TEXT OCCURS 1.

INCLUDE STRUCTURE BAPI1028_3.

DATA END OF MY_TEXT.

CALL FUNCTION 'BAPI_GL_GETGLACCBALANCE' DESTINATION 'DM06'

EXPORTING

companycode = '1000'

glacct = '1000'

fiscalyear = '1997'

currencytype = '10'

  • IMPORTING

ACCOUNT_BALANCE = MY_TEXT

RETURN = MY_RET

.

LOOP AT MY_TEXT.

WRITE: / MY_TEXT-Currency.

WRITE : / MY_TEXT-BALANCE.

WRITE : / MY_TEXT-COMP_CODE.

WRITE : / MY_TEXT-GL_ACCOUNT.

WRITE : / MY_RET-MESSAGE.

ENDLOOP.

8 REPLIES 8
Read only

Former Member
0 Likes
1,488

hi,

Keep this Function module statement after the the calling of your bapi function module.

'BAPI_TRANSACTION_COMMIT'. There is nothing to export and import to this FM.

I hope this helps you.

Regards,

Gopi.

Read only

Former Member
0 Likes
1,487

why are you specifying destination...

just to know...i am asking..

vijay

Read only

Former Member
0 Likes
1,487

I am able to see the result , remove the Destination

for the sake of testing and try it out..

<b>you will get the result...</b>

vijay

Read only

Former Member
0 Likes
1,487

Hi

What happened , are you able to see the result..

if so please reward for helpful answers

vijay

Read only

andreas_mann3
Active Contributor
0 Likes
1,487

Hi Björn,

have you analyse structure return???

i've got error message

(in german: E |FN004|Keine Berechtigung für Kontoart Sachkonto )

-> check authority (F_BKPF_KOA) of your rfc-user

Andreas

Read only

Former Member
0 Likes
1,487

You've commented out "IMPORTING". Put it bck in and it should work.

Rob

Read only

Former Member
0 Likes
1,487

Hi,

Import Statement is commented. Uncomment that.

Regards,

Ramesh

Read only

Former Member
0 Likes
1,487

Thanks for helping me !