Function Modules Split Billing Documents

Hi expert,
Does anyone knwo some function modules can help to split billing document when it exceeding the limit. I did know in IMG we can configure the max amount to split the billing documents but it doesn't help. I want some function modules which can directly use in my source coding to split the given billing documents by amount and tax rates.
Many thanks.

check these  BAPI's
BAPI_BILLINGDOC_CREATEFROMDATA   and
BAPI_BILLINGDOC_EDIT
Use the user exit and you need to determine the amount you want to split and feed to these BAPI (the first one)..

Similar Messages

  • Looking for function module to clear document structure

    Hello,
    we want to use Easy DMS for quick check-in of documents. Therefore we need a folder (document structure) to move all new documents in this fixed defined folder. Now we want to clear every night this folder. Does anybody know, which function module could I use?
    Thanks a lot for any support.
    Best regards.
    Markus

    Hello Iring,
    thanks a lot for your answer. BAPI_DOCUMENT_CHANGE2 is a solution, but in this case I have to read everytime all documents. In my case I know already the folder number (document structure) and therefore I'm looking for a function module to give just the folder number to clear, which would be the best way from performance side.
    Anyway thanks a lot for your answer.
    Regards.
    Markus

  • Function module to find document attached to a transaction in document tab

    Hi
    I have an urgent requirement. I have to check whether any document is attached in the document tab in service order transaction within my code. How can I do that?Is there any function module for doing that? Please suggest.
    Regards,
    Sucheta

    Not quite sure if these BAPI's work for service orders in CRM (cause that is probably what you are looking for), but here is some code for retrieving documents for service orders (or business transaction in general):
    DATA : lr_crm_document           TYPE REF TO cl_crm_documents.
      Get header info object.
        SELECT SINGLE * FROM crmd_orderadm_h
               INTO lw_orderadm_h
               WHERE guid = iv_guid.
      Retrieve all documents linked to current business transaction.
        CREATE OBJECT lr_crm_document.
        ls_business_object-instid = lw_orderadm_h-guid.
        ls_business_object-typeid = lw_orderadm_h-object_type.
        ls_business_object-catid  = 'BO'.
      Get info documents.
        CALL METHOD lr_crm_document->get_info
         EXPORTING
           business_object       = ls_business_object
          PROPERTIES_REQUEST    =
           newest_only           = 'X'
          properties_query      =
          PROPERTIES_QUERY_RA   =
         IMPORTING
           phioloios             = lt_phioloios
           ios_properties_result = lt_ios_properties_result
           loios                 = lt_loios
           phios                 = lt_phios.
    Hope this helps.

  • Search for a function module for deleting document originals (DMS)

    Hi,
    I'm searching for a function module to delete originals in documents (like manually with transaction cv02n). I'm only able to set an delete mark with the module 'BAPI_DOCUMENT_DELETE'.
    The module 'BAPI_DOCUMENT_CHANGE2' can only add new originals to an existing document. I need a possibility to delete all originals in an document without deleting the document itself.
    Has anyone an idea?
    Thanks.
    Jan-Christian Treusch

    Many thanks!
    That's especially the method I've searched for so long....
    best regards.
    Jan-Christian Treusch

  • Function module for reversing documents

    Is there a function module for posting reversal documents like F08 transaction.....

    Hi,
    We have BAPI's to reverse the documents.
    Check with 'BAPIREVERSE in SE37.
    Right now iam not on the systemto go indepth.
    Thanks,
    Deepak.

  • Remote Function Module for Change document Items.

    Hi Experts,
    I want a Remote Function Module to read Change document Items, can any please help me out. <removed by moderator>
    Thanks,
    Sridevi
    Edited by: Jan Stallkamp on Aug 25, 2008 8:25 PM

    If you are looking for the fm here it is.....
    you can check this CHANGEDOCUMENT_READ_POSITIONS fm and its documentation.
    If it is suitable for your requirement copy the same fm and make it remote enabled.
    I think it should work for you.

  • Function module for srm document flow

    Hi Friends,
                  If there is any function module which give me the complete document flow for the document.

    Hi Nilesh,
    Are you talking about shopping cart?
    pl. go to transaction BBP_PD in EBP GUI.
    this transation can give you which all tables are updated when a SC is created.
    BR
    Dinesh

  • Function module for disconnection document (SAP Utilities)

    Hi ,
    Can any body tell the function module or bapi for creating disconnection document(EC85) for an installation?
    vineel.

    Can you check the Following  Link
    http://help.sap.com/saphelp_utilities472/helpdata/en/e6/297540540ed362e10000000a155106/Release_Infos_472_e.pdf
    1.11.3.1.2 BAdI ISU_SERVORD_EDCN
    Kanagaraja L

  • Function Modules to Upload document to DMS frm CRM

    Hello There,
    Please can  any body help me with FUNCTION Module/bapi which can be used to upload files of any type to DMS(Document Manage, System) from CRM program,
    Points would be awarded in FULL,
    Thanking you in advance,
    Raj

    Hi,
    thanks for reply
    I know gui_upload   am asking about   textconvert_xls_sap_ about this with example and description.
    thanks and regards
    zarah

  • How do I split billing document?

    Hi,
    I have a customer who only accept a certain lines per billing document. However, they want to place a sales order, regardless of its limitation in billing document.
    For example, in sales order, there should be no limit of ltem lines (i.e. 20 lines). Yet, the billing document only accept 6 lines per billing document. In this case, 4 billing documents need to be created from 1 sales order.
    Any help or suggestions are apprciated!

    Hi Takako,
    Let me recap your scenario and then i will provide the solution.
    You want to split the billing document for a particular customer only with the restriction on the no. of lines.
    Solution
    Go to the customer master and choose 1 field which can be used enter the maximum no. of lines which a billing document can have for this customer. Whether the field has to appear in Sales Area Data or General Data will depend upon whether you want all the invoices for that customer to split on the special logic or you want only the invoices related to a specific Sales Area to split on this special logic. If the field is not availble then kindly create a new field and attach that to the Customer Master.  The new field can be created in the Additional Data Tab of the customer master.
    If you split the invoices for a Delivery relevant Sales cycle it is a possibility that you will end up having 1 delivery and multiple invoice and you might stuck up into the problem of Net Weights & Gross Weights & HU splitting in the logistics process.... Therefore, it makes more sense to split the delivery also on that special logic.  You can check this requirement with respect to your SAP instance and let me know if you need this splitting also.  Currently i am only explaining the requirement of splitting the invoices only.
    In a delivery related Sales Cycle, Billing Picks the Qty & Lines delivered details from Delivery Document & Pricing details from the Sales Order Document (except for shipping services related prices). Therefore the split for invoices has to be placed in the Delivery to Billing Copy Control.  Pick up the routine you are using between Delivery to Billing and make necessary modifications in the ZUKRI field.  ZUKRI field is a 25 character unique field which is responsible for additional  splits.  You can take a look at the ABAP code in the SAP Note No. 192558 which is specific to china for Splitting the invoices for a maximum value and max no. of line items per Sales Org. In your case it is not sales org based but customer based so you need to make necessary modifications in the code to bring in split data from Customer master instead of sales org.  This will provide you an idea about the split in your case.
    I hope details provide by me helps for your case.
    Thanks
    Kapil Sharma

  • Sd split billing document

    hi all,
    If I have to work with a flow sales order - billing (no delivery), is it possible to process different billing document for each item inserted in the sales order?
    what I hve to set in customizing??
    thanks in advance

    hi,
    In Billing, data is copied into billing documents from reference documents. You can refer to an entire document, individual items or partial quantities of items.
    For a delivery-related billing document, for example, quantities to be billed will be copied from the delivery and prices copied from the sales order.
    You can redetermine prices in billing documents according to different Pricing Types.
    Prerequisites
    You determine controlling for dataflow in SD Customizing.
    Features
    You can influence the flow of data from reference documents to billing documents using:
    Billing document types (e.g. for text or partner)
    Controlling is carried out in SD Customizing via Billing - Billing documents - Define billing types.
    Copying control for either -
    the header:
    Data on foreign trade
    Assignment numbers
    Reference numbers
    Item number assignments
    or the item:
    Quantity
    Prices
    Copying control is carried out by the system administrator in SD Customizing via Billing - Billing documents - Maintain copying control for billing documents.
    You can also use the data transport routines to influence data flow to meet your individual requirements. For example, payment terms can be copied from the customer master instead of the sales document. Controlling for this is carried out in copying control for the item in the field Data VBRK/VBRP.
    regards,
    Siddharth.

  • Function module for Change document for Business partner

    Hi Experts,
    Could any one send me the sample code of function module for CDHDR and CDPOS tables for extracting the change date along with role.
    Eg :
    BPRole Changd on crtd by crtd on Business partner
    ZCASH 30.11.2011 NHALLAL 24.11.2011 0001000237
    CRM000 03.12.2011 NHALLAL 24.11.2011 0001000237
    I wanted to catch up the changed date and changed role from CDHDR (base table) and CDPOS(cluster table - item level).
    Might be involved with creation of extract structure.
    Any sample codes are appreciated. Thanks.
    Regards,
    Janardhan

    resolved

  • Function module for FI document change with G/L line items

    Hi!
    Does anybody know how to change FI document with G/L line items (fields like XREF3, SGTXT, ZUONR - generally speaking, all the fields can be changed with FB02)?
    FM FI_DOCUMENT_CHANGE has needed functionality and works well for account payables and account receivables line items, but it doesn't handle general ledger line items.
    Regards,
    Maxim.

    Hello!
    The function has some mandatory fields to use:
    I_AWTYP -> get value from BKPF-AWTYP for the specific document;
    I_AWREF -> number of the document to change;
    I_AWORG-> concatenate document's company with respective year;
    Then, only one of the following fields should be filled:
    i_lifnr,
    i_kunnr,
    i_obzei,
    i_buzei.
    You can find the relevant data for this fields in BSEG.
    The structure I_BSEGC should be filled with data you think appropriate. I didn't tested it, but i think the first fields are sufficient.
    Then, add lines (1 for each field you wish to change) in table T_ACCCHG.
    However, you should notice that you're not allowed to change all fields. For instance, KKBER is one of the fields that is forbidden to change in this FM.
    Hope that helps.
    Rui Delca Mendes

  • Split Billing document by value

    Hi Expert
       I have a requirement by customer that the max value of an invoice should be 100,000 usd. that means any sales orders whose total value greater than this will be splitted into serveral invoices. for example:
       a sales order has a total amount: 350,000 usd. when i try to create invoice for this sales order via VF01, four invoices should be created: 100,000;100,000;100,000;50,000.
       any ideas? thanks

    hi,
    please go through the link hope this help.
    http://saptechsolutions.com/pdf/SDBillingDocumentConsolidationAndSplit.pdf
    http://www.sap-img.com/mm025.htm

  • Create billing document from IDOC INVOIC01

    Hi Experts,
    I created a function module to extend IDOC_INPUT_INVOIC_MRM. After created successfully the invoice from this inbound idoc, I tried to create a billing document by code below:
    get sale order number from purchase order *****************************
        CALL FUNCTION 'BAPI_PO_GETDETAIL'
          EXPORTING
            PURCHASEORDER                    = lw_tfrseg-ebeln
            ACCOUNT_ASSIGNMENT               = 'X'
         TABLES
            PO_ITEM_ACCOUNT_ASSIGNMENT       = lt_acc_***
    ****get sale order details*******************************************************
         CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'
          EXPORTING
            I_BAPI_VIEW                   = lw_order_view
          I_MEMORY_READ                 =
          TABLES
            SALES_DOCUMENTS               = lt_sales_key
            ORDER_HEADERS_OUT             = lt_ord_headers
            ORDER_ITEMS_OUT               = lt_ord_items
            ORDER_SCHEDULES_OUT           = lt_ord_schedules
            ORDER_BUSINESS_OUT            = lt_ord_business
            ORDER_PARTNERS_OUT            = lt_ord_partners
            ORDER_ADDRESS_OUT             = lt_ord_address
          ORDER_STATUSHEADERS_OUT       =
          ORDER_STATUSITEMS_OUT         =
            ORDER_CONDITIONS_OUT          = lt_ord_cond
    ****Fill billing data in*******************************************************
               lt_bill_data-SALESORG = lt_ord_headers-sales_org.
             lt_bill_data-DISTR_CHAN = lt_ord_headers-DISTR_CHAN.
             lt_bill_data-DIVISION   = lt_ord_headers-DIVISION.
             lt_bill_data-DOC_TYPE   = lt_ord_headers-DOC_TYPE.
             lt_bill_data-ORDBILLTYP    = lt_ord_headers-ORDBILLTYP.
             lt_bill_data-BILL_DATE    = lt_ord_business-bill_date.
             lt_bill_data-SOLD_TO    = lt_ord_headers-SOLD_TO.
             lt_bill_data-ITEM_CATEG    = lt_ord_items-ITEM_CATEG.
             lt_bill_data-ACCTASGNMT    = lt_ord_business-ACCNT_ASGN.
             lt_bill_data-PRICE_DATE    = lt_ord_business-PRICE_DATE.
             lt_bill_data-COUNTRY    = 'US'.
             lt_bill_data-PLANT    = lt_ord_items-PLANT.
             lt_bill_data-BILL_TO    = lw_partner_bp-customer.
             lt_bill_data-PAYER    = lw_partner_py-customer.
             lt_bill_data-SHIP_TO    = lw_partner_sh-customer.
            REF_DOC    = lt_sales_orders-DIVISION.
             lt_bill_data-MATERIAL    = lt_ord_items-material.
             lt_bill_data-REQ_QTY    = lt_ord_items-req_qty.
             lt_bill_data-CURRENCY    = lt_ord_items-currency.
             lt_bill_data-SHORT_TEXT    = lt_ord_items-short_text.
             lt_bill_data-TAXCL_1MAT    = lt_ord_items-TAX_CLASS1.
            REF_ITEM    = lt_sales_orders-DIVISION.
            STAT_GROUP    = lt_sales_orders-DIVISION.
             lt_bill_data-NO_MATMAST    = 'X'.
             lt_bill_data-ADDR_NO    = lt_ord_address-ADDRESS.
            lt_bill_data-TITLE    = lt_ord_address-DIVISION.
             lt_bill_data-NAME    = lt_ord_address-NAME  .
             lt_bill_data-NAME_2    = lt_ord_address-NAME_2.
             lt_bill_data-POSTL_CODE    = lt_ord_address-POSTL_CODE.
             lt_bill_data-CONSUMCTRY    = lt_ord_address-COUNTRY.
             lt_bill_data-CITY    = lt_ord_address-CITY.
             lt_bill_data-DISTRICT    = lt_ord_address-DISTRICT.
             lt_bill_data-STREET    = lt_ord_address-STREET.
             lt_bill_data-REGION    = lt_ord_address-REGION.
             lt_bill_data-PROD_HIER    = lt_ord_items-PROD_HIER.
             lt_bill_data-SALES_UNIT    = lt_ord_items-SALES_UNIT.
             lt_bill_data-PROFIT_CTR    = lt_ord_items-PROFIT_CTR.
            TAXJURCODE    = lt_sales_orders-DIVISION.
             lt_bill_data-PURCH_ORD    = lt_ord_headers-PURCH_NO.
             lt_bill_data-DOC_NUMBER    = lt_ord_items-DOC_NUMBER.
             lt_bill_data-ITM_NUMBER    = lt_ord_items-ITM_NUMBER.
            ORIGINDOC    = lt_sales_orders-DIVISION.
            lt_bill_data-ITEM    = lt_sales_orders-DIVISION.
             lt_bill_data-CREATED_BY   = sy-uname.
            MATERIAL_EXTERNAL = lt_sales_orders-DIVISION.
            MATERIAL_GUID = lt_sales_orders-DIVISION.
            MATERIAL_VERSION = lt_sales_orders-DIVISION.
             lt_bill_data-INCOTERMS1  = lt_ord_business-INCOTERMS1.
             lt_bill_data-INCOTERMS2  = lt_ord_business-INCOTERMS2.
             lt_bill_data-EXCHANGE_RATE = lt_ord_business-EXCHG_RATE.
             lt_bill_data-PAYMENT_TERMS  = lt_ord_business-PMNTTRMS.
             lt_bill_data-HG_LV_ITEM   = lt_ord_items-HG_LV_ITEM .
    ******call bapi function to create billing document********************
      CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
       EXPORTING
         CREATORDATAIN         = lw_creator
         TESTRUN               = lc_testrun
         POSTING               = lc_posting
        TABLES
          BILLINGDATAIN         = lt_bill_data
        CONDITIONDATAIN       =
        CCARDDATAIN           =
        TEXTDATAIN            =
          ERRORS                = lt_bill_errs
          RETURN                = lt_bill_retu
          SUCCESS               = lt_bill_succ
    A return message in the table lt_bill_retu:
    "This item is not relevant for billing!"
    Anyone can tell me why? I think this problem be generated from the step "fill billing data" but I don't know where.
    Pls help me!!!
    Thanks,
    Gy

    Hi,
    In the condition data, I want to add new condition type as below:
    <<  Add new condition type
        CLEAR: lt_cond_data.
        lt_cond_data-COND_TYPE = 'ZHD0'.
        lt_cond_data-COND_VALUE = mrm_ship_charge-summe.  " amount of shipping charge
        lt_cond_data-COND_CURR = mrm_ship_charge-waerq. " USD
        append lt_cond_data.
    *>>
    But I created successfully billing document, this condition type is not appear in the billing view by transaction VF03.
    Could you help me to find out the fault?
    Thanks,
    Gy

Maybe you are looking for

  • Get file name and received date & time

    Hello experts, We are loading around 10 source files(xml) on regular basis to Target table. I have to capture source filename & received datetime of those files and status of file whether it loaded successfully or not(I can care take care of status o

  • HT4906 Iphoto not able to link with icloud- more $$

    So is this just another revenue stream for apple- I have to pay for a new Iphoto download - no update showing. Is that correct?

  • SQL performance slow -- oracle 10g to oracle 11g

    Hi, We are have two development server, here we can call server10 and server11. Server's having same hardware and OS, but different oracle version, server 10 and server 11 having oracle 10g and oracle 11g respectively. Problem, when you run sql query

  • "Fast Web View" changing depending on versions

    Hi there, We have some PDFs that need to have the "Fast Web View" option enabled. Although the files have this option enabled when viewed on version 6.0, when the files are viewed on a later version - Version X for example, some of them are still ena

  • Missing parameters for Exchange Portlet

    In the Exchange Portlet installation document on page 15 under Stage 3. Changes to zone.properties the line shows servlet.exchangeAppProv.initArgs=provider_root=c:\exchange, sessiontimeout=1800000 it should read servlet.exchangeAppProv.initArgs=provi