zvf05-new.txt

Upload: prasadpandit123

Post on 04-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 ZVF05-new.txt

    1/2

    ZVF05- Descon Invoice Statement

    "Objective"

    The purpose of the report is to find out the list of invoices with Project Details, Revenue details, Tax details, Collection, Outstanding Details.

    "Selection Screen"

    There has been five Selection-screen options as follows:Sales OrganizationProject CodeSales Order NoCustomerBilling 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(VBRK-VBELN).

    1.2. GET Billing date(VBRK-FKDAT),Payer(VBRK-KUNRG) from Billing document 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),

  • 8/14/2019 ZVF05-new.txt

    2/2

    1.5. Find Correspond Sales Document(VBRP-AUBEL) of Billing Document(VBRP-VBELN).

    GET Customer PO No(VBAK-BSTNK) ,PO Date(VBAK-BSTDK) andSO 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 Taxes(ZSER,ZCST etc).]

    1.8. GET POSTING STATUS(VBRK-RFBSK) of Correspond Billing document(VBRK-VBELN).

    2. For project no & description:DOREAD 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 Element(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).IFReference Transaction(BKPF-AWTYP)='VBRK'and Reference Key(BKPF-AWKEY)=VBRK-VBELNand 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-BELNR,Company Code(BSEG-BUKRS)=BKPF-BUKRS,Fiscal Year(BSEG-GJAHR)=BKPF-GJAHR

    and Debit/Credit Indicator(BSEG-SHKZG)='S'(Debit).

    ENDIF.

    End of Program.