Purchase order (STO) schedule line change through BAPI_PO CHANGE

Hi Gurus,
we have requirement in user exit of MIGO ; to change the purchase order(STO) Scheduline change through BAPI_PO_Change.
Current process.
STO -> outbound delivery through VL10B -> PGI -> MIGO to the receipt
It is working fine MIGO if we give fully quanitty issued in the quantify field of MIGO.
but if we give less quantity what ever PGI ed earlier then inside the user exit of MIGO it is giving error message 06 089 -> Quanity is smaller than the quantity Issued while changing the STO scheduline line through BAPI_PO_CHNAGE
If anybody having any idea 06 089 -> Quanity is smaller than the quantity Issued please help me.
Best Regards,
Radhakrishna.

Check the following link it will help u
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm

Similar Messages

  • Report for purchase requisition, purchase order and schedulling agreement.

    Hi, thanks for your help.
    I need a report or query just to view in one screen the related docs. as purchase requisition, purchase order and schedulling agreement.
    I don´t know if there is a table or trx. with that information.
    Is it possible to get that information via query ?
    Thanks for your help.
    Regards.

    For PR and PO you can use ME5A
    For PR and Scheduling agreements also you can use ME5A.

  • Purchase requisitions to schedule lines conversion

    hi,
    Is there a way to mass convert purchase requisitions to schedule lines directly?
    The material for this scenario would have a scheduling agreement and source list defined but i am unable to use ME59 to do this. All the indicators for auto PO have been checked.

    Hi,
    For creating schedule lines automatically, you have to maintain at source list the vendor & schedule agreement number & mark at MRP column as 1 (MRP relevant). Then system will generate the schedule lines from MRP
    Regards,
    Prashant Kolhatkar

  • Make to order production - schedule line not confirmed

    Hi,
    I created a  " make to order production " having few normal materials & few supersession materials.
    created PO, GR,invoice, all done.PO is updated in sales order.
    Schedule line is automatically confirmed for normal materials, but not confirmed for supersession materials.
    can anybody tell me , how schedule line can be automatically confirm for supersession materials.
    Thanks.

    Is your scenario a third party one? After you finished GR for the PO, have you checked inventory of those materials? But I still didn't understand what's difference between new material and "supersession" old one? New for what and old for what? Could you be more specific or any example will be helpful.

  • Change Schedule Line category through user exit - Issue with transfer of requirements

    Dear All,
    There is a user exit in Sales Order program MV45AZZ - PREPARE_TO_SAVE . It is currently being used to implement code to change schedule line category based on the status of the sales order.
    When Blocked , category is set to ZP, and when Released then it is set to CP.
    Now, when we change ZP to CP manually through VA02, I am able to see the requirements transferred in tcode MD50.
    The problem is, when user changes status of sales order from blocked to released, the userexit changes categories from ZP to CP, but the requirements are not transferred ( cannot see it in MD50 ).
    I tried searching the SCN, tried googling it, its been a week now and I havent found any clear solution.
    So, far what I understood is Availability Check needs to be carried out again. But I am not clear how to trigger it again.
    Are there any indicators that need to be set or any internal tables to be updated or any FM to call or any other user exit to place the code in.

    ?? Any suggestion friends ?

  • Mass Delete of Schedule Lines generated through changes in prod Schedule

    Hi friends,
    Kindly provide me the process of mass deleting schedule lines which are created through changes in Production Schedule in the month end.
    Regards,
    Ask

    Hi,
    Try T.code Me17
    thanks
    Rakesh

  • Purchase order for a line item

    Hi Guys,
                 I have got the following business sceanrio.
    I have got a material "A" which can get from locally or can get from 3rd party also.
    In the sales order i have entered like following.
    Line item no.  Material     Qunatity     Item category
            10             A              100            
            20             A              500
    As only 100 quantity is available in my stock i want to go with 3rd party for line item 20.
    How can i go ahead in this scenario.
    What would be the item categories for two line items?
    If i go with Purchase order for line item 20. Where in sales order i can track that, Line item 20 is getting thru Purchase order, My requirement is to store the corresponding purchase order no for each line item getting from 3rd party (STO also).
    Thank you
    Anil

    Hi Anil,
    For delivery from stock use the item category TAN
    For procuring it from Vendor use the item category - TAS/TAB
    Check whether the ITEM CATEGORY GROUP & GENERAL ITEM CATEGORY GROUP for Material B is BANS/BANC & the Material type is HAWA.
    Once you get the item category TAS/TAB, in sales order save it and go to Change to mode of the Sales Order then you can see the purchase requisition no in the Schedule line tab. Based on this Purchase Requisition a PO is created.
    After you save the PO note down the PO number and then raise Goods Receipt (MIGO) with reference to the PO number.
    Now you can goto MMBE and check the Stock for Material B.
    Reward if helpful.
    Regards
    PAVAN

  • Schedule line generation through MRP

    hi,
    Schedule lines are not generated through MRP.
    i Have Maintained all settings.standard PR is creating while
    running MRP.the SA account assignment category
    is Q(Project-make to order). is this is the reason
    for Not geneating Schedule lines?
    what needs to be done?
    regds

    Hi,
    Did you set the correct MRP indicator in the source list ?

  • Schedule line : delivery date not changes

    Dear Gurus,
    When I change delivery date change in delivery documents and sales documents, picking date, pricing date, etc.. changes, but in sales document, schedule line's delivery date does not changes.
    Please help me to change the same and kindly tell me, will it make any problem.
    fyi..
    If I have not created delivery for the respective sales document, then I can able to change the delivery date in the schedule line(sales document).
    I'm just a new born in this area so please feed me...
    Regards
    Viswanthan.G

    Hi Viswanath,
    When you change delivery date change in delivery documents and sales documents, picking date, pricing date, etc.. changes, but in sales document, schedule line's delivery date does not changes.
    This is because the system calculates the dates based on avaliabiltiy check and it picks data from material master as well, based on purchasing processing time, GR processing time, loading time ..etc and it will conclude accordingly.
    Its like system will do backward schdeuling and establishes material avaliabilty date.
    Thanks & Regards,
    Krishna

  • Aseembly order entry in sales order--item schedule line--Procurement tab

    Hi all,
    i created a Sales order which includes BOM explosion under which i am trying to seek Assembly order no under Item -- schedule lines-- procurement tab.
    currently i am not getting any such data in the particular screen at all.
    can anyone suggest if any IMG activity is missing which needs to be configured for geeting the same(assembly order entry inside sales order screen.)
    antipitaing replies.
    -ujjwal

    Hi
    Just try once as below.
    Do not create it as a BOM material first of all.
    For the Main-item, change the Item category group in the Material master to "0001" and save.
    Ensure the Item category assignment in VOV4 as
    Order type + Item category group (e,g. 0001) -
    > Item category (TAK).
    Now, create the new order for the Main-item, manually add the sub-items in the sales order, specify the "Hgh level item number" (item number of the main item) > click enter > save.
    Now, in VA02, check schedule line > Procurement tab.

  • STO Schedule Line Not reflecting in VL10F

    Hi Gurus
    Please note that I'm doing Stock Transport Order for transferring the material from one plant to another plant. And it's working fine.
    Now I want to use the Stock Transport Scheduling Agreement for stock transfers. But the schedulie line maintained in the scheduling agreement are not reflecting in VL10F.
    Can anybody help me in the same.
    Regards
    Hitesh

    Hi rithvika 
    Pl note that it's not the PO.
    I'm using Purchase Scheduling Agreement and it's the Schedule lines of purchase scheduling agreement which are not appearing in the VL10F.
    Can U help me for the same.
    Regards,
    Hitesh

  • Released schedule line in firm zone  changed in the background

    Hi
    I need to understand why and how a Released schedule line in firm zone  can be changed in the background?

    If the qty is not transmitted to the vendor using message transmission, system does not firm the qty with in planning time fence.
    So pls chk your planning time fence as well.
    Also pls chk the below link
    http://help.sap.com/saphelp_46c/helpdata/en/f4/7d2a5b44af11d182b40000e829fbfe/content.htm
    BR,
    Krishna

  • Need to Create delivery on the basis of sales order and schedule line

    Hi,
    I need to create delivery on for sales order which is splitted in schedule line number (ETENR).
    I am using FM RV_DELIVERY_CREATE and passing sales order number with single line item at a time for different (schedule line) VBEP-ETENR. but it is creating the delivery for all schedule line  items in first time only and in second loop it is not returing any thing even error. can any one please suggest me  urgently what can I do for it.

    Hi Ankit,
    You will have to create your own program to do this.
    There is no standard way todo this.
    Best regards,
    Ramki

  • Link between delivery line item and sales order item schedule line.

    Hello friends,
    This is a continuation of my earlier query - for which I got half the solution, and this is the remaining problem.
    I want to know: from delivery document line item, how to link it to sales order line item's schedule line (when there are multiple schedule lines with identical quantities).
    Thanks for your help.
    - Chetan

    This is the code which i used for the same purpose and its working.
    Hope this will help you too....
    ****it_itab  is my final internal table.
    *Internal table for manupulating the Delivery balance when
    *its used in more than one schedule line
    TYPES: BEGIN OF ty_new,
           vbeln TYPE vbep-vbeln," so no
           posnr TYPE vbep-posnr," so line no
           etenr TYPE vbep-etenr," schedule line
           delno TYPE lips-vbeln,"delivery no
           delposnr TYPE lips-posnr,"del item no
           totval TYPE vbep-wmeng," total del wise value
           val   TYPE vbep-wmeng," del wise used value
           sdval TYPE vbep-wmeng,"schedule wise  del used value
           sdtotval TYPE vbep-wmeng," total Schedule value
         END OF ty_new.
    DATA:it_new TYPE ty_new OCCURS 0,
         wa_new TYPE ty_new.
    DATA: it_vbepvb TYPE TABLE OF vbepvb,
            wa_vbepvb LIKE LINE OF it_vbepvb,
            fvbfa TYPE TABLE OF vbfa,
            fvbup TYPE TABLE OF vbup,
            fvbap TYPE TABLE OF vbapvb.
      LOOP AT it_vbak INTO wa_vbak.
        LOOP AT it_vbap INTO wa_vbap
                WHERE vbeln = wa_vbak-vbeln.
      SELECT * FROM   vbfa INTO TABLE fvbfa WHERE vbelv = wa_vbap-vbeln
                                             AND  posnv = wa_vbap-posnr.
      SELECT * FROM   vbup INTO TABLE  fvbup WHERE vbeln = wa_vbap-vbeln
                                             AND  posnr = wa_vbap-posnr.
      SELECT * FROM   vbap INTO TABLE fvbap WHERE vbeln = wa_vbap-vbeln
                                             AND  posnr = wa_vbap-posnr.
      SELECT * FROM   vbep INTO TABLE it_vbepvb WHERE vbeln = wa_vbap-vbeln
                                             AND  posnr = wa_vbap-posnr.
      CALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
        EXPORTING
          fbeleg                        = wa_vbap-vbeln
          fposnr                        = wa_vbap-posnr
      FVERRECHNUNG                  = ' '
      FS073_ALT                     = ' '
      IF_NO_SORT                    = ' '
        TABLES
       fvbfa                         = fvbfa
       fvbup                         = fvbup
       fxvbep                        = it_vbepvb
      FVBLB                        =
        fvbap                        = fvbap
    EXCEPTIONS
      FEHLER_BEI_LESEN_FVBUP        = 1
      FEHLER_BEI_LESEN_FXVBEP       = 2
      OTHERS                        = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT it_vbepvb BY vbeln posnr edatu.
      LOOP AT it_vbepvb INTO wa_vbepvb
                    WHERE vbeln = wa_vbap-vbeln
                      AND posnr = wa_vbap-posnr.
        to write data of schedule line with no delivery
        MOVE wa_vbepvb-olfmng_flt TO wa_itab-openqty.
        IF  wa_vbepvb-bmeng EQ wa_itab-openqty.
          CLEAR wa_itab.
          PERFORM schedule_data.  "schedule line based data to be displayed
          MOVE: wa_vbap-lgort TO wa_itab-lgort.
          MOVE: wa_vbepvb-etenr TO wa_itab-etenr,
                wa_vbepvb-bmeng TO wa_itab-kwmeng,
                wa_vbepvb-olfmng_flt TO wa_itab-openqty.
          APPEND wa_itab TO it_itab .
          CLEAR wa_itab.
        ENDIF.
        LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_vbepvb-vbeln
                                            AND  posnv = wa_vbepvb-posnr.
          READ TABLE it_likp INTO wa_likp WITH KEY vbeln = wa_vbfa-vbeln.
          CHECK wa_likp-bldat >= wa_vbepvb-edatu.
    check the Delivery doc date with the schedule line confirmed date
          CLEAR: delbal, deltot,wa_new.
          LOOP AT it_new INTO wa_new WHERE vbeln = wa_vbepvb-vbeln
                                         AND       posnr = wa_vbepvb-posnr
                                         AND       etenr = wa_vbepvb-etenr.
            deltot = deltot  +  wa_new-sdval.
          ENDLOOP.
          delbal = wa_new-sdtotval - deltot.
          CHECK sy-subrc <> 0 OR delbal GT 0.
          MOVE wa_vbepvb-olfmng_flt TO wa_itab-openqty.
          CHECK  wa_vbepvb-bmeng NE wa_itab-openqty.
    ****To check whether this delivery is already fully allocated against
    any other schedule.
    LOOP AT it_lips INTO wa_lips WHERE  vbeln = wa_vbfa-vbeln
                                           AND posnr = wa_vbfa-posnn.
            MOVE: wa_likp-bolnr TO wa_itab-vesname.
            MOVE: wa_likp-vbeln TO wa_itab-delno.
            MOVE: wa_likp-wadat TO wa_itab-wadat.
            MOVE: wa_likp-anzpk TO wa_itab-anzpk.
            MOVE: wa_likp-lddat TO wa_itab-lddat.
            MOVE: wa_likp-ernam TO wa_itab-ernam.
    ******end of code added by IVL1 on sep 27 2007 #3618
            PERFORM schedule_data.
            IF wa_lips-umvkz <> 0.
              tempquant = wa_lips-umvkn / wa_lips-umvkz.
            ELSE.
              tempquant = wa_lips-umvkn. "delivery qty
            ENDIF.
            tempquant = tempquant * wa_vbfa-rfmng.
    ***New logic added to get delivery qty schedule wise****
            MOVE: wa_vbepvb-etenr TO wa_itab-etenr,
                  wa_vbepvb-bmeng TO wa_itab-kwmeng,
                  wa_vbepvb-olfmng_flt TO wa_itab-openqty. "jo
    **if delivery qty is less than or equal to schedule line qty******
            IF tempquant LE  wa_vbepvb-bmeng.
              wa_itab-delqty =  tempquant.
              LOOP AT it_new INTO wa_new  WHERE  vbeln = wa_vbepvb-vbeln
                                         AND     posnr = wa_vbepvb-posnr
                                         AND     etenr = wa_vbepvb-etenr
                                         AND     delno  = wa_lips-vbeln
                                         AND     delposnr = wa_lips-posnr.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-val = tempquant.
                wa_new-totval = tempquant.
                wa_new-sdval  = tempquant.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                MODIFY TABLE it_new FROM wa_new .
                IF NOT sy-subrc IS INITIAL.
                  APPEND wa_new  TO it_new.
                ENDIF.
              ENDLOOP.
              IF sy-subrc <> 0.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-val = tempquant.
                wa_new-totval = tempquant.
                wa_new-sdval  = tempquant.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                APPEND wa_new TO it_new.
              ENDIF.
             wa_itab-delqty =  tempquant.
             CLEAR tempquant.
            ELSE.
        lips qty > so schedule lineqty
              CLEAR deltol.
              LOOP AT it_new INTO wa_new WHERE    vbeln = wa_vbepvb-vbeln
                                          AND      posnr = wa_vbepvb-posnr
                                         AND     etenr = wa_vbepvb-etenr
                                          AND     delno  = wa_lips-vbeln
                                          AND    delposnr = wa_lips-posnr.
                deltol = deltol  + wa_new-val.
              ENDLOOP.
              LOOP AT it_new INTO wa_new  WHERE    vbeln = wa_vbepvb-vbeln
                                          AND      posnr = wa_vbepvb-posnr
                                          AND     delno  = wa_lips-vbeln
                                          AND    delposnr = wa_lips-posnr.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_new-val = wa_new-totval - deltol.
                wa_itab-delqty =  wa_new-val.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-totval = tempquant.
                wa_new-sdval  = wa_new-val.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                MODIFY TABLE it_new FROM wa_new .
                IF NOT sy-subrc IS INITIAL.
                  APPEND wa_new  TO it_new.
                ENDIF.
              ENDLOOP.
              IF  sy-subrc <> 0.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_itab-delqty =  wa_vbepvb-bmeng.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-val =  wa_vbepvb-bmeng.
                wa_new-totval = tempquant.
                wa_new-sdval  = wa_vbepvb-bmeng.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                APPEND wa_new  TO it_new.
              ENDIF.
            ENDIF.
            IF NOT wa_lips-lgort IS INITIAL.
              MOVE: wa_lips-lgort TO wa_itab-lgort.
            ELSE.
              MOVE: wa_vbap-lgort TO wa_itab-lgort.
            ENDIF.
            APPEND wa_itab TO it_itab .
            CLEAR wa_itab.
          ENDLOOP. 
        ENDLOOP.
        CLEAR wa_vbepvb.
      ENDLOOP.
        ENDLOOP.
        CLEAR wa_vbak.
      ENDLOOP.

  • Error in creating schedule line aggrement through BAPI

    Hi All ,
    I want to create schedule line aggrement (VA31) by using BAPI / FM .
    I am using " SD_SALESDOCUMENT_CREATE" FM  .
    Here i am getting error in output when i enter shchedle line data in input .
    Error is given below .
    E V1                   434 No schedule line category could be determined during quantity adjustment
    Error only come when i want to create new schedule line ....in Changing any schedule line aggrement there is no error .
    I am able to create schedule line aggrement manually .
    please help .

    Use BAPI_SAG_CREATE

Maybe you are looking for