on 03-21-2011 11:45 PM
Friends,
I am working on Custom WDA using AIF to create Purchase Requisitions.
I am calling the BAPIs - 'BAPI_REQUISITION_CREATE' and 'BAPI_TRANSACTION_COMMIT' using CALL FUNCTION.
I passed the item values to zitab and called the function module.
Here is the code:
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
EXPORTING
SKIP_ITEMS_WITH_ERROR = 'X'
AUTOMATIC_SOURCE = 'X'
IMPORTING
NUMBER = number
TABLES
REQUISITION_ITEMS = zitab
REQUISITION_ACCOUNT_ASSIGNMENT =
REQUISITION_ITEM_TEXT =
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES =
REQUISITION_SRV_ACCASS_VALUES =
RETURN = zbapireturn
REQUISITION_SERVICES_TEXT =
REQUISITION_ADDRDELIVERY =
EXTENSIONIN =
.
I am getting the following error messages from BAPI_REQUISITION_CREATE:
1. Message type - E
Code - W5069
Message - Please also pass on a unit of measure for the quantity
2. Message type - E
Code - W5002
Message - No items exist (not possible to save)
Here are the relevant details:
System - SAP ECC 6.0 EhP4
Adobe Livecycle Designer version - 8.1.2.4246.1.597341
ADS version - 802.20100318013254.656549
I found this link that is relevant to the second error, thought the solution is not provided:
I would appreciate any hints or thoughts on how to get these errors rectified.
Regards,
Arun.
I am closing this thread, as my original question about the BAPI has been answered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Learner,
My suggestion is first goto SE37 and execute that BAPI, and check it is working or not with that data.
After that pass same fields as inputs in call function it will work.
Message - Please also pass on a unit of measure for the quantity - you have to pass unit also for that quantity.
Message - No items exist (not possible to save) - i think no items for perticular number.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Kris for your reply.
I was able to rectify the 2 errors.
I need to update 5 custom fields in the CI_EBANDB include in the EBAN table. I am using the EXTENSIONIN parameter.
Here is my code:
data: wa_bapiextn type bapiparex,
zbapiextn type table of bapiparex.
wa_bapiextn-structure = 'CI_EBANDB'.
wa_bapiextn-VALUEPART1 = 'A'.
wa_bapiextn-VALUEPART2 = 'B'.
wa_bapiextn-VALUEPART3 = 'C'.
wa_bapiextn-VALUEPART4 = 'D'.
append zstruct to zitab.
append wa_bapiextn to zbapiextn.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
* EXPORTING
* SKIP_ITEMS_WITH_ERROR = 'X'
* AUTOMATIC_SOURCE = 'X'
IMPORTING
NUMBER = number
TABLES
REQUISITION_ITEMS = zitab
* REQUISITION_ACCOUNT_ASSIGNMENT =
* REQUISITION_ITEM_TEXT =
* REQUISITION_LIMITS =
* REQUISITION_CONTRACT_LIMITS =
* REQUISITION_SERVICES =
* REQUISITION_SRV_ACCASS_VALUES =
RETURN = zbapireturn
* REQUISITION_SERVICES_TEXT =
* REQUISITION_ADDRDELIVERY =
EXTENSIONIN = zbapiextn
.
The custom fields are not getting updated. I would greatly appreciate any hints on how to get these custom fields updated.
Regards,
Arun.
Hi Kris,
The APPEND ZSTRUCT TO ZITAB statement is to hold the item values for the 'REQUISITION_ITEMS' parameter.
The message in the RETURN Parameter is:
"Purchase requisition number <PR number> created."
But still, the custom fields in CI_EBANDB include are not getting updated.
I would greatly appreciate any hints or thoughts on how to get these custom fields updated.
Regards,
Arun.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.