Batch Split field in KNVV Table

Dear All,
While checking the table KNVV - Sales Area Data, I found the field Batch Split. In OBD2 I am not able to see this field? Could you please tell me why we are using the field Batch Split and where we are using that and how we can use that?
Waiting for positive reply
Regards
Rahul

Hello Rahul
Please see OSS notes 423893 and 385048. They say "As of Release 4.6, flag 'Batch split allowed' is no longer used on the shipping screen of the customer master record."
Thatu2019s why it does not figure in the definition of account group- Field status screen. I guess it is a field maintained for compatibility reasons with older releases.

Similar Messages

  • KNVV - BOIDT i.e Rebate Index field in KNVV table is showing some date

    Dear Friends
    How this Rebate index fields updates in KNVV table.
    I have no rebates applicable  as on date. but it is showing  some date on this fields.
    can you please let me know why this gets updates and what is the use.
    Thanks
    Raju.

    HI,
    Thanks for your quick response.
    for some customers this date is updating,  i am aksing on what basis this updates in KNVV table.
    is there is specific reson behind that.
    I think for your case date is blank. have identified why this blank anyware.
    thanks
    raju

  • Logic to retrieve batch number in batch split scenario for a material

    Hi All!
    LIPS-CHARG gives the batch number for a material in normal scenario.But in batch split scenario for a material what should be the logic to retrieve the field batch number based on POSNR,VBELN and UECHA in LIPS.
    UECHA corresponds to higher level item of a batch.
    I had been given the following logic to do the same but it is not pulling any values inspite of a batch split available for the material.The logic is
    Select lips-charg (batch number) where  lips-posnr = lips-uecha ( higher level item batch)
    Please advise
    Regards
    Praneeth

    Hi Praneeth,
    The way LIPS records are in a batch split scenario is that let us say you have a delivery with one line item 00010. Now if this splits into two batch split items, then you will find in LIPS 3 records, one with line item 00010, one with 90001 and another with 90002. Both 90001 and 90002 will have a UECHA of 00010, whereas for 00010, this field will be blank. So the logic is to create two internal tables one where UECHA is blank and another where it is not blank and use it.
    SELECT * FROM LIPS
             INTO TABLE I_LIPS
            WHERE VBELN = P_VBLEN.
    I_LIPS_TEMP[] = I_LIPS[].
    DELETE I_LIPS_TEMP WHERE UECHA IS INITIAL.
    *-- This table will not have only the batch split items not the main items.
    LOOP AT I_LIPS WHERE UECHA IS INITIAL.
    *-- loop at the main items.
      IF I_LIPS-CHARG IS INITIAL.
    *-- batch is not there on the main item, see if it is there on any batch split items.
        READ TABLE I_LIPS_TEMP WITH KEY UECHA = I_LIPS-POSNR.
         do whatever
      ENDIF.
    ..... do whatever
    ENDLOOP.

  • From which table and field can I get batch split indicator?

    Dear friends,
    There is batch split indicator at VL02N screen. From which table and field can I get this indicator?
    Thanks regards..

    Hi,
    I dont think there is anythign called batch split indicator.
    You can find that there is a batch split in a delivery if LIPS-UECHA field is updated for a particular delivery. If UECHA is filled, then the number means that for the item number mentioned in UECHA, those records are the split records.
    i.e. For example say for a line item 10, there are 2 split items in a delivery. In this case, there will be two line items with LIPS-POSNR = 90001 and 90002. These line items will have LIPS-UECHA = 10. This means that the items 90001 and 90002 are the child batch items for the parent line item 10 as mentioned in UECHA field.
    btw....u can check LIPS-CHSPL if this is what you are looking for.
    I hope this answers your question. If you have any doubt, pls lemme know

  • Batch reading request doesn't prefix field names by table name

    A batch reading request doesn't prefix field names by table name and I've got a AmbigiousException which is normal because there is the same fields in the 2 tables.
    The following code :
    //call a ReadAllQuery and return a list of AffaireImpl
    List<Affaire> listeAffaire =  affaireDao.getAffaireCorrespondantes(lccJrd, lnaAnnee, lnaOrdre, lcNataffCode, lnaNoSuite);
    for (Affaire affaire : listeAffaire) {
       //there is a one to Many mapping on Affaire to Dossier, with Transparent Indirection, Read-Ony and Batch Reading
       //this metod generate the wrong batch reading method
       List<Dossier> listeDossiers = affaire.getDossier();
    generates the following requests:
    ReadAllQuery(eu.curia.litige.model.AffaireImpl) --
    SELECT * FROM LA_AFF WHERE ( ((LCC_JRD = 'C') AND (LNA_ANNEE = 8)) AND (LNA_ORDRE = 8))
    ReadAllQuery(eu.curia.litige.model.DossierImpl) --
    SELECT t0.*
    FROM LA_DOSSIER t0, LA_AFF t1
    WHERE
    (((t0.LNA_NO_SUITE = t1.LNA_NO_SUITE) AND ((t0.LCC_JRD = t1.LCC_JRD) AND ((t0.LC_NATAFF_CODE = t1.LC_NATAFF_CODE) AND ((t0.LNA_ANNEE = t1.LNA_ANNEE) AND (t0.LNA_ORDRE = t1.LNA_ORDRE)))))
    AND UPPER(LCC_JRD) = 'C' AND UPPER(LNA_ORDRE) = '8' AND UPPER(LNA_ANNEE) = '8')+
    but the request should be :
    SELECT t0.*
    FROM LA_DOSSIER t0, LA_AFF t1
    WHERE
    (((t0.LNA_NO_SUITE = t1.LNA_NO_SUITE) AND ((t0.LCC_JRD = t1.LCC_JRD) AND ((t0.LC_NATAFF_CODE = t1.LC_NATAFF_CODE) AND ((t0.LNA_ANNEE = t1.LNA_ANNEE) AND (t0.LNA_ORDRE = t1.LNA_ORDRE)))))
    AND t1.LCC_JRD = 'C' AND t1.LNA_ORDRE = '8' AND t1.LNA_ANNEE = '8')+
    It's strange because this is the only place the batch reading doesn't prefix and uses a UPPER.
    For now we have disabled the batch reading, but it decreases the performanes (the list of affaire can be hudge).
    Any Idea?
    We use TopLink 10.1.3 on a Oracle 10g Database.
    Edited by: krampstudio on 2 déc. 2011 07:40
    Edited by: krampstudio on Dec 7, 2011 11:57 AM

    Here the mapping (I've also remove the tags of some of the direct mapping fields to simplify the reading)
         <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
             <opm:class>eu.curia.litige.model.AffaireImpl</opm:class>
             <opm:alias>Affaire</opm:alias>
             <opm:primary-key>
                <opm:field table="LA_AFF" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LCC_JRD" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LNA_ANNEE" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                <opm:field table="LA_AFF" name="LNA_ORDRE" xsi:type="opm:column"/>
             </opm:primary-key>
             <opm:events xsi:type="toplink:event-policy"/>
             <opm:querying xsi:type="toplink:query-policy">
                <toplink:does-exist-query xsi:type="toplink:does-exist-query">
                   <toplink:existence-check>check-database</toplink:existence-check>
                </toplink:does-exist-query>
             </opm:querying>
             <opm:attribute-mappings>
                <opm:attribute-mapping xsi:type="toplink:one-to-many-mapping">
                   <opm:attribute-name>dossier</opm:attribute-name>
                   <opm:read-only>true</opm:read-only>
                   <opm:get-method>getDossier</opm:get-method>
                   <opm:set-method>setDossier</opm:set-method>
                   <opm:reference-class>eu.curia.litige.model.DossierImpl</opm:reference-class>
                   <opm:target-foreign-key>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LCC_JRD" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LCC_JRD" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LNA_ANNEE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LNA_ANNEE" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LNA_ORDRE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LNA_ORDRE" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                      </opm:field-reference>
                      <opm:field-reference>
                         <opm:source-field table="LA_DOSSIER" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                         <opm:target-field table="LA_AFF" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                      </opm:field-reference>
                   </opm:target-foreign-key>
                   <toplink:batch-reading>true</toplink:batch-reading>
                   <toplink:container xsi:type="toplink:list-container-policy">
                      <toplink:collection-type>oracle.toplink.indirection.IndirectList</toplink:collection-type>
                   </toplink:container>
                   <toplink:indirection xsi:type="toplink:transparent-collection-indirection-policy"/>
                   <toplink:selection-query xsi:type="toplink:read-all-query">
                      <toplink:container xsi:type="toplink:list-container-policy">
                         <toplink:collection-type>oracle.toplink.indirection.IndirectList</toplink:collection-type>
                      </toplink:container>
                   </toplink:selection-query>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lccJrd</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LCC_JRD" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lcNataffCode</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LC_NATAFF_CODE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lnaAnnee</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LNA_ANNEE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lnaNoSuite</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LNA_NO_SUITE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
                <opm:attribute-mapping xsi:type="toplink:direct-mapping">
                   <opm:attribute-name>lnaOrdre</opm:attribute-name>
                   <opm:field table="LA_AFF" name="LNA_ORDRE" xsi:type="opm:column"/>
                </opm:attribute-mapping>
             </opm:attribute-mappings>
             <toplink:descriptor-type>independent</toplink:descriptor-type>
             <toplink:caching>
                <toplink:cache-invalidation-policy xsi:type="toplink:time-to-live-cache-invalidation-policy">
                   <toplink:time-to-live>30000</toplink:time-to-live>
                </toplink:cache-invalidation-policy>
             </toplink:caching>
             <toplink:instantiation/>
             <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
             <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
             <toplink:tables>
                <toplink:table name="LA_AFF"/>
             </toplink:tables>
          </opm:class-mapping-descriptor>

  • How to change the standard Fields short description in KNVV table

    Hi All,
    Our system is recently upgraded from 4.7 to ECC 6. When we compared both versions we found the KNVV table fields descriptions are changed in 4.7(customer modifications done in 4.7) and same these customer modifications are not copied to ECC 6 from 4.7 version.
    So I tried to change the short description at domain level with the help of access key. But the description is not changed. Can you please let me know is there any procedure that how can we change the fields description for standard tables.
    KNVV table in 4.7                                                        ECC 6
    Fields                       Short Description                     Short Description
    1. KVGR1               Gen.Bus.Terms print                Customer group 1
    2. KVGR2               VAT on FOC                            Customer group 2
    3. KVGR3               Confirmation status                 Customer group 3
    4. KVGR4               Collect Billing                           Customer group 4
    5. KVGR5               SC Surchge Excl                    Customer group 5
    Regards,
    Jyothi CH.

    You need not use access key to change field labels
    Transaction CMOD -> Go to -> Text Enhancements -> Keyword -> Change.
    Here you can change all data element KNVGR1 to KVGR5

  • Picking quantity from a different storage location during batch split??

    Hi Gurus,
    Have an issue with doing batch split in a delivery with batches from several storage locations.
    Have delivery XXXXXX where I want to pick batches from several different storage locations.
    I click on the batch split button and select the different batches and quantitys.
    The issue here is that I would like to have the different storage locations entered automatically based on the selection of the batch I have made.
    The only storage location that is entered here or possible to be entered is the defaulted storage location that is in the first screen...
    My question is why can I get the storage location where the batch is located and acctually exists when I do select the batch in the batch split...
    The table LIPS and LGORT is not filed with the storage location so I do not know how I could fill this field with the correct storage location data...
    Thank You for all Your help!
    BR,
    Christian

    Hi Christian,
    you have not jet got an answer  -- here my suggestion.
    You have to use the Userexit Mv50afz1. Here you can do some checks and  you can do a popup, where you can sign the LGORT, where the batch is.
    In any case, you need an ABAPer
    In documentation, there is signed, that you should not change database other as Save_prepare - and that's too late.
    In one solution at my company, i show in a message the right information. In an other solution, i made a modification of table lips.
    But dont change the index of the current lips/xlips. That may have the effect of incorrest LIS - System.
    If nessesary create an ylips- Line of the position.
    Use an assign-command to avoid the change of the index.
    hans

  • Batch Split in OBD & billed for the entire Quantity .RG1  register does not update the excise values

    Hi All,
    I am new here . We have batch split in Delivery and 601 happens for the individual batches and billing we bill for the entire quantity . Hence the RG1 does not update the excise values for the batches and it is showing as zero (upon extraction in J2I6). Upon research through the program the latest note which i presume is patched
    The latest note is N158234 which does not show in the program but seems have been patched considering we are using the Latest version of SAP .
    As you see above in the billing we have billed for the whole quantity but RG1 does not update for the since the batches are zero .
    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split .
    Now i have checked few other projects in my company and they all seems to be following the program . So i am wondering whether my process or some customization is missing .
    Sales order (no batch determination)  , in delivery the batches are picked through wm to and batch split happens in the delivery . Then billling for the whole quantity . We have automatic excise invoice creation enabled so no J1IIN .
    Can somebody help me .
    Thank you

    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split
    Which field (H & J) they were referring in VBFA ?
    i have checked few other projects in my company and they all seems to be following the program
    How about the other projects' values in VBFA where your techinical team is guessing some issue.  Have you compared this?
    Since you have already the note 158234 implemented in your system, ideally, you should not face any issue.
    G. Lakshmipathi

  • Urgent ! delivery items and its batch split items

    Exports:
        How to find relationship between delivery items and its batch split items. Thanks alot.

    Talk to functional guy -
    List of tables which contains CHSPL
    VBAP
    LIPS
    KNVV
    KNMT

  • Batch split in Idoc DESADV.DELVRY01

    Hi,
    my scenario is non-SAP --> xi --> SAP for dispatch notifications. The sender system provides batch information on line item level, sometimes with batch split.
    I am looking for a possibility to post the dispatch advice in R/3 with batch split. I already tried with multiple E1EDL24 segments and with E1EDL15, but with no success.
    Does anybody have experience with batch splits in SAP Idocs or can anybody help me with a documentation?
    Thanks a lot,
    Philipp

    hello Philipp, all you have to do is to fill the fields CHARG, HIPOS, HIEVW, only have  to fill the fields HIPOS and HIEVW in the sub-items segments, then you have to manually assign these fields to the structure that receives them, for example in the user exit "EXIT_SAPLV55K_011" the structure that receives these fields is DELIVERY_COM.   
    Example:   
    IF IDOC_SEGMENT-SEGNAM = 'E1EDL24.'   
       l_es_e1edl24 = idoc_segment-sdata.   
       it describes table DELIVERY_COM lines reg.   
       if sy-subrc = 0 and reg> 0.   
          loop at delivery_com into l_ti_delivery from reg to reg.   
                  l_ti_delivery-charg = l_es_e1edl24-charg.   
                  l_ti_delivery-lichn = l_es_e1edl24-charg.   
                  l_ti_delivery-chspl = 'X.'   
                  l_ti_delivery-uecha = l_es_e1edl24-hiccups.   
                  modify delivery_com from l_ti_delivery transporting charg lichn chspl uecha.   
          endloop.   
       endif.   
    endif. 
    i hope this information can help you. 
    best regards.
    Cesar Becerra.

  • FOR ALL ENTRIES IN - For Batch Split & multiple items

    Hi,
    My Report is to find Production Order from Sale Order.
    Flow of tables -
    (VBAK- VBAP- LIPS - SER01 - OBJK - SER05 - CAUFV)
    Report is working accurate in normal scenario. But -
    Here, In Batch split with multiple items -->
    FOR ALL ENTRIES IN - is not taking values.
    one case for Ex-->
    sale order   so item        obdelivery           obd item           serial no
    39782            10             1234              900001                 12
    39782            10             1234              900002                 13
    39782            20             3456              10                     14
    Here,
    only one OBD 1234 (sr no 12 & 13 ) is get entered in ITAB and not 3456.
    (i.e. in gi_objkso all 3 entries are there, but in gi_objkpo only two entries are transferred)
    Where, Production order is there for all three Sr. No.
    My code is -->
    IF NOT gi_ser01 IS INITIAL.
              SELECT obknr equnr sernr matnr
                     FROM objk
                     INTO TABLE gi_objkso
                     FOR ALL ENTRIES IN gi_ser01
                     WHERE obknr EQ gi_ser01-obknr
                       AND equnr IN so_equnr
                       AND sernr IN so_sernr
                       AND matnr IN so_matnr
                       AND taser EQ 'SER01'.
              IF NOT gi_objkso IS INITIAL.
                           SELECT obknr equnr sernr matnr
                       FROM objk
                       INTO TABLE gi_objkpo
                       FOR ALL ENTRIES IN gi_objkso
                       WHERE sernr EQ gi_objkso-sernr
                         AND equnr EQ gi_objkso-equnr
                         AND matnr EQ gi_objkso-matnr
                         AND taser EQ 'SER05'.

    Hi,
    Do you create more than one production order per sales order line?  If not, you could change the match to look at table AFPO for fields KDAUF = sales order number) and KDPOS = salse item number.
    If you are going down to serial number level, after this select (fields are indexed in index AFPO~3, by default I think), then you could use your additional serial number field match after getting the list of production order numbers for the sales order/item.
    Regards,  Andy

  • Batch splitting logic

    Hi
    I am required to add batch splitting logic in below code.
    Any one tell me how to do this
    PERFORM get_invoice_data.
      PERFORM filter_invoice_data.
    FORM get_invoice_data.
        SELECT k~vkorg k~vbeln k~fkart k~vtweg k~fkdat  "CHOYT CHG#1589121
               k~waerk k~bzirk k~regio
               k~BSTNK_VF                                       "Mod-010++
               p~posnr p~vkgrp p~vkbur p~mvgr5 p~matnr
               p~arktx p~fkimg p~vrkme p~netwr p~mwsbp
               p~aubel p~vgbel p~vgtyp
               p~charg p~werks k~fkart
               k~xblnr
          INTO CORRESPONDING FIELDS OF TABLE t_vbrp
          FROM vbrk AS k INNER JOIN vbrp AS p
            ON k~vbeln = p~vbeln
         WHERE k~vkorg IN s_vkorg "<< MOD CHOYT CHG#1589121
           AND k~fkdat IN s_fkdat
           AND k~vtweg IN s_vtweg
           AND k~rfbsk = 'C'      " Accounting document has been created
           AND vkgrp IN s_vkgrp
           AND vkbur IN s_vkbur.
    ENDFORM.                    " get_invoice_data
    FORM filter_invoice_data.
      DATA lt_vbpa LIKE t_vbpa OCCURS 0 WITH HEADER LINE.
    If not t_vbrp[] is initial. "Mod-004++
      REFRESH lt_vbpa.
      SELECT vbeln parvw kunnr
        FROM vbpa
        INTO CORRESPONDING FIELDS OF TABLE lt_vbpa
        FOR ALL ENTRIES IN t_vbrp
       WHERE vbeln = t_vbrp-vbeln
         AND posnr = '000000'.    " Header partner
      SELECT vbeln parvw kunnr
        FROM vbpa
        APPENDING CORRESPONDING FIELDS OF TABLE lt_vbpa
        FOR ALL ENTRIES IN t_vbrp
       WHERE vbeln = t_vbrp-vbeln
         AND parvw = 'WE'.    " Header partner
    Endif. "Mod-004++
      SORT lt_vbpa BY vbeln.
      t_vbpa[] = lt_vbpa[].
        LOOP AT lt_vbpa WHERE vbeln = t_vbrp-vbeln
                          AND parvw IN s_parvw
                          AND kunnr IN s_kunnr.
          EXIT.
        ENDLOOP.
        IF sy-subrc <> 0.
          DELETE t_vbrp.
        ENDIF.
      ENDLOOP.
      IF c_prf = 'X'.                                           "KA01
        SORT t_vbrp DESCENDING BY posnr vbeln fkart.            "KA01
        SORT t_vbrp DESCENDING BY vgbel fkart.
       LOOP AT t_vbrp WHERE rfbsk NE 'C'.
          t_vbrp_c = t_vbrp.
          APPEND t_vbrp_c.
          DELETE t_vbrp.
        ENDLOOP.
        SORT t_vbrp_c DESCENDING BY vgbel vgpos vbeln.
        DELETE ADJACENT DUPLICATES FROM t_vbrp_c
               COMPARING vgbel vgpos fkart.
        LOOP AT t_vbrp_c.
          t_vbrp = t_vbrp_c.
          APPEND t_vbrp.
        ENDLOOP.
        SORT t_vbrp.
      ENDIF.                                                    "KA01
    ENDFORM.                    " filter_invoice_data

    Hi Kumar,
    You should format your code before posting... I have done it and put it just below :
    PERFORM get_invoice_data.
    PERFORM filter_invoice_data.
    FORM get_invoice_data.
    SELECT k~vkorg k~vbeln k~fkart k~vtweg k~fkdat "CHOYT CHG#1589121
         k~waerk k~bzirk k~regio k~BSTNK_VF "Mod-010++
         p~posnr p~vkgrp p~vkbur p~mvgr5 p~matnr
         p~arktx p~fkimg p~vrkme p~netwr p~mwsbp
         p~aubel p~vgbel p~vgtyp p~charg p~werks k~fkart k~xblnr
      INTO CORRESPONDING FIELDS OF TABLE t_vbrp
      FROM vbrk AS k
      INNER JOIN vbrp AS p
       ON k~vbeln = p~vbeln
        WHERE k~vkorg IN s_vkorg "<< MOD CHOYT CHG#1589121
          AND k~fkdat IN s_fkdat AND k~vtweg IN s_vtweg
          AND k~rfbsk = 'C' " Accounting document has been created
          AND vkgrp IN s_vkgrp AND vkbur IN s_vkbur.
    ENDFORM. " get_invoice_data
    FORM filter_invoice_data.
    DATA lt_vbpa LIKE t_vbpa OCCURS 0 WITH HEADER LINE.
    IF NOT t_vbrp[] IS INITIAL. "Mod-004++
      REFRESH lt_vbpa.
      SELECT vbeln parvw kunnr FROM vbpa
        INTO CORRESPONDING FIELDS OF TABLE lt_vbpa
        FOR ALL ENTRIES IN t_vbrp
          WHERE vbeln = t_vbrp-vbeln
           AND posnr = '000000'. " Header partner
      SELECT vbeln parvw kunnr FROM vbpa
        APPENDING CORRESPONDING FIELDS OF TABLE lt_vbpa
        FOR ALL ENTRIES IN t_vbrp
         WHERE vbeln = t_vbrp-vbeln AND parvw = 'WE'. " Header partner
    ENDIF. "Mod-004++
    SORT lt_vbpa BY vbeln.
    t_vbpa[] = lt_vbpa[].
    " I believe that you have forget the following line, isn't it?
    LOOP AT t_vbrp.
    " ^^^^^^^^^^^^^^
      LOOP AT lt_vbpa WHERE vbeln = t_vbrp-vbeln
             AND parvw IN s_parvw
             AND kunnr IN s_kunnr.
        EXIT.
      ENDLOOP.
      IF sy-subrc 0.
        DELETE t_vbrp.
      ENDIF.
    ENDLOOP.
    IF c_prf = 'X'. "KA01
    " Are you sure you want to sort your internal table twice ???
      SORT t_vbrp DESCENDING BY posnr vbeln fkart. "KA01
      SORT t_vbrp DESCENDING BY vgbel fkart.
    " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    " I don't understand why you delete some lines in T_VBRP
    " that you after insert again in T_VBRP
    " (a sort change nothing to the content)???
      LOOP AT t_vbrp WHERE rfbsk NE 'C'.
    ...  " here I have skipped some lines
      ENDLOOP.
    " ^^^^^^^^^^^^^^^^^^^
      SORT t_vbrp.
    ENDIF. "KA01
    ENDFORM. " filter_invoice_data
    I have insert some remarks about your code : some lines seems strange! But for your question, what do you mean by batch splitting logic? Could you explicit? Thanks!
    Samuel

  • Batch splits in deliveries

    Hi all,
    I have to modify an FM to extract the SLED/BBD (expiry date) based on material and batch number, and move it to an IDoc segment. In addition i need to take into account batch splits in which case the earliest SLED/BBD will be moved to an IDoc segment.
    My question is given a delivery were can i check if a batch split occurred? And were will i find the different batches if a batch split indeed occurred?
    For the deliveries in which no batch split occurred i will be extracting the data from table LIPS.

    Hi Joseph,
    Not exactly.
    If the field value LIPS-UECHA is '000000' or the same line item number (let say '000010', in this case both the line item number (LIPS-POSNR) & LIPS-UECHA will be same)), then consider this line item as the master.
    Then chk whether any line item in lips with the same vbeln and LIPS-UECHA = '000010' (in this case LIPS-POSNR will have a different value as per the customization, normally in many cases it will be like 009000, 009001... or 000011, 000012...). If exists, then that line item have the batch split and get all the above line items.
    For instance, let say
    for line item ... 000010 will have 2 batch split with each 10 qty for the document number X, then in the lips you have 3 line items as below:
    LIPS
    VBLN        POSNR      LFIMG    UECHA
    X               000010      0            000000 (or 000010 which can be configured)
    X               000011      10          000010
    X               000012      10          000010
    Regards,
    Selva K.

  • Inserting Batch Split Items in Delivery

    Hi Folks,
    a very quick question. I was mining for info to get the batchsplit items inserted into an Outbound delivery thru the FM WS_DELIVERY_UPDATE sometime ago. Out of doubt and tight schedule I had to opt for BDC which is not that elegant and I would like to know if anyone of you gurus has managed to insert batch split items for a normal item in a delivery. A sample piece of code would be just what I am looking for, suggestions are invited
    thanks a lot in advance.
    ZAM

    Hi ZAMUser,
    I have played with batch-split Items, this is a little part of the code. In this code I try to update quantity of the delivery. Maybe that will help you
    Regards
    Frédéric
    (comments are in french, and I play with special messages and text)
    *   Livraison
        refresh wlt_btc.
        move : 'SAPMV50A'    to wlt_btc-program ,
               '4004'        to wlt_btc-dynpro ,
               'X'           to wlt_btc-dynbegin.
        append wlt_btc.
        clear  wlt_btc.
        move : 'BDC_OKCODE'  to wlt_btc-fnam ,
               '/00'         to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
        move : 'LIKP-VBELN'    to wlt_btc-fnam ,
               wlt_badge-vbeln to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
    *   PoPo.
        move : 'SAPMV50A'    to wlt_btc-program ,
               '1000'        to wlt_btc-dynpro ,
               'X'           to wlt_btc-dynbegin.
        append wlt_btc.
        clear  wlt_btc.
        move : 'BDC_OKCODE'  to wlt_btc-fnam ,
               '=POPO_T'     to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
    *   Poste.
        if wlt_badge-uecha eq '00000000'.
          move wlt_badge-posnr to wlv_poste.
        else.
          move wlt_badge-uecha to wlv_poste.
        endif.
        move : 'SAPMV50A'    to wlt_btc-program ,
               '0111'        to wlt_btc-dynpro ,
               'X'           to wlt_btc-dynbegin.
        append wlt_btc.
        clear  wlt_btc.
        move : 'BDC_OKCODE'  to wlt_btc-fnam ,
               '=WEIT'       to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
        move : 'RV50A-POSNR' to wlt_btc-fnam ,
               wlv_poste     to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
    *   Marque le poste
        move : 'SAPMV50A'    to wlt_btc-program ,
               '1000'        to wlt_btc-dynpro ,
               'X'           to wlt_btc-dynbegin.
        append wlt_btc.
        clear  wlt_btc.
        if wlt_badge-uecha ne '00000000'.
          move : 'BDC_OKCODE'  to wlt_btc-fnam ,
                 '=CHSP_T'     to wlt_btc-fval .
        else.
          move : 'BDC_OKCODE'  to wlt_btc-fnam ,
                 '=IDET_T'     to wlt_btc-fval .
        endif.
        append wlt_btc.
        clear  wlt_btc.
        move : 'BDC_CURSOR'     to wlt_btc-fnam ,
               'LIPS-POSNR(01)' to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
        if wlt_badge-uecha ne '00000000'.
    *     Recherche le sous poste.
          move : 'SAPMV50A'    to wlt_btc-program ,
                 '3000'        to wlt_btc-dynpro ,
                 'X'           to wlt_btc-dynbegin.
          append wlt_btc.
          clear  wlt_btc.
          move : 'BDC_OKCODE'  to wlt_btc-fnam ,
                 '=POPO_T'     to wlt_btc-fval .
          append wlt_btc.
          clear  wlt_btc.
    *     Sous Poste.
          move : 'SAPMV50A'    to wlt_btc-program ,
                 '0111'        to wlt_btc-dynpro ,
                 'X'           to wlt_btc-dynbegin.
          append wlt_btc.
          clear  wlt_btc.
          move : 'BDC_OKCODE'  to wlt_btc-fnam ,
                 '=WEIT'       to wlt_btc-fval .
          append wlt_btc.
          clear  wlt_btc.
          move : 'RV50A-POSNR'   to wlt_btc-fnam ,
                 wlt_badge-posnr to wlt_btc-fval .
          append wlt_btc.
          clear  wlt_btc.
    *     Marque le sous poste
          move : 'SAPMV50A'    to wlt_btc-program ,
                 '3000'        to wlt_btc-dynpro ,
                 'X'           to wlt_btc-dynbegin.
          append wlt_btc.
          clear  wlt_btc.
          move : 'BDC_OKCODE'  to wlt_btc-fnam ,
                 '=CDET_T'     to wlt_btc-fval .
          append wlt_btc.
          clear  wlt_btc.
          move : 'BDC_CURSOR'     to wlt_btc-fnam ,
                 'LIPS-POSNR(01)' to wlt_btc-fval .
          append wlt_btc.
          clear  wlt_btc.
        endif.
    *   Onglet Qtt
        move : 'SAPMV50A'    to wlt_btc-program ,
               '3000'        to wlt_btc-dynpro ,
               'X'           to wlt_btc-dynbegin.
        append wlt_btc.
        clear  wlt_btc.
        if wlt_badge-uecha ne '00000000'.
          move : 'BDC_OKCODE'  to wlt_btc-fnam ,
                 '=T04'       to wlt_btc-fval .
        else.
          move : 'BDC_OKCODE'  to wlt_btc-fnam ,
                 '=T05'       to wlt_btc-fval .
        endif.
        append wlt_btc.
        clear  wlt_btc.
    *   Mise à jour Qtt livrée
        move : 'SAPMV50A'    to wlt_btc-program ,
               '3000'        to wlt_btc-dynpro ,
               'X'           to wlt_btc-dynbegin.
        append wlt_btc.
        clear  wlt_btc.
        move : 'BDC_OKCODE'  to wlt_btc-fnam ,
               '=SICH_T'     to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
        move : 'LIPS-LFIMG'  to wlt_btc-fnam ,
               wlv_poids     to wlt_btc-fval .
        append wlt_btc.
        clear  wlt_btc.
    *   Appels du call transaction.
        call transaction 'VL02N'  using wlt_btc
                                  mode  'N'
                                  update 'S'
                                  messages into wlt_error.
        sort wlt_error by msgid msgnr.
    *   Binary search
        read table wlt_error
             with key msgid = 'ZTPL'
                      msgnr = '011'
             binary search.
        if sy-subrc eq space.
          message i011(ztpl) with wlt_error-msgv1 wlt_error-msgv2.
        else.
          read table wlt_error
               with key msgid = 'ZTPL'
                        msgnr = '010'
               binary search.
          if sy-subrc eq space.
            message i010(ztpl) with wlt_error-msgv1 wlt_error-msgv2.
          else.
    *       Pas de binary search pour la recherche d'erreur
            read table wlt_error
                 transporting no fields
                 with key msgtyp = 'E'.
            if sy-subrc eq space.
              message i398(00) with text-e01.
            else.
    *         Mise à jours des masses dans les textes au niveau des postes
    *         de livraison.
              concatenate wlt_lips-vbeln
                          wlt_lips-posnr
                          into wlv_tdname.
    *         Masse net.
              move : 'VBBP'     to wls_thead-tdobject ,
                     wlv_tdname to wls_thead-tdname ,
                     'YP09'     to wls_thead-tdid ,
                     wlv_langu  to wls_thead-tdspras.
              move : wlt_bascule-poids to wls_tdline-tdline ,
                     '*'               to wls_tdline-tdformat .
              refresh wlt_tdline.
              append wls_tdline to wlt_tdline.
              call function 'SAVE_TEXT'
                exporting
                  header                = wls_thead
                  savemode_direct       = 'X'
                tables
                  lines                 = wlt_tdline
                exceptions
                  id                    = 1
                  language              = 2
                  name                  = 3
                  object                = 4
                  others                = 5.
    *         Masse brut.
              move : 'YP07'            to wls_thead-tdid ,
                     wlt_bascule-poid2 to wls_tdline-tdline ,
                     '*'               to wls_tdline-tdformat.
              refresh wlt_tdline.
              append wls_tdline to wlt_tdline.
              call function 'SAVE_TEXT'
                exporting
                  header                = wls_thead
                  savemode_direct       = 'X'
                tables
                  lines                 = wlt_tdline
                exceptions
                  id                    = 1
                  language              = 2
                  name                  = 3
                  object                = 4
                  others                = 5.
    *         Tare.
              move : 'YP08'            to wls_thead-tdid ,
                     wlt_bascule-poid3 to wls_tdline-tdline ,
                     '*'               to wls_tdline-tdformat.
              refresh wlt_tdline.
              append wls_tdline to wlt_tdline.
              call function 'SAVE_TEXT'
                exporting
                  header                = wls_thead
                  savemode_direct       = 'X'
                tables
                  lines                 = wlt_tdline
                exceptions
                  id                    = 1
                  language              = 2
                  name                  = 3
                  object                = 4
                  others                = 5.
            endif.
          endif.
        endif.

  • Delivery order Batch split

    Hi all,
    I am using a smartform to print the Delivery order in VL03n. it is printing fine if there is no batch split.
    The quantity, amount for the delivery items  is  appearing as zero in the print if BATCH SPLIT is there.
      I have 2 items in delivery order like 10 & 20. After batch split, i find one new item 90010 is created under 10 &
    another item  90020 is created  under 20.
      i checked LIPS table where i find all 4 items. But i want to print only 2 main  like 10 & 20 . but the quantity, amount is present
      in batch split items.
      Please suggest how i need to handle batch split in my smartform printing .
    Thanks
    pabi

    Pabhi,
    In LIPS table, you'll find a field UECHA . For batch split item, it will point to parent item and for parent item it will be initial.
    e.g.  For item 90010 it will be  10 & for item 90020 it will be 20. 
    You can loop around the lips table using this relationship and sum the batch split quantities and then transfer that value to parent item. After loop processing you can delete the entries,which have UECHA not initial .

Maybe you are looking for