Grid Value in Delivery Schedule isn't populating with BAPI_PO_CREATE1

Hi Gurus, hope you are doing well.
I have a problem on my end.
I am trying to create a Purchase Order using BAPI_PO_CREATE1. The special thing here is that I am using AFS Data.
Everything is working fine, but the problem is that in Delivery Schedule tab in ME23N, there is a field called Grid Value. This field is not populating with the value that I specified into the ABAP code.
Does any of you guys had this problem before?, Could you help me to solve it?
Hope you gays can help me.
Regards
Jesus Martinez
Mexico

This is the ABAP Code that I am using for testing:
REPORT  zme51n.
DATA : t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE .
DATA: it_po_header LIKE bapimepoheader OCCURS 0 WITH HEADER LINE,
      it_po_headerx LIKE bapimepoheaderx OCCURS 0 WITH HEADER LINE,
      it_po_items LIKE bapimepoitem OCCURS 0 WITH HEADER LINE,
      it_po_itemsx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE,
      it_po_item_schedules LIKE bapimeposchedule OCCURS 0 WITH HEADER LINE,
      it_po_item_schedulesx LIKE bapimeposchedulx OCCURS 0 WITH HEADER LINE,
      it_afs_po_items LIKE /afs/bapimepoitem OCCURS 0 WITH HEADER LINE,
      it_afs_po_itemsx LIKE /afs/bapimepoitemx OCCURS 0 WITH HEADER LINE,
      it_afs_po_item_schedules LIKE /afs/bapimeposchedule OCCURS 0 WITH HEADER LINE,
      it_afs_po_item_schedulesx LIKE /afs/bapimeposchedulx OCCURS 0 WITH HEADER LINE.
CLEAR it_po_header.
it_po_header-doc_type = 'ZNB'.
it_po_header-vendor = '0000001093'.
it_po_header-doc_date = '20110221'.
it_po_header-purch_org = '0201'.
it_po_header-pur_group = '010'.
it_po_header-comp_code = '0020'.
it_po_header-suppl_plnt = ''.
APPEND it_po_header.
CLEAR it_po_headerx.
it_po_headerx-doc_type = 'X'.
it_po_headerx-vendor = 'X'.
it_po_headerx-doc_date = 'X'.
it_po_headerx-purch_org = 'X'.
it_po_headerx-pur_group = 'X'.
it_po_headerx-comp_code = 'X'.
it_po_headerx-suppl_plnt = 'X'.
APPEND it_po_headerx.
CLEAR it_po_items.
it_po_items-po_item = 10.
it_po_items-material = '000000109206000052'.
it_po_items-net_price = '212'.
it_po_items-plant = '0220'.
it_po_items-stge_loc = '0201'.
it_po_items-trackingno = ''.
it_po_items-item_cat = ''.
it_po_items-preq_name =  'JMARTINEZ'.
APPEND it_po_items.
CLEAR it_po_itemsx.
it_po_itemsx-po_item = 10.
it_po_itemsx-material = 'X'.
it_po_itemsx-net_price = 'X'.
it_po_itemsx-plant = 'X'.
it_po_itemsx-stge_loc = 'X'.
it_po_itemsx-trackingno = 'X'.
it_po_itemsx-item_cat = 'X'.
it_po_itemsx-preq_name =  'X'.
APPEND it_po_itemsx.
CLEAR it_po_item_schedules.
it_po_item_schedules-po_item = 10.
it_po_item_schedules-sched_line = 1.
it_po_item_schedules-del_datcat_ext = '1'.
it_po_item_schedules-delivery_date = '20110221'.
it_po_item_schedules-quantity = '636'.
APPEND it_po_item_schedules.
CLEAR it_po_item_schedulesx.
it_po_item_schedulesx-po_item = 10.
it_po_item_schedulesx-sched_line = 1.
it_po_item_schedulesx-del_datcat_ext = 'X'.
it_po_item_schedulesx-delivery_date = 'X'.
it_po_item_schedulesx-quantity = 'X'.
APPEND it_po_item_schedulesx.
CLEAR it_afs_po_items.
it_afs_po_items-po_item = 10.
it_afs_po_items-afs_flag = 'X'.
APPEND it_afs_po_items.
CLEAR it_afs_po_itemsx.
it_afs_po_itemsx-po_item = 10.
it_afs_po_itemsx-po_itemx = 'X'.
APPEND it_afs_po_itemsx.
CLEAR it_afs_po_item_schedules.
it_afs_po_item_schedules-po_item = 10.
it_afs_po_item_schedules-sched_line = 1.
it_afs_po_item_schedules-sch_size = '00W9'.
it_afs_po_item_schedules-ordered_qty = '636'.
it_afs_po_item_schedules-quantity_s = '636'.
APPEND it_afs_po_item_schedules.
CLEAR it_afs_po_item_schedulesx.
it_afs_po_item_schedulesx-po_item = 10.
it_afs_po_item_schedulesx-sched_line = 1.
it_afs_po_item_schedulesx-sch_size = 'X'.
it_afs_po_item_schedulesx-po_itemx = 'X'.
it_afs_po_item_schedulesx-sched_linex = 'X'.
it_afs_po_item_schedulesx-quantity_s = 'X'.
APPEND it_afs_po_item_schedulesx.
CALL FUNCTION 'BAPI_PO_CREATE1'
  EXPORTING
    poheader                     = it_po_header
    poheaderx                    = it_po_headerx
TABLES
   return                       = t_return
   poitem                       = it_po_items
   poitemx                      = it_po_itemsx
   poschedule                   = it_po_item_schedules
   poschedulex                  = it_po_item_schedulesx
  POCONDHEADER                 =
  POCONDHEADERX                =
  POCOND                       =
  POCONDX                      =
   afs_poitem                   = it_afs_po_items
   afs_poitemx                  = it_afs_po_itemsx
   afs_poschedule               = it_afs_po_item_schedules
   afs_poschedulex              = it_afs_po_item_schedulesx
  AFS_POCOND                   =
  AFS_POCONDX                  =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.
LOOP AT t_return.
  WRITE t_return-message.
ENDLOOP.

Similar Messages

  • KM Scheduler isn't running with Implementation - but without

    Hi experts,
    I have a very confusing problem with my portal scheduler.
    This is my implementation.
    public class AbstractImportScheduler implements ISchedulerTask
         private static final Location logger = Location.getLocation(AbstractImportScheduler.class);
         public AbstractImportScheduler()
              // Note:
              // The task must implement a default constructor to have them created by the scheduler after a system (re)start.
         public void run(String id, Properties properties)
              logger.debugT("start import scheduler");
              logger.debugT("Scheduler is taking a local file for import.");
              try
                   Importer importer = new Importer();
                   importer.run(takeLocalFile);
              catch (Exception exc)
                   logger.errorT(exc.toString());
              logger.debugT("end import scheduler");
    So, if I comment the try-catch-block out, everything works fine - the scheduler is running. I can check this looking at the logfiles.
    But if I remove the comment around the try-catch, the scheduler will not work.
    I'm sorry for not using the search, but I have absolutely no idea for what I can search.
    So, hopefully you can help me. If you need further information, I will try giving them.
    Thanks in advance.
    Regards,
    Tobias

    Hi iburnthings,
    How did you configure the task schedule from the UI(User Interface) or command line ?
    Have you configured the triggers as "At Startup" ?
    Please also navigate to the task and check the history for more information to troubleshoot this issue .
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Billing plan as per delivery schedule

    Hi,
    Is it possible to have the billing plan dates as per the schedule lines of the items using the billing plan configuration(either via either periodic billing plan or milestone billing)
    for e.g. for  a line item - qty 10(value 1000), delivery schedule is as follows
    10-Mar-2009 - qty to be delivered is 6
    02-Apr-2009 - qty to be delivered is 4
    ( dates and qty would be decided as per the customer needs. No periodic differences between dates).
    My expected billing plan should be as follows
    10-Mar-2009 - value to be billed is 600
    02-Mar-2009- value to be billed is 400
    if yes, please let me know.
    Thanks in Advance for your answers.
    Regards,
    Madhuri

    Hello,
    I believe the Condition Record for Rent would be based per Month. Now you cannot change this record to Daily because in that case system will bill only for 28 days in month of February.
    Instead there is a way out, in the Condition Type maintenance - T-Code V/06, Under Changes which can be made, put a Tick mark in Qty Relation Check Box.
    This will allow you to change the Calculation Type while creation of Sales Document. Thus for the month of January, you can change the Calculation Type to daily & leave it as it is (Monthly) for other months.
    Hope this helps,
    Thanks,
    Jignesh Mehta

  • In VA01  In Schedule line Delivery date not getting populated

    Hello,
    We have developed enhancement for VA01 tcode.
    Depending upon the quatity entered for a material it should show one more item as free good.
    If quatity is 10 for a line item 10 then it should show item 20 by default same mateerial and quatilty as 1.We have done this it is working fine.
    But if we select free good item in our case it is 20 and click on schedule line item buttom all quaitity fields getting populated.but delivery date not getting populated for only free good.for line item 10 it showing properly.
    Can any one please suggest what i need to do in order to display delivery date for free good.
    Thanks in advance.
    Regards.

    Thanks for your response.
    Actually i have seen technical settings for that field.it is rv45a-etdat.this field has value till MV45AFZZ.seen in debugger.
    Looks like it is clearing some where after the above include.Any suggisitions welcome.Thanks again.

  • Delivery schedule line number in sales order is not populated in production

    Hi all,
    i am doing make to order scenario with 20 strategy group. In sales order we r defining the different delivery schedule lines.when i run the MRP and getting the plan orders for all the FG material and semifinished material, the sale order number and sale order item number is getting updated in production order . Beside these two , delivery schedule line number is not populated in production order.
    please give your valuable suggestion .
    i would be highly thankful to u
    Will reward points.
    Regards
    Kumaraguru

    Hi Kumar,
    Some changes done in your PRD server.If yes then contact abap consultant regarding the same.
    Because these type of problem comes when you do transport or changes done in the system.
    Regards,
    Anil

  • Delivery schedule line number in sales order is not populated  in productio

    Hi all,
    i am doing make to order scenario with 20 strategy group. In sales order we r defining the different delivery schedule lines.when i run the MRP and getting the plan orders for all the FG material and semifinished material, the sale order number and sale order item number is getting updated in production order . Beside these two , delivery schedule line number is not populated in production order.
    please give your valuable suggestion .
    i would be highly thankful to u
    Regards
    Kumaraguru

    Hi Kumar,
    Some changes done in your PRD server.If yes then contact abap consultant regarding the same.
    Because these type of problem comes when you do transport or changes done in the system.
    Regards,
    Anil

  • Populating PR number in delivery schedule of PO

    Dear Experts,
    My Client Requirement is if, we split the quantity in delivery schedule,like 30 and 30 each for only first delivery schedule
    system is automatically populating PR number,but not for second delivery schedule,please suggest me,what the
    development i need to do for populating the PR number for every delivery schedule,please suggest me.
    Thanks in advance
    Varun

    Hi There
    To do the Split use the Icon(Copy) Shc line split- Under the delivery schdule tab,, it will solve your issue,,
    Even if you want to go for the development,, ABAPer will ref the Sch lines Vs Order line item Qty and PR,, he will call/use the above said function and update,,
    Thanks
    Senthil

  • AFS Grid value problem

    Hello,
            After i create a sales order in va01, and want to change the quantity in va02 tcode. I select AFS ITEM and edit the quanity, after i save it and again enter using va02, in the grid value i.e., matrix entry all the items i entered is missing. And most of the times the quanitiy is doubling. i.e., if 500 units of shirts were entered in va01, here automatically it doubles. My client is facing this problem. Is there a SAP PATCH error??
      Thanks in Advance.

    Hello,
    What's your AFS release ?
    That's pretty strange, I know almost all AFS releases and never faced such an issue. I would recommend first to check whether a malicious user exit could be the cause of the error. If that's not the case, note that there is no available AFS features that deletes entered schedule line/grid value. Only reason for rejection can be automatically populated in sales order due to wrong grid value, ATP check...etc...
    The last option will be to raise a customer note.
    Best regards,
    Mehdi

  • Grid value probelm in PR or PO

    Dear All my Guru,
    I am using AFS MM
    I have 2 userid:
    ACTMM01
    ACTMM03
    Terms:
    Purchase requisition /  Purchase order
    Item details: Delivery Schedule>Grid Value
    In this above I am creating one PR by userId "ACTMM03" .
    In delivery schedule > Grid value - I can not see any grid value there.
    It is showing "No values found" Message no. DH801
    But other hand by "ACTMM01" it is fine. I can see the all grid value there.
    I believe this is the user id problem. But I did not found any authorization problem in SU53 for the user ACTMM03.
    Can any body advice me is there any other problem in userid?
    Thanks and B/R
    Bishnu
    04/12/2010

    HI ,
    Thanks for the Elaborated answer.
    What  i did  is
    PR number range in the backend as external and same i created in SRM as Internal.
    PO number range in ECC i maintain as internal and in SRM as external because of classic scenario.
    Apart from number ranges i went to
    Define backend system for Product category in Technical settings.
        source and target system as BAckend logical system name
    In Cross Application basic setting-- >Define object in backend system
    Pgrp as * and Cat. ID as * Source sys "BAckend System"  ....Always external procurement and PO if item data is complete otherwise PR.
    Now my question is with these settings am i able to create a PR when my Shopping cart is approved and other thing is Do i need to implement any Badi for this ? i mean to create aPR do i need to implement any BAdi , SAme for PO. ?
    Appricate your help in advacne.
    Smriti
    Edited by: Smriti arora on Apr 27, 2010 3:12 PM

  • ME2L Delivery Schedule Showing Fully Delivered Lines

    Hey,
    We are experiencing this issue on a SAP 4.7c system that we support.
    Our business are trying to generate a report, every month, that is sent to vendors, of all the purchase orders that the business are expecting them to fill. To do this the business user uses ME2L report per vendor, only selecting the Schedule Agreements documents, hitting the calendar button (Delivery Schedule), exporting the resulting output to Excel, using a formula to identify the lines which have a GR value less than the Scheduled Qty value and sending these onto the vendor as a notification to the that these are the orders that the business have marked as outstanding.
    The issue arose when the business cancelled lines on Scheduling Agreement 5500000073 by going into MD04 and deleting the requirement for vendor 5033760 and reassigned those requirements to a new Agreement 5500000053 for vendor 5000259.
    However when you run the process above the deleted lines still show up on the report and you believe this should not be the case and never was the case.
    What process to accurately identify on SAP, schedule line items, that have not being fully Goods Receipted and/or cancelled so they can be sent to the vendor?
    Many thanks for any help,
    Colm

    Hi Jurgen,
    Apologies for the delay, I was away on leave.
    We use selection parameters WE101 and that correctly brings us back only open orders on the selection screen, however when we click the Delivery Schedule button it displays lines that have been fully Goods Receipted.
    For example, if I have a PO with 3 lines, Lines 1 and 3 have been fully received and line 2 has only been partly received.
    I run ME2L with the selection parameter WE101 and the report only displays line 2. Which is correct.
    However when I click the delivery schedule button I will be shown the entire history of that line, including scheduled quantites that were fully goods receipted.
    What I would like to see is only lines where the scheduled quantity is greater than the goods receipted quantity.
    I hope this makes sense, thanks for your help,
    Regards,
    Colm

  • Scheduling Agreement with Delivery Schedule using Idoc messages

    Hi all,
    Can anybody please explain the importance of the field name "LABKY" in Idoc execution for Forecaste/JIT Delivery Schedule.
    My requirement is that when i send a new Idoc i do not want the old schedule line which are not yet released , to be deleted .
    As per the SAP help the use of the field LABKY is related to this , but when i tried its value as "1" , the previous schedule lines are still getting deleted.
    Can you pls explain how to go about it . ( DELFOR/DELJIT Idocs)
    Thank you
    Regards
    Subha

    Hi ,
    The Field
    LABKY : Delivery schedule key
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 026, Offset : 0393. external length : 000001
    Regards
    Seegal

  • Order of delivery schedule line counter at schedule agreements from MRP run

    Currently we are using schedule agreements for our long term external suppliers, but we are facing a problem with the order of new delivery schedule lines created during MRP run.
    Because of master data settings like, lot size, rounding value, plan delivery time and planning time fence to set as firm new requirements, multiple schedule lines are created with no order for schedule line counter.
    Does anyone is aware of a BADI, user exit or customizing control to have this schedule line counter in order?
    Thank you
    Daniel Guillen
    IT
    Skyworks Inc.

    Hi,
    Pls put this query in SD fourms  and get immly help because this is technical fourms.
    Anil

  • Deletion of Scheduling Agreement and Delivery Schedule using BAPI

    Hi SAP MM Gurus,
    Please assist in inquiry below:
    My scenario is that I am trying to delete delivery schedules and scheduling lines using BAPIs. I have no issues when there is no GR made yet for the delivery schedules. The error arises when there are already existing Goods Receipts and Invoices for the schedule line that I wish to delete
    When using the BAPIs (either BAPI_SAG_CHANGE or BAPI_SCHEDULE_MAINTAIN), I set the deletion indicator to "L" and set to X all change relevant fields (i.e. DELETION_INDX). However, whenever I execute it, I get the error message 06088. The funny thing is both the Quantities and the delivered quantities that are normally populated are left blank.
    For example:
    Normal error for 06088:
    Quantity 100.0 smaller than quantity delivered 179.0
    Error using BAPI with deletion indicator:
    Quantity  smaller than quantity delivered
    Is this a bug of the BAPI? or am I just missing some settings?
    Your immediate response is appreciated
    Regards,
    DeLo

    Hi,
    Please find the below link check the setting are correct or not
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02cb00a-bfb4-2c10-98aa-e33e7f64ba28?quicklink=index&overridelayout=true
    Reagrds,
    Pramod

  • The delivery schedule lines don't get created automatically on MRP run.

    Hi All,
    The delivery schedule lines don't get created automatically on MRP run for subcontracting material.  I have maintained source list as follow eg.
    Valid from | Valid to | Vendor | Porg | PPI | Agreement | Item | Fix | MRP | MRP area
    02.11.2009 | 31.12.2999| XYZ | XY01|     |AA0000XYZE |10 | X |2 | ABC
    Could you please help me about this issue
    Thanks in advance.

    Hi Amit,
    Please ensure the value of Special procurement key in the MRP2 view for the material. It should be maintained as 30 - subcontracting.
    Thanks and Regards,

  • Idoc execution in Scheduling Agreement with Delivery Schedule

    Hi all,
    Can anybody please explain the importance of the field name "LABKY" in Idoc execution for Forecaste/JIT Delivery Schedule.
    My requirement is that when i send a new Idoc i do not want the old schedule line which are not yet released , to be deleted .
    As per the SAP help the use of the field LABKY is related to this , but when i tried its value as "1" , the previous schedule lines are still getting deleted.
    Can you pls explain how to go about it . ( DELFOR/DELJIT Idocs)
    Thank you
    Regards
    Subha

    Hi ,
    The Field
    LABKY : Delivery schedule key
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 026, Offset : 0393. external length : 000001
    Regards
    Seegal

Maybe you are looking for

  • FI-AA reconci;lation- for year end closing(ABST2)

    Dear Team, This is with regard to Year end closure in Asset Accounting. we are using T.code ASBT2, which is giving the differences in FA and GL recon, can you suggest me the way to solve this Issue. I have tried the GL with FS10n and Assets report to

  • Tcode OAOR in View mode

    Hi everyone, I want to use the OAOR tcode, in only read mode, but, even I put act. 03 in al objects that's needed, however I can create, delete or modify documents on my society. I'm on SP BASIS 13, and my user only have the autorization to do OAOR,

  • Gallery is broke on 5800

    Just of recent, my gallary has decided to break. When i go into my images and video's, it doesnt show them, it only shows the download icons. But i know i had pictures and video's in there in the first place, cos they have decided to just go missing.

  • Adobe Premiere Elements 7.0 Files in video rendering misplaced.

    I wasen't sure where to post this, but i'm having trouble with Adobe Premiere Elements 7.0 While editing a video in this program, I can add multiple videos to my hearts content. It looks good. But when I render out my video, no matter what the format

  • CS5, Mac OSX 10.6.4 Synchronizing styles in book

    I can't seem to synchronize styles from a style source in an InDesign book in CS5. Is it me?