Billing quantity issue in case of BAPI_BILLINGDOC_CREATEMULTIPLE

Hello Folks,
We have a ‘z’ transaction where we are using BAPI ‘BAPI_BILLINGDOC_CREATEMULTIPLE’ to create Billing Document. However the billing quantity updated in the billing document is ‘0.00’ in the case of document being created using the ‘z’ transaction whereas the correct quantity is updated from the transaction ‘VF01’.
If I change the configuration in VTFL, of billing quantity from ‘B Delivery quantity less invoiced quantity’ to ‘G Cumulative batch quantity minus invoiced quantity’ then the quantity updated from ‘z’ transaction appears correct while the quantity gets doubled in case of ‘VF01’ ie. quantity is updated in both the batches and invoiced item.
Here is the code snippet I have used in my ‘z’ transaction to create the billing document:
LOOP AT gt_item_inv_coll INTO gs_item_inv_coll.
    REFRESH : gt_billing.
    CLEAR : gv_line_item. gv_line_item = '0'.
    LOOP AT gt_item INTO gs_item WHERE vbeln_del  = gs_item_inv_coll-vbeln_del .
*  IF GS_ITEM-STO_SO_IND = 'STO'.
      gv_line_item  = gv_line_item + 10.
      gs_billing-ordbilltyp = 'ZSTO'.
      gs_billing-ref_doc    = gs_item-vbeln_del.
      gs_billing-ref_item   = gv_line_item.  " GS_ITEM-EBELP.
      gs_billing-doc_number = gs_item-ebeln.
      gs_billing-itm_number = gs_item-ebelp.
      gs_billing-ref_doc_ca = 'J'.
      gs_billing-material   = gs_item-matnr.
      gs_billing-plant      = gs_item-reswk.
      APPEND gs_billing TO gt_billing .
      CLEAR gs_billing.
    ENDLOOP.
    REFRESH : gt_bapiret_bill.
    CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
      TABLES
        billingdatain = gt_billing
        return        = gt_bapiret_bill
        success       = gt_success.
    READ TABLE gt_bapiret_bill INTO gs_bapiret_bill WITH KEY type = 'E'.
    IF sy-subrc <> 0.
      READ TABLE gt_success INTO  gs_success INDEX 1.
      IF sy-subrc = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = 'X'.
        REFRESH : gt_billing.
        LOOP AT gt_item INTO gs_item WHERE vbeln_del  = gs_item_inv_coll-vbeln_del .
          gs_item-vbeln_bil = gs_success-bill_doc.
          MODIFY gt_item FROM gs_item.
*           save data to ztable - zmm_weigh_bridge
          PERFORM save_data.
          READ TABLE gt_item INTO gs_item WITH KEY sel = 'X'.
          IF sy-subrc = 0.
            MESSAGE s168(ztr) WITH gs_success-bill_doc gs_item-vbeln_del.
          ENDIF.
        ENDLOOP.
        CLEAR gs_item.
      ENDIF.
    ENDIF.
*    ENDIF.
  ENDLOOP.
I humbly request you to provide me with possible solution(s).
Thanks & Regards,
Archie

In customizing of MM-PUR Assign Delivery Type and Checking Rule   the document type of the STO is assigned to the delivery document type.
Check if you assigned NLCC or just NL.
NLCC is for cross company while NL is for transfers within one company code.

Similar Messages

  • Bill Accounting issue  frieght clearing  provision account is not getting

    Hello Experts
    Subjcet: Bill Accounting issue  frieght clearing  provision account is not getting cleared at the time of accounting.
    Error in ZIVA for invoice parking and ZIVB for invoice posting
    my user tying to post the invoice through ZIVB with reference of PO number . So at the time of posting this transaction he is getting error like  Balance not zero: 651.25  debits: 1,378.75  credits: 2,030.00
    that difference amount stands for freight clearing - 651.25
    Before that he was posted to ZIVA for Invoice parking with reference of PO
    Can any body give me suggestion on the same
    Thanks and Regards
    vamsi

    Thanks for all
    my problem was resolved
    regards
    vamsi

  • How to enable "Billing Document- Issue Output To- Issue output to" in VF03

    Plz let me know how to Enable "Billing Document --> Issue Output To --> Issue output to" in the VF03 transaction (2nd screen).
    After entering the billing doc no. n then pressing enter items will be displayed. Then in the menu bar under "Billing Document" there will be "Issue Output To" option will be there.
    Under that again " Issue Output To " & " Screen" options will be there, which by default displayed in disable mode. Is there any option to enable them.

    Hi
    U need to customize a message type for the billing by  trx NACE

  • Milestone billing for non project case

    Hi,
    I have a building/room that is going to be rented. I need to adopt Down Payment (%) with open date, which means the customer is have flexibility to choose when he/she wants to finish the payment. e.g: for a wedding, today the customer pay DP, let say 30% of total, and he/she will use the building next year and pay the remaining.
    I  try to explore the proper / suitable solution for this case in SD. I try to use milestone billing plan. I copy as SO doc type OR, copy as item category TOA, copy as billing doc type FAZ and FAS , and use milestone billing plan in item level while creating the SO doc.
    My question is, before I continue to use it, I want to know if It is okay to use milestone biiling plan for non project case? and what is the possible effects?
    thank you,
    Regards,
    Harris

    Hi all SAP ers...
    I want to continue my first question.
    1. Right now I am considering, is it the right concept to use millestone billing plan in my case?
    2. If I use Milestone Billing Plan for Down Payment Process, which point of view do we use? Is it I am the project owner and then I bill the vendor OR I am the Vendor who sends the invoice to the customer/project owner?
    3. Is it "okay", if I use milestone billing plan ? (If the point of view is I am the Vendor who sends the invoice to the customer)
    Regards,
    Harris

  • Report that shows STO's and quantity issued and opened quantity by document

    Dear friends ,
    does anyone knows if exist any report in SAP that shows me all STO's and the respective quantity issued by STO ?
    We need to analyse all STO's issued since Jan 2008 till now and if possible including Batch information.
    best regards,
    Ale

    Hi,
    Try with T.code MB51.
    Enter the appropriate movement type and dates, then execute.
    Regards,

  • Filling billed quantity into FI-CA document (DFKKOPK-MENGE)

    Hi,
    I need some advice if it is possible "somewhere"  in the System (FI-CA) to customize the filling of the billed quantity into FI-CA document. Table DFKKOPK (G/L Account Items in Open Item Account Document) field MENGE - Quantity.
    Is this functionality in SAP standard processing or should I use some Event (for example 0061 - Posting: Check Complete Document, Set Customer Fields) to fill out this field.
    Thanks for help
    Vlado

    Hello Vlado,
    there is no special activities necessary to transfer the quantity from DBERDTAX-MENGE to DFKKOP-MENGE.
    Please check the
    event R413,
    Field status group XXX for the G/L account, that the field  Quantity  is possible ( => 'X' Req. entry)   and
    note1367393.
    Best regards.
    Christiane

  • JMS/JTA issue is case of a server crash

              Hi All
              I am having some JMS/JTA related issue in case of a server crash. This is there
              for both 6.1 and 7.0. Its like this - an MDB is getting data from a Queue and
              its CMT [ie JTA]. Now when the MDB has the onMessage call back that time a usertransaction
              has been opened by the JMS framework of WLS 7.0/6.1. Now when the onMessage block
              is executing if the server crashes - before the TX has been rolled back/commited
              then next time when that server is restarted that message does mot appear on the
              Queue for 4-5 minutes and the Queue shows the message in "Bytes Pending". So the
              user has to wait for 4-5 minutes before getting back the message. In this time
              period whatever u try - like use QueueBrowser /QueueReceiver to find the message
              shows no result. This is something to do with JTA/JMS combination.
              Is there anyway to control this "invisible time" of the message? This is causing
              a lot of problem in our user base.
              thanks
              Anamitra
              

    I don't think there are any issues. You might get more info from the
              transaction newsgroup and/or customer support.
              Tom
              Anamitra wrote:
              > Hi Tom
              > thats good - but this brings another question. If that was to be reduced are there
              > any side effects that I should be aware of?
              > thanks
              > Anamitra
              >
              > Tom Barnes <[email protected]> wrote:
              >
              >>This is a FAQ, but is not in the FAQ.
              >>
              >>1) As an enhancement, the transaction recovery delay has been reduced,
              >>
              >>or even eliminated in 8.1.
              >>
              >>2) There are plans to back-port this reduction to 7.0 - I think the
              >>back-port is already available. Contact customer support.
              >>
              >>3) Meanwhile, there is somewhat of a work-around. You can reduce the
              >>
              >>recovery delay to as little as 60 seconds by setting
              >> RecoveryThresholdMillis="60000"
              >>in the "JTA" section of your config.xml, programmatically via JMX on
              >>the
              >>"JTAMBean".
              >>
              >>Tom
              >>
              >>Anamitra wrote:
              >>
              >>>Hi All
              >>>I am having some JMS/JTA related issue in case of a server crash. This
              >>
              >>is there
              >>
              >>>for both 6.1 and 7.0. Its like this - an MDB is getting data from a
              >>
              >>Queue and
              >>
              >>>its CMT [ie JTA]. Now when the MDB has the onMessage call back that
              >>
              >>time a usertransaction
              >>
              >>>has been opened by the JMS framework of WLS 7.0/6.1. Now when the onMessage
              >>
              >>block
              >>
              >>>is executing if the server crashes - before the TX has been rolled
              >>
              >>back/commited
              >>
              >>>then next time when that server is restarted that message does mot
              >>
              >>appear on the
              >>
              >>>Queue for 4-5 minutes and the Queue shows the message in "Bytes Pending".
              >>
              >>So the
              >>
              >>>user has to wait for 4-5 minutes before getting back the message. In
              >>
              >>this time
              >>
              >>>period whatever u try - like use QueueBrowser /QueueReceiver to find
              >>
              >>the message
              >>
              >>>shows no result. This is something to do with JTA/JMS combination.
              >>
              >>>Is there anyway to control this "invisible time" of the message? This
              >>
              >>is causing
              >>
              >>>a lot of problem in our user base.
              >>>
              >>>thanks
              >>>Anamitra
              >>
              >
              

  • Delete proposed items with billed quantity 0 in VF01

    Hi,
    We need to delete from the proposed items to invoice the items with billed quantity 0. The lines with this quantity = 0 have not to be showed so we need to delete the items just when the items are proposed. Do you know any way to do that? The user exits we have found, like userexit_fill_vbrk_vbrp, are not usefull because are executed before the append is done to the table XVBRP.
    Thank you,
    Manel

    This should be done in COPY CONTROL. Please sit with your functional counterpart to identify which copy control routine is currently being used. Next, in VOFM, copy this routine to a new routine (new routine # should be between 601 to 900) and adjust your new routine per your requirements.
    Raj

  • Customer wise Billed quantity and Receivables

    Dear All,
    Is there any standard report in which I can have Billed quantity and Receivables (collection amount ) based on the customer and date wise ,
    Regards
    R Dhana

    Hi Dhana,
                Check the below T-Codes it will be helpfull+FD10N
    1.S_ALR_87012167-Accounts Rec. Information System
    2.S_ALR_87012172-Customer Balances in Local Currency
    3.S_ALR_87012186-Customer Sales
    4.S_ALR_87012169-Transaction Figures: Account Balance
    5.S_ALR_87012168-Due Date Analysis for Open Items
    6.S_ALR_87012197-List of Customer Line Items
    7.S_ALR_87012174-List of Customer Open Items
    8.S_ALR_87012175-Open Items: Customer Due Date Forec.
    9.S_ALR_87012178-Customer Open Item Analysis(Overdue)
    Regards,
    Venugopal

  • Billing quantity data in CIC0 transaction

    HI Gurus,
      I would like to know how the billing data is stored in CIC0.
    When I searched previous threads, I came to know that
    Billing data is stored in CRMD_BILLING table and header
    data in CRMD_ORDERADM_H table.
    But when i checked my system, i didnt got any
    CRMD_BILLING table.I got the header data table.
    I would like to know that for a given business partner
    and posting date, How the billing quantity is calculated?
    Points will be rewarded to helpful answers
    Regards,
    Senoy

    check
    CRMD_BILLING table....
    i can c same table in my system..
    check once again
    Regards
    Anbu

  • Order Related Billing-Change Billing Quantity

    Hi
    I am Creating Order Related billing.
    Order Qty:-10.After entering Order No in VF01 it goes to Billing Screen & Doesn't alow to change Quanity.
    I want to make Billing Quantity as 1 instead of 12.
    Regards,
    Amol

    Hi,
    First check the config setting in VTFA, In item level, select "A" in Billing Quantity field.
    then go to VF01, put the sale order number & select the line where u put the sale order no. & click on "Selection List".
    It shows open qty as order qty. Here u can change the qty & click on "Copy" then save the doc.
    Pls revert if it is working.
    Raj

  • ISE - Multiple Issuing Subordinate CAs for EAP Auth?

    Is it possible to utilise multiple issuing subordinate CAs with an ISE implementation? In short I have a situation where the client is wanting to issue certificates for one group of users from CA1 and issue certificates for another group of users from CA2.
    As far as I can see it is not possible to have two different server certificates installed on a policy node for the purposes of EAP authentication. Is the only way around this to install a policy node per issuing certifcate server?

    Ok to add to this I would really like some clarification on certificate installation for the purposes of EAP-TLS. The Cisco doco is at best vague on this topic. I have a distributed deployment with 2 x Admin, 1 x monitoring and 2 x PSN. I have installed a Public HTTPS server auth cert on each device and all nodes are joined. I would now like to utilise MS CA cert infrastructure to authenticate EAP-TLS.
    My understanding is that I need the MS CA Root Cert and Subordinate Cert on the Admin node with the subordinate cert ticked for trust for EAP Auth. Is there a requirement for a Server Authentication certificate on the Admin Node? Going forward with that Is there a requirement to add a server authentication certificate to the PSN Nodes?
    In addition back to my first question is it possible to utilise multiple subordinate CAs for client authentication if so how as I cannot seem to click trust for EAP on multiple certs

  • How to change Billing quantity

    Hi,
    business scenario:  the sales order is cross company sales, delivery use POD. when bill to customer, the billing quantity is POD quantity; when bill to receiving company, we want that the billing quantity is delivery quantity, is not POD quantity.
    question:
    1) how to change the billing quantity from POD quantity to delivery quantity?
    2) If use delivery quantity, how to make the delivery status to close?
    thanks your help.
    Cindylan

    Hi,
    May I know the reason for your requirement? I believe customer has to pay only for the material received and that data will be correct only in POD qty than delivery qty.  Otherwise, you can deactivate POD function through delivery item category.
    POD qty = Delivery qty +/- Difference qty.  Please try giving difference qty as zero.
    Regards,
    P Gomatheeswaran

  • Return-billing quantity

    Hi sap gurus
    In return process, we have option of copying billing quantity from order or delivery docs.Is it possible to copy billing quantity from qaulity doc or report/enhancement developed (to calculate actual quantity for credit-returns)
    pl suggest any solution to solve
    Raghu

    Hi Ragu,
    As per the standard functionality I hope it will not possible.
    Because the copy control settings are available only in between sales,delivery and billing document not between the reports or any other enhancements.
    I hope it will help you,
    Regards,
    Murali.

  • Can i make at vf02/vf03 billing document issue output  from a select list

    i have 2 output types YN30  an YN38 who are automaticly created ok
    but when i want to output it  sap doesnot show a choice for two types  but instead
    it shows onley the default from TVFK
    by example at va02  you get a choice from all types that are created for this order
    anyone can help me

    i dont think you understand my problem
    compare sales order output
    with invoice output
    in customizing the look identique
    but in sap
    va02   enter an order  > menu sales document > issue output to
    then a popup window is displayed with all documet type that are created for this order
        you can select one > print or display
    vf02 enter an invoice  > menu billing document issue output to> print or display
    and then  there is nolist  but onley the default document type
    you can change that or search in all types defined in sap ( not in onley the types created for this invoice )
    i need that the user can choose between the 2 types
    we work in sap 4.6C

Maybe you are looking for

  • Skype to go number in mexico

    I just set up my skype to go number for my cell phone in Mexico.  I try the number that they gave me and it ends up being a wrong number.  What can I do, can somebody help me with this problem?

  • Errors in JSP file for htmlb code - CE 7.1

    Hi Experts, I am trying  created simple JSP dynpages application in NWDS 7.1 & CE 7.1. I am getting errors for HTMLB  code like: cannot find tag Library descriptor for tagLib In JSP page i wrote simple htmlb code like: <%@taglib uri="tagLib" prefix="

  • What is a good site to be upto date on Ipad games?

    Whats a good site to see the latest ipad games and any updates if there are paid games that are free now , a goood ipad gaming sites

  • Dropshipt warehouse in production process

    Hi.. experts... Can be involved dropship warehouse in production process? Regards Shruti

  • Reading Binary Header text

    Hello, I am new to reading binary files and have had a lot of help creating this simple read binary vi. There is header information (# of channels, sampling rate etc) on the sample files\ which no matter what I do, I cannot read it. I would really ap