BAPI_PO_CREATE1 multiple schedule lines cann't create ECC500

Dear all:
   I want to use BAPI_PO_CREATE1 to create more than one purchase order schedule item for a purchase order item .However, the system either posts the first purchase order schedule line or the BAPI terminates the posting with an error message. I have found SAP NOTES (828582) try to solve the problem . But it was no use.
   My SAP system component information is SAP_APPL     500     0012     SAPKH50012 .
   I attach test program as follows:
   REPORT  ZPO_CREATE.
DATA: HEADER LIKE BAPIMEPOHEADER,
      HEADERX LIKE BAPIMEPOHEADERX,
      EXPHEADER LIKE BAPIMEPOHEADER,
      TESTRUN  LIKE BAPIFLAG-BAPIFLAG,
      ITEM LIKE BAPIMEPOITEM OCCURS 0 WITH HEADER LINE,
      ITEMX LIKE BAPIMEPOITEMX OCCURS 0 WITH HEADER LINE,
      POSCHEDULE LIKE BAPIMEPOSCHEDULE OCCURS 0 WITH HEADER LINE,
      POSCHEDULEX LIKE BAPIMEPOSCHEDULX OCCURS 0 WITH HEADER LINE,
      POTEXTHEADER LIKE BAPIMEPOTEXTHEADER OCCURS 0 WITH HEADER LINE,
      POTEXTITEM LIKE BAPIMEPOTEXT OCCURS 0 WITH HEADER LINE,
      RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
*<<<< HEADER
  HEADER-COMP_CODE = '1000'.
  HEADER-DOC_TYPE = 'NB'.
  HEADER-CREAT_DATE = SY-DATUM.
  HEADER-CREATED_BY = SY-UNAME.
  HEADER-VENDOR = '0000000063'.
  HEADER-LANGU = SY-LANGU.
  HEADER-PURCH_ORG = '1000'.
  HEADER-PUR_GROUP = '100'.
  HEADER-CURRENCY = 'RMB'.
  HEADER-DOC_DATE = SY-DATUM.
  HEADERX-COMP_CODE = 'X'.
  HEADERX-DOC_TYPE = 'X'.
  HEADERX-CREAT_DATE = 'X'.
  HEADERX-CREATED_BY = 'X'.
  HEADERX-VENDOR = 'X'.
  HEADERX-LANGU = 'X'.
  HEADERX-PURCH_ORG = 'X'.
  HEADERX-PUR_GROUP = 'X'.
  HEADERX-CURRENCY = 'X'.
  HEADERX-DOC_DATE = 'X'.
<<<< ITEM
  CLEAR ITEM.
  ITEM-PO_ITEM = '00010'.
  ITEM-MATERIAL = 'K01060'.
  ITEM-PLANT = '1000'.
  ITEM-QUANTITY = 20.
  ITEM-PO_UNIT = 'LIN'.
  ITEM-NET_PRICE = 310.
  ITEM-TAX_CODE = 'J2'.
  ITEM-PO_PRICE = 1.
  ITEM-FINAL_INV = 'X'.
  ITEM-IR_IND = 'X'.
  APPEND ITEM.
  ITEMX-PO_ITEM = '00010'.
  ITEMX-MATERIAL = 'X'.
  ITEMX-PLANT = 'X'.
  ITEMX-QUANTITY = 'X'.
  ITEMX-PO_UNIT = 'X'.
  ITEMX-NET_PRICE = 'X'.
  ITEMX-TAX_CODE = 'X'.
  ITEMx-PO_PRICE = 'X'.
  ITEMX-FINAL_INV = 'X'.
  ITEMX-IR_IND = 'X'.
  APPEND ITEMX.
**************schedule lines   doesn't effect or make error when post po
POSCHEDULE-PO_ITEM = 10 .
POSCHEDULE-SCHED_LINE = 1.
POSCHEDULE-DELIVERY_DATE = SY-DATUM .
POSCHEDULE-QUANTITY = 5 .
APPEND POSCHEDULE.
POSCHEDULE-PO_ITEM = 10 .
POSCHEDULE-SCHED_LINE = 2 .
POSCHEDULE-DELIVERY_DATE = SY-DATUM .
POSCHEDULE-QUANTITY = 15 .
APPEND POSCHEDULE.
POSCHEDULEX-PO_ITEM = 10 .
POSCHEDULEX-SCHED_LINE = 1.
POSCHEDULEX-DELIVERY_DATE = 'X' .
POSCHEDULEX-QUANTITY = 'X' .
APPEND POSCHEDULEX.
POSCHEDULEX-PO_ITEM = 10 .
POSCHEDULEX-SCHED_LINE = 2.
POSCHEDULEX-DELIVERY_DATE = 'X' .
POSCHEDULEX-QUANTITY = 'X' .
APPEND POSCHEDULEX.
CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
      POHEADER                     = HEADER
      POHEADERX                    = HEADERX
      NO_PRICE_FROM_PO             = 'X'
    IMPORTING
     EXPHEADER                    = EXPHEADER
    TABLES
      RETURN                      = RETURN
     POITEM                       = ITEM
     POITEMX                      = ITEMX
     POSCHEDULE                   = POSCHEDULE
     POSCHEDULEX                  = POSCHEDULEX 
  LOOP AT RETURN .
    WRITE : /  RETURN-TYPE,
               RETURN-ID,
               RETURN-NUMBER,
               RETURN-MESSAGE.
    CLEAR RETURN.
  ENDLOOP.
  IF NOT EXPHEADER IS INITIAL.
     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'  .
  ENDIF.
  I am full of grateful for you can solve my problem . Thanks a lot!
  Best regards.
                                   Daniel fu  2006-08-27

I guess u need to add
POSCHEDULEX-PO_ITEMX = X.
before appending the table Parameter POSCHEDULEX
One for each append statement on table internal table POSCHEDULEX
Regards
Alok Pathak

Similar Messages

  • How to create multiple schedule lines for configurable products

    Hi -
    We have enabled variant configuration and would like to have multiple scheudule lines created , but it seems that only one line is avaialble, is there any way to configure the use of multiple schedule lines? 
    Note - we are not using KMAT material types, rather triggering a unique kit compoments within Sales BOM.
    We have been able to make the necessary adjustments to allow the creation of the Scheduling agreement and have the BOM explode correctly, but just am not able to trigger multiple sched lines.
    thanks
    Bill

    Your context node shall contain all these fields like country,city,etc as different attributes.so in your view configuration,add all these fields whatever you require from the AVAILABLE FIELDS section to the DISPLAYED FIELDS section.NOw all these attributes would be added in diff rows.What you need to do is,select the first attribute,lets say COUNTRY,click on this attribute and then on the buttn SHOW FIELD PROPERTIES.Thsi will show you the label name etc.Here you change the label name to NATIONALITY.Also ,it will show you the row no,cloumn span of the field and column span of the label.You need to reduce the column span of the field value.Ie if the column span is from D TO H,reduce it from D TO F.Now goto the next attribute eg CITY and in the same way,goto the attribute properties.Here ,There is a check box SHOW LABEL,uncheck this,and now goto the row no and the cloumn span.Make the row no same as that of the COUNTRY FIELD.The column span should howevrbe statring from where the column span of country field ended.Ie Teh column apsn of counrty field ended at F .So for CITY,the column span should start from G to amybe H.Now this is how you need to accomodate the other fields also in the same row,by changing the row no and column span in the field properties.
    Suvidha

  • Backorder scheduling creating multiple schedule lines

    Hi,
    We have one issue wherein Backorder scheduling is creating multiple schedule lines for the same date.
    I would lke to know how to approach this issue, what all needs to be checked in config to prevent it from creating multiple schedule lines.
    Thanks

    Rajendra,
    You didn't mention what kind of order, but the first things to try are the same regardless.
    Use an availability checking type in your material master that uses daily requirements, similar to SAP standard 01.  You can review the checking types in OVZ2, use one that has a "Total Sales" entry of B.
    You can also change the default confirmation behavior.  OVZJ, set Avail check rule to "blank"  or B "full delivery" if you are talking about sales orders.
    Rgds,
    DB49

  • Regarding multiple schedule lines in sales order with same date

    Hi All,
    we create the Orders from RFC and the orders are going to Multiple Schedule lines for the same date.
    period       delivery date          ordered quan       confirmed quantity
    D     10/11/2007                10                    0
    D     10/11/2007                 0                     10
    here for the same date in first line it is not confirming and in the second line it is confirming the quantity for the same date.
    On what conditions it is possible??????
    Any one have the solution for this Please send it to me [email protected]
    Regards,
    Prasad

    Just check the schedule line details i.e go to schedule line---shipping. You will find that although the del. date is same in both the case but the timings were different e.g material availability time etc will be different in both these lines. So though the dates may be same its time difference that's causing the second schedule line.
    Reward points if useful

  • Multiple schedule lines

    Dear all,
    I have got an error while creating a sales order multiple schedule lines.
    When going to schedule line tab i can see 2 schedule lines there even i have a lot of stock. i want today's date as delivery but it is giving delivery date as next day.
    Please help me in solving this. I have seen so many threats but i didnt get the problem exactly.
    Regards,
    C Chaitanya

    Hi Chaitanya,
    Please check your below parameters
    1) check your material master any lead time maintain in MRP views
    2) Check your shipping point any lead time mention
    3) check your sales order any lead delivery time maintain in- VOV8 
    4) Check your route in sales order and check any lead time mention in route determination.
    5) If its Third party sales please check info records any delivery lead time mention
    check the above points and let me know still you have any issues.
    Regards
    Nishad

  • Help using /AFS/BAPI_PO_CREATE with multiple schedule lines

    I'm using /AFS/BAPI_PO_CREATE to create POs and everything works fine until I pass an item with multiple schedule lines. 
    When you pass multiple schedules it is giving each of the schedule lines under an item the same grid value!  So if I want to order one black, one white shirt...  both grid values are changed to black when the PO is created.
    I'm wondering if you need to pass some sort of sequence value into the BAPI when you have multiple schedule lines for an item.  Does anyone know?

    Hi Justin
    Please make sure that you are specifying the <b>item number</b> while passing the ITEM Details and their correponding SCHEDULE lines.
    Though i couldnt find FM: /AFS/BAPI_PO_CREATE in our system, i guess it is similar to BAPI_PO_CREATE.
    Kind Regards
    Eswar

  • Billing in the basis of billing plan for multiple schedule lines

    Hi All,
    I have one scenario in which we have created milestoen billing via project systems in sales order. Now Suppose I have three line items in my sales order and against each line items we have maintained multiple schedule lines. ex. 10%, 40%,50% respectively. Similarly for other line items also we have maintained the same. Now I need to generate invoice on the basis of schedule lines(billing plan). for ex. single Invoice covers 2 schedule lines out of total schedule lines in the line item. Similarly for other line items.
    Kindly guide.
    Thanks.

    Hi
    Your milestone billing plan integrates with PS means that you have an order related billing.
    Hence schedule line is a confusing word and I assume it as a billing plan.
    Each milestone-related billing date is blocked for processing until the Project System confirms that the milestone is completed. The billing block will automatically be removed once the milestone is achieved.
    Do maintain copy controls properly at item category level (VTFA) and your billing should happen standard SAP way.
    If still you face any errors, please post the screenshots.
    Thanks
    Atul

  • Open Sales Order  table with multiple schedule line....

    YUSUF BHORI wrote:
    Hi Experts,
    In Sales Order there are multiple schedule line for single item.
    Where and in which table i can find open qty for order ,material, item and schedule line items.
    I Want open items for each schedule line. For One vbeln, posnr there multiple etenr.
    Urgent,
    Yusuf.

    Hai,
    Join VBAK & VBAP and store data in an internal table GT_VBAP to get Sales order numbers, items, materials.
    Get Open Sales order items from VBUP into GT_VBUP  where VBUP-GBSTA  NE  'C'.
    LOOP at GT_VBAP.
    Read table GT_VBUP with key vbeln & posnr.
    If sy-subrc <> 0.
      delete GT_VBAP.
    endif.
    ****Fill your Final Report Internal table with required field values **Append into that internal table
    ENDLOOP.
    Now Select WMENG BMENG from VBEP into GT_VBEP for all entries in GT_VBAP.
    LOOP AT  GT_VBEP.
    *******Again Modify your Final Report internal table with these values
    ***VBEP-WMENG is Ordered Qty
    ***VBEP-BMENG is Confirmed Qty
    ************Open Qty     = Ordered Qty      = Confirmed Qty***
    ************Open Qty     = VBEP-WMENG = VBEP-BMENG.***
    ENDLOOP.
    Edited by: Eswara Rao Aakula on Dec 24, 2007 9:56 AM
    Edited by: Eswara Rao Aakula on Dec 24, 2007 9:57 AM

  • Unable to enter multiple Schedule lines for BOM material in Sales Order

    Hi All,
    We have a Sales Order where in which we cannot add additional schedule lines for BOM material.
    The schedule lines are greyed out, user was able to add schedule lines earlier.
    I have checked all assignments in VOV6, VOV7 and everything seems to be fine and no changes have been made to item category being used.
    Please provide a solution for this.
    PFB link in which similar situation posted in this community but the final resolution method is not discussed.
    http://scn.sap.com/message/13201504#13201504
    Regards,
    Samiksh

    Hi Samiksh,
    Pls check for that particular customer, only complete delivery allowed(c) is set in the CMR or CMIR. If so, you can't enter multiple schedule lines for that customer.. it would be grayed out in the sales order schedule lines except confirmed line.
    or check the problematic sales order at item level shipping tab if the par del/item is set to 'C'
    With regards
    S.Siva

  • Multiple Schedule Lines for Individual Qty in Standard Order

    Hello All,
    I have a Client Requirement to Set up the Standard Order for a Material which will be sold on Single Quantity every Month.
    This will have to occur from the same Order. For this Multiple Schedule Lines are required to be generated as per Monthly Delivery Schedule.
    I know this functionality comes under Scheduling Agreements where we can deliver goods as per confirmed Schedule Lines for the Month.
    But Client Requirement is to set up this functionality in Standard Order Only as setting up scheduling agreements calls for mapping of New Order Types which is not feasible.
    So Can you provide with your valuable Inputs as to whether this can be possible through Standard Order in the system.
    Looking forward to your esteemed reply!!
    Warm Regards,
    Onkar Khedekar

    Dear Onkar:
    If you don't want to use Schedule agreements, you can enter several schedule lines for each item in "Schedule line" tab at  item level.
    Enter in this tab each schedule line per month.
    But be aware which date you enter becuase this requirement will be transfered to MRP.
    Check it and revert.
    Jose Antonio Martinez

  • Delivery date variance for multiple schedule lines in EKET

    Hi experts,
    can anyone tell me what dates  are used (from EKET, EKBE or any other table)  to calculate delivery date variances when there are multiple schedule lines in EKET table. I am able to match single schedule line POs but not POs having multiple schedule lines.
    thanks in advance,
    purvang

    can anyone provide input on this?

  • Schedule lines not getting created while applying  exit at line item

    Hii all,
    First of all , I will explain my scenario. I have a requirement to give pop up screen in VA01 to get order quantity as per business requirement.
    i have used customer exit MV45AFZZ , USEREXIT_MOVE_FIELD_TO_VBAP . in this exit i m calling my Z function module which gives pop up screen through which user will enter length code and lot size. from this i will calculate quantity and update quantity field.
    Now problem is that, no schedule lines are getting created when i m applying this quantity calculation logic directly to line item quantity.
    So, I want schedule lines also to be generated. If somebody has a solution , plz reply soon.
    Thanks & Regards,
    Kavan Shah
    my id is [email protected]

    Hi Kavan ,
    by debug u can find out whats the wrong with ur code , check the UPDKZ of XVBAP?
    regards
    Prabhu

  • 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

  • Multiple Schedule Line Category significance

    Hi,
    I am a SAP SD newbie..  I am not able to understand the significance of Schedule line category..
    Each item can have multiple schdule line caterories.  But why would we need multiple of these.
    Sap manuals are not very clear on the need for multiple schedule lines especially since they are automaticall determined.
    So clarification would help me understand the concept..
    Thanks
    Kevin

    Significance of Multiple Schedule Lines is that if the complete stock is not available at a given point of time & Partial Delivery allowed. For Example, Sales Order is for Quantity 100 (Partial Delivery allowed) & ready stock issay 30, which can be delivered on required delivery date & balance 70 may be available after 10 day. so there will be multiple schedule line, the first schedule line as not confirmed sales order on say 17th Jan, second schedule line as confirmed sales order of 30 on 17th Jan & third schedule line as confirmed sales order on 27th Jan.
    Alternatively, customer places Sales Order of say 100 & provides an schedule say 25 numbers on 17th Jan, 25 numbers on 24th Jan & so on..., so accordingly schedule lines can be maintained.
    Regards,
    Rajesh Banka
    Reward points if helpful.

  • Multiple schedule line and reschedule for product selection

    Hi,
    Is it possible to mainatine multiple sechedule line for sales order where product selection is active
    Let me explain the problem in detail.
    We are using product selection functionality while creating sales order. Say for example in VB11 transaction I have maintained A= A1, A2 and A3. Where A1 has stock 50, A2 has stock 30, A3 has stock 20. Suppose my sales order is 150 for material A. The reason used is 0004 'automatic'. So while creating the sales order, confirmed qty for A1=50, A2 =30 and A3
    = 20. I have unconfirmed qty. 50. for this scenario, I need to enable a
    partial delivery, 1st I need to let the customer know when my 100 pcs going to be delivered and 2nd when my balance 50 pcs going to be delivered. So in the sales order I need to maintain two schedule line , one for
    confirmed 100 and another for unconfirmed 50. I am not able to do this.
    I can maintain only one schedule line per main item and at the sub item
    level not possible to maintain.
    The second problem is that, when I get stock for unconfirmed 50, I can
    not reschedule. can anyone please help to solve this issue?
    Regards,
    Beena

    goto item and doublle click on item and goto schedule lines and chenage the shedule lines..
    wat i know is by avaiblity check it propose the delievry dates of items...
    goto MM02 and mrp 1.. you can give there days to producee..
    OR doc type propose delivery dates.. lead days...
    hope it helps
    you
    ramki

Maybe you are looking for

  • Deinstall Oracle 11g client hangs on Windows 7 Enterprise 64-bit

    Hi, I am trying to dinstall Oracle 11g client on Windows 7 Enterprise 64-bit but the process hangs when it reaches the following: Removing Windows and .NET products configuration START It just hangs there for ever! Checking the log file C:\Program Fi

  • IBooks Author table of contents does recognize paragraph styles

    The video https://www.youtube.com/watch?v=n2p08-NmqfQ shows that using iBooks Author  I should be able to have text that is formatted with specific Paragraph Styles show automatically in the Table of Contents. But for me that does not work.  My versi

  • Unabl eto share Internet connection through Airport

    I have a new Samsung wave S8500. I'm trying to access the internet connection shared by my mac on the airport, everytime i try to connect to my mac through the Wi-Fi on my phone, it doesn't connect. I put a 40 bit WEP Key length on the sharing option

  • Best way to add delay line and arpeggiator to multi instrument?

    I am using logic sequencer to drive external hardware, and have been making use of the arpeggiator and delay line objects in the environment. Apparently they have to be set up in loop cabling? Where the delay line runs into the multi instrument, whic

  • Why do i get redirected to yahoo kids

    Whenever I try to get on a website while using firefox I always get redirected to yahoo kids . Why is this happening? Also when I try to get on facebook and other sites a message comes up that says '''K2 web reports Login''' LOGIN- enter a KeyServer