Automate

 View Only
  • 1.  Scales in Contract Create BAPI

    Posted 09-14-2020 20:05
    I've looked through the resources on the site and have not seen anything specific to scales in the standard Contract Create BAPI.  I'm not quite sure how to structure this to make it work.  I have a working script that'll create the contract and looping line items but when I try to nest another loop for the Scales at the line item it's being ignored.  I've pulled in all of the Quantity Scale fields (screen below) but not sure how to map the Number of Condition Record, Sequential number of condition and Current number of the line scale.  Anyone have experience with the correct settings?  Thanks!

    Josh



    ------------------------------
    Josh Bellingar | Technology Manager, Global Procurement
    Kellogg Corporation | 269-832-5696
    ------------------------------


  • 2.  RE: Scales in Contract Create BAPI

    Posted 09-15-2020 03:02
    Hi Josh,

    Could you precise your SAP version and the name of used BAPI.
    BR 
    Nicolas Delestrade
    BU Winshuttle Manager
    STMS Toulouse-Paris

    ------------------------------
    Nicolas Delestrade | Winshuttle Manager
    STMS | +33662566829
    ------------------------------



  • 3.  RE: Scales in Contract Create BAPI

    Posted 09-15-2020 08:05

    Hi Nicolas, here you go:

    SAP ECC 6.0 Release 701

    BAPI_CONTRACT_CREATE

    Thanks!

    Josh



    ------------------------------
    Josh Bellingar | Technology Manager, Global Procurement
    Kellogg Corporation | 269-832-5696
    ------------------------------



  • 4.  RE: Scales in Contract Create BAPI

    Posted 09-15-2020 08:08

    Actually, let me correct that (we use multiple instances at different version levels).  I'm working on this script in a cloud version of ECC with release numbers:

    SAP_BASIS - 731
    SAP_APPL - 606

    Let me know if that's what you needed, thanks!

    Josh



    ------------------------------
    Josh Bellingar | Technology Manager, Global Procurement
    Kellogg Corporation | 269-832-5696
    ------------------------------



  • 5.  RE: Scales in Contract Create BAPI

    Employee
    Posted 09-21-2020 10:43
    Hey Josh, 
    This documentation about advanced looping may help - it looks like you need 2 loops, one for line items, and another one for the scales per line item. 
    http://winshuttle-help.s3.amazonaws.com/studio/en/central-sap/help/12/Advanced-looping.htm

    You may also attach your script to this thread, so I (or others) can offer more feedback. 
    Jayasri

    ------------------------------
    Jayasri Varyani | solutions engineer
    Winshuttle North America |
    ------------------------------



  • 6.  RE: Scales in Contract Create BAPI

    Posted 09-24-2020 09:09
    Thanks Jayasri, I'm familiar with advanced looping.  Please see attached, the script is actually successful at loading a single line item and creating a contract (it will create multiple line items if I remove the mapping I've done for Qty scales).  Line is mapped to D for looping and the scales are mapped to D1 but I'm not quite sure of the settings - for instance, poking around SAP tables I know that the number of the condition record needs to come from SAP so I attempted to pull that down from SAP.  Any advice you can provide is appreciated, thanks.

    Josh

    ------------------------------
    Josh Bellingar | Technology Manager, Global Procurement
    Kellogg Corporation | 269-832-5696
    ------------------------------



  • 7.  RE: Scales in Contract Create BAPI

    Employee
    Posted 10-07-2020 17:57
    Hi Josh, 
    The BAPI documentation seems to suggest that you also need to map the table ITEM_CONDITION when you use the scale quantity or value tables. 
    I think that is what may be missing. 
    Before you check this -- Did your test work in SE37?
    If you have a working data set in SE37, it makes it easier to try the same in DIrect. Just my 0.02c. 
    BAPI documentation snippet


    ------------------------------
    Jayasri Varyani | SE
    Winshuttle North America |
    ------------------------------