Clearing charges

Hi friends,
While doing MIRO the clearing charges are being crediting to main vendor account. Have maintained the clearing agent vendor code in PO condition tab for all the items. Still it is crediting main vendor. Can anybody tellme what might be the reason?
Regards,

Hi,
Double check it in PO that, Vendor Code of Clearing Agent has been assigned to the Condition Type of Clearing Charges under Conditions Tab in Details button.
If yes then check during GR (In MIGO) if someone has changed it to Import Vendor from Clearing Agent.
OR in MIRO, also someone would have changed it manually under Details Tab.
Also check, in PO, is there any Partner Function maintained as PI at Header level.

Similar Messages

  • Imported PO report with prices ,clearing charges..etc?

    Hi gurus
    Can anybody give som input for my query related to Imported Purchase order report with below details
    Purchase Voucher     
    Party Name     
    Description     
    Basic Doc No.     
    Freight Doc No     
    Customs Doc No.     
    Basic + Pkg     
    Freight     
    Customs Duty     
    Clearing Charges     
    Cenvat     
    GOod solutions will be highly appreciable with high points
    Thanks
    sap-mm

    Hi
    Thank u very much for ur Response.
    Can u expain me , where i can get a excise details for the PO wise (Document types ) eg . local PO,Service PO, Imported PO,Subcontarct PO..etc
    Pls giv me some inputs..
    Thanks
    sap-mm

  • Custom Clearing Charges

    hi,
    I have few Custom Clearing charges i.e. once shipment reaches the port, there will be few custom clearing charges like:
    Shifting charges,Demurrage charges...
    My question is these custom clearing charges will be copied from which condition types???
    I don't think these conditions will come into freight....
    Please adivse...
    Utsav

    Thanks Sanjoo,
    Please also let me know If the price quoted is in CIF that is cost insurance and freight..
    Like Basic price      = 100 Usd
            Freight to port  = 50 usd
            Insurance        = 2 USD
    After that there will be all Custom clearing charges like
    Custom duty, Counter vailing duty and Education Cess....
    So as per your reply i will copy all custom clearing charges by  Freight cahrges...
    What about
            Basic price      = 100 Usd
            Freight to port  = 50 usd
            Insurance        = 2 USD
    Do these charges will be trreated as a Gross Price or taxes.....
    Pl advise..
    utsav

  • Condition type for landing and clearing charges for imports

    All SAP Gurus,
    Which standard condition type to be for Condition type for landing and clearing charges for imports?
    Regards,

    If both Condition types are Quantity basis then you can Create New Condition types by Referring FRA1 & FRC1 Condition types.
    Else Create New Condition types called ZCCH for Clearing Charges by giving the Following inputs:
    Condition class A
    Calculation Type A
    Condition Category B
    Plus/Minus A
    Also in Control data Check Accruals option and in Scales tab give Scale Value as 2 if want.
    Create New Condition types called ZLNC for Landing Charges by giving the Following inputs:
    Condition class A
    Calculation Type A
    Plus/Minus A
    Uncheck Accruals options and save.
    Regards,
    Ashok

  • Price Diffrence for Clearing Charges

    Hi Expert,
    WE defined clearing charges 1400 @ 12000 kg material in PO and we received GR for 11930 , accordingly clearing charges credited by almost 140011930 , in between ,we consumbed almost. 1174 quantity but whenever bill passed for the same , clearing charges , we passed the bill Rs. 116000 ( too much low i.e. Rs. 10 per qt in comprison of Rs.1400 in PO ) System totally adjusted here inventory account even that from my concept , 11741390(1400-10)=1631860 should be passed into PRD account but only Rs, 70000 passed in PRD and toitally passsed in inventory so that inventory cost fell suudenly .
    Please suhhest me , why it happended.., we maintaing material at moving average price..
    Thanks in  Advance.
    Dharmveer

    ok

  • Clearing charges not flowing in MIR7

    hi all
    can anybody clarify me , while doing the invoice verification for import PO for clearing charges.
    In Import PO allthe conditions i have maintained properly. but
    The values are not flowing in MIR7.
    what might be mistake , how to identify .
    Than ks
    sap-mm

    hi
    as we are not doing  GR based IV ,system will not pick values for customs duty u have to maintain it manually only
    now u have to capture the excise in J1IEX only as we r doing miro first and then GR and also we dont maintain the excise tax code (we have to maintain zero taxcode)
    plz check following process
    Import scenario
    1.Create material master of import goods.
    2. Create vendor master record of import vendor and Customs clearing vendor.
    3. Maintain CIN settings.
    4. Maintain J1id.
    5. Maintain Pricing procedure SAP standard JIMPOR.., maintain required conditions..JCDB, JCV1...
    6.Assign the schema to respective import vendor in purchasing view of VMR.
    7. Create import PO, check in conditions of JCDB, JCV1 the customs clearing vendor(Indian vendor) and percentage is assigned. This can be done by In condition tab select condtion then click on display, then enter.
    Save the PO.
    8. MIRO --Capture Bill Of Entry.(Commercial Invoice No.,).Customs clearing first .Here CVD will be converted to BED (manual entries).
    9. capture Excises invoice--j1iex.
    10.MIGO.
    12.Post Excise Invoice.
    13.MIRO...Payment to vendor(import vendor)
    regards
    KI

  • CHA Charges and Custom clearing

    In Import PO i am getting the error
    For CHA Charges, CUS Custom clearing charges..
    Provision account key missing for condition type ZCHA in schema ZJICIM
    Message no. ME172

    Hi,
    Assign FR2  to condition type ZCHA in schema ZJICIM.
    Actaully FR1 is used for the clearing account & FR2 is used for the provisions in which both G/L accounts assigned to FR1 & FR2 are balance sheet accounts.
    Regards,
    Biu K

  • Custom clearing agent payment issue

    Dear experts
    Purchase  order  was created  and  the  material was  received  on   port (imports).
    custom clearing  agent has  cleared  the goods.
    now   custom   clearing  agent needs  his  charges.
    the  inv  from vendor with reference to PO is not received.
    any  solution  to  settle  the  custom  clearing  agent  payments.
    till  the  inv. from  vendor  not  received custom agent payment  is is pending.
    what  should  be  done  to  resolve  this  issue.

    Hi,
    Copy one of your freight condition types and create a new condition type as custom clearing charges, please ensure that condition category is Delivery charges (B). In calculation schema enter this condition type at the appropriate position. Now when creating the PO, enter this condition type put the value, then select this condition type and go to details, here you will have a field to enter the vendor code, there key in the vendor code of custom clearing agent.
    Now in MIRO enter PO no. and choose layout for Planned delivery cost, you can now enter the value for your agent and pay him.
    Note: Please use this to pay only for service charge for the agent, for payment of custom duty you should use the condition type for custom duty and key in the vendor code for the customs clearing office there so that its easy to differentiate between custom duty and the service charges charged by clearing agent.
    Regards
    Chandra Shekhar

  • Assigning custom,stamp duty,custom clearing agent conditions by all Vendor

    well i have create above condition i want to assing all this with the all vendor. ie custom duty must go to commissioner vendor, custom clearing charges must go to C & F agent.
    example
    particular            condition type vendor
    basic duty           xxxx                 123
    2%                      xxx1                 123
    1%                      xxx2                 123
    C & F                  vvvv                 324
    Regard
    nabil

    hI,
    You can assign this in PO, when u give the condition type say customs, there you can mention the vendor to which charges refer to.
    Path: Me21ncondition-condition detail---vendor in changeable mode, keep the customs vendor thre...
    Thanks
    Abdul Raheem

  • Error while adding Misc. Charges in Imports PO

    Dear Sir,
    We want add Freight charges and Custom Clearing Charges in Imports PO as Misc. Charges in condition ZMIS.
    But we try to add these as 3 % it gives following error
    Provision account key missing for condition type ZMIS in schema ZHILI1
    Message no. ME172
    Please suggest me the solution.
    Thanks & Regards
    Vishal

    Hi
    Check in M/06,against the condition type ZMIS have you assigned an accounting key? If no, assign the same and assign GL Account to the same through FBKP
    Regards
    Sanil Bhandari

  • Weird battery charging behaviour

    Ok, I'll start by saying that this is a problem that has been coming and going for quite a while (definitely months, maybe years). But for the sake of illustration, I'll describe what happened today.
    So last night I was using my laptop on the couch (not plugged in) and fell asleep. Woke up to a dead battery. No problem, I plugged it in and woke it up and was good to go. Several hours later I noticed that my battery charge was still at 1 or 2%, though clearly it was running just fine off AC power. Looking at the light on the power adapter, I thought it was completely off until I read a few support posts and found out that "dim green" is an option. Upon close examination, yep, dim green. System Information said the battery itself was ok (cycle count 153, condition normal) but not charging. Under AC Charger Information, it said Connected: yes, Charging: no.
    Unplugging and replugging the adapter a few times didn't seem to do anything. There's no obvious gunk in around the terminals. I shut down and reset SMC, no change. Finally I just fiddled with the adaptor (unplug, replug, flip around, wiggle up and down) until the light turned briefly green, and then orange. Now it's clearly charging (up to 38% now, and battery icon has a little lightning bolt) although System Info still says it isn't charging.
    Oh, hang on. I just quit and restarted System Info, and now it says it is charging! Huh.
    Addendum: While adding tags I noticed that the light on the adapter is back to dim green. System info still says it's charging, and battery % charged numbers are still going up.
    I'm guessing it's an issue with the magsafe adaptor, just not sure how you end up with a temporary situation where the laptop can run on AC power but can't charge the battery.
    Oh, and in case it's relevant: I'm running a 13" mid-to-late 2009 MacBook Pro, the kind with a non-removable battery, though I did have the battery replaced (by a friend who is Apple-certified) less than a year ago. The AC adaptor I'm using is the one that came with the computer. I'm pretty sure the problem pre-dates the new battery (since it comes and goes, and because I spend a lot of time using the laptop at home while plugged in, I don't always notice).

    I had this exact same problem with my mid-2009 MBP as well. My adapter (white connector) has suddenly stopped charging the computer and displayed a very dim-green LED instead of the normal orange or bright green.
    I came to the conclusion that the adapter has been shorted out in some way (possibly due to old age) and that was the cause of this. Sure enough my local Apple retailer sold me a new adapter that everything has been fine ever since. I even enjoy the new design - the metal-tipped connector that faces sideways.
    Unfortunately the adapter cost me $80, but was a small price to pay as opposed to replacing my laptop. Since this sounds like the exact same issue I faced, I would recommend you purchase a new MagSafe. Just make sure you get the right one for your model (should be a 60W MagSafe)
    Hope this helps you out!

  • Can i use an iphone5 charger to charge an ipad mini?

    can i use an iphone5 charger to charge an ipad mini?

    You resurrected a 2 month old thread to say its not possible?
    What is not possible exactly?
    Because clearly charging an iPad mini with an iPhone 5 charger is totally possible.
    http://store.apple.com/us/product/MD810LL/A/apple-5w-usb-power-adapter?fnode=48
    That's the charger that ships with an iPhone 5, check the compatibility at the bottom of that page. It includes the iPad Mini.

  • I POD CLASSIC CHARGER

    Reference my earlier question about charging my Classic.
    My Apple store charger (from Apple) is rated as a 12w usb adaptor.
    I have just plugged the Classic into my pc via the usual port and it shows it clearly charging with the correct symbols, transferring it to the wall charger the display does not......i am confused. Plug my Shuffle it to same wall charger and it does indeed charge up....i did it last night.
    Would it be best to return the charger to the Apple store for a refund as i need it to charge both my Classic and Shuffle???
    Many Thanks....Steve.

    If yours is a genuine Apple 30 pin connector it may have two tabs on either side that must be pressed to release its internal locking tabs, so press hard, and pull hard.
    Make every effort to pull it straight out, not at an angle, and have a soft "backstop" such as a pillow in case the iPod goes flying out of your other hand when the connector finally lets loose.
    If you can't get a good grip on the connector with your fingers you may need to use a pair of straight slip-joint pliers. Using a tool like that may destroy the connector in an effort to remove it, but you may not have any other choice.

  • My ipad won't sync but says it is, and it's not charging but is?

    My ipad connects with my computer, but on the screen it says it's not charging, but it's clearly charging since It was dead the other day and it's been plugged into my computer for a few days. And itunes says its syncing, and it says on the ipad screen it IS syncing but no apps, pictures, etc are presen
    If You need anymore info, just ask... I'll be here

    When you charge the iPad from your computer - even though it may be charging as it is in your case - it will say not charging. It is charging at a very slow rate - a trickle charge. You should really use the power adapter to charge the battery. You can read about the charging the battery here.
    http://support.apple.com/kb/HT4060
    Was all of the content that you are trying to sync, bought with the same Apple ID and iTunes account that you are signed into on the iPad?
    Have you selected all of your iTunes content to sync? You must select the content in iTunes if you want to sync the content to the iPad. You must check the Sync Apps heading and then check all of the apps that you want to sync. Do the same thing in all of the other tabs in iTunes as well, movies, photos. music, books and so on.

  • BAPI_PO_CHANGE with scheduling

    Hai frnds,
      Im using BAPI_PO_CHANGE for changing the quantity of the existing item and need to create an new item also. For this im using scheduling table(poschedule),where one item has two scheduling line.
    Existing details
    Eg: POHEADER:    0210000001
        POITEM:
          10 -> 400(quantity)
        POSCHEDULE:
          10 -> 1(1st sched) -> 100(quantity)
          10 -> 2(2nd sched) -> 300(quantity)
    After modification
    Eg: POHEADER:    0210000001
        POITEM:
         10 -> 60(quantity)
         20 -> 340(quantity)
        POSCHEDULE:
         10 -> 1(1st sched) -> 60(quantity)
         10 -> 2(2nd sched) -> 0(quantity)
         20 -> 1(1st sched) -> 40(quantity)
         20 -> 2(2nd sched) -> 300(quantity)
    Can anyone help me to solve this problem??? wat are the fields to be considered in POITEM,POSCHEDULE?
    Suganya Jayabalan.

    Hai Thomas,
      this is the code:
    REPORT  zfi_upd_import_process NO STANDARD PAGE HEADING
                                     MESSAGE-ID z6 .
    TABLES: zmmpoamend,ekko, ekpo.
    DATA:t_zmmpo_amend_tab LIKE zmmpoamend OCCURS 0 WITH HEADER LINE.
    DATA:t_zmmpo_amend_tab1 LIKE zmmpoamend OCCURS 0 WITH HEADER LINE.
    DATA:v_bstmg     LIKE bapimepoitem-quantity,
         v_ebelp     LIKE bapimepoitem-po_item,
         v_belnr1    LIKE bkpf-belnr,
         v_awkey     LIKE bkpf-awkey,
         v_orderunit LIKE ekpo-meins,
         v_currency  LIKE tcurc-waers,
         v_ebeln     LIKE ekko-ebeln,
         v_payterm   LIKE ekko-zterm,
         v_zfbdt     LIKE bseg-zfbdt,
         v_flag(1)   TYPE c,
         v_flgbdc(1) TYPE c.
    DATA: wa_bapiquantity1 like eket-menge,
          wa_bapiquanfin1 like eket-menge,
          wa_bapiquantot like eket-menge,
          wa_bapiquantity2 like eket-menge,
          wa_bapiquanfin2 like eket-menge.
    DATA: BEGIN OF t_belnr_tab OCCURS 0,
            belnr LIKE bkpf-belnr,
            gjahr LIKE bkpf-gjahr,
          END OF t_belnr_tab.
    DATA: BEGIN OF t_ret_tab OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF t_ret_tab.
    FOR PO AMENDMENT POSTING ****************
    DATA:BEGIN OF t_bapimepocond_tab OCCURS 0.
            INCLUDE STRUCTURE bapimepocond.
    DATA:END OF t_bapimepocond_tab.
    DATA:BEGIN OF t_bapimepoitem_tab OCCURS 0.
            INCLUDE STRUCTURE bapimepoitem.
    DATA:END OF t_bapimepoitem_tab.
    DATA: t_bapimepoitem_tab1 LIKE t_bapimepoitem_tab OCCURS 0 WITH HEADER
    LINE
    DATA:BEGIN OF t_bapimepoitemdet_tab OCCURS 0.
            INCLUDE STRUCTURE bapiekpo.
    DATA:END OF t_bapimepoitemdet_tab.
    DATA:BEGIN OF t_bapieket_tab OCCURS 0.
            INCLUDE STRUCTURE bapieket.
    DATA:END OF t_bapieket_tab.
    DATA:BEGIN OF t_bapiposchedule OCCURS 0.
            INCLUDE STRUCTURE BAPIMEPOSCHEDULE.
    DATA:END OF t_bapiposchedule.
    data: w_no type i,
          w_no1 type i,
          w_idx type i.
    DATA: w_ebelp like ekpo-ebelp.
    DATA:BEGIN OF t_bapimepoaccount_tab OCCURS 0.
            INCLUDE STRUCTURE bapimepoaccount.
    DATA:END OF t_bapimepoaccount_tab.
    DATA:BEGIN OF t_bapimepoaccountx_tab OCCURS 0.
            INCLUDE STRUCTURE bapimepoaccountx.
    DATA:END OF t_bapimepoaccountx_tab.
    DATA:BEGIN OF t_bapimepoaccountdet_tab OCCURS 0.
            INCLUDE STRUCTURE bapiekkn.
    DATA:END OF t_bapimepoaccountdet_tab.
    DATA:BEGIN OF t_bapimepoitemx_tab OCCURS 0.
            INCLUDE STRUCTURE bapimepoitemx.
    DATA:END OF t_bapimepoitemx_tab.
    DATA:wa_bapimepoitem LIKE LINE OF t_bapimepoitem_tab.
    data: begin of t_bapiposchedulex occurs 0.
            include structure BAPIMEPOSCHEDULX.
    data: end of t_bapiposchedulex.
    END OF FOR PO AMENDMENT POSTING **********
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_poamd RADIOBUTTON GROUP rad1,
               p_mirofs RADIOBUTTON GROUP rad1,
               p_mirocd RADIOBUTTON GROUP rad1,
               p_mirofr RADIOBUTTON GROUP rad1,
               p_j1iex RADIOBUTTON GROUP rad1.
    SELECT-OPTIONS:s_zzboe FOR zmmpoamend-zzboe NO INTERVALS NO-EXTENSION
                               OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    IF p_poamd = 'X'.
    begin of internal table processing for calling BAPI's*******
      SELECT * FROM zmmpoamend INTO TABLE t_zmmpo_amend_tab
         WHERE zzboe IN s_zzboe AND
               zzpostat = ' '.
      IF sy-subrc <> '0'.
        MESSAGE 'No PO found which has to be updated.' TYPE 'E'.
      ENDIF.
    begin of PO Amendment****************
      LOOP AT t_zmmpo_amend_tab .
        t_zmmpo_amend_tab-waers = 'INR'.
        t_zmmpo_amend_tab1 = t_zmmpo_amend_tab.
        t_zmmpo_amend_tab1-zzpostat = 'X'.
        APPEND t_zmmpo_amend_tab1.
        IF t_zmmpo_amend_tab-zzwrbtrvcd NE '0'.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvcd.
          t_bapimepocond_tab-cond_type = 'ZVCD'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrvnv NE '0'.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvnv.
          t_bapimepocond_tab-cond_type = 'ZVNV'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrccd NE '0'.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrccd.
          t_bapimepocond_tab-cond_type = 'ZCCD'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrvcv NE '0'.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvcv.
          t_bapimepocond_tab-cond_type = 'ZVCV'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrvce NE '0'.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvce.
          t_bapimepocond_tab-cond_type = 'ZVCE'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrvfi NE '0'.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvfi.
          t_bapimepocond_tab-cond_type = 'ZVFI'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrvad NE '0'.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvad.
          t_bapimepocond_tab-cond_type = 'ZVAD'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrvac NE '0'.
    ZVAC added..
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvac.
          t_bapimepocond_tab-cond_type = 'ZVAC'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrvae NE '0'.
    ZVAE added..
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrvae.
          t_bapimepocond_tab-cond_type = 'ZVAE'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzwrbtrmis NE '0'.
    ZMIS(Miscellaenous charges) added..
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzwrbtrmis.
          t_bapimepocond_tab-cond_type = 'ZMIS'.
          t_bapimepocond_tab-currency = t_zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzinsper NE '0'.
    insurance
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzinsper.
          t_bapimepocond_tab-cond_type = 'ZPIN'.
          t_bapimepocond_tab-currency = '%'. "zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        IF t_zmmpo_amend_tab-zzclsper NE '0'.
    *clearing charges.
          CLEAR t_bapimepocond_tab.
          t_bapimepocond_tab-itm_number = t_zmmpo_amend_tab-ebelp.
          t_bapimepocond_tab-cond_value = t_zmmpo_amend_tab-zzclsper.
          t_bapimepocond_tab-cond_type = 'ZPCL'.
          t_bapimepocond_tab-currency = '%'. "zmmpo_amend_tab-waers.
          t_bapimepocond_tab-change_id = 'I'.
          APPEND t_bapimepocond_tab.
        ENDIF.
        v_bstmg = t_zmmpo_amend_tab1-menge + v_bstmg.
        AT END OF ebelp.
         t_bapimepoitem_tab-po_number = t_zmmpo_amend_tab1-ebeln .
          t_bapimepoitem_tab-po_item = t_zmmpo_amend_tab1-ebelp .
          t_bapimepoitem_tab-quantity = v_bstmg.
          APPEND t_bapimepoitem_tab.
          CLEAR v_bstmg.
        ENDAT.
        AT END OF  ebeln.
         L_EBELN =
          CALL FUNCTION 'BAPI_PO_GETDETAIL'
            EXPORTING
              purchaseorder                    = t_zmmpo_amend_tab-ebeln
             items                            = 'X'
             account_assignment               = 'X'
             SCHEDULES                        = 'X'
           TABLES
             po_items                         = t_bapimepoitemdet_tab
             po_item_account_assignment       = t_bapimepoaccountdet_tab
             PO_ITEM_SCHEDULES                = t_bapieket_tab.
          CLEAR v_ebelp.
          v_ebelp = t_bapimepoitemdet_tab-po_item.
          LOOP AT t_bapimepoitem_tab.
            v_bstmg = t_bapimepoitem_tab-quantity.
            LOOP AT t_bapimepoitemdet_tab WHERE
                              po_number = t_zmmpo_amend_tab-ebeln AND
                              po_item = t_bapimepoitem_tab-po_item.
              IF t_bapimepoitemdet_tab-quantity =
              t_bapimepoitem_tab-quantity.
               MOVE-CORRESPONDING t_bapimepoitemdet_tab TO wa_bapimepoitem.
                wa_bapimepoitem-gr_basediv = ' '.
                APPEND wa_bapimepoitem TO t_bapimepoitem_tab1.
                t_bapimepoitemx_tab-po_item = wa_bapimepoitem-po_item.
                t_bapimepoitemx_tab-gr_basediv = 'X'.
                APPEND t_bapimepoitemx_tab.
              ELSE.
                v_ebelp = v_ebelp + '10'.
                MOVE-CORRESPONDING t_bapimepoitemdet_tab TO wa_bapimepoitem.
                wa_bapimepoitem-quantity = t_bapimepoitemdet_tab-quantity -
                                           t_bapimepoitem_tab-quantity.
                wa_bapimepoitem-po_item = v_ebelp .
                APPEND wa_bapimepoitem TO t_bapimepoitem_tab1.
                LOOP AT t_bapimepoaccountdet_tab
                  WHERE po_item = t_bapimepoitem_tab-po_item.
                  MOVE-CORRESPONDING t_bapimepoaccountdet_tab TO
                                    t_bapimepoaccount_tab.
                  t_bapimepoaccount_tab-gl_account =
                    t_bapimepoaccountdet_tab-g_l_acct.
                  t_bapimepoaccount_tab-itm_number =
                    t_bapimepoaccountdet_tab-sdoc_item.
                  t_bapimepoaccount_tab-quantity = wa_bapimepoitem-quantity.
                  t_bapimepoaccount_tab-po_item = v_ebelp.
                  t_bapimepoaccountx_tab-po_item = v_ebelp.
                  t_bapimepoaccountx_tab-quantity = 'X'.
                  t_bapimepoaccountx_tab-creat_date = 'X'.
                  t_bapimepoaccountx_tab-quantity = 'X'.
                  t_bapimepoaccountx_tab-gl_account = 'X'.
                  t_bapimepoaccountx_tab-bus_area = 'X'.
                  t_bapimepoaccountx_tab-costcenter = 'X'.
                  t_bapimepoaccountx_tab-sd_doc = 'X'.
                  t_bapimepoaccountx_tab-itm_number = 'X'.
                  t_bapimepoaccountx_tab-co_area = 'X'.
                  t_bapimepoaccountx_tab-part_acct = 'X'.
                  APPEND  t_bapimepoaccount_tab.
                  APPEND  t_bapimepoaccountx_tab.
                ENDLOOP.
                t_bapimepoitemx_tab-po_item = wa_bapimepoitem-po_item.
                t_bapimepoitemx_tab-quantity = 'X'.
                t_bapimepoitemx_tab-stge_loc = 'X'.
                t_bapimepoitemx_tab-preq_no = 'X'.
                t_bapimepoitemx_tab-preq_item = 'X'.
                t_bapimepoitemx_tab-material = 'X'.
                t_bapimepoitemx_tab-po_unit = 'X'.
                t_bapimepoitemx_tab-plant = 'X'.
                APPEND t_bapimepoitemx_tab.
                MOVE-CORRESPONDING t_bapimepoitemdet_tab TO wa_bapimepoitem.
                wa_bapimepoitem-quantity = v_bstmg.
                wa_bapimepoitem-gr_basediv = ' '.
                APPEND wa_bapimepoitem TO t_bapimepoitem_tab1.
                t_bapimepoitemx_tab-po_item = wa_bapimepoitem-po_item.
               t_bapimepoitemx_tab-quantity = 'X'.
               t_bapimepoitemx_tab-gr_basediv = 'X'.
                APPEND t_bapimepoitemx_tab.
    *********this is wer new coding starts*****************************
    *inserted for delivery scheduling foe PO
              loop at t_bapieket_tab
                      where po_item = t_bapimepoitemdet_tab-po_item.
                w_idx = sy-tabix.
              IF t_bapieket_tab-SERIAL_NO = '0001'.
               IF t_bapimepoitem_tab-quantity > t_bapieket_tab-quantity or
                  t_bapimepoitem_tab-quantity = t_bapieket_tab-quantity.
                 wa_bapiquantity1 = t_bapieket_tab-quantity.
               ELSEIF t_bapimepoitem_tab-quantity < t_bapieket_tab-quantity.
                 wa_bapiquantity1 = t_bapimepoitem_tab-quantity.
               ENDIF.
                 wa_bapiquanfin1 = t_bapieket_tab-quantity - wa_bapiquantity1.
                 t_bapieket_tab-QUANTITY = wa_bapiquantity1.
                 modify t_bapieket_tab index w_idx transporting quantity.
                  t_bapieket_tab-po_item = v_ebelp.
                  t_bapieket_tab-quantity = wa_bapiquanfin1.
                  append t_bapieket_tab.
              ELSE.
                 IF t_bapimepoitem_tab-quantity > t_bapieket_tab-quantity.
                  wa_bapiquantity2 = t_bapimepoitem_tab-quantity - wa_bapiquantity1.
                 ELSEIF t_bapimepoitem_tab-quantity < t_bapieket_tab-quantity or
                        t_bapimepoitem_tab-quantity = t_bapieket_tab-quantity.
                  wa_bapiquantity2 = 0.
                 ENDIF.
                 wa_bapiquanfin2 = t_bapieket_tab-quantity - abs( wa_bapiquantity2 ).
                 t_bapieket_tab-QUANTITY = abs( wa_bapiquantity2 ).
                 modify t_bapieket_tab index w_idx transporting quantity.
                  t_bapieket_tab-po_item = v_ebelp.
                  t_bapieket_tab-quantity = wa_bapiquanfin2.
                  append t_bapieket_tab.
              ENDIF.
              endloop.
              Sort t_bapieket_tab by po_item.
              sort t_bapimepoitem_tab1 by po_item.
              sort t_bapimepoitemx_tab by po_item.
              loop at t_bapieket_tab.
                move: t_bapieket_tab-po_item to t_bapiposchedule-po_item,
                      t_bapieket_tab-serial_no to t_bapiposchedule-sched_line,
                      t_bapieket_tab-quantity to t_bapiposchedule-quantity,
                      t_bapieket_tab-preq_no to t_bapiposchedule-preq_no,
                      t_bapieket_tab-preq_item to t_bapiposchedule-preq_item.
                if  t_bapieket_tab-quantity = 0.
                 t_bapiposchedule-delete_ind = 'X'.
                endif.
                append t_bapiposchedule.
                move: t_bapieket_tab-po_item to t_bapiposchedulex-po_item,
                      t_bapieket_tab-serial_no to t_bapiposchedulex-sched_line.
                t_bapiposchedulex-po_itemx = 'X'.
                t_bapiposchedulex-sched_linex = 'X'.
                if  t_bapieket_tab-quantity = 0.
                 t_bapiposchedulex-delete_ind = 'X'.
                elseif  t_bapieket_tab-quantity <> 0.
                 t_bapiposchedulex-quantity = 'X'.
                endif.
                clear: w_ebelp.
                select single ebelp from ekpo
                       into w_ebelp
                       where ebeln = t_zmmpo_amend_tab-ebeln and
                             ebelp = t_bapieket_tab-po_item.
                if w_ebelp is initial.
                 t_bapiposchedulex-preq_no = 'X'.
                 t_bapiposchedulex-preq_item = 'X'.
                endif.
                append t_bapiposchedulex.
                clear: t_bapiposchedulex, t_bapiposchedule.
               endloop.
              ENDIF.
            ENDLOOP.
    ***********end of new insertion**********************************************
            CLEAR t_bapimepoitemdet_tab.
            CLEAR v_bstmg.
          ENDLOOP.
          CALL FUNCTION 'BAPI_PO_CHANGE'
            EXPORTING
              purchaseorder                = t_zmmpo_amend_tab-ebeln
           TABLES
             return                       = t_ret_tab
             poitem                       = t_bapimepoitem_tab1
             poitemx                      = t_bapimepoitemx_tab
    *****************inserted by suganya-2006/06/27*************************
             POSCHEDULE                   = t_bapiposchedule
             POSCHEDULEX                  = t_bapiposchedulex
    *****************end of insertion-suganya-2006/06/27********************
             poaccount                    =  t_bapimepoaccount_tab
             poaccountx                   =  t_bapimepoaccountx_tab
             pocond                       = t_bapimepocond_tab
          CLEAR v_flag.
          LOOP AT t_ret_tab.
            IF t_ret_tab-type = 'E'.
              v_flag = 'X'.
              WRITE:/2 t_zmmpo_amend_tab-ebeln,
                   15 t_ret_tab-type,
                   25 t_ret_tab-message.
            ENDIF.
            AT LAST.
              IF v_flag <> 'X'.
                UPDATE zmmpoamend FROM TABLE t_zmmpo_amend_tab1.
                CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                  EXPORTING
                    wait = 'X'.
                WRITE:/2 'PO ',5 t_zmmpo_amend_tab-ebeln,
                               16 ' changed succesfully'.
              ENDIF.
            ENDAT.
          ENDLOOP.
          CLEAR t_ret_tab.
          REFRESH t_ret_tab.
          CLEAR t_bapimepocond_tab.
          REFRESH t_bapimepocond_tab.
          CLEAR t_zmmpo_amend_tab1.
          REFRESH t_zmmpo_amend_tab1.
          CLEAR t_bapimepoitem_tab.
          REFRESH t_bapimepoitem_tab.
          CLEAR t_bapimepoitemdet_tab.
          REFRESH t_bapimepoitemdet_tab.
          CLEAR t_bapimepoitem_tab1.
          REFRESH t_bapimepoitem_tab1.
          CLEAR t_bapimepoitemx_tab.
          REFRESH t_bapimepoitemx_tab.
          CLEAR t_bapimepoaccount_tab.
          REFRESH t_bapimepoaccount_tab.
          CLEAR t_bapimepoaccountdet_tab.
          REFRESH t_bapimepoaccountdet_tab.
          CLEAR t_bapimepoaccountx_tab.
          REFRESH t_bapimepoaccountx_tab.
        ENDAT.
      ENDLOOP.
    ENDIF.
    End of PO Amendment****************
    Regrads,
    Suganya Jayabalan

Maybe you are looking for