05-14-2009 7:14 AM
Hi All,
I am in need of generating an INVOICE from FB01 tcode. I have to generate the invoice according to the USER6 field in the table AUFK. The invoice amount should be totalled according to the USER6 field. It should also have a logo.
I am plannig to use the BAPI - BAPI_ACC_GL_POSTING_POST.
But it doesnot hold the USER6 field. The details for posting are enterd through a Selection-screen in a Custom Program.
Let me know how to proceed. Will the BAPI be useful in generating the invoice.
Regards,
Priyanka.
05-14-2009 7:50 AM
Hi Priyanka,
From your requirement I understand that you want to post an accounting document instead of invoice.
The amount BAPI_ACC_DOCUMENT_POST is useful for your requirement.
From the order number given on the inut screen ( AUFNR needs to be given on the input screen ) , Get the USER6 Filed from AUFK and the filed value is the amount( DMBTR) in the BAPI.
Regards,
Sai
05-14-2009 7:50 AM
Hi Priyanka,
From your requirement I understand that you want to post an accounting document instead of invoice.
The amount BAPI_ACC_DOCUMENT_POST is useful for your requirement.
From the order number given on the inut screen ( AUFNR needs to be given on the input screen ) , Get the USER6 Filed from AUFK and the filed value is the amount( DMBTR) in the BAPI.
Regards,
Sai
05-14-2009 12:47 PM
Hi Sai,
Thanks a lot for the reply.
But the USER6 field is not defined in the BAPI and no where in the tcode FB01. Let me know how to pass that particular fields to be in the document.
Thanks,
Priyanka
05-14-2009 1:15 PM
Yes Priyanka. USER6 will not be there in BAPI. The value stored in USER6 to be moved to amount field (DMBTR) in accounting document.
Regards,
Sai
05-15-2009 6:53 AM
Hi,
In the Function Module BAPI_ACC_GL_POSTING_POST in the tables we have two tables ACCOUNTGL
and CURRENCYAMOUNT.
There is a common field for both the tables POSNR_ACC with which the items are to be sent to the BAPI.
Please let me know from which table we get the field so that i can send the data through the tables.
Thanks,
Priyanka.
05-15-2009 7:01 AM
Hi Priyanka,
You can check n BSEG table.
What happens in Accounting document is: There should be a credit entry for every debit entry.
In GL account internal table, you need to pass the both Credit and debit GL account information.
In the amounts internal table, you need to pass the Amout that is credit for each GL.
Example: GL: 10000 Credit. Amount : 500 /-
GL: 10030 Debit Amount : 500 /-.
Regards,
Sai
05-15-2009 7:08 AM
Hi Sai,
BSEG table doesnot hold the field.
In my scenario i am getting data from BSEG and BKPF. Calculating the total amount for particular accounting number ans then passing them through the BAPI to post the document.
My doubt is POSNR_ACC should be sent through my internal table..how will i send the data??
Thanks,
Priyanka.
05-15-2009 7:22 AM
Hi Priyanka,
POSNR_ACC gets automaticall picks up. I think need not to send it.
If it fails to post the document, then send it as 10 , 20 , 30 for resprctive items.
Regards,
Sai