Line Order No doesnt match with Invoice line number

At the line level , the line order no doesnt match with the invocie line number
ie. say for example in a sales order we have 3 lines
1. A
2. B
3. C
where as in transaction at AR level the line no is different
1. B
2. A
3. C
the customer wants in AR also the line no should be same as sales order line nos
Please help us what is the setup where we define the line level numbering in AR.
I have checked the line ordering rules but i am not clearly understanding, if anyone can explain with an example how this no generates witht he setup details it would be great

This can be done in XSL OR in procedure on the DB side. Performance wise better to do in procedure as mentioned by other use. You can choose to go with DB or XSL approach depending on number of orders you are expecting in a single message. If it is going to be 100s or few thousand messages then keeping it in XSL is not a problem. But if you are planning tens or hundreds of thousands of orders in the same request then better do it in stored procedure.
How do you do in XSL?
1. Put a for each on every unique order no. You can use xsl:Key or xslt:distinct-values() for this.
2. Within for each unique value of order no, use position() function to pass line/order no as 1,2,3... etc. As soon as the loop moves to second iteration for the next unique order no, count will automatically start again from 1,2,3... and so on.
Apart from slightly slower processing time, another drawback from this approach is that the data in the XML you send to DB procedure will be sorted by order numbers. All orders with same number will appear together.
Another problem with this approach is that this will work only within one request, i.e. if the next request contains an order with same no which was already sent in a previous request, for this order the count will again start from 1. So if you want to keep the sequencing maintained across multiple requests, the easiest way to do is in the DB procedure where you can lookup in the table before inserting a new row and insert with next sequence of that order no.

Similar Messages

  • Withholding tax lines are being cleared along with other line items

    Hi All,
    While doing J1INCHLN(payment making of TDS), system giving error i.e.
    "Withholding tax lines are being aleared along with other line items"
    Please suggest me in this issue...it would be great help for me.
    Thanks,
    Saisri

    Hi,
    As per my analysis we found some documents, here We have made advance payment to vendors with TDS and again rised invoce to vendors with TDS and these documents have been nockedoff in F-54.
    We have many documents of such nature and as per me it is because of these documents  the system is throwing error. Pls. advice as to how to proceed on this.
    Thanks,
    Saisri

  • Slected no of records doesnt match with the no of records transferred

    Hai BI EXPERTS
    SINCE FROM LONG THE DATA PACKET IS RED IN COLOUR WITH THE ERROR MESSAGE 'SELECTED NO RANGES DOESNT MATCH WITH NO OF RECORDS TRANSFERRED'
    PLS EARLY ANSWERS=HIGH POINTS

    Hello,
    check for IDOC's in BD87 and just see if any thing is pending or not...
    if yes then execute them manually.
    Also check SM58 and is some LUW are waiting process them manully if possible.
    Also try to see the job log in the spource system in SM37 for the user ALEREMOTE and go inside each job and check the one for your data source...and check where it is stuck.
    also check for teh system connection and try to see if the jobs are running for other data source.
    Also check if the job in BW is running in SM37 for this data load or not.
    You can try to cancel all the jobs in BW...turn the total status of the request to RED and then delete it and execute the infopackage..it will ask for repeat and you can repeat the load.
    If DTP then just schedule the DTP after deleting gthe request.
    Thanks
    Ajeet

  • I'm trying to upload the new itunes version because The older one doesnt match with the iphone 5. At one step it is required one code to allow the installation but as It is not the itunes code which one is it ?

    I'm trying to upload the new itunes version because The older one doesnt match with the iphone 5. At one step it is required one code to allow the installation but as It is not the itunes code which one is it ?

    Hello, GwladysPa. 
    Thank you for visiting Apple Support Communities. 
    I believe that the iTunes update is requesting your computer's administrator password to update the application.  Here is the article that explains this process. 
    Mac OS X: Software installations require administrator password
    http://support.apple.com/kb/HT2558
    Cheers,
    Jason H. 

  • Accouting Document Number along with Invoice Document Number

    Hi All,
    I want to see the Accouting Document Number along with Invoice Document Number
    while Posting the invoice in MIRO.
    Regards
    Arjun

    Check
    miro (invoiced document number & account documber number)

  • KE30 Summary balance not matching with KE24 line item total

    Hello Experts,
    My client's are having one KE30 report and there are about 15-18 rows in the output.  About 12 rows agrees with the KE24 line item report and they inturn matches with FBL3N balance.  However, the balance 3-6 rows does not agree with the KE24 line items report.
    For the difference rows :
    The KE30 balance   USD 210000
    The KE24 balance   USD 229000
    The FBL3N balance USD 229000
    The KEAT figures    USD 229000
    Can anybody confirm which settings are missing, if any.
    Thanks & Regards.
    Vikas.

    Hi
    I think you will have to reconcile on case to case basis and identify the causes...
    It may also happen that some docs are posted with some blank chars and hence they are not featured in KE30 based on the selection parameters given during execution of report
    To mind, only these 2 points come
    1. Define a report restricting to chars like Comp Code, currency type (if applicable), version =0 and period... Do Not restrict on any other char and execute the report.. It has to match with KE24
    2. In the 5 to 6 lines where you have this issue, try to drilldown on each possible char in KE30 for these rows... and match each of this value with KE24... you will come to know where the problem lies
    Regards
    Ajay M

  • How to close PO after fully matched with invoice only

    Hi,
    We wan't to use 3-way match, but when an invoice is fully matched with the po we want
    the status of the po gets closed. Now it's still open untill you do a receipt for the po.
    We need the QTY REC matchinghold to send the invoices for approval if the
    receipts is not available before the invoice is matched with the po.
    How can I set this up?

    you are correct. That functionality is not available in iprocurement
    Refer note:
    The Initial Quantity Received Satisfies the Receipt Closing Tolerance (Doc ID 168495.1)
    An Enhancement request is already logged:
    16438982 - ABILITY TO RECEIVE ITEMS IN IPROCUREMENT AFTER PO IS CLOSED

  • How to club many sales orders in to one single invoice document number

    Dear Team,
    We are in to contract for 12 years with our client for a particular service,so we will raise a contract order for a particular item,with this we generate the order number,here we are generating some 150 orders numbers,this 150 order number I want to combine in to one single invoice document number,I have tried this in vf01 I am giving the all 150 document numbers,and excuting this but here for each sales order document number it is creating one billing document number,but I need one single invoice number for all this order numbers.
    My copy controls are
    In VTFA
    Header data
    Sales doc type-                                 zabc
    Target billing tye-                            zmv
    Copy requirement-                           001 header/order related
    Determination export data-               blank
    Assignment number-                         b
    Reference number-                            b
    Copy item number-                            tick box was selected
    Item category
    Copy requirements-                        Item/order related
    Data vbrk/vbrp-                              003  single invoice
    Billing quantity                               A
    Pos/neg                                            +
    Pricing type                                      c
    Pricing type exchange rate              blank
    Price source                                     blank
    Can any one guide what to do

    Hi
    In VTFA, please do the following changes,and then test by creating the sales orders then do collective billing.
    Keep Assignment number blank
    Keep Reference number blank
    Copy item number- Uncheck the box where tick box was selected
    Also make sure that PO Number in sales order is same
    Regards
    Srinath

  • Receipt Matching with Invoice (AP) - Line to be Checked by Default

    Hi,
    As per finance requirement, they need line to be checked by default in Match Receipt Window. Is there any option available?
    I did personalization for selecting check box value to 'Y'  and it is working. But that time it is not taking Qty Invoiced and Match Amount if I use personalization (I need to disable check and enable again to get value). Is there any standard option available? if not, how to fulfill this requirement?
    Navigation:
    AP Administrator > Invoice > Entry > Invoices
    Create Invoice and Save
    Click on Matching
    Matching Type > Item
    Search with PO number or Receipt Number > Find
    Thanks,
    Navab

    Hi,
    As per finance requirement, they need line to be checked by default in Match Receipt Window. Is there any option available?
    I did personalization for selecting check box value to 'Y'  and it is working. But that time it is not taking Qty Invoiced and Match Amount if I use personalization (I need to disable check and enable again to get value). Is there any standard option available? if not, how to fulfill this requirement?
    Navigation:
    AP Administrator > Invoice > Entry > Invoices
    Create Invoice and Save
    Click on Matching
    Matching Type > Item
    Search with PO number or Receipt Number > Find
    Thanks,
    Navab

  • LSMW to create Sales Order refer to Quotation with multiple line items.

    Hi Gurus,
    I am new to LSMW, and my requirement is that, I have a file downloaded from another system, it is like this:
    Quotation No.  Sold to party  data        item no.       material no.     quatity
    556                         10000012                 10              19077                1
    556                         10000012                 20              19078                1
    557                         10000011                 10              19076                1
    And it is required I need to create orders in VA01 refering to quotations, and then delete all the items from quotation, and add the items in the file. I am now doing it through transaction recording in VA01, but I came to a difficult part, that is how I can process line items. Because the items number will only be decided at runtime, so I can not record a BDC for that. And I have read some guides on LSMW, one of it said that transaction recording in LSMW can not deal with deep structures. So could any1 help on this?
    Best regards,
    Vincent

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • Send all line items of a sales order to IPC along with condition lines data

    We wrote some pricing routines in R/3, where while doing he calculations for condition line item, we needed to pull in the material information for previous line items. So we exported vbap and imported it inside the routine to be able to have access to all the line items in the sales order. Now, we need to put in the same kind of logic in CRM/IPC. My question is what would be the equivalent of SAP's(import/export) commands for internal tables in case of IPC. I looked at the BADI CRM_COND_COM_BADI but still do not see how I can send all the line items  data to IPC. So I guess, the question comes down to, how do I send all the line items of the sales order (whole VBAP in R/3 terms) to IPC along with the condition line data? Can someone please help?
    Thanks

    Hi Vaibhav,
    If you can get the list of Sales orders which has deleted line items and force completion status. You can manage them in BI via lookup  or navigation attribute.
    Just my views I am sharing .
    Thanks,
    KDJ

  • Sales Order Credit Status Block with Schedule Line ATP Confirmed Quantity

    I would like to keep the Credit Status Block on a Sales Order when it is created and over the credit limit and at the same time be able to Confirm the Order Quantity (if inventory is available) on the Schedule Line.  Has anyone done this?  I'm using ECC 5.0
    In the IMG --> Sales and Distribution --> Basis Functions --> Credit Management/Risk Management --> Credit Management --> Define Automatic Credit Control --> If I remove the Status/Block indicator the schedule line does confirm the sales order quantity but the sales order is not blocked and a delivery can be created.
    Thanks.
    Donna

    Hello Donna,
    I think I solved your problem.
    There are two ways to block the sales order - one is to not confirm the Schedule line i.e. block delivery... block further action that can be taken. The second is to not let the person save the sales order.
    Another option is to get Just a warning message, that the credit limit has been exceeded, but able to save the sales order with a confirmed schedule line.
    The setting will be in OVA8.
    For the Document Value you make the setting C or A. and make sure the block is not set.
    Don't worry about the Open order or open delivery unless you want the system to perform a credit check considering the orders that are already existent. Same with open delivery. It will take into account all the cost of the orders that are open for delivery.
    Now here some options:
    Either consider a 'warning' by the system good enough and still be able to confirm the schedule line.
    (ii) Put in a Delivery Block in the Sales Document Types, in the Shipping tab. That way, you will be able to save the sales doc. but not be able to deliver it.
    (iii) Put a Billing Block in the Sales Doc type, in the Billing tab. You will be able to deliver but not bill.
    (iv) Create a new routine (with the help of an ABAP guy) and place it in the auto credit check, 'Reaction' field where it will place a Delivery Block.
    Do let me know what your thoughts are and what you decided to do.
    Thanks
    Noel

  • Transfer Order for Inbound delivery with multiple line items...

    Hi All,
    <The flow of my report pgm is >
    PO creation using Transaction - me21n
    My report pick the PO created as per date given in selection screen-
    Creates outbound Deliveries using BAPI_OUTB_DELIVERY_CREATE_STO
    Create Transfer order FM L_TO_CREATE_DN
    Confirm Transfer order FM L_TO_CONFIRM
    GI is done - Inbound delivery is created
    Create Transfer order FM L_TO_CREATE_DN for Inbound delivery
    Confirm Transfer order FM L_TO_CONFIRM
    Goods receipt.
    If PO is having one item - the entire flow is working perfectly.
    if my PO is having multiple items,
    While creating TO for inbound deliveeies - i am facing the error.
    Before calling FM,
    I am assigining these values like
    wa_delit-nlpla  = wa_ltap_vb-vlpla.    "Source Storage Bin To Destination Bin
          wa_delit-nltyp  = wa_ltap_vb-vltyp.    "Source Storage Type To Destination Storage type
          wa_delit-anfme  = wa_ltap_vb-nsolm.    "Actual destination quantity
          wa_delit-letyp  = wa_ltap_vb-letyp.    "Storage Unit Type
          wa_delit-altme  = wa_ltap_vb-meins.    "Unit of measure
          LOOP AT i_lips INTO wa_lips WHERE vbeln = WA_VBFA-IN_DELIV.
            wa_delit-posnr =  wa_lips-posnr.
            APPEND wa_delit TO it_delit.
             ENDLOOP.
    As i am appending i am getting 2 line items in the tabke it_delit.
    Function module :
    CALL FUNCTION 'L_TO_CREATE_DN'
      EXPORTING
       i_lgnum                         = l_lgnum
       i_vbeln                         = wa_vbfa-in_deliv
       i_commit_work                   = 'X'
       i_bname                         = sy-uname
       it_delit                        = it_delit
    IMPORTING
       e_tanum                         = gv_tonum_1
    TABLES
       t_ltap_vb                       = i_ltap_vb_1
      EXCEPTIONS
       foreign_lock                     = 1
       dn_completed                     = 2
       partial_delivery_forbidden       = 3
       xfeld_wrong                      = 4
       ldest_wrong                      = 5
       drukz_wrong                      = 6
       dn_wrong                         = 7
       squit_forbidden                  = 8
       no_to_created                    = 9
       teilk_wrong                      = 10
       update_without_commit            = 11
       no_authority                     = 12
       no_picking_allowed               = 13
       dn_hu_not_choosable              = 14
       input_error                      = 15
       error_message = 16
       OTHERS = 32.
    Here i am getting as input error, i need to create only one TO for multplie items
    If i pass this i a loop - then it will create 2 Transfer order which is WRONG ...so please help me to over come this error.
    Thanks
    Senthil
    Edited by: Senthil Kumar on Dec 7, 2009 3:29 PM

    Hi,
    Please check FM L_TO_CREATE_MULTIPLE.
    Regards,
    Ferry Lianto

  • How can I insert a vertical line  between two underlined unfilled with text lines.  I am trying to construct an invoice and I need a break.  If I try any of the shapes or inset functions it eliminates my underlined lines and shifts the whole document.

    I am trying to construct an invoice.  How can I install a vertical line between two or more underlined lines to create a break.  I have tried the insert, shapes and nothing works.  If I try any of the functions the whole document shifts to the right and I loose some of the lines.  Is there a work around, or is I work not able to do what I want?   
    Thanks
    Armand

    It sounds as though you may have "Object Causes Wrap" activated for the Line Shape. This will push other content away.
    See the Wrap Inspector.
    Jerry

  • Val.type doesnt match with PO STO 351

    dear all,
    i'm a newbie need some help
    How is make linked val.type in MIGO GI mov.type 351 with val.type in PO STO until not a different val.type that transfered . Cause the user often do mistake.
    tk.
    edo

    hai BSk
    i'm sorry about that....
    anyway..
    thank u
    edi

Maybe you are looking for

  • How can I get my data back?

    I have a Macbook Pro running 10.8.5. I went to startup my computer tonight and got an osx utilities window. No desktop. I don't know how to restore my desktop or get my data back. I don't have a backup. Please help! Thanks

  • Problem in Adobe forms

    Hi experts I am trying the tutorial on SDN - 'How to Execute an RFC Model with Input from Interactive Forms'. When I click on submit on the adobe form and the plug is fired using, wdThis.wdFirePlugOutToFlightDetail(); the browser closes without any e

  • Updating to ios 7.0.4

    I tried to update my iphone 5 to iOS 7.0.4 and it keeps saying it can't verify update because I am not connected to the internet. My wifi signal is showing and I am able to access the internet. I tried plugging it into my laptop and it still didnt wo

  • Create an alias to run a plug-in?

    I'd like to create an alias on my desktop that would run an Automator plug-in. Is this possible? I find it clumsy to have to right-click my desktop and navigate three menus to get to it. Thanks in advance.

  • How to generate RXi Report

    Hi friends, Please help me Sequence the steps for creating an RXi report by using Oracle Financials RXi Reports Administration Tool in a specified scenario. I need the step by step procedure to run an RXi report. pls help me. I copied the attribute s