Update of schedule line in PO using BADI 'ME_PROCESS_PO_CUST'

Hi,
I have a scenario where my PO has one line item with quantity 10 but there is more than one schedule line (05 Nos.) under the tab 'Delivery Schedule'. First 3 lines have same Delivery Date, same Stats. Del. Date & same Committed Date. Next 2 lines have different Delivery Date, different Stats. Del. Date & different Committed Date.
The requirement is to conver the first three lines into one with same Delivery Date, Stats. Del. Date & Committed Date and the quantity will be summed up in one row.
Can I use the above mentioned BADI for the same. If yes then how & If no then which other BADI can be useful?
Thanks

Hi Vinay,
Can you please let me know how did you solve this?
I have a requirement, I need to send delivery date in the output corresponding to the Schedule line after each GR posting of that day.
I couldn't find any link between EKET and PKPS.
Please help.
Thanks
Lakshmi

Similar Messages

  • Update Contract Schedule lines using BAPI_CUSTOMERCONTRACT_CHANGE

    Dear All,
    I want to change the schedule line of a Sales Contract using the BAPI, BAPI_CUSTOMERCONTRACT_CHANGE however i do not find any table parameter to do the same as is available in the Quotation & Sales Order change BAPIs.. I checked OSS but did not find any note in this regard.. Kindly let me know if there is any way this can be done apart from using the EXTENSIONIN parameter for this BAPI.
    Thanks for your help.
    Cheers
    Nitesh

    Dear Dipak,
    Is it possible to update the schedule lines without using the EXTENSIONIN parameter for this BAPI ?? If so kindly let me know.
    Cheers
    Nitesh

  • Update Schedule line Delivery date using Bapi_po_Change

    Hi all,
    I am using Bapi_po_change to Update the Schedule line Delivery date(EKET-EINDT) for the PO based on the Item and the Schedule line.
    I am passing the PO number, Po header, Item structure, Schedule line Structure.
    But the Date is not getting updated in the Eket table.
    Please suggest.

    Hi Sukriti,
    Thanks for the Response, yes i have used the Bapi Transaction Commit Also .
    The point is I am able to Update the Statistical Delivery Date in the Same EKET table using BAPI_PO_Change .I have Checked all the Ways to update the EKET-EINDT(Delivery Date)but no Unable to do it.

  • BAPI for VA02 to check availability & update the Schedule lines

    Hi Experts,
    Is there a BAPI which can 'check item availability' & update the Schedule lines for the same order?
    I have checked 'RV_AVAILABILITY_CHECK' 'BAPI_MATERIAL_AVAILABILITY' 'SD_BACKORDER_UPDATE'
    but it is not solving the purpose.
    Kindly give your suggestion for the same.
    Thanks.

    Hi,
    Please let me know if you were able to achieve this functionality. I have a similar requirement wherein I need to check for the material availability and update the schedule lines in the scheduling agreement. I checked the FM SD_BACKORDER_UPDATE, but it doesn't seem to be helpful.
    Regards,
    Dawood

  • Reschedule does not update the schedule line

    Dear All expert,
    After upgrade to ECC6.0, the reschedule does update the schedule lines eventhough it list all the required to be update in the list.
    As I checked , it update the ekpo successfully but does not update the eket.
    Is there any suggestion ?

    Hi,
    On the initial screen of V_V2
    Remove tickmark of SIMULATION, Then it will update schedule lines in sales document
    Kapil

  • Order schedule lines not created using BAPI_SALESORDER_CREATEFROMDAT2

    Hi experts,
      I am creating sales order using BAPI_SALESORDER_CREATEFROMDAT2. I want to update the Order quantity in VBAP-KWMENG.I got the information from SDN when including the Schedule line in BAPI 'BAPI_SALESORDER_CREATEFROMDAT2  '.
      I tried by using Update flag = 'I'.I am not able to update, what are the values to be passed and how to update the field.
    Is there any other way..Please suggest me..
    Thanks&Regards,
    Karthik.

    Hi, In the BAPI if you look at the tables parameter you will find ORDER_ITEMS_IN and ORDER_ITEMS_INX as well as ORDER_SCHEDULES_IN and ORDER_SCHEDULES_INX. To update KWMENG you will have to pass that value to ORDER_ITEMS_IN-TARGET_QTY and update the same in the table ORDER_ITEMS_INX (ORDER_ITEMS_INX-TARGET_QTY) with 'X'.
    For updating schedule line go for ORDER_SCHEDULES_IN-SCHED_LINE and update X for the same in ORDER_SCHEDULES_INX.
    Try looking into the following code, I am filling in both the Item data as well as the Schedule line data.
      loop at t_mdata into fs_mdata.
        fs_item-itm_number  = fs_mdata-posnr.
        fs_itemx-itm_number = c_flag.
        fs_item-material    = fs_mdata-matnr.
        fs_itemx-material   = c_flag.
        fs_item-target_qty  = fs_mdata-kwmeng.
        fs_itemx-target_qty = c_flag.
        fs_item-item_categ  = fs_mdata-pstyv.
        fs_itemx-item_categ = c_flag.
        fs_itemx-updateflag = c_flag.
          APPEND fs_item TO t_item.
          APPEND fs_itemx TO t_itemx.
        fs_sline-ITM_NUMBER  = fs_mdata-posnr.
        fs_slinex-ITM_NUMBER = c_flag.
        fs_sline-SCHED_LINE  = c_sline.
        fs_slinex-SCHED_LINE = c_flag.
        fs_sline-REQ_QTY     = fs_mdata-kwmeng.
        fs_slinex-REQ_QTY    = c_flag.
          APPEND fs_sline TO t_sline.
          APPEND fs_slinex TO t_slinex.
      endloop.                             " Loop t_mdata
    c_flag contains 'X'.
    fs_item is of structure ORDER_ITEMS_IN.
    fs_sline is of structure ORDER_SCHEDULES_IN.

  • Fields update in "Schedule Lines for FRC sched." in a scheduling agreement

    May I know how the following fields in the "Schedule Lines for FRC sched." section in a scheduling agreement are being updated?
    We have already a new inbound delivery with goods receipt (last June 1, 2010) but the following fields still show the previous inbound delivery details:
    For example:
    Date of last del. 08.10.2009
    Last d. note no. 91011
    Last GR 21.10.2009
    Last GR qty. 54.500
    I wish I can show some screenshots here.
    Thanks a lot in advance for your answers.

    Hi Sravan,
    As per my view point, this is standard SAP behaviour. System will generate PR only in case of external operation.
    If you go to OPL8 (Order type dependent parameters) for your respective order type & plant combination you have option of maintaining setting related to PR only and there is no option of using scheduling agreement or generating schedule lines.
    I don't see any possibility to use scheduling agreement using to have schedule lines for external operation.
    Regards,
    Tejas

  • 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

  • Schedule Lines in APO using CTM

    Dear Experts,
    How to create schedule lines directly in APO using CTM?
    Thanks adn regards,
    Sushant

    Hi,
    Do you mean creation of Planned orders by CTM against the demand /
    Generally "schedule lines" term  in APO are seen in RRP3 Product view and refers to Planned order / purchase requisitions.
    Yes CTM can create schedule lines in APO after CTM planning run.
    Thanks,
    Pavan Verma

  • Delivery date not updated in Schedule line

    Hi friends,
    We are trying to update the delivery date of a schedule line in a sale order item through BAPI_SALESDOCUMENT_CHANGE. This goes well for all the cases except when the last sale order item is fully delivered. When the last sale order item is fully delivered, the BAPI is unable to update the delivery date for any of the other schedule line items in the same sale order.
    While debugging standard SAP program SAPMV45A, we found that the XVBUP item always points to the last sale order item (FM: SD_FIELD_INPUT_CHECK) and as this is fully delivered, it says that the order is completely delivered and hence delivery date EDATU cannot be changed.
    Could anyone please help to resolve this issue?
    Thanks,
    Sharmila
    Edited by: Sharmila Subramanian on Mar 17, 2011 8:17 AM

    Use following function  and update  schedule_lines  and    schedule_linesx  table.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument     = p_vbeln
        order_header_in   = s_order_header_in
        order_header_inx  = s_order_header_inx
        behave_when_error = 'P'
      TABLES
        return            = it_return
        order_item_in     = i_order_item_in
        order_item_inx    = i_order_item_inx
        schedule_lines    = i_sched
        schedule_linesx   = i_schedx.

  • FM to Update delivery schedule lines in transaction ME38

    Hi All,
    Please let me know the Function Module to update Schedule agreement, Delivery schedule lines in the transaction ME38.
    Thanks,
    Swamy Mantha

    Hi Swamy,
    Try BAPI_CONTRACT_CHANGE.
    Regards,
    Chester

  • Create dummy schedule line in SO using User-Exit

    Hi ,
    I have one requirement of adding one dummy schedule line before the normal schedule lines which gets added after ATP check in sales order.
    for eg: if for line item 10, system will determine 2 schedule 1 and 2. then i want to add a dummy schedule line before 1.
    so it will be like
    sch line
    1 - Dummy
    2 - system generated schedul eline 1.
    3 - system generated schedul eline 2.
    Please let me know if is there any user excit or any way i can achive this?
    Thanks,

    HI Soni,
    What is the meaning of dummy  schedule line.
    Regards,
    Madhu.
    Edited by: madhurao123 on Feb 25, 2011 5:26 AM

  • Cannot update batch header during MIGO GR using BADI MB_DOCUMENT_BADI

    I am trying to update next inspection date via MIGO when Goods Receipting a production order which is held in the batch header and in a classification we have set up. I have used function modules to try and perform the update.
    I have used both 'VB_UPDATE_BATCH' and QEVA_BATCH_UPDATE both by themselves and in an update task to update field QNDAT. (1st one updating MCHA and MCH1 the second one to update MCHA).
    I had the code before in POST_DOCUMENT of BADI MB_MIGO_BADI and this made no difference either. Sometimes it updates if I cancel the material document and redo the goods receipt with the same production number but this is very inconsistent. I need this to be done when I am posting the goods receipt.
    Does anyone have any ideas as I am at the end of my tether with this one?
    Many thanks
    Regards
    Larissa Maryniuk

    used BAPI_CHANGE_BATCH in method CHECK_ITEM of  MB_MIGO_BADI

  • How to Change Schedule line Quantity in BADI 'ORDER_SAVE'

    Hi,
    I need to change the Schedule line quantity While Order saving. I am writing the code in ORDER_SAVE BADI. Using the Header guid i am reading the details and changing the quantity in Schedule line structure. How can i pass those values in to Memory so that order quantity will change. I try to Use CRM_ORDER_MAINTAIN but not able to change the quantity. Can an

    Hi,
    You need the One Order Function Module - CRM_ORDER_MAINTAIN to update the Schedule line value. So, you need to have a look at all the fields that are necessary to fill using the Tables and Structures. If you have the header guid, then you can probably pass the guid to CRM_ORDER_READ to read the values and then fill in the entries necessary to make the changes.
    You can also debug the order code to get a feel of the necessary changes.
    Hope this helps.
    Thanks,
    Samantak.

  • Schedule line wrongly updated in SO

    Hi expert,
    When updating AB confirmation line in PO it updates an corresponding Schedule line in SO after calculating GR processing time.In my scenario user done confirmation first for full quantity and then split the  quantity into two confirmations. Then processing the first confirmation upto billing and then again split the quantity in Second confirmation. Please guide me to solve this issue.
    Eg:
    1) AB Confirmation in PO
    Delivery date     Quantity        Quantity reduced
    23.01.2012       50000              0
    Schedule line in SO
                             order qty   Rounded qty    Confirmed qty        Delivered qty           
    25.01.2012     0                  0                       50000                    0
    2)  Split the quantity in AB confirmation
    Delivery date     Quantity        Quantity reduced
    23.01.2012         25000            0
    25.01.2012         25000             0
      Schedule line in SO
                             order qty   Rounded qty    Confirmed qty        Delivered qty
    25.01.2012      0                    0                   25000                      0
    26.01.2012      0                    0                   25000                      0
    3) Processing the first confirmation line upto billing then it updates the schedule line like this
    Delivery date     Quantity        Quantity reduced
    23.01.2012         25000            25000
    25.01.2012         25000             0
      Schedule line in SO
                             order qty   Rounded qty    Confirmed qty        Delivered qty
    25.01.2012      0                    0                   25000                     25000
    26.01.2012      0                    0                   25000                      0
    4) Now user again split the quantity for second confirmation in PO
    Delivery date     Quantity        Quantity reduced
    23.01.2012         25000            25000
    25.01.2012          10000            0
    During updation Schedule line in SO the result like this
      Schedule line in SO
                             order qty   Rounded qty    Confirmed qty        Delivered qty
    25.01.2012      0                    0                   35000                     25000
    Its gets updated in already processed schedule line without calculating GR processing time.I debug the process and find out that two schedule line gets deleted and then restoring into XVBEP. Actual result will be
                             order qty   Rounded qty    Confirmed qty        Delivered qty
    25.01.2012      0                    0                   25000                     25000
    26.01.2012       0                    0                    10000

    Ganesh,
    There is no fixed relationship between a MTO Production order and a Sales order schedule line.  The link is only 'logical' (eg, "this production order probably will support this schedule line").  What you see in MD04 is reevaluated and re-calculated every time you re-execute MD04.
    MTO Production orders are only relevant to a  Sales Doc item and not the sales doc item schedule.
    Best Regards,
    DB49

Maybe you are looking for

  • Exe created with Report Generation toolkit does not work for all users

    I created a exicutable with the report generation toolkit and it only works with some of my users. I use microsoft 2007 and anyone that has microsoft 2007 my exe works well. Most of my users that have microsoft 2010 are able to use my program as well

  • Itunes won't transfer my music to new phone the way it used to.

    I replaced my 4s with a used 4s that was wiped clean when I got it. I restored from cloud to my last backup and it's all working but it didn't include music (not sure if it should have). When I try to manually transfer music by connecting to my itune

  • Problem with restarting

    My macbook pro shut down unespectetly and at the moment of turning it back on a blinking file folder with a question mark aperared. Since that happened I cant see my desk top or anything. Any idea of what is going on?

  • Cannot find the root of your orgchart. The orgchart box may have been delet

    Hi All I have searched to forum for similar issues, but none seem to apply to the errors I get in the CDS log. When try-ing to view the Orgchart, in the Orgchart Console I get the following message "Cannot find the root of your orgchart. The orgchart

  • Mac Mini RAM Problem

    Hi to all!! That's my (new) problem: after an incredible reanimation of my "dead" Mac Mini (it wasn't turn on at all except the white LED at the front), now the system can't read the total amount of installed RAM Memory. This Mini has installed 512MB