Вы находитесь на странице: 1из 2

ZVF05- Descon Invoice Statement "Objective" The purpose of the report is to find out the list of invoices with

Project Detai ls, Revenue details, Tax details, Collection, Outstanding Details. "Selection Screen" There has been five Selection-screen options as follows: Sales Organization Project Code Sales Order No Customer Billing Date "Output" The output will be: Billing Document, Currenrt Proj no , Project description, Payer, Sales Order No, SO Value, Bill Date, Pay-Terms, Customer Name, PO number, PO Date, Sales Organization, Posting Status, Condition Value, Amount in Local Currency.

"Brief Logic" This logic is all about how to fetch data.... 1. READ Billing Document no(VBELN) from Billing:Header Table(VBRK), Where SD document category(VBTYP) is Invoice('M'), and 'Billing document is cancelled(FKSTO)' not equals to

X .

1.1. GET Sales Organization(VBRK-VKORG) of Correspond Billing document(V BRK-VBELN). 1.2. GET Billing date(VBRK-FKDAT),Payer(VBRK-KUNRG) from Billing documen t no(VBRK-VBELN). 1.3. Find Terms of Payment Key(VBRK-ZTERM) form Billing document no(VBRK -VBELN). 1.4. GET CUSTOMER(KNA1-NAME1). Where Customer Number(KNA1-KUNNR)=Payer(VBRK-KUNRG),

1.5. Find Correspond Sales Document(VBRP-AUBEL) of Billing Document(VBRP -VBELN). GET Customer PO No(VBAK-BSTNK) ,PO Date(VBAK-BSTDK) and SO Value(VBAK-NETWR). Where Sales Document(VBAK-VBELN)=VBRP-AUBEL. 1.6. GET Sales Order No(VBFA-VBELV). Where 'Subsequent sales and distribution document'(VBFA -VBELN)=VBRK-VBELN. and 'Document category of preceding SD document'(VBFA-V BTYP_V)='C'(Order), 1.7. For Condition Value: Read Billing document(VBRK-VBELN),Find Number of the do cument condition(VBRK-KNUMV) of Correspond VBRK-VBELN. Get Condition type (KONV-KSCHL) with respect to Number of the document condition (KONV-KNUMV). [N.B.-When 'KONV-KSCHL' will be 'ZPRO' then that will b e consider as Revenue(excluding taxes), other cases generally considered as Taxe s(ZSER,ZCST etc).] 1.8. GET POSTING STATUS(VBRK-RFBSK) of Correspond Billing document(VBRKVBELN). 2. For project no & description: DO READ WBS Element from Billing:Item Table(VBRP -PS_PSP_PNR), When Billing Document(VBELN) of Item Table(VBRP) equals to Billi ng Document(VBELN) of Header Table(VBRK). GET CURRENT PROJECT NUMBER(PRPS-PSPHI). Where WBS Element(PSPNR) of WBS Master Table(PRPS)= WBS Elemen t(PS_PSP_PNR) of Billing:Item Table(VBRP). Then Find 'Current number of the appropriate project'(PRPS-PSPHI ),Where WBS Element(PRPS-PSPNR)= VBRP-PS_PSP_PNR. GET PROJECT DESCRIPTION(PROJ-POST1). When Project definition(PROJ-PSPNR)= PRPS-PSPHI. ENDDO. 3. For Amount in Local Currency:

GET AMOUNT IN LOCAL CURRENCY(BSEG-DMBTR). IF Reference Transaction(BKPF-AWTYP)='VBRK' and Reference Key(BKPF-AWKEY)=VBRK-VBELN and Company Code(BKPF-BUKRS)=VBRK-BUKRS. READ Accounting Document Number(BKPF-BELNR),Company Code(BKPF-BU KRS) and Fiscal Year(BKPF-GJAHR). Where Accounting Document Number(BSEG-BELNR)=BKPF-BELN R,Company Code(BSEG-BUKRS)=BKPF-BUKRS,Fiscal Year(BSEG-GJAHR)=BKPF-GJAHR and Debit/Credit Indicator(BSEG-SHKZG)='S'(Debit ). ENDIF. End of Program.

Вам также может понравиться