DIscount condition for plant to plant STO

Hi,
Please let me know if this requirement is possible in the system.
My scenario is when I am transferring stock from plant to plant (both under same company code), I get a subsidy.
So when I receive the goods in the receiving plant the price has to be net of subsidy. is this possible in the system.
Example shown below
Plant X material A price is 100
Subsidy or discount gained when transfering to Plant Y is 20 INR
So when I transfer the material to Plant Y the moving average price has to be adjusted and the price should be 80 INR
Please let me know if its possible.
Thanks
Naveen

Hello,
I think there is some confusion. If the price decreases when you transfer material from one plant to another, then who will pay for the loss of sending plant.
If the above statement is true and you still need a tax code to decrease the value, you can create one by making condition records with negative value.
For Example If you want to maintain the tax code of VAT 4 % then make the condition record with JVRD as -4 and not with +4
Regards
Prabhjot Singh

Similar Messages

  • Condition for the nonexcisable Plant

    Dear  Experts
    whenever u will receive a material with  all excise & frieght & other taxes then in the Nonexisable Plant
    Material in coming cost goes to inventory means Basic + taxes Material Price at the system.
    how we can vibergate in the system so that  material will take the Basic cost (as its applicable for the excisable plant) and other taxes bcoz of complete liable to the nonexsiable plant  and cost is going to the inventory.
    Rgds
    Pankaj Agarwal

    Hi Pankaj,
    Actually taxes should go to material only if the plant is nonexcisable. We r doing this in one of our uttranchal plant. This is STD as well. Consult with ur FICO experts.
    Still if u feel that it should not go to inventory then dont maintain taxes in PO.
    Then clear the taxes in FB60. Here also u have to debit and credit items. U can debit the Taxes a/c and credit expenses. But again if u do so then the debited taxes u have to remit to govt which u r not going to do so.
    Hence i suppose the above practice may not fit.
    For delivery cost u can debit the delivery cost a/c and credit the venodr in FB60.
    Above all chk with ur fico guys.
    I think adding to inventory is correct method.
    Chk and revert.
    Reg
    Raja

  • How to set discount condition for distount condition?

    Hellow!
    We use price condition ZP01 (base price)
    Then discount condition ZDI1 (discount for customer group and material group) is implemented for base price
    This works fine.
    But now I need to implement extra condition to correct discount. It is percent condition which redice discount for customer.
    Example
    base price ZP01
    100 EUR
    discount  ZDI1
    cust group 01 material group 01  - 10%
    cust group 01 material group 02 - 20%%
    DISCOUNT CORRECTION (ZDK)
    cust 1001 0,7 (or 30%)   (cust 1001 in 01 customer group)
    It means that discount in sale document for material group 01  should be 7% and for mat group 02 14% . So condition ZDK reduce discount perchens but not item price.
    Please  help me, how ZDK should be inserted into price procedure.
    Andrey Garshin.

    Hi Andrey,
    Are there any logical reasons behind the reduction as follow:
    1) 10% --> 7% (Material Group 1)
    2) 20% --> 14% (Material Group 2)
    If there are logic to these reduction, you can proceed to write a routine in VOFM and assign it accordingly for condition type ZDK in your pricing procedure.  However, this does not seems to be a standard practice and business wise this would also appear to be rather inflexible and are constrained by the routine you built alone.
    Alternative to the above, I would recommend that you could also consider using the standard condition type PMIN (minimum pricing) given in the standard pricing procedure.  The reason you are probably reducing (or correcting) the discount is also because too much discounts are granted in any sales transaction and therefore you may want to establish a control that there should be a minimum price for a particular material sold. This can be achieved automatically using the PMIN condition type. 
    As such, if the minimum price is not met during pricing in sales order transaction, then the system automatically determines the difference using condition type PMIN.
    Example:
    Condition record PMIN: USD 1,000
    Sales Order Pricing:
    PR00 (Basic Price) = USD 1,250
    K007 (Customer Discount) = USD 300
    PMIN (Minimum Price) = USD 50
    Net Value = USD 1,000 (as per PMIN condition record USD 1,000)
    Whenever minimum price for a material change, you can just change the condition record to quickly change your requirement without changing the configuration.
    Hope the above helps give an idea on how to approach your discount design.
    Thanks.

  • Need conditions for pricing

    Dear Friends ,
    can you suggest me which standard condition type i should use for the following.
    Basic Price                                                                                = 100
    less discount@ 10%                                                                                =10 .....(May be % or in amount)
    less additional discount 1%                                                                                =0.90
    Subtotal of A                                                                                =89.10
    +Add excise duty @10.30% (Include ED 10% 2 % edu cess1 % higher edu cess)+    =9.18
    Subtotal of B                                                                                =98.28
    Additional Packing and forwarding /Insurance @ 1%                                                     =0.98
    subtotal of C                                                                                = 99.260
    Additional CST/ST/VAT @12.5%                                                                                =12.41
    Subtotal of D                                                                                =111.67
    Additional freight                                                                                =10
    Grand total                                                                                = 121.67
    Regards and thanks
    Mahesh.

    hi,
    in addition to kiran
    please use the RM0000 priceing procedure in m/08  for basci price and  discount conditions.
    for basic price youcan use PB00 CONDITION  type
    for discount  use RA00
    for additionol dis copy rom ra00 name at as zd00
    these are used in priceing procedure in m/08 copy from RM0000.
    FOREXCISE
    JMOP     IN: BED setoff %
    JEC1     IN: SECESS setoff %
    JSEP     IN: SHECESS setoff %
    JMX1     IN: A/P BED setoff
    JMX3     A/P ECess % Setoff
    JHX1     A/P SH.CESS % SETOFF
    JVRD     Inp VAT Cr Non-CG
    JIPC     IN C Sales tax inv.
    FOR THIS you can use taxprocedure TAXINN in obyz. (copy your tax procedur from TAXINN  and name it as your own)
    don"t disturb the standerd.(TAXINN)
    FOR  packing and farwardin and insurance and additionl fright you have to copy from FRA1 condition type in m/06 and name it as z conditinns like for packing zpac for  insurance  zins and additionol fright zfri like that .
    these are to be given in your priceing procedure only in m/08.
    Thanking you

  • Sto intra company plant to plant

    hi guru's
    in a company code i have two plants x and y. i configured sto for two plants both the way from x to y and y to x. i maintained shipping data for both the plants with same cust no and same sales area.
    i have transfer the stock its ok. its transferring from one to other. but when i am creating the order with that customer and material plant is determining in the order. i tried enter the plant manually but its not taking its showing the error enter the respected plant.
    do we need to maintain any config for this. pls help out.

    Hello Surya,
    For STO the following steps can be performed.
    You need to have 1 company code + 2 plants assigned to them
    Supose co.code is  Z01 and your plants are X and Y.
    X- is Supplying Plant
    Y-is Recieving plant
    You should have 1 material under Supplying plant and should be extended to Recieving plant .
    One customer which should be maintained under recieving and supplying plant.
    Maintain shipping conditions and delivering plant in XD02 which is vital.
    Now the steps are.
    First step
    Go to OLME-Purchase order - set up STO- Define shipping data for plants
    or you can also follow path which is
    IMG-mm-purchase-purchase order--set up STO
    Here you need to ender the sales area details i.e your sales organisation, distribution channel, division and the plant details.
    Second Step
    Define Checking rule: you can use standard one or you can define your own one
    Third Step
    Assign Delivery type to checking rule
    Here you need to assign delivery types to checking rule like NB-NLCC- and suppose checking rule is B
    and for UB-NL-and checking rule could be B
    _Fourth Step_
    Assign document types wheather it is one step
    like X-Y-UB
    once you have gone throught these steps and saved at every step then raise purchase order ME21N save it.
    for delivery do VL10B, and here dont forget to add document data, and save it.
    Now do the MIGO whose movement type is 301.
    All these steps are there one after by one
    I think this are basic step which you should follow to do STO.
    If I have missed any thing please do not ignore, instead correct.
    Regards,
    Sridhar.

  • Accounting Problem during STO from Plant to Plant with M.type 351

    Dear Experts,
    Pl. provide solution for the following problem.
    Problem :
    Wrong accounting generation  at the time of Goods Issue from plant to plant within a single company code  with Movement type 351 and without Delivery document.
    Business scenario :
    In order to capture the profit from a Supplying  profit center to  receiving  profit center , receiving  plant (profit center for eg. XX maintained in a Material Master ) has generated  a  Stock Transfer Order (STO) with profit margin for  the supplying plant ( profit center YY maintained in a Material Master ) by maintaining conditions.
    Required Accounting Document :
    Inventory Account  Supplying Profit Center      -                                * CREDIT*
    Inventory Account  Receiving Profit Center  -                                     DEBIT
    Income  from Stock Transfer for the supplying profit Center u2013              CREDIT
    Expense from stock Transfer for the receiving profit Center -                DEBIT    
    Generated Accounting Document in SAP:
    Inventory Account  Supplying Profit Center    -                                 CREDIT
    Inventory Account  Receiving Profit Center  -                                    DEBIT
    Income  from Stock Transfer for the supplying profit Center u2013             DEBIT
    Expense from stock Transfer for the receiving profit Center -              CREDIT
    regards,
    YK

    hi
    check your OBYC settings

  • Plant to Plant STO with excise invoice and taxes in one company code

    Hi,
    I have a new business requirement, we want to create only one company code and 12 plants in different states,  each plant will have separate purchasing and sales activity this is ok this can be done with separate excise and series group as ther will not be any issue for purchsing and saling of materisl with exice in each plant , but how we can transfer the material plant to plant  if the plant is in different states we want that the material should be transfer from palnt to plant  with excise invoice only,  as we have the company code common,  how to create the billing document for this, and how to pass the duty from the saling plant and capture the same in the recieving plant. with proper tax entry. Can we do the STO with biiling if the two plants are in single compnay code.
    regards,
    zafar

    hi,
    I am trying to create a Stock Transport Order (STO) with document type UB and item category U. My objective is to transfer material from Plant (supplying plant) 100 to Plant (receiving plant) 1100 within one company code (1000) with STO.
    For this purpose I created a raw material 1434 in plant 1000 with sales org 1 view and in that view entered in delivering plant field 1000 as delivery plant. After that I extended material 1434 to plant 1100 without changing anything what I did while creating the material first in Plant 1000 except in organizational level I entered 1100 in the plant field. I entered Sales org 1000 and distribution channel 10 in organization level for both plant while creating and extending the material. In me21n I chose Stock Transport Order with document type UB and item category as U also receiving Plant as 1100. With this when I tried to save the STO the message, I am getting an error,  Cannot determine shipping data for the material 1434? 
    I am doing solely mm function why I need to create Customer master? In this case plant 1100 is the customer right? 
    Solution:
    1. Mat.(1434) should be maintained in both the plants. (1000&1100).
    2. Should have enough stock in supplying plant(1000).
    3. Make its supplying plant as a vendor in vendor master record in receiving plant(1100).
    4. Make it receiving plant as a customer in customization.  
        Create customer (xd01) & and define the shipping data for plants in both the plants.
        Path: spro u2013 img u2013 m.mgmt u2013 purchasing u2013 po u2013 set up STO u2013 define shipping data (1 by1 )
        In Receiving plant (1100)                         In Supplying plant (1000)
        Customer num.  123345 (for ex.)              Customer num.  -
    (don't fill) 
        Sales org.yyy                                                  
        Dist. Channel                                                              
        Sales div.  y   
    5. Assign doc. Type is "NL" for intra company STO. If  STO is inter company, Assign doc. Type is "NLCC".
        Position doc type is "UB"
        Enter supplying plant(1000) & doc type (NL) & checking rule (ex:01)
    6. Assign doc. Type is "UB" to u'r plants.(PO)
        Go for new entries 
        Enter supplying plant(1000) & Receiving plant (1100) & doc type (UB).
    7. Create a PO, choose the doc type is `UB' & item cat.'U', Enter supplying plant as a vendor in PO  of the receiving plant(1100).
    8. Provide this num (PO) to SD people, they will do the delivery by using transactional code is VL10B.
    9. Sales people they will provide "out bound delivery num".
    10. Do the GR. In GR the second tab 05 out bound delivery instead of PO mov.type 101.
    11. See the stock over view in the receiving & supplying plants.  
    thanking you

  • Excise duty not loaded onto inventory for non excisable plant

    Hello
    I am facing a problem in excise duty flow. I have two plants, one excisable and second non excisable. one vendor is supplying the material to both the plants, so vendor is sending the invoice having BED, ECess & SECess for both the plants.
    For excisable plant all the duty values are flowing correctly, but for non excisable plant BED is getting loaded onto inventory.
    For non excisable plant, I have maintained conditions records al plant level for JMIP (BED Inv %), JMX2 (A/P BED Inv), ZECN (IN:ECess Inv %), JEC2 (ECess Inv Total), JSEI (IN: A/P SECess Inv), JHX2 (IN: SECess Inv Total).
    During MIRO, BED is not getting loaded onto inventory, while ECess & SECess is getting loaded to material.
    Pl suggest, where to check the settings or any settings for condition types, tax procedure etc.
    Thanks & regards'
    Manoj Gupta

    Hi,
       The system behaviour of posting to stock account is controlled by account key NVV. Go to OBQ3, in your tax procedure TAXINN (or copy of that procedure) check for the condition types which account keys are assigned.
    System will never discriminate that BED is not getting inventorised but ECess and Hcess on BED get inventorised.
    Regards

  • Sto plant to plant(1 company cde)

    Sir,
    While creating STO (plant to plant within company), I am getting an error by not possible to determine shipping data for material…….
    I have done following steps
    1.     Created material master with maintaining sales data in both plant
    2.     Created customer and master data for both plant and maintained in both master records(007 account group*-vendor)
    3.     Mentioned shipping data for both plant in SPRO settings with sales organization and div.
    4.     Assigned delivery type as NL as it is within company code plant to plant transfer, De activated one step procedure
    May any one please help where I am lacking?
    also let me know what has to be done if i wan to go for cross company code.

    Hello Suresh,
    Check the below Configs
    1. IMG->MM->Purchasing-> Setup STO-> Define shipping data for plants
    (Maintain Customer No of Reciving Plant)
    2. IMG-> Logistics Execution->Shipping Points->Shipping Point& Good Receiving Point Determination->Assign Shipping Points
    3. Fill details in Vendor Master-> Purchasing view, from menu Extras-> Add Purchasing Data.
    4. Maintain Shipping details in Customer Master.
    I think this will help you.
    Rgds,
    S.Balaji.

  • More than one Planning plant for a maintenance plant.?

    hi Friends, can we have more than one Planning plant for a maintenance plant.Is there any advantage or disadvantage of this condition.?

    Hi,
         You can have Maintenance Planning Plant & Maintenance Plant in any of the follwing ratios, i.e., 1:1 / 1:n / n:1. Actually in Maintenance, there can be electrical & mechanical maintenance.
              In the case of 1:1 relation, all the maintenance activities (Electrical & Mechanical) will be planned by single Maintenance Planning Plant for single Maintenance Plant.
            In case of 1:n, single maintenance planning plant will do the plaaning of maintenance activities for all the maintenance plants.
          In case of n:1, electrical activity will be planned by one Maintenance planning plant & mechanical activities by another planning plant for a single Maintenance plant.
          Defining Maintenance planning plant & maintenance plant in different relations will help us in generating different kind of reports.
    I am looking forward your reply.
    Regards,
    Maheswaran.

  • Movement Type 161error in STO return (Plant to Plant) at the time of goods issue .

    Hi all...
    Am getting the following error while posting goods issue through VL02N
    Update control of movement type is incorrect (entry 161 X X _ L)
    Message no. M7226
    Diagnosis
    The system could not find entry 161 X X _ L in any of the movement type control tables.
    Process : STO Return Plant to Plant.
    Purchase Order ( STO) done.
    Goods issue done.
    Goods receipt at the receiving plant.
    Amended Purchase order, added one more line item and ticked return.
    Inbound delivery done.
    VL02n Goods issue am getting the error.
    Pls help.
    Suhas
    MM consultant

    Update control of movement type is incorrect (entry 161 X X _ L)
    Have a look into your OMJJ customizing for 161 movement type:
    It probably looks like mine:
    the error message has the info in exact the same sequence
    161 X X _ L
    this is 161, checkmark checkmark blank L  in the table above.
    L would mean reference to a delivery.
    But as you can see here, there is no L, everything is B which means reference to purchase order.
    It is not allowed to add items in a delivery without purchase order reference, it is technically possible, but it finally ends in the error you have.
    The process has to start from the purchase order.

  • Error "Material not subject to inventory management in Plant " on the STO

    I want to create a Stock tansport order ( plant to plant transfer) with  stock & non-stock item and non stock item is giving an error  "Material not subject to inventory management in Plant".  Please tell me how to clear this error.   Plant / SLOC view is already maintained and no qty/value update selected on the material type because of non stock item.   Please tell me how to overcome this error on the STO

    Hello,
    As you said you want to move nonstock item through STO.
    It seems that in your case say for example your plant 1000 has material ABC which is maintained as stock item.
    Now you have another plant 2000, whaich has same material ABC which is maintained as non-stock item (generally used in third party sales or cross docking).
    If your material ABC is nonstock in plant 2000 where no stocks are mainatined,  then how can you move the stock to plant 1000 where it is stock item.
    Could you please confirmthat can you see the stock in MMBE for plant where that material is maintained as non stock item.
    If so, then  you have chnage the plant specific material status for that plant from non stock item to stock item.
    This is maintained in material master in purchasing view.
    The other way out is you have to third party sales with ship to party as the plant where that item is maintained as stock item.
    In this case flow is
    Sales order>>Purchase requistion>>Purchase order>>(Vendor supplies material directly to customer (which is you plant where that item is stock item))
    Br,
    Tushar
    Instead you can acheive

  • Time Out error problem when i run the report for the whole plant

    Dear all,
    pls find the below coding, when i execute this report for the whole plant , it gives me time out error since it has to process huge database. pls suggest me in which part of my below coding i can improvise or any other better way to fetch the same result.
    pls note that
    i m using Views for querying.pls also note the comments given in Bold to understand the reason behind the coding.
    Views used in are - ZVPOD and ZVPRDCONF.
    START-OF-SELECTION.
      Data: zstat type jest-stat.
      data: stklocaf type mska-lgort.
      data: stklocas type mska-lgort.
    <u><b>To collect the status of the production order by joining the ZVPOD and JEST table.</b></u>
      CLEAR it_ZVPRODDET.
      SELECT DISTINCT ZVPOD~bukrs ZVPOD~aufnr ZVPOD~objnr
      jest~stat ZVPOD~werks ZVPOD~arbpl ZVPOD~J_3AKORD2
      FROM  ZVPOD
      INNER JOIN jest ON ZVPOD~objnr = jest~objnr
      INTO CORRESPONDING FIELDS OF wa_ZVPRODDET where
      plnbez in FGM and arbpl in wc and werks in plant
      and SSAVD in eldate
      and J_3AKORD2 in cups and jest~inact ne 'X'.
        APPEND wa_ZVPRODDET TO it_ZVPRODDET.
      ENDSELECT.
      SORT it_ZVPRODDET BY aufnr stat.
    <u><b>Loop thru Itab to check and delete the records from itab for the specified status.</b></u>
      LOOP AT it_ZVPRODDET INTO wa_ZVPRODDET.
        IF wa_ZVPRODDET-stat = 'I0045' .  " TECO - compl
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0009' .  " CNF - Confirmed
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0012' .  " DLV - Delivered
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0046' .  " CLSD - Closed
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0076' .  " DLFL - Del Flag
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'E0003' .  " SCLS - Short Close
          CLEAR tj30t.
          SELECT SINGLE txt04
          FROM tj30t INTO tj30t-txt04
          WHERE stsma = 'PRDHOLD' AND
                estat = 'E0003' AND
                txt04 = 'SCLS' AND
                spras = 'EN'.
          IF sy-subrc = 0.
            DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
          ENDIF.
        ENDIF.
    *      Condition for Prod Order released - REL
        IF wa_ZVPRODDET-stat = 'I0002'.
          mreleased = 'Y'.
        else.
          mreleased = 'N'.
        endif.
        zstat = wa_ZVPRODDET-stat.
        IF mreleased = 'N'.
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr
          and stat = zstat.
        ENDIF.
      ENDLOOP.
    <u><b>Loop thru the filtered ITAB to get all the production order details for the production order number specified in the where clause( zaufnr ) and populate another internal table.</b></u>
          LOOP AT it_ZVPRODDET INTO wa_ZVPRODDET.
            zaufnr = wa_zvproddet-aufnr.
            zarbid = wa_zvproddet-arbid.
            at new aufnr.
              SELECT DISTINCT * INTO CORRESPONDING FIELDS OF  walnpln
              FROM zvpod where plnbez in FGM and arbpl in wc and SSAVD in
             eldate and werks in plant and J_3AKORD2 in cups and aufnr = zaufnr.
                APPEND walnpln TO itablnpln.
              endselect.
            endat.
          endloop.
          clear walnpln.
    <u><b>
    Looping thru Internal table and performs all the following calculations and inner loop
    and also relevant querying.</b></u>
    <u><b>Assume that ITABLNPLN holds appox. 8000 records.</b></u>
    LOOP AT itablnpln  INTO walnpln.
            contot = 0.
            SELECT distinct * INTO CORRESPONDING FIELDS OF TABLE itablnp
            FROM zvprdconf where aufnr = walnpln-aufnr and
            j_3asize = walnpln-j_3akordx and stzhl ne '2' and stokz ne 'X'.
            clear zvprdconf.
            SELECT single isdd
            FROM zvprdconf into  zvprdconf-isdd
            where aufnr = walnpln-aufnr and
            j_3asize = walnpln-j_3akordx and stzhl ne '2' and stokz ne 'X'.
            SELECT single isdz
            FROM zvprdconf into  zvprdconf-isdz
            where aufnr = walnpln-aufnr and
            j_3asize = walnpln-j_3akordx and stzhl ne '2' and stokz ne 'X'.
            IF sy-subrc EQ 0.
              <u><b>Assume that ITABLNP  holds appox. 30 records.</b></u>
              loop at itablnp into walnp.
                contot = contot + walnp-J_3ALMNGA.
                move walnp-J_3ASIZE to walnpln-J_3ASIZE.
                move zvprdconf-isdd to walnpln-zdate.
                move zvprdconf-isdz to walnpln-ztime.
              endloop.
              walnpln-output = contot.
            endif.
            walnpln-wip = walnpln-menge - contot.
            if walnpln-werks = '1000'.
              stklocaf = '1050'.
              stklocas = '1060'.
            elseif walnpln-werks = '2000'.
              stklocaf = '2150'.
              stklocas = '2160'.
            endif.
           select single kunnr into walnpln-ship from vbpa where
           vbeln = walnpln-KDAUF and PARVW = 'WE'.
            zship = walnpln-ship.
            move zship to walnpln-ship.
            select  single kalab into walnpln-zactqty from mska
            where matnr = walnpln-plnbez
            and j_3asize = walnpln-J_3AKORDX and LGORT = stklocaf.
            condense walnpln-kdauf.
            zsales = walnpln-kdauf.
            concatenate zsales 'S' into zso.
            select single kalab into walnpln-zsndqty from mska
            where matnr = walnpln-plnbez
            and j_3asize = walnpln-J_3AKORDX and LGORT = stklocas
            and J_4KSCAT = zso.
            zmatn = walnpln-plnbez.
            zsale = walnpln-KDAUF.
            walnpln-kdauf = zsale.
            walnpln-plnbez = zmatn.
            zcust = walnpln-kunnr.
            walnpln-kunnr = zcust.
            select single bezei into walnpln-season from TVV2T where
            kvgr2 = walnpln-kvgr2 and SPRAS = 'E'.
            select single bezei into walnpln-shipmode from T173T where
            vsart = walnpln-vsart and SPRAS = 'E'.
            STRL = strlen( walnpln-j_3akord2 ).
            if  strl = 4.
              move walnpln-j_3akord2 to walnpln-j_3akord3.
              clear walnpln-j_3akord2.
            endif.
            move zremk to walnpln-remk.
            MODIFY itablnpln FROM  walnpln.
            contot = 0.
            clear itablnp.
          ENDLOOP.
          PERFORM build_fieldcatalog.
          PERFORM build_layout.
          PERFORM display_alv_report.

    Hi raja,
    Plese go through the suggessitions.
    1.avoide the select ...endselect. write the below select
    CLEAR IT_ZVPRODDET.
    SELECT DISTINCT
         ZVPOD~BUKRS
         ZVPOD~AUFNR
         ZVPOD~OBJNR
         JEST~STAT
         ZVPOD~WERKS
         ZVPOD~ARBPL
         ZVPOD~J_3AKORD2
      FROM ZVPOD
      INNER JOIN JEST ON ZVPOD~OBJNR = JEST~OBJNR
      INTO CORRESPONDING FIELDS TABLE  IT_ZVPRODDET
      WHERE PLNBEZ IN FGM AND
            ARBPL IN WC AND
            WERKS IN PLANT AND
            SSAVD IN ELDATE AND
            J_3AKORD2 IN CUPS AND
            JEST~INACT NE 'X'.
      IF SY-SUBRC = 0.
        SORT TABLE IT_ZVPRODDET.
      ENDIF.
    2..first of all dont delete a record inside the loop. instead use the Field symobols.
    have u obsereved you code in the loop!!!!. wht u r doing..
    u r removing the same record which u in the loop..
    If u wanto delete the entires with check to<b> stat</b>... <b>then.. why dont u put the STAT field in Wher e condition..?</b> by this you reduce the data base select time..
    Now the select query is like the below....
    CLEAR IT_ZVPRODDET.
    SELECT DISTINCT
         ZVPOD~BUKRS
         ZVPOD~AUFNR
         ZVPOD~OBJNR
         JEST~STAT
         ZVPOD~WERKS
         ZVPOD~ARBPL
         ZVPOD~J_3AKORD2
      FROM ZVPOD
      INNER JOIN JEST ON ZVPOD~OBJNR = JEST~OBJNR
      INTO CORRESPONDING FIELDS TABLE  IT_ZVPRODDET
      WHERE PLNBEZ IN FGM AND
            ARBPL IN WC AND
            WERKS IN PLANT AND
            SSAVD IN ELDATE AND
            J_3AKORD2 IN CUPS AND
            JEST~INACT NE 'X' AND
            ( STAT <> 'I0045' AND
              STAT <> 'I0045' AND
              STAT <> 'I0009' AND
              STAT <> 'I0012' AND
              STAT <> 'I0046' AND
              STAT <> 'I0076' AND
              STAT <> 'E0003' ).
      IF SY-SUBRC = 0.
        SORT TABLE IT_ZVPRODDET.
      ENDIF.
    <b>3.</b> WHT IS MEANING OF THE SELECT
    <b>  CLEAR TJ30T.
      SELECT SINGLE TXT04
      FROM TJ30T INTO TJ30T-TXT04
      WHERE STSMA = 'PRDHOLD' AND
            ESTAT = 'E0003' AND
            TXT04 = 'SCLS' AND
            SPRAS = 'EN'.
      IF SY-SUBRC = 0.
        DELETE IT_ZVPRODDET WHERE AUFNR = WA_ZVPRODDET-AUFNR.
      ENDIF.</b>....... IN WHERE CONDION U R GIven all are constant values right?..
    why u need select it inside the loop.. u can write before the SELECT from ZVPOD..
    that why first checke this field then go for fur thure selects..
    <b>now u r code looks like this....</b>
    CLEAR TJ30T.
    SELECT SINGLE TXT04
      FROM TJ30T INTO TJ30T-TXT04
    WHERE STSMA = 'PRDHOLD' AND
          ESTAT = 'E0003' AND
          TXT04 = 'SCLS' AND
          SPRAS = 'EN'.
    IF SY-SUBRC = 0.
      CLEAR IT_ZVPRODDET.
      SELECT DISTINCT
           ZVPOD~BUKRS
           ZVPOD~AUFNR
           ZVPOD~OBJNR
           JEST~STAT
           ZVPOD~WERKS
           ZVPOD~ARBPL
           ZVPOD~J_3AKORD2
        FROM ZVPOD
        INNER JOIN JEST ON ZVPOD~OBJNR = JEST~OBJNR
        INTO CORRESPONDING FIELDS TABLE  IT_ZVPRODDET
        WHERE PLNBEZ IN FGM AND
              ARBPL IN WC AND
              WERKS IN PLANT AND
              SSAVD IN ELDATE AND
              J_3AKORD2 IN CUPS AND
              JEST~INACT NE 'X' AND
              JEST~STAT <> 'I0045' AND
              JEST~STAT <> 'I0045' AND
              JEST~STAT <> 'I0009' AND
              JEST~STAT <> 'I0012' AND
              JEST~STAT <> 'I0046' AND
              JEST~STAT <> 'I0076' AND
              JEST~STAT <> 'E0003' ).
        IF SY-SUBRC = 0.
          SORT TABLE IT_ZVPRODDET.
        ENDIF.
      ENDIF.
    there are so many select inside the loop...... please Delete all of them.... write them be for the loop.......using the FOR ALL ENTRIES.....
    THEN LOOP THE TABLE USING THE WHERE CONDITIONS.
    <b>Plese write u updated code here again</b>..

  • Transfer Posting for Plant to Plant: Account Determination

    Dear all,
    I'm performing a standard transfer posting from Co. X Plant A (issuing plant) to Co. Y Plant B (receiving plant). Upon successful of the transaction, there are 2 accounting documents generated for both issuing plant and receiving plant, respectively.
    Alright, when I view the accounting document for the receiving plant, it's debit stock account and credit another account. I know that the configuration for stock account is under BSX. However, I'd like to know how the SAP system determine which account to be credited at the same?
    Thanks.
    Steven

    Dear all,
    Thank you for the answers so far. However, I apologize if I've caused some misinterpretation.
    Let me explain further. I'm not using STO. I"m doing a transfer posting of stock using movement type 301 between 2 interco. plants as explained earlier. My question is more on accounting document generated for the receiving plant. The following is what I get:
    Accounting Document for Receiving Co. Y Plant B:
    Debit - Account GLxxxx -> Spare parts (This is my stock account configured in OBYC - BSX) => OK, no problem here.
    Credit - Account Nxxx -> Co. X => My question: Where or how did the SAP system acquire this account information at the first
    place? I don't remember configuring this in SPRO.
    Thanks.

  • STO from Plant to Plant in same Company Code

    Dear All ,
    Please give me brief idea about STO(with screen ) from Plant to Plant in same Company Code
    ganga

    Dear Ganga Mukerjee
    Welcome to SDN
    There are plenty of threads available on this topic in both SD general,Sales and MM forums
    Please make a search
    As this is your first qn i am giving here with some simple steps for STO from Plant to Plant in same Company Code via SD route
    INTRA COMPANY STO.
    1. There should be two plants in the given company code for intra STO to
    happen.
    2. Assign Purchasing org of the ordering to the supplying plant.
    3. Create a customer in the supplying sales area.
    4. Assign the customer to the ordering sales area.
    5. IMG > MM > Purchasing > PO > Setup STO > Define shipping data for plants
    here go to supplying plant and mention its own sales area.
    6. In the ordering plant assign the customer created in the supplying sales area
    and also the supplying sales area.
    7. Maintain checking rule as 01.
    8. Assign the delivery type NL supplying plant checking rule and PO Doc type
    UB.
    9. Assign document type UB supplying plant and ordering plant then decide up
    on either 1 step or 2 steps.
    10. Create PO with doc type UB.
    11. Go to VL10B give the PO No. and enter, select the line item and click back
    ground. (Where Del. Will be created in the back ground)
    12. Go to VL02N for picking and PGI.
    13. If 1 step no need of doing MIGO else for 2 steps do MIGO.
    Hence forth make search
    Regards
    Raja

Maybe you are looking for