Application Development 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: 

Any BAPI for "FB02"

former_member445996
Participant
0 Kudos

Hi All,

Is there any BAPI/FM for transaction FB02?

Regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

Check this BAPI

BAPI_ACC_GL_POSTING_POST.

Regards,

Vara

8 REPLIES 8

Manohar2u
Active Contributor
0 Kudos

Try these

BAPI_ACC_DOCUMENT_POST Accounting: Posting

BAPI_ACC_DOCUMENT_REV_POST Accounting: Post Reversal

please read the Documentation .

Regds

Manohar

laxmanakumar_appana
Active Contributor
0 Kudos

Hi,

Check this FM : FI_ITEMS_MASS_CHANGE

Regards

appana

0 Kudos

Any body knows how this FM 'FI_ITEMS_MASS_CHANGE' work to update reference fields in Accounting Document (FB02).

Please send me a code how to pass the parameters.

thanks in advance

0 Kudos

I have successfully changed the reference field (BSEG-ZUONR) for a particular item using this FM FI_ITEMS_MASS_CHANGE.

Please find the following code:

REPORT ZTEST_FB02 .

type-pools : TPIT.

DATA : W_BSEG TYPE BSEG,

W_message TYPE T100-TEXT.

data : it_errtab TYPE tpit_t_errdoc WITH HEADER LINE,

it_fldtab TYPE tpit_t_fname WITH HEADER LINE,

it_buztab TYPE tpit_t_buztab WITH HEADER LINE.

  • Field name to be changed

it_fldtab-fname = 'ZUONR'.

append it_fldtab.

clear it_fldtab.

  • Field value

W_BSEG-ZUONR = 'TEST19'.

  • ITEM 7

select single

bukrs

belnr

gjahr

buzei

koart

umskz

bschl

mwart

mwskz

from bseg

into corresponding fields of it_buztab

where belnr = '0902001922' and

bukrs = '3160' and

gjahr = '2006' and

BUZEI = '007'.

if sy-subrc = 0.

APPEND it_buztab.

clear it_buztab.

endif.

CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'

EXPORTING

S_BSEG = W_bseg

IMPORTING

ERRTAB = it_errtab[]

TABLES

IT_BUZTAB = it_buztab

IT_FLDTAB = it_fldtab

EXCEPTIONS

BDC_ERRORS = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

perform generate_message.

write : w_message.

else.

write : 'Updated successfully'.

ENDIF.

&----


  • & Form generate_message

&----


FORM generate_message .

CLEAR W_message.

read table it_errtab index 1.

if sy-subrc <> 0.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

id = it_errtab-ERR-MSGID

lang = sy-langu

no = it_errtab-ERR-MSGNR

v1 = it_errtab-ERR-MSGV1

v2 = it_errtab-ERR-MSGV2

v3 = it_errtab-ERR-MSGV3

v4 = it_errtab-ERR-MSGV4

IMPORTING

msg = W_message

EXCEPTIONS

not_found = 1

OTHERS = 2.

endif.

ENDFORM. " generate_message

regards,

vamshi tallada

0 Kudos

Thanks man.

This was helpful.

Former Member
0 Kudos

HI,

Check this BAPI

BAPI_ACC_GL_POSTING_POST.

Regards,

Vara

0 Kudos

hi,

i think there's <b>no</b> bapi.

-> use bdc for transaction <b>FB09</b>(simple) or FB02

A.

Message was edited by: Andreas Mann

0 Kudos

thx ...very much

i have got the solution.. i did the BDC with t code fb09 given in the link inside..

jigar p..