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: 

bapi to post a vendor invoice not related to logistics?

arjun_subhash
Active Participant
0 Kudos

Hi experts,

i need to post values into GL accounts which dont have any reference documents like PO.Can i use BAPI_ACC_INVOICE_RECEIPT_POST.will this bapi create any accounting document like vendor invoice?or shall i use BAPI_ACC_GL_POSTING_POST.requirement is to post travel services done by a vendor from a java frontend.

Edited by: Arjun Subhash on Oct 17, 2008 9:39 AM

1 ACCEPTED SOLUTION

arjun_subhash
Active Participant
0 Kudos

BUT THE ERROR MESSAGE I GET IN RETURN IS LIKE

ERROR IN DOCUMENT OBJ_TYPE,OBJ_KEY,OBJ_SYS

INCORRECT ENTRY IN FIELD OBJ_TYPE

HOW TO CORRECT THESE ERRORS,

WHAT R THE VALUES FOR THESE FIELDS IN DOCUMENTHEADER.

I TRIED WITH OBJ_TYPE = BKPF,BKPFF,RMRP AND THEY R PRESENT IN TTYP.

OBJ_KEY = SOME UNIQUE VALUE OR SY-UZEIT.

OBJ_SYS = SAP + SY-SYSID + CLIENT.

14 REPLIES 14

Former Member
0 Kudos

Hello use in this way

DATA: lv_type LIKE bapiache03-obj_type.

DATA: lv_sys LIKE bapiache03-obj_sys.

DATA: lv_key LIKE bapiache03-obj_key.

CALL FUNCTION 'BAPI_ACC_INVOICE_RECEIPT_POST'

EXPORTING

documentheader = lv_doc_header

  • CUSTOMERCPD =

IMPORTING

obj_type = lv_type

obj_key = lv_key

obj_sys = lv_sys

TABLES

accountpayable = lt_positions_kred[]

accountgl = lt_positions_sako[]

accounttax = lt_positions_tax[]

currencyamount = lt_positions_amount[]

  • PURCHASEORDER =

  • PURCHASEAMOUNT =

return = lt_bapi_return

  • CRITERIA =

  • VALUEFIELD =

extension1 = lt_extension1. .

arjun_subhash
Active Participant
0 Kudos

BUT THE ERROR MESSAGE I GET IN RETURN IS LIKE

ERROR IN DOCUMENT OBJ_TYPE,OBJ_KEY,OBJ_SYS

INCORRECT ENTRY IN FIELD OBJ_TYPE

HOW TO CORRECT THESE ERRORS,

WHAT R THE VALUES FOR THESE FIELDS IN DOCUMENTHEADER.

I TRIED WITH OBJ_TYPE = BKPF,BKPFF,RMRP AND THEY R PRESENT IN TTYP.

OBJ_KEY = SOME UNIQUE VALUE OR SY-UZEIT.

OBJ_SYS = SAP + SY-SYSID + CLIENT.

0 Kudos

Hi Arjun,

Try with these values

OBJ_TYPE = 'BKPFF'

OBJ_SYS = '$

OBJ_KEY = '$'.

Thanks

Sudharshan

0 Kudos

thanks sudarshan,

i tried but the same problem,

shall i enter anything in criteria table for solving the problen.

0 Kudos

hi experts,

does anybody know the 'documentheader-obj_type' value for document type 'kr' or incoming vendor invoice for bapis like

bapi_acc_invoice_recipt_post,

bapi_acc_gl_posting_post.

i tried with bkpf,bkpff,axbta,ztest ete......

all showing error message as document error.

0 Kudos

Hi Arjun,

I am sorry I didnt see that its vendor invoice for this actually you need not pass any values for these 3 fields it should be empty and bus_act field should contain value as 'RMRP'.

I am talking about BAPI_ACC_DOCUMENT_POST to post vendor invoice.

Thanks

Sudharshan

0 Kudos

Thanks Sudarshan, i was thinking about that BUS_ACT field value.

But that LINE ITEMS ENTERED SEVERAL TIMES is coming,

can u please explain this error...

regards

Arjun

0 Kudos

No need to answer that sudharshan, i understood the mistake...

i was entering vendor account number and his gl account number in both ACCOUNTPAYABLE and GL ACCOUNT tables so 'line item entered several times'! Instead vendor number for credit in ACCOUNTPAYABLE and gl accounts for debit in GLACCOUNT was enough.

thanks and regards

Arjun

Edited by: Arjun Subhash on Oct 21, 2008 9:24 AM

0 Kudos

Hello experts,

i am facing a same problem with both

bapi_acc_invoice_reciept_post and

bapi_acc_document_post

the return message is showing

'document XXX posted successfully' but no such documents seen in database!!!

earlier i successfully used bapi_acc_gl_posting_post , its creating documents but my requirement is to post credit to a particular vendor account not to a balancesheet ledger which cannot be done using bapi_acc_gl_posting_post.

what should be done,my doc_type is KR

any help please???

Edited by: Arjun Subhash on Oct 21, 2008 10:17 AM

0 Kudos

Hi Arjun,

To post Credit Memo document you need to pass document type as 'KG' and regarding the message saying document xxx posted successfully and not able to find in the database because you might have forgotten to use BAPI_TRANSACTION_COMMIT after the BAPI_ACC_DOCUMENT_POST.

Thanks

Sudharshan

0 Kudos

Hi experts,

I was making a bapi to post vendor invoice(travel expences) as we do like F-43 .(my doc_type is 'TR' ).In transaction f-43, on the screen for entering details of vendor, there are two mandatory field like "Business Place" and "Business section" for which values for my client is always only 'IN01' .

everything else got allright with standard bapis like

'bapi_acc_document_post' and

'bapi_acc_invoice_recipt_post'

except that i could't find no import/tables parameter like business place( BSEG-BUPLA ) and business section( BSEG-SECCO ).In return message, i am getting the same error message (I:ZTDS:001) as i get in t-code f-43 when i dont enter these values.

any comments will be highly helpful,

thanks and regards

Arjun

0 Kudos

hello guys,

I found those 'business place' and 'section code' fields in ACCOUNTPAYABLE table which i missed earlier,

and my bapi is done with all your help.

thanks and regards to all

Arjun

Former Member
0 Kudos

Hi ,

I am using the FM "BAPI_ACC_DOCUMENT_POST"

BUT THE ERROR MESSAGE I GET IN RETURN IS LIKE

ERROR IN DOCUMENT OBJ_TYPE,OBJ_KEY,OBJ_SYS

INCORRECT ENTRY IN FIELD OBJ_TYPE

HOW TO CORRECT THESE ERRORS,

WHAT R THE VALUES FOR THESE FIELDS IN DOCUMENTHEADER.

So I removed values for all the 3 and passed only BUS_ACT = RFBU but I am getting some more errors like

1. Error in document: BKPFF $ R3SRD200

2. |FI/CO interface: Line item entered several times

plz help me how to avoid these 2 errors , actually I am passing data for Accountpayables tables only eventhough i am getting the same error....

plz reply if possible send some sample code...

0 Kudos

Hi,

Actually u dont need to pass any values to those three fields.

the error 'line item entered several times' is because u r passing more than required lines to glaccount and accountrecivable or accountpayable tables whatever u r using.

i suppose u r entering a vendor details,

then give item_no 1 in accountpayable and 2,3,4 etc in glaccount tables.

mention all in currencyamount table as 1,2,3,4 etc..and give negative values in 'amount' for credit entries.

regards

Arjun