07-20-2006 9:15 PM
07-20-2006 10:06 PM
07-20-2006 9:22 PM
Try these
BAPI_ACC_DOCUMENT_POST Accounting: Posting
BAPI_ACC_DOCUMENT_REV_POST Accounting: Post Reversal
please read the Documentation .
Regds
Manohar
07-20-2006 9:25 PM
09-13-2006 6:19 PM
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
09-29-2006 1:47 AM
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
09-15-2011 7:42 PM
07-20-2006 10:06 PM
07-21-2006 7:01 AM
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
01-02-2008 11:41 AM
thx ...very much
i have got the solution.. i did the BDC with t code fb09 given in the link inside..
jigar p..