Schedule lines creation with BAPI_SALESORDER_CHANGE

Dear All,
1. I'm trying to create a new Schedule Lines to an already existing Scheduling Agreement.
2. For this, I'm using the BAPI --> BAPI_SALESORDER_CHANGE.
3. This BAPI returns me a message saying that the Schedule line processed successfully.
4. When I check the VBEP Table with the Scheduling Agreement number, I'm able to see the newly created schedule line.
5. But, when I see the Transaction VA33, I'm not able to see the schedule lines.
I checked in SDN and OSS notes. I found 1647069 which says to pass the line number and Item number which I'm already doing it.
Can any one help me out ?
Regards,
Deepu.K

I verified in my system that the below should work. Here, I am inserting a new schedule 0002 for item 10 with qty 1 and another date.
Of course, you should ensure that there is sufficient quantity that is not yet confirmed by existing schedule lines.
BAPI_SALESORDER_CHANGE
SALESDOCUMENT = '0011827125'
ORDER_HEADER_INX
           UPDATEFLAG = 'U'
ORDER_ITEM_IN
           ITM_NUMBER = '000010'
ORDER_ITEM_INX
           ITM_NUMBER = '000010'
           UPDATEFLAG = 'U'
SCHEDULE_LINES
           ITM_NUMBER = '000010'
           SCHED_LINE = '0002'
           REQ_DATE   = '20120104'
           REQ_QTY = '1'
SCHEDULE_LINESX
           ITM_NUMBER = '000010'
           SCHED_LINE = '0002'
           UPDATEFLAG = 'I'
           REQ_DATE   = 'X'
           REQ_QTY = 'X'.

Similar Messages

  • BAPI for schedule lines creation ME38

    Hi All,
    Currently i am working in 4.6C version. Could you please let me know is there any BAPI available for schedule lines creation (Transaction is ME38).
    Regards,
    Hari.

    Hi,
       Check with below link.
    [Link1|BAPIs for ME38 transaction;
    Thanks,
    Asit Purbey.

  • Schedule line Release with help of release creation profile.

    Hello,
    Is it possible to create the schedule line release for scehule line automaticaly by heuristcs run with the help of release creation profile of external procurement relationship ?
    We can release the schedule line in product view.
    What is other way release the schedule line?

    Hi,
    Credit check is done to see if the customer has crossed his credit limit or not. Incase you want to forcefully release order we use [VKM1]. What is this got to do with the schedule lines??? Irrespective of whether the order is under credit hold or no the schedule line are determined the same way. Didnt understand the connection.
    Regards
    Nadarajah Pratheb

  • SCHEDULING AGREEMENT AND SCHEDULING LINE CREATION

    Hello Guys,
    I trying creating a scheduling agreement(SA) for vendor & material combination.
    I have created a Scheduling agreement in ME31L then maintained in ME38.
    In ME38 i have also mentioned the delivery date. when i am checking EKKO for Purchasing document , its created with the delivery date specified.
    My question is how to create a schedule line ? Do we need to maintain a source list of that material, plant and vendor.
    If we have the source list maintained, then what is the next step after SA is created and maintained.
    Do we need to do MIGO? because i tested by creating one SA in ME31L and maintained in ME38. I mentioned the delivery date as today and when i checked EKKO table the Purchasing document is created.
    Do i need to create a Purchase Order?
    If no then do i need to do MIGO? If i need to do MIGO, for what reference do i need to do MIGO???
    My client never maintained a Scheduling agreement, they want the scheduled lines to be created and sent to vendor and we need to receive  the goods on specified delivery date.
    Help will be appreciated.
    Thanks.

    Hi,
    You need to make a distinction between the scheduling agreement (ME31L/ME32L) and the delivery schedule creation (ME38/ME84)
    With ME31L you create the scheduling agreement. In the scheduling agreement which is created for a vendor you maintain the parts that you will order at this vendor, the target quantity that you will order over a certain period and the price.
    In ME38 you use the scheduling agreement number that is created with ME31L to create schedule lines (manually). These schedule lines consist of a date and an quantity. This is the data that needs to be transmitted to the vendor and against which the vendor is shipping the ordered materials.
    Once the vendor ships the materials you post the goods receipt in Migo against the scheduling agreement number.
    That is the basic working of the scheduling agreement and the delivery schedule.
    Now some remarks.
    You need to set-up the required output conditions for transmitting the data to the vendor either via print, fax, email or EDI.
    You can do this manually in each scheduling agreement and each release but typically you maintain the output condition records.
    For scheduling agreement contract (ME31L) you use transaction MN07.
    For the delivery schedule (ME38/ME84) you use transaction MN10.
    In order for you to be able to post the goods receipt the delivery schedule needs to have been transmitted otherwise you will get a message that not requirement are found when trying to post goods receipt.
    Also the goods receipt can only be posted if the requirements are valid on the day that you are performing MIGO. This means if you would post GR today then the open requirements in the scheduling agreement need to be for today or already from previous dates. The system will not allow you to post GR for quantities that are only due tomorrow (if this is required a user exit needs to be set-up).
    If you want schedule lines created via MRP then you need to set-up a source list using ME01. You have to make sure that the MRP key is set to 2 in orer for the system to generate schedule lines and you also have to make sure that you have the correct MRP parameters set-up.
    You can use ME84 to transmit the delivery schedule lines generated by MRP if no changes are required. With the ME84 you can transmit multiple releases at once, however this transaction can not be used to make manual changes to the MRP proposal.
    The scheduling agreement offers lot's more possibilities but the above should get you going with the basics.
    Hope this will help you on your way.

  • Automatic schedule lines creation from PR

    Hi,
    We have a scheduling agreement for certain material
    We have maintained a Automatic PO tick in Material master as well as in vendor master
    We have also maintained purchasing info fo records and source list
    Now we have created a manual PR.
    And when we are running the T code ME59 system is creating the PO.
    Is it possible to generate schedule lines (automatically through ME59) against a scheduling agreement instead of creating a new PO?
    Regards,

    Hello,
    The transaction ME59 does not select the purchase requisitions assigned to a scheduling agreement. The reason for this is that the Scheduling agreement itself is equivalent to a purchase order. For a purchase requisition assigned to a scheduling agreement, you have to create a delivery schedule only and not a purchase order. Automatic conversion program currently does not handle creation of delivery schedules.                                                               
    Please use ME58 instead.        
    br,Gabor

  • Updation Error in Schedule line category using 'BAPI_SALESORDER_CHANGE'

    HI ,
    I am using BAPI_SALESORDER_CHANGE to Update schedule line category for an order.But the issue is...the entries are updated if it is having single schedule line item,but if more than on item it is giving error in Last Record.
    15192625   000200 0001 2.608.596.065               130,000  21.09.2009 ZX CP
    *15192625   000200 0002 2.608.596.065                 0,000  04.02.2010 ZX CP
    *EV1                  335System error: Schedule line 0002 for item 000200 does not exist
    EV4                  219Sales document 0015192625 was not changed
    i have written the code like below:
    loop at i_ma4_etenr.
              i_salesdocument = i_ma4_etenr-vbeln.
             i_order_header_inx-updateflag = 'U'.
            r_schedule_lines-itm_number = i_ma4_etenr-posnr.
            r_schedule_lines-sched_line = i_ma4_etenr-etenr.
            r_schedule_lines-sched_type = i__ma4_etenr-ettyp .
            APPEND r_schedule_lines TO i_schedule_lines.
            CLEAR : r_schedule_linesx.
            r_schedule_linesx-itm_number = i_y16v_ma4_etenr-posnr.
            r_schedule_linesx-sched_line = i_y16v_ma4_etenr-etenr.
            r_schedule_linesx-updateflag = 'U'.
            r_schedule_linesx-sched_type = 'X'.
            APPEND r_schedule_linesx TO i_schedule_linesx.
    endloop.
            CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
              EXPORTING
                salesdocument               = i_salesdocument
                order_header_inx            = i_order_header_inx
              TABLES
                return                      = i_return
                schedule_lines              = i_schedule_lines
                schedule_linesx             = i_schedule_linesx.
    Thanks in Advance,
    Sateesh Kumar.

    Hi,
    As you are facing error , so check wheather in VA02 schedule line fields have been uploaded or not initially.
    If they are not uploaded then you will be facing the error.
    Otherwise check:
    Did you pass the X fields for the schedule lines properly. As you are changing only the schedule lines, Just pass the SCHEDULE_LINES , SCHEDULE_LINESX Internal tables.
    Please also check whether anything is passed to ORDER_ITEM_INX- UPDATE field. it should be blank.
    May it helps you.
    Regards,
    DS.

  • Schedule line creation after Removing the credit block

    Hi Experts,
    I would appreciate some urgent help with following issue.
    When the order is created for the customer, the automatic credit check is carried out and order is blocked. Once the order is released from VKM1, when you display the order, the schedule line is not getting redetermined. How do I make the system to do create the schedule lines again?
    Appreciate any help.
    Thanks.
    Message was edited by:
            SAPguy

    Hi,
    Credit check is done to see if the customer has crossed his credit limit or not. Incase you want to forcefully release order we use [VKM1]. What is this got to do with the schedule lines??? Irrespective of whether the order is under credit hold or no the schedule line are determined the same way. Didnt understand the connection.
    Regards
    Nadarajah Pratheb

  • Schedule line item with no confirmed quantity

    I encountered that the schedule line item has no confirmed quantity. What are the possible reasons these happened?
    Thanks.

    Hi,
    The 1st reason could be no stock ( can check using T.code .MMBE).
    2nd reason could be not relavent for avaliability check ( check in VOV6 select the relavent scheduline category and check in transaction flow tab field availability if checked)
    3rd reason could be either the customer is blocked for his credit.
    Kindly Reward points if useful.
    Regards
    vK

  • Automatic creation of Schedule line after MRP RUN

    Hi,
    Till now we are  using only PO for placing orders to vendor, now we want to use the functionality of scheduling agrement,  so that after MRP run,  we can get automatic schedule line creation,  for this ,  what are settings required, how system create the automatic schedule lines based on which criteria, second thing while creating on eschedule agrement i found that the conditon which i can add for a vednor in ME21N  that all condition are not coming while creating schedule agrement  even my vendor is same for PO and Schedule agrement,  so what are  the setting required for this.
      regards,
       zafar

    Hi
    1.In material master purchasing view data auto PO is to be flagged.If scheduling agreemet with release documentation.
    Then flag JIT indicator 1.
    2.maintain MRP views in material master
    3.In source list for fix vendor,source list usage 2 is to be maintained.
    4.Vendor master purchasing data auto PO indicator is to be flagged.
    5.Then when you run MRP automatically schedule lines are generated.
    For JIT and forecasting maintain creaton profile in OMUP transction.
    Assign the creation profile in scheduling agreement.

  • Deletion and creation of Schedule line for Line Item

    Hi BW Experts,
    In P.S.A. when i have checked for first schedule line 001 reqdelqty is 50 , after deleting 001 and after creation of second schedule line in R/3 there are two records transferred from R/3 for schedule line 002 first with reversal indicator 'X' and delivery quantity -50 and next record with Reversal Indicator blank with value 50. which in turn results Reqdelqty zero.
    Reason of wrong data in BW: -
    Schedule line category for an item is being deleted forcefully. R3 doesn’t allow deletion of a schedule line category if delivery is already created. Here user is creating one same schedule line and then he deletes the order quantity from earlier one. This forces system to pick up schedule line 2 in the document flow
    · User shouldn’t delete schedule line.

    Hello Ganesh,
    Schedule line number sequence will not be in control of the user.
    once delivery for a schedule line is completed, no way you can delete the schedule line (except renumbering case). This is general SAP logic relates to schedule lines.
    Let me know how they are deleting the schedule lines even though delivery is completed.
    Now coming to Data load problem in BI.
    When you delete schedule line 001, the generated record should be with schedule line 001 with Reversal Indicator as R and delivery quantity -50.
    And for new schedule line 002, reversal indicator as blank and delivery quantity 50
    Regards,
    Nandakumar.A

  • Schedule lines with no confirmed qty

    The client needs schedule lines generated with no confirmed quantity please assist if itss possible
    Regards
    Maddy

    Hi,
    you will have to create a project for the enhancement object ATP00001 through CMOD.... You can also explore the possibility of activating the availability check which will also set the confirmed quantity to zero.
    Regards,
    Murali

  • Where i can find multiple confirm qty with multiple schedule line..

    Hi Experts,
    Is there any BAPI  FM or FM for finding multiple schedule line confirmation with some of blocked.
    Yusuf

    not solved

  • Where we can see  receipt date with reference to Schedule lines in SA

    Hi,
    where we can see  receipt date with reference to Schedule lines( not with reference to Items) in Schedule Agreement
    Thanks in advance.
    Best Regards,
    Kapil.

    Table EKET is schedule line table and it consists only the Scheduled and statistical delivery dates, the Open and GR Qty but not the receipt date against the schedule lines.  The receipt dates are stored in the EKBE (History per Purchasing Document) tables but this dates are stored against the Purchase doc item number but not the schedule line no.
    System generally fills the scedule lines in the chronological orders based on the GR qty.
    RJ

  • To generate Schedule lines for scheduling Agreement when MRP is run.

    Hi,
    Please help advise on my following requirement:
    When I run the MRP for 'Single Item - Multi level' (MD02) for a material, I want MRP to generate delivery schedule lines for that material in Scheduling agreement.
    Please advise as to how i can go about with this.
    Regards,
    Manju

    Hi Manju,
    For this you need to set creation indoactor for planning run in SPRO.
    The path is spro-MM-CBP-Carry out overall maintenance of plant parameters-Click on maintain-give your plant-click on external procurement under planning run-here you can give your option for the schedule line creation.
    Traction code is omi8. Hope this will help you.
    Cheers
    Ravi

  • Deletion of schedule line in PO using BAPI_PO_CHANGE

    Hi ,
    Can anyone give me the code to delete a schedule line in a po using the bapi bapi_po_change.
    Useful answers will be rewarded.
    Regards,
    Sowmya.

    Hi,
    Refer below code
    *&      Form  sub_populate_data
          text
    FORM sub_populate_data .
    *--Local Variables
      DATA : l_ipdate      TYPE rc65a-datefrom,
             l_fdate       TYPE sy-datum.
      IF NOT it_succ_file[] IS INITIAL.
        LOOP AT it_succ_file INTO st_succ_file.
          st_ipfile = st_succ_file.
    *--Sales Document
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = st_ipfile-vbeln
            IMPORTING
              output = st_salesdoc.
          st_ord_headx-updateflag = c_u.
    *--Sales Document Item
          st_schedule_line-itm_number = st_ipfile-posnr.
          st_schedule_linex-itm_number = st_ipfile-posnr.
          st_schedule_linex-updateflag = c_i.
    *--Schedule line date
          l_ipdate = st_ipfile-edatu.
    *--Call function module to convert the date format into current user format
          CALL FUNCTION 'CY_CONVERT_DATE'
            EXPORTING
              date_string_imp = l_ipdate
            IMPORTING
              date_exp        = l_fdate.
          st_schedule_line-dlv_date = l_fdate.
          st_schedule_linex-dlv_date = c_chk.
          st_schedule_line-req_date = l_fdate.
          st_schedule_linex-req_date = c_chk.
    *--Order quantity in sales units
          st_schedule_line-req_qty = st_ipfile-wmeng.
          st_schedule_linex-req_qty = c_chk.
          APPEND st_schedule_line TO it_schedule_line.
          APPEND st_schedule_linex TO it_schedule_linex.
    *--Clear
          CLEAR : st_schedule_line,
                  st_schedule_linex.
          AT END OF posnr.
    *--Perform to delete the existing schedule line
            PERFORM sub_delete_schedule_line.
          ENDAT.
          AT END OF vbeln.
    *--Clear
            CLEAR : st_erfile.
            READ TABLE it_erfile INTO st_erfile WITH KEY vbeln = st_ipfile-vbeln
                                                         posnr = st_ipfile-posnr
                                                         BINARY SEARCH.
            IF sy-subrc EQ 0.
              g_error_records = g_error_records + 1.
              g_total_records = g_total_records + 1.
            ELSE.
    *--Call the bapi to update sales order schedule line
              PERFORM sub_call_bapi.
            ENDIF.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sub_populate_data
    *&      Form  sub_call_bapi
          text
    FORM sub_call_bapi.
      g_total_records = g_total_records + 1.
    *--Call BAPI to update sales order schedule line for simulation mode
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = st_salesdoc
          order_header_inx = st_ord_headx
          simulation       = c_chk
        TABLES
          return           = it_return
          schedule_lines   = it_schedule_line
          schedule_linesx  = it_schedule_linex.
      IF NOT it_return[] IS INITIAL.
        READ TABLE it_return INTO st_return WITH KEY type = c_e.
        IF sy-subrc EQ 0.
          g_error_records = g_error_records + 1.
        ELSE.
          REFRESH : it_return.
    *--Call BAPI to update sales order schedule line
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument    = st_salesdoc
              order_header_inx = st_ord_headx
            TABLES
              return           = it_return
              schedule_lines   = it_schedule_line
              schedule_linesx  = it_schedule_linex.
        ENDIF.
        LOOP AT it_return INTO st_return
                          WHERE type EQ c_e.
          st_erfile = st_ipfile.
          st_erfile-message = st_return-message.
          APPEND st_erfile TO it_erfile.
          APPEND st_erfile TO it_file.
          CLEAR : st_return.
        ENDLOOP.
      ENDIF.
      IF it_file[] IS INITIAL.
    *--Call BAPI transaction commit to change the schedule line
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_chk.
      ELSE.
        ROLLBACK WORK.
    *--Call BAPI transaction rollback to rollback the schedule line
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.
    *--Clear
      CLEAR : st_salesdoc,
              st_ord_headx.
    *--Refresh
      REFRESH : it_return,
                it_schedule_line,
                it_schedule_linex.
    ENDFORM.                    " sub_call_bapi
    Regards,
    Prashant

Maybe you are looking for