FB50L Non Leading Document  CO & PCA Document is not generating

Hi Guys,
will book expenses in FB50L Non leading ledger document posting that time CO, PCA, CO-PA document is not generating.
client using New GL and activatied Clasical PCA also. all reports developed based on GLPCA Table
in controlling side what are settings is required.
Please provide any configuration settings is required in CO Side.
Thanks
Ramu

HI Ramu,
Please refer the below notes.
Note 804753 and 932045.
Regards
Madhu M

Similar Messages

  • Exchange rate difference in FI document and PCA document.

    When we invoice with foreign currency, document exchange rate used in posting to FI but exchange type ‘M’ used in posting to PCA. Can we use document exchange rate to post to PCA?

    I dont think this is possible. Generally in PCA config setting you maintain this exchange rate type. Go to OKEQ and selelct verion 0 and click against Settings for PC accounting on the left hand side.  Here you can see the exchange rate type which is set. So you need to maintain the exchange rate type here. There is no way that document exchange rate can be set here.

  • PCA document not able to display in tc: 9KEK

    Hi,
    I have posted some entries in PCA via allocation and also adjustment entries.
    I am able to see these entries in GLPCA table and also in standard line item report: KE5Z but not able see the document in PCA document display transaction 9KE9, I have selected the layout, doc number, document type.
    Any help on this.
    Thanks
    Suresh

    If you assign the profit center in the document or it will be posted dummy profit center automatically,based on cost objects assignment to the profit center.kinldy check once again in the profit center master data.If you posted the document pertaining to the profit center, it shows in the report KE5Z.
    Please check in the master data and document.
    Thanks and regads
    Sivakumar.Subbiah

  • Non Leading Ledger Posting

    Hi Guys,
    Have client requirement in Non-Leading Ledger.
    For MIS reportting purpose Non Leading Ledger using, dont impact on Leading only for MIS purpose post some Entryes. FB50L use for Non Leading Ledger Posting.
    1. Normal Expenses booking every month - No issues
    2. Provision book for Customer & Vendor every month dont impact on any logal Books - In this case is it possiable manual JV ?
    I tested one scenario Normal Expenses booked in FB50L 2012 8 period Document Type is SA. If saw in FAGLFLEXT Table 2012 - 8 period no values it is coming only in 16 period only.
    3. Will book any Manual JV Expenses book in FB50L Non leading ledger will show 16 period only ? or any setting is wrong.
    4. Will book any Expenses in FB50 Leading automatically updating in Non Leading Ledger will see in FAGLFLEXT Table same value showing under 16 period only.
    If i check in FAGLFLEXA Table is showing correctly 2012 - 8 Leading & Non-Leading (FB50L)
    5. We are using 30 company codes in 30 Countryes. Currency Keys is 10, 40, 60- USD. 60 is common currency for all co.Codes. issue is i developed one report in Report painter Used FAGLFLEXT Table. 60 Global Company Currency is not updating.
    Please provide the soluation on above points it is very urgent.
    Thanks
    Ramu

    By default system will post to all ledgers that is leading and non leading ledgers for a posting. However you can make postings to non leading ledgers independent of leading ledgers using Fb50L which should not be open item managed.
    Non leading ledger will contain all postings of leading ledgers + postings related to local reporting requirements.
    There is no way that you can control this in my opinion using SAP standard functionalities.

  • Tax Date Based Non Leading Ledger BS, TB and PnL

    Hi Gurus
    In our scenario, we will be using the Leading Ledger for Accrual Accounting, while the Non Leading Ledger will be used for Cash Accounting. It is required, for management effectiveness to capture transactions on accrual basis (leading ledger), but as far as tax reporting is concerned, it will be on cash basis (non leading ledger).
    Scenario is:
    Vendor Invoice comes on Jul 1, 2009 with terms of payment as say 45 days. The due date is mid August. In accrual (Leading Ledger) accounting, we will book the invoice on Jul 1, 2009 (posting date) with 45 days credit period, and due date as Aug 14, 2009. Now, as per cash accounting (Non Leading Ledger) we should only book this invoice on Aug 14, 2009,when the cash outflow will take place. However, since in New GL posting automatically happens for Leading and Non Leading ledgers, the NL document also will have the same posting date as LL document (Jul 1, 2009). The TDS/ Service Tax etc. however will be deducted only on payment, in August, which is a different fiscal period (as well as different tax reporting period).
    My question is, is there a way to use TAX DATE or some other date field for Non Leading Ledger, and have the tax reports generated on that basis? Mind you, the purpose of cash accounting is for statutory and tax purposes. So we need to be able to draw financial statements based on cash accounting.
    Would greately apprecaite if any of you can help me guide to a possible solution. I have the following options:
    1 - Create a report that will use (somehow) a logic to capture the transactions based on tax date
    2 - Find a User Exit to capture the actual cash flow date and use it to generate the tax/ statutory reports
    3 - Use Tax Date field to store the cash flow date and use it to generate the tax/ statutory reports
    Any suggestions welcome!
    Regards
    Mandar

    Hi,
    using different ledgers for parallel accounting ( eg IFRS, US-GAAP, Indian-GAAP...) is not a matter of tax procedure assigned to a country and company code(s) assigned to a country.
    The tax law for a country/tax jurisdiction code does not depend on which reporting standard you use (IFRS, US-GAAP, Indian-GAAP...).
    Best regards, Christian

  • Opening balance upload in Leading and NOn leading ledger.

    Hi All.
    We are in the phase of opening balance upload. We are using Leading and Non leading ledger concept. Our Leading ledger starts on 29th of March 2009 as per UK reporting and Non leading ledger starts from 1st April to 31st of March as per India reporting.
    We were going to upload the opening balance as on 22nd of Nov as per UK reporting. But here We stuck because as per India reporting our 2008 fiscal year has been closed on 31st of march 2009 also financial books has been closed. But due to UK reporting we are carrying 29th to 3st march 2009 P&L balances in Leading ledger which has been considered in the India Balance sheet ( has come in Profit and Loss Account).
    Here I am not able to understand that how I should upload the 29th to 31st march P&L balances in leading ledger because if I will upload these through F-02 or FB50 BDC than these will effect the India balances also. If I am using the FB01l or FB50L to upload the Non leading ledger balances, than system is not allowed me to upload the balances in open item management accounts. System prompt me following message.
    Postings to G/L accounts with open item management are not permitted
    Message no. FAGL_POST_SERVICE012
    Diagnosis
    You use G/L account 213702 in company code 7041 with open item management. However, postings are not permitted to G/L accounts in individual ledgers with open item management.
    Procedure
    If you have not yet made any postings to this account and if the account is to be used for closing processes in non-leading ledgers, deactivate the Open Item Management indicator in the company code data for the G/L account.
    Can any one tell me that how I can Achieve the same with correct P&L affect in Leading Ledger and correct effect in Non leading ledger Profit and loss account.
    Appreciate your immediate response.
    Many thanks

    Hi
    If your problem is solved, can you please let me know the solution for upload of customer, vendor and other open GL items in Non Leading Ledger.
    Regards
    Sourabh

  • Exit for to restict Non-leading ledger posting periods for Document Type SA

    Hi,
      Please give the guidelines to complete the following requirment.
      In SAP FI two ledgers Leading(0L), Non-Leading (J2) Posting periods are defined in OB52.
    If non-leading ledger is closed also it will take the Leading posting periods and Posting the document..
    This is the SAP Behaviour.
    Like in FB50L if we enter J2 (Non-Leading) it will display the erro message like
    Posting period in not open.
    Like that they want for FB70,FB75,MIGO,MIRO,FINT and Invoice(VF01).
    Please suggest the suitable exit.
    Thanks & Regards,
    Padmaja.

    Hi Ramu,
    Please refer the below points,
    1. Leading ledger is only one ledger in one client.
    2. In one client you can keep N of non leading ledgers.
    3. company codes are need  assign to non leading ledgers.
    4. All postings will update leading ledger by default.
    5. Non leading ledgers will update if  company code is assigned to non leading ledger.
    6. If you want to  post only non leading ledger then please use the tcode FB50L and FB01L.
    7 You can set the separeate fiscal year variant for non leading ledger.
    I hope above information will resolve you r issue.
    Regards
    Madhu M
    http://wiki.sdn.sap.com/wiki/x/JghNCw    (NewGL Migration Secnarios)
    http://wiki.sdn.sap.com/wiki/x/mosOD     (Document Splitting Wizard)
    http://wiki.sdn.sap.com/wiki/x/f4OfDg    (NON-LEADING LEDGER SPECIFIC
                                                                  POSTING)

  • Document splitting with non leading ledger activation

    Hi experts,
    Thanks for your advance help. we have activated document splitting in my company code pofit center is deriving proprly. for below entry.
    1 31       503402     Vinayaka International Ltd.     4100     3,000.00-     0.00
    2 40       53080043     ELECT.CHRGS-NON PLT     4100     2,000.00     0.00  4206
    3 40       53080043     ELECT.CHRGS-NON PLT     4100     1,000.00     0.00  4207
    system is deriving profit center like below.
    000001  31  16011002     SUNDRY CREDITORS     2,000.00-     INR   4207
    000002  40   53080019     BAD DEBTS WRITTEN OF     1,000.00     INR   4207
    000003  40   53080043     ELECT.CHRGS-NON PLT     1,000.00     INR   4206
    000004  50   19910001     INTER BRCH/DIVN A/C     1,000.00-     INR   4206
    000005 40   19910001     INTER BRCH/DIVN A/C     1,000.00     INR   4207
    in the same way i have activated document splitting in another company code with non leading ledger activation. and posting same transation
    1 31       503402     Vinayaka International Ltd.     4100     3,000.00-     0.00
    2 40       53080043     ELECT.CHRGS-NON PLT     4100     2,000.00     0.00  4206
    3 40       53080043     ELECT.CHRGS-NON PLT     4100     1,000.00     0.00  4207
    system is not deriving pofit center and it is giving the below error.
    Balancing field "Profit Center" in line item 001 not filled
    please advise any configration i have missed out.
    any quaries please please let me know.
    Regards

    Hi Venkat,
    Even in the first transaction, the profit center has not been determined by document splitting
    if the profit center was derived by document splitting we would have seen 2 items for sundry creditors in the GL view
    So check your document splitting settings for the corresponding document type, and transaction variant
    the account category which includes vendor's recon accounts should be included in "item categories to be edited" list
    Regards
    Sach!n

  • Different segment in same document for leading and non-leading ledger

    Hi,
    Is it possible to have different segments derived in the same document for Leading and Non-leading ledgers.
    Is there an exit where we can substitute the segment originally derived so as to update only in one particular ledger
    Please suggest.

    Thanks Alex for your response.
    But would it be possible to update the segment only in one ledger, the other one carrying the default values coming from profit center?

  • ECC 5.0 BAPI for posting documents only in non-leading ledger

    Hello,
    for an FI-interface i want to call an BAPI for posting the documents. The document were posted to the leading ledger and to the non-leading ledger by usage of BAPI_ACC_DOCUMENT_POST.
    Now there are cases to post documents only to the non-leading ledger.
    Is there anywhere a possibility to tell the BAPI (e.g. enter the ledger group) only to post to the non-leading ledger or is another BAPI available to do so.
    Thank you for your help.
    Thomas

    Hi Thomas,
    You can use the same BAPI for any type of ledger postings. You can restrict your postings to Type of ledger.
    Cheers
    Srinivas

  • Document Split on Non Leading Ledger

    Hi Friends,
    Can we activate document split on Non leading Ledgers also?
    Actually my client wants to maintain Leading ledger as per US GAAP and Non leading ledgers as per Schedule VI
    So there is a requirement of activating document split on the non leading ledgers
    Regards,
    Ambuj Garg
    +91-9739976912

    Ok Think I should put my question differently
    I have activated document split.....
    Leading and Nonleading Ledgers are also in use
    Now when i post a document it is split on the basis of Profit Center on the "OL" Leading Ledger view
    While in the "NL" it is not split.
    Is there a seperate setting for achieving document split in the Nonleading ledgers

  • Document type and No. range for non leading ledger

    Hi Friends,
    can anybody tell me about the document type and No. range I can take for the non leading ledger.
    Regards

    Ok Pankaj,
    I am taking document types by copying it from the SAP standard document type and the No. range identical to the No. range assigned in the standard Doc. type. Is it ok
    LA                9A                               
    LB                 9B
    LC                 9C
    LD                 9D
    LE                  9E
    LF                  9F
    LG                  9G
    LH                  9H
    LI                   9I
    LJ                  9J
    LK                 9K
    LM                 9L
    LN                 9M
    LN                 9N
    LO                 9O
    LP                  9P
    LQ                 9Q
    LR                  9R
    LR                  9S
    LS                  9T
    LT                  9U
    LU                 9V
    LV                9W

  • Non-Stock Delivery - PGI Accounting Document

    Hi
    we are selling Non-Stock material. when invoice is being generated . Accounting document is generated  ( Customer <dr>  to Sales <cr>).  when Delivery-PGI is posted. No Accounting document is generated ..  because it is non-stock material and material document is not generated ( outbound delivery movemnt type 601) , resultant accounting document ( COGS (cost of goods sold ) <dr>  to Stock <cr>)   for material document is not generated.
    Requirment is we want to generate   Accounting document against Outbound Delivery    ( COGS<dr> to Stock in Trade account<cr> )
    without   Stock decreaes (outbound delivery movement type 601) because it is non-stock item.
    Actually it is because , at first when receive stock we put 
    Stock to  Stock in trade ( transfering  Material(valuated) to Material ( non valuated )
    so, we want to post accounting document on PGI   with accounting entry ( COGS to Stock in Trade ).
    Thanks
    thomas

    Hi Guru Reazuddin MD
    have already maped  Value-Material to Non - Material    .  MM & FI are running good. everything is ok regarding valu-material to Non-val-material.
    currnt requirment is :
    Sales order :   No ATP check on sales order.  
    Delivery Document : On Post Good Issue  ,  it will generate  a accounting document of our required accounts . like    COGS (cost of goods sold ) dr    >>>> to >>>> to Stock in Trade .
    but not decrease \ check any stock.
    when we transfer Valuated material to Non valuated material .    in accounting   Stock in Trade account is debited and Stock account is Credited. that is ok.
    Billing Document . billing and resultant Accounting document is already generated and ok.
    Regards
    Thomas

  • Regarding invoice no. displaying in non-invoice no.list in document flow

    Hi All,
    I have 3 radio buttons. if i select 1st one only orders with invoice list should be displayed and for 2nd only orders without invoice list should be displayed and for the 3rd both should be displayed.
    but here the problem was when i select the 2nd radiobutton and see the output it was showing all the orders without invoice no. but when i see the document flow for the first order it was showing invoice no. in DOCUMENT FLOW. but it was not displaying in the output.
    So any one can help me in this issue, i am sending the select statements i have used,
      Get the invoice numbers and the corresponding order numbers for the
      date range specified on the selection screen.
        SELECT vbrkvbeln vbrpposnr vbrp~matnr
               vbrpaubel vbfaposnv
          INTO CORRESPONDING FIELDS OF TABLE i_invoice_items FROM vbrk
          INNER JOIN vbpa ON vbrkvbeln = vbpavbeln
          INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln
          INNER JOIN vbfa ON vbrkvbeln = vbfavbeln  AND
                             vbrpposnr = vbfaposnn  AND
                             vbrpaubel = vbfavbelv
          WHERE vbrk~fkdat BETWEEN s_fkdat-low AND s_fkdat-high AND
                vbrk~bukrs  IN s_bukrs    AND
                vbpa~parvw   = 'WE'       AND
                vbpa~kunnr  IN s_kunnr    AND
                vbrk~vkorg  IN s_vkorg    AND
                vbrp~prodh  IN s_prdha    AND
                vbrp~werks  IN s_werks    AND
                vbfavbelv   = vbrpaubel AND
                vbfa~vbtyp_n = 'M'        AND
                vbfa~vbtyp_v = 'C'.
    get all open orders i.e. orders that have not been invoiced - Start.
      Step 1 - Get all invoiced orders.
        SELECT vbfavbelv vbfaposnv
          INTO CORRESPONDING FIELDS OF TABLE i_inv_ord_items
          FROM vbfa
          INNER JOIN vbpa ON vbfavbelv = vbpavbeln
          INNER JOIN vbak ON vbfavbelv = vbakvbeln
          INNER JOIN vbap ON vbfavbelv = vbapvbeln AND
                             vbfaposnv = vbapposnr
          WHERE vbtyp_n        = 'M'     AND
                vbtyp_v        = 'C'     AND
                vbpa~parvw     = 'WE'    AND
                vbpa~kunnr    IN s_kunnr AND
                vbak~vkorg    IN s_vkorg AND
                vbak~bukrs_vf IN s_bukrs AND
                vbap~abgru     = ' '     AND
                vbap~werks    IN s_werks AND
                vbap~prodh    IN s_prdha.
      STEP 2 - Get all orders that have not been invoiced.
      Step 2a) Get all orders that match the filters specified on the selection screen
        SELECT vbakvbeln vbapposnr matnr
          INTO CORRESPONDING FIELDS OF TABLE i_ord_items FROM vbak
          INNER JOIN vbap ON vbakvbeln = vbapvbeln
          INNER JOIN vbpa ON vbakvbeln = vbpavbeln
          WHERE vbpa~parvw     = 'WE'    AND
                vbpa~kunnr    IN s_kunnr AND
                vbak~vkorg    IN s_vkorg AND
                vbak~bukrs_vf IN s_bukrs AND
                prodh         IN s_prdha AND
                werks         IN s_werks AND
                vbap~abgru     = ' '.
        SORT i_ord_items BY vbeln posnr.
      Step 2b) Delete orders that have been invoiced by
               deleting records found in Step 1
        LOOP AT i_inv_ord_items INTO wa_inv_ord_items.
          READ TABLE i_ord_items
            INTO wa_ord_items
            WITH KEY vbeln = wa_inv_ord_items-vbelv
                     posnr = wa_inv_ord_items-posnv
            BINARY SEARCH.
          IF sy-subrc = 0.
            gv_index = sy-tabix.
            DELETE i_ord_items
              INDEX gv_index.
          ENDIF.
        ENDLOOP.
      Step 2c) Remove entries that exist in the invoiced orders internal table
      to avoid duplicate entries
        SORT i_ord_items BY vbeln posnr.
        LOOP AT i_invoice_items INTO wa_invoice_items.
          READ TABLE i_ord_items
            INTO wa_ord_items
            WITH KEY vbeln = wa_invoice_items-aubel
                     posnr = wa_invoice_items-posnv
            BINARY SEARCH.
          IF sy-subrc = 0.
            gv_index = sy-tabix.
            DELETE i_ord_items
              INDEX gv_index.
          ENDIF.
        ENDLOOP.
    get all open orders i.e. orders that have not been invoiced - End.
      Combine the open orders and invoiced orders into one internal table
    --Code added by CHHEDAM.SMS129705.Date- 03/28/2007--
      Clear 'invoiced' orders if open orders are opted.
        IF g_open EQ 'X'.
          CLEAR: i_invoice_items[].
        ENDIF.
    --End of code added by CHHEDAM.SMS129705.Date- 03/28/2007--
        IF g_open EQ 'X' OR g_both EQ 'X'.       
          LOOP AT i_ord_items INTO wa_ord_items.
            CLEAR wa_invoice_items.
            MOVE: wa_ord_items-vbeln TO wa_invoice_items-aubel,
                  wa_ord_items-posnr TO wa_invoice_items-posnv,
                  wa_ord_items-matnr TO wa_invoice_items-matnr.
            APPEND wa_invoice_items TO i_invoice_items.
          ENDLOOP.
        ENDIF.                                   
        SORT i_invoice_items BY vbeln.
        IF i_invoice_items[] IS NOT INITIAL.
          SELECT *
            FROM vbak
            INTO TABLE gt_vbak_table
            FOR ALL ENTRIES IN i_invoice_items
            WHERE vbeln = i_invoice_items-aubel.
          IF sy-subrc = 0.
            DELETE gt_vbak_table
              WHERE vkorg    NOT IN s_vkorg OR
                    bukrs_vf NOT IN s_bukrs OR
                    auart    NOT IN s_auart.
          ENDIF.
          SORT gt_vbak_table BY vbeln.
          IF gt_vbak_table[] IS NOT INITIAL.
            SELECT *
              FROM vbap
              INTO TABLE gt_vbap_table
              FOR ALL ENTRIES IN gt_vbak_table
              WHERE vbeln = gt_vbak_table-vbeln.
            IF sy-subrc = 0.
              DELETE gt_vbap_table
                WHERE werks NOT IN s_werks OR
                      prodh NOT IN s_prdha.
            ENDIF.
          ENDIF.
        ENDIF.
        SORT gt_vbak_table BY vbeln.
        SORT gt_vbap_table BY vbeln posnr.
    LOOP AT i_invoice_items INTO wa_invoice_items.
          READ TABLE gt_vbak_table
            INTO gt_vbak_table_line
            WITH KEY vbeln = wa_invoice_items-aubel
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-aubel     = gt_vbak_table_line-vbeln.
            display_table_line-vkorg     = gt_vbak_table_line-vkorg.
            display_table_line-auart     = gt_vbak_table_line-auart.
            display_table_line-bukrs_vf  = gt_vbak_table_line-bukrs_vf.
            display_table_line-bill_to   = gt_vbak_table_line-kunnr.
            display_table_line-vdatu     = gt_vbak_table_line-vdatu.
            display_table_line-faksk     = gt_vbak_table_line-faksk.
            display_table_line-lifsk     = gt_vbak_table_line-lifsk.
          ENDIF.
          READ TABLE gt_vbap_table
            INTO gt_vbap_table_line
            WITH KEY vbeln = wa_invoice_items-aubel
                     posnr = wa_invoice_items-posnv
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-posnr     = gt_vbap_table_line-posnr.
            display_table_line-matnr     = gt_vbap_table_line-matnr.
            display_table_line-kdmat     = gt_vbap_table_line-kdmat.
            display_table_line-maktx     = gt_vbap_table_line-arktx.
            display_table_line-werks     = gt_vbap_table_line-werks.
            display_table_line-prodh     = gt_vbap_table_line-prodh.
            display_table_line-kwmeng    = gt_vbap_table_line-kwmeng.
            display_table_line-vrkme     = gt_vbap_table_line-vrkme.
            display_table_line-waerk     = gt_vbap_table_line-waerk.
            display_table_line-net_price = gt_vbap_table_line-netwr.
            display_table_line-kzwi1     = gt_vbap_table_line-kzwi1.
            display_table_line-kzwi2     = gt_vbap_table_line-kzwi2.
            display_table_line-kzwi3     = gt_vbap_table_line-kzwi3.
            display_table_line-kzwi4     = gt_vbap_table_line-kzwi4.
            display_table_line-kzwi5     = gt_vbap_table_line-kzwi5.
            display_table_line-wavwr     = gt_vbap_table_line-wavwr.
            display_table_line-mwsbp     = gt_vbap_table_line-mwsbp.
          ENDIF.
          display_table_line-vbeln = wa_invoice_items-vbeln.
          APPEND display_table_line TO display_table_line.
          CLEAR wa_invoice_items.
          CLEAR display_table_line.
        ENDLOOP.
      Get the Purchase Order Number, Sales District and Desc
        IF display_table_line[] IS NOT INITIAL.
          CLEAR: gt_vbkd_table.
          CLEAR: gt_t171t_table.
          SELECT *
            FROM vbkd
            INTO TABLE gt_vbkd_table
            FOR ALL ENTRIES IN display_table_line
            WHERE vbeln = display_table_line-aubel.
          SORT gt_vbkd_table  BY vbeln.
          IF gt_vbkd_table[] IS NOT INITIAL.
            SELECT *
              FROM t171t
              INTO TABLE gt_t171t_table
              FOR ALL ENTRIES IN gt_vbkd_table
              WHERE bzirk = gt_vbkd_table-bzirk.
          ENDIF.
          SORT gt_t171t_table BY bzirk.
        ENDIF.
      Get Ship To Account
        IF display_table_line[] IS NOT INITIAL.
          CLEAR: gt_vbpa_table.
          SELECT *
            INTO TABLE gt_vbpa_table
            FROM vbpa
            FOR ALL ENTRIES IN display_table_line
            WHERE vbeln = display_table_line-aubel.
          IF sy-subrc = 0.
            DELETE gt_vbpa_table
              WHERE parvw <> 'WE'.
          ENDIF.
        ENDIF.
        SORT gt_vbpa_table BY vbeln parvw.
    Get Ship To Name and City
        IF gt_vbpa_table[] IS NOT INITIAL.
          CLEAR: gt_kna1_table.
          SELECT *
            INTO TABLE gt_kna1_table
            FROM kna1
            FOR ALL ENTRIES IN gt_vbpa_table
            WHERE kunnr = gt_vbpa_table-kunnr.
        ENDIF.
        SORT gt_kna1_table BY kunnr.
        IF display_table_line[] IS NOT INITIAL.
          CLEAR: gt_vbpa2_table.
          SELECT *
            INTO TABLE gt_vbpa2_table
            FROM vbpa
            FOR ALL ENTRIES IN display_table_line
            WHERE vbeln = display_table_line-aubel.
          IF sy-subrc = 0.
            DELETE gt_vbpa2_table
              WHERE parvw <> 'ZS' .
          ENDIF.
        ENDIF.
        SORT gt_vbpa2_table BY vbeln parvw.
        IF gt_vbpa2_table[] IS NOT INITIAL.
          CLEAR: gt_kna12_table.
          SELECT *
            INTO TABLE gt_kna12_table
            FROM kna1
            FOR ALL ENTRIES IN gt_vbpa2_table
            WHERE kunnr = gt_vbpa2_table-kunnr.
        ENDIF.
        SORT gt_kna12_table BY kunnr.
    Get Sales Group and Desc
        IF display_table_line[] IS NOT INITIAL.
          CLEAR: gt_knvv_table.
          SELECT *
            INTO TABLE gt_knvv_table
            FROM knvv
            FOR ALL ENTRIES IN display_table_line
            WHERE kunnr = display_table_line-bill_to  AND
                  vkorg = display_table_line-vkorg    AND
                  vtweg = '01'.
          SORT gt_knvv_table BY kunnr vkorg vtweg.
          IF gt_knvv_table[] IS NOT INITIAL.
            CLEAR: gt_tvgrt_table.
            SELECT *
              INTO TABLE gt_tvgrt_table
              FROM tvgrt
              FOR ALL ENTRIES IN gt_knvv_table
              WHERE vkgrp = gt_knvv_table-vkgrp AND
                    spras = sy-langu.
          ENDIF.
          SORT gt_tvgrt_table BY vkgrp spras.
        ENDIF.
    Get Order Status for the line items in the sales orders
        IF display_table_line[] IS NOT INITIAL.
          CLEAR: gt_vbup_table.
          SELECT *
            INTO TABLE gt_vbup_table
            FROM vbup
            FOR ALL ENTRIES IN display_table_line
            WHERE vbeln = display_table_line-aubel AND
                  posnr = display_table_line-posnr.
        ENDIF.
        SORT gt_vbup_table BY vbeln posnr.
        IF gt_vbup_table[] IS NOT INITIAL.
          CLEAR: gt_tvbst_table.
          SELECT *
            INTO TABLE gt_tvbst_table
            FROM tvbst
            FOR ALL ENTRIES IN gt_vbup_table
            WHERE spras = sy-langu AND
                  tbnam = 'VBUP'   AND
                  fdnam = 'GBSTA'  AND
                  statu = gt_vbup_table-gbsta.
        ENDIF.
        SORT gt_tvbst_table BY spras tbnam fdnam statu.
    Get Blocked Reason Text for Billing and Delivery Block
        IF display_table_line[] IS NOT INITIAL.
          CLEAR: gt_tvfst_table.
          SELECT *
            INTO TABLE gt_tvfst_table
            FROM tvfst
            FOR ALL ENTRIES IN display_table_line
            WHERE spras = sy-langu AND
                  faksp = display_table_line-faksk.
        ENDIF.
        SORT gt_tvfst_table BY spras faksp.
        IF display_table_line[] IS NOT INITIAL.
          CLEAR: gt_tvlst_table.
          SELECT *
            INTO TABLE gt_tvlst_table
            FROM tvlst
            FOR ALL ENTRIES IN display_table_line
            WHERE spras = sy-langu AND
                  lifsp = display_table_line-lifsk.
        ENDIF.
        SORT gt_tvlst_table BY spras lifsp.
        SORT display_table_line BY vbeln aubel posnr matnr.
        DELETE ADJACENT DUPLICATES
          FROM display_table_line
          COMPARING aubel posnr matnr .
        LOOP AT display_table_line INTO display_table_line.
          gv_index = sy-tabix.
      Get the Purchase Order Number, Sales District and Desc
          READ TABLE gt_vbkd_table
            INTO gt_vbkd_table_line
            WITH KEY vbeln = display_table_line-aubel
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-bstkd = gt_vbkd_table_line-bstkd.
            display_table_line-bzirk = gt_vbkd_table_line-bzirk.
            READ TABLE gt_t171t_table
              INTO gt_t171t_table_line
              WITH KEY bzirk = gt_vbkd_table_line-bzirk
              BINARY SEARCH.
            IF sy-subrc = 0.
              display_table_line-bztxt = gt_t171t_table_line-bztxt.
            ENDIF.
          ENDIF.
      Get Ship To Account
          READ TABLE gt_vbpa_table
            INTO gt_vbpa_table_line
            WITH KEY vbeln = display_table_line-aubel
                     parvw = 'WE'
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-ship_to = gt_vbpa_table_line-kunnr.
          ENDIF.
    Get Ship To Name and City
          READ TABLE gt_kna1_table
            INTO gt_kna1_table_line
            WITH KEY kunnr = display_table_line-ship_to
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-ship_to_name = gt_kna1_table_line-name1.
            display_table_line-ship_to_city = gt_kna1_table_line-ort01.
          ENDIF.
    Get Ship To Salesman Number
          READ TABLE gt_vbpa2_table
            INTO gt_vbpa2_table_line
            WITH KEY vbeln = display_table_line-aubel
                     parvw = 'ZS'
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-salesrep = gt_vbpa2_table_line-kunnr.
          ENDIF.
    Get Ship To Salesman
          READ TABLE gt_kna12_table
            INTO gt_kna12_table_line
            WITH KEY kunnr = display_table_line-salesrep
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-ship_to_srep = gt_kna12_table_line-name1.
          ENDIF.
    Get Sales Group and Desc
          READ TABLE gt_knvv_table
            INTO gt_knvv_table_line
            WITH KEY kunnr = display_table_line-bill_to
                     vkorg = display_table_line-vkorg
                     vtweg = '01'
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-vkgrp = gt_knvv_table_line-vkgrp.
            READ TABLE gt_tvgrt_table
              INTO gt_tvgrt_table_line
              WITH KEY vkgrp = gt_knvv_table_line-vkgrp
                       spras = sy-langu
              BINARY SEARCH.
            IF sy-subrc = 0.
              display_table_line-bezei = gt_tvgrt_table_line-bezei.
            ENDIF.
          ENDIF.
    Get Order Status for the line items in the sales orders
          READ TABLE gt_vbup_table
            INTO gt_vbup_table_line
            WITH KEY vbeln =  display_table_line-aubel
                     posnr =  display_table_line-posnr
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-gbsta = gt_vbup_table_line-gbsta.
          ENDIF.
          READ TABLE gt_tvbst_table
            INTO gt_tvbst_table_line
            WITH KEY spras = sy-langu
                     tbnam = 'VBUP'
                     fdnam = 'GBSTA'
                     statu = display_table_line-gbsta
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-status = gt_tvbst_table_line-bezei.
          ENDIF.
    Get Blocked Reason Text for Billing and Delivery Block
          READ TABLE gt_tvfst_table
            INTO gt_tvfst_table_line
            WITH KEY spras = sy-langu
                     faksp = display_table_line-faksk
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-fakskt = gt_tvfst_table_line-vtext.
          ENDIF.
         SELECT SINGLE vtext INTO display_table_line-lifskt
          READ TABLE gt_tvlst_table
            INTO gt_tvlst_table_line
            WITH KEY spras = sy-langu
                     lifsp = display_table_line-lifsk
            BINARY SEARCH.
          IF sy-subrc = 0.
            display_table_line-lifskt = gt_tvlst_table_line-vtext.
          ENDIF.
    Get Total Net and Total Gross Invoice Amount
          display_table_line-brtwr = display_table_line-kzwi1 -
                                     display_table_line-kzwi2 -
                                     display_table_line-kzwi3 -
                                     display_table_line-kzwi4 -
                                     display_table_line-kzwi5.
    Calculate Discount
          display_table_line-disc = display_table_line-kzwi2 +
                                    display_table_line-kzwi4.
         Unit Price and cost.
          IF display_table_line-kwmeng NE 0.
            display_table_line-unit_price = display_table_line-brtwr /
                                            display_table_line-kwmeng.
            display_table_line-wavwr = display_table_line-wavwr /
                                       display_table_line-kwmeng.
          ELSE.
            display_table_line-wavwr = 0.
          ENDIF.
        Calculate the GPM percentage.
          IF display_table_line-unit_price NE 0.
            display_table_line-gpm_perc = ( ( display_table_line-unit_price -
                                              display_table_line-wavwr ) /
                                              display_table_line-unit_price ) * 100.
          ENDIF.
        Update the internal table.
          SHIFT display_table_line-matnr   LEFT DELETING LEADING '0'.
          SHIFT display_table_line-bill_to LEFT DELETING LEADING '0'.
          SHIFT display_table_line-ship_to LEFT DELETING LEADING '0'.
          SHIFT display_table_line-vbeln   LEFT DELETING LEADING '0'.
          SHIFT display_table_line-aubel   LEFT DELETING LEADING '0'.
          WRITE display_table_line-vdatu   TO   display_table_line-vdatu_char MM/DD/YYYY.
          MODIFY display_table_line
            INDEX gv_index
            FROM display_table_line
            TRANSPORTING vbeln      aubel        bzirk        bztxt
                         bill_to    ship_to      ship_to_name ship_to_city
                         salesrep   ship_to_srep vkgrp        bezei
                         bstkd      gbsta        status       fakskt
                         lifskt     matnr        vdatu        brtwr
                         disc       unit_price   wavwr        gpm_perc
                         vdatu_char.
          CLEAR: display_table_line, tvbst_wa.
        ENDLOOP.
        IF  s_vkgrp[] IS NOT INITIAL.
          DELETE display_table_line WHERE vkgrp NOT IN s_vkgrp.
        ENDIF.
        IF  s_bzirk[] IS NOT INITIAL.
          DELETE display_table_line WHERE bzirk NOT IN s_bzirk.
        ENDIF.
        IF s_srep[] IS NOT INITIAL.
          DELETE display_table_line WHERE salesrep NOT IN s_srep.
        ENDIF.
        SORT display_table_line BY vkorg vkgrp ship_to_srep bill_to.
        DELETE display_table_line WHERE aubel = ' '.
      ENDMETHOD.                    "read_main_data
      METHOD display_report.
        CALL METHOD alv_class->set_table_for_first_display
       EXPORTING
         I_BUFFER_ACTIVE               =
         I_BYPASSING_BUFFER            =
         I_CONSISTENCY_CHECK           =
         I_STRUCTURE_NAME              =
         IS_VARIANT                    =
         I_SAVE                        =
         I_DEFAULT                     = 'X'
         is_layout                     = gv_layout
         IS_PRINT                      =
         IT_SPECIAL_GROUPS             =
         IT_TOOLBAR_EXCLUDING          =
         IT_HYPERLINK                  =
         IT_ALV_GRAPHICS               =
         IT_EXCEPT_QINFO               =
         IR_SALV_ADAPTER               =
         CHANGING
           it_outtab                     = display_table_line[]
           it_fieldcatalog               = gt_field_cat
         IT_SORT                       =
         IT_FILTER                     =
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4
        IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDMETHOD.                    "display_report
    Thanks in Advance,
    Ramana Prasad.T

    Hi Janakiraman,
    unfortunately we don't have an upload storage here in the SDN. At this point we have two options:
    a) you could upload the screenshots to a website that provides storage and then you can paste the url to the screenshots here
    b) we can route this through our support channel. You can send a message to our support team in the <a href="http://service.sap.com/smb/sbo/support">SAP Business One Support Center</a> in our <a href="http://service.sap.com/smb/sbo">SAP PartnerEdge Portal</a>.
    Please use the method that works best for you.
    Thanks,
    Torsten

  • No Sales Order Item number in PCA document on Delivery

    Hi,
    We have an issue as below:
    Sales Order (Not a CO object)>Delivery is done> We cannot see Sales Order item number in the PCA document whereas it appears in Accounting Document.
    After Billing, a CO-PA document also generated.
    Thanks to provide any information on this.
    Umapathi G

    Hi,
      For billing documents, the information from the respective sales order and from the sales order item in the line item table GLPCA is only in the fields AUBEL and AUPOS.    
      You post a goods issue for delivery. If you post the goods issue for a sales order stock, the information of the sales order is updated in the profit center document (field GLPCA-KDAUF). If the goods issue is posted from the make-to-stock inventory, then the sales order information is not updated.
    regards
    Waman

Maybe you are looking for

  • Cannot open Acrobat 6 Pro after opening Reader 8 and viceversa

    There is a compatibility issue between Acrord32.exe and Acrobat.exe files? My Acrobat 6 Professional does not open while viewing a PDF in Reader 8, get a empty Reader 8 window instead of Acrobat 6. When trying the opposite, the Reader 8 shows the fol

  • How to do Credential and Policy migration in 10g?

    Hi, I installed BPEL manager 10g on my machine and want to run the embed demos/tutorials. I noticed the demos are using JAZN as identity service but my installation on Weblogic Server does not support it. As a result I couldn't use JDeveloper BPEL UI

  • Help me with Javaaaa (very basic)

    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld Caused by: java.lang.ClassNotFoundException: HelloWorld at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.U

  • PayPal button size...

    Whenever I place a PayPal button, it has blank space at the bottom that I can't get rid of. In Muse, the button, by default, is 107px X 47px, but when previewed and inspected in the browser, it says the image is 107px X 27px. So how do I get rid of t

  • Right-click and Forms9i

    Hello, when i use the :SYSTEM.MOUSE_BUTTON_PRESSED variable, it returns allways 1 for 1st and 2nd button and nothing for the 3rd (right) button. is anybody could tell me the reason why ?