Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Blanket PR Creation

former_member599943
Participant
0 Kudos
239

Hi Experts,

I am using BAPI_REQUISITION_CREATE to create blanket requisition. Blanket requisition is successfully created but the 'LIMITS' data are not stored into the particular Blanket PR.

Below is my coding, any mandatory fields or indicators I left during Blanket PR creation?

*===Item===
    PR_ITEM-PREQ_ITEM  = '1'.    "<--Item Number>
    PR_ITEM-PUR_GROUP  = 'C02'.    "<--Purchasing Group (Department)
    PR_ITEM-SHORT_TEXT = 'BLANKET'.    "<--Short Text
*    PR_ITEM-FIXED_VEND = GT_DATA-FLIEF.    "<--Fixed Vendor
    PR_ITEM-DES_VENDOR = '001CDO0001'.    "<--Desired Vendor
    PR_ITEM-DELIV_DATE = '20090129'.    "<--Delivery Date
    PR_ITEM-DOC_TYPE   = 'ZPR4'.    "<--Document Type
    PR_ITEM-ACCTASSCAT = 'K'.    "<--Account Assignment Category
*    PR_ITEM-QUANTITY   = '1'.    "<--Quantity
*    PR_ITEM-UNIT       = 'AU'.    "<--UoM
    PR_ITEM-MAT_GRP    = '100'.    "<--Material Group
    PR_ITEM-PLANT      = '1101'.    "<--Plant
*    PR_ITEM-C_AMT_BAPI = '1000'.    "<--Valuation Price
*    PR_ITEM-CURRENCY   = 'MOP'.    "<--Currency
    PR_ITEM-ITEM_CAT   = '1'.    "<--Item Category

    APPEND PR_ITEM.
    CLEAR PR_ITEM.

*===Account Assignment===
    PR_ACCOUNT-COST_CTR  = '0001430101'.  "<--Cost Center
    PR_ACCOUNT-G_L_ACCT  = '0008510002'.
    APPEND PR_ACCOUNT.
    CLEAR  PR_ACCOUNT.

*===Limits===
    PR_LIMIT-EXP_VALUE  = '1000.0'.
    PR_LIMIT-LIMIT      = '1000.0'.
    APPEND PR_LIMIT.
    CLEAR  PR_LIMIT.

  CALL FUNCTION 'BAPI_REQUISITION_CREATE'
    IMPORTING
      NUMBER                         = PR_NO
    TABLES
      REQUISITION_ITEMS              = PR_ITEM
      REQUISITION_ACCOUNT_ASSIGNMENT = PR_ACCOUNT
      REQUISITION_LIMITS             = PR_LIMIT
*      REQUISITION_SERVICES           = PR_SERVICE
*      REQUISITION_SRV_ACCASS_VALUES  = PR_SRV_ACCASS_VAL
      RETURN                         = PR_RETURN.

thank you.

Best Regards,

Weng

1 REPLY 1

Former Member
0 Kudos
50

hi

try calling BAPI_TRANSACTION_COMMIT after you have used BAPI_REQUISITION_CREATE

hope this helps

regards

Aakash Banga