BAPI_REQUISITION_CHANGE
Hii All,
We are using this bapi_requisition_change
here we are trying to change a multiple account assignment based on quantity to single account assignment
we are getting this error "With multiple acct. assignment, enter distribution indicator"
we have checked that distrib remains blank but still shows this error.
Regards
Hiren K.Chitalia
Hiren,
The error message is right.
If you doing a multiple account assignment then you should specify whether you are doing that on a % basis or on a quantity basis.
You cannot leave that blank.
Regards,
Ravi
Note : Please mark the helpful answers
Similar Messages
-
Error Message from BAPI_REQUISITION_CHANGE
Hi Guys.
I am getting an error message Sum of quantities >2< larger than total quantity.I saw some related threads from this forum.But not conclusive.
This error is from
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
number = prno
TABLES
requisition_items_old = i_bapieban_old
requisition_items_new = i_bapieban_new
return = i_bapireturn.
The Quantity in both i_bapieban_old and in i_bapieban_new is 1.
The PR has only one quantity.
I would like to know why this error arises.
Thanks in advance.CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
EXPORTING
number = prno
TABLES
requisition_items = i_bapieban
return = i_bapireturn.
READ TABLE i_bapieban WITH KEY preq_no = prno
preq_item = itab-bnfpo.
IF sy-subrc = 0.
MOVE-CORRESPONDING i_bapieban TO i_bapieban_old.
MOVE-CORRESPONDING i_bapieban TO i_bapieban_new.
i_bapieban_new-quantity = itab-clqty.
i_bapieban_new-short_text = itab-txz01.
APPEND i_bapieban_old.
APPEND i_bapieban_new.
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
number = prno
TABLES
requisition_items_old = i_bapieban_old
requisition_items_new = i_bapieban_new
return = i_bapireturn. -
Error message in BAPI_REQUISITION_CHANGE
Hi gurus .
I've got an error message :
Runtime Errors CALL_FUNCTION_UC_STRUCT
Exception CX_SY_DYN_CALL_ILLEGAL_TYPE
The reason for the exception is:
In the function "BAPI_REQUISITION_CHANGE", the STRUCTURE parameter
"REQUISITION_ITEMS_NEW" is typed in such a way
that only actual parameters are allowed, which are compatible in Uni
with respect to the fragment view. However, the specified actual
parameter " " has an incompatible fragment view.
Please , look at my code below . What is my problem ?
I don't see any error in data definition .
REPORT Z_CHANGE_REQ.
DATA : ZREQ TYPE BAPIEBAN-PREQ_NO VALUE '1000073060' ,
ZITEMO_TAB TYPE TABLE OF BAPIEBAN WITH HEADER LINE ,
ZITEMN_TAB TYPE STANDARD TABLE OF BAPIEBAN ,
LZITEMN_TAB TYPE BAPIEBAN ,
ZRETURN TYPE TABLE OF BAPIRETURN WITH HEADER LINE .
CLEAR : ZITEMO_TAB[] , ZITEMN_TAB[] , ZRETURN[] .
CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
EXPORTING
NUMBER = ZREQ
TABLES
REQUISITION_ITEMS = ZITEMO_TAB .
READ TABLE ZITEMO_TAB INDEX 1 .
CHECK SY-SUBRC = 0 .
LOOP AT ZITEMO_TAB .
MOVE-CORRESPONDING ZITEMO_TAB TO LZITEMN_TAB .
LZITEMN_TAB-C_AMT_BAPI = LZITEMN_TAB-C_AMT_BAPI * '0.95' .
APPEND LZITEMN_TAB TO ZITEMN_TAB.
ENDLOOP .
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
NUMBER = ZREQ
TABLES
REQUISITION_ITEMS_OLD = ZITEMO_TAB
REQUISITION_ITEMS_NEW = ZITEMN_TAB
RETURN = ZRETURN .
READ TABLE ZRETURN INDEX 1 .
Regards . Helenayou are wrong with the type of "ZITEMO_TAB and zitemn_tab"
it's should be typed of bapiebanv , not bapieban.
pls check.
tks. -
Alternative for BAPI_REQUISITION_CHANGE, to run this in update process.
Hi,
I'm using BAPI_REQUISITION_CHANGE, to change a purchase requisition Qty related to a purchase order. This Bapi is used in a report program which inturn is triggered by an output type, on Purchase Order creation.
Now, when this BAPI is executed, it ends up in dump saying "Invalid COMMIT WORK in an update function module".
The search criterion it gave was ..
"COMMIT_IN_POSTING" C
"SAPLBAPT" or "LBAPTU05"
"TRANSACTION_END"
And the error analysis as
Calling a COMMIT WORK in an update process is not allowed
because the function modules triggered in a Logical Unit
of Work cannot then be processed correctly.
This clearly shows that commit is being done inside the BAPI. Is there any other way that I can update Purchase Requisition Qty?
Thanks for your time on this.
Regards,
Srikanth PeriHi,
This issue is now resolved. I have found BAPI_PR_CHANGE and tried using it. It works perfectly in update mode.
Thanks and apologies for your time on this.
Regards,
Srikanth Peri -
Changing Material Number ON BAPI_REQUISITION_CHANGE!!!
Dear Gurus,
On BAPI_REQUISITION_CHANGE there is parameter name REQUISITION_ITEMS_OLD, on this parameter there was no item MATERIAL. I want to change this material when doing update (change). How could this BAPI doesn't support MATERIAL when doing update (change) ? Do you have any information about this? Thx for you help before.Hi John,
I took this part from BAPI documentation .
<i>The table contains the purchase requisition item with the changed values.
For more information on the individual parameter fields, see the data element documentation in the ABAP Dictionary.
Proceed as follows:
First enter all values from RequisitionsItemsOld in RequisitionItemsNew.
Then change the desired field values.
Ensure that all field that are not to be changed contain the values from the database.
Note
You cannot add any new items. The method only supports the changing of already existing items</i>
Please look for the documentation in BAPI for the other fields.
Hope this helps
Regards,
Caglar -
How to update zfields by using BAPI_REQUISITION_CHANGE for purchase requisi
Hi Experts,
There is a requirement to create a zfield in purchase requisition and i have appended zfileds in EBAN table.
How to update these zfields by using BAPI_REQUISITION_CHANGE, the requisition_items_new contain my zfileds and the lates values. but after executing this fields are not updated in EBAN table.
If i changed any quantity or any other fields, they are updated in successfully.
Please help to update the zfileds in Purchase requitiion.
Best Regards
ChaitanyaHi,
Refer the following SAP notes.
1. Note 485557 - BAPI_REQUISITION_CREATE: 'EXTENSIONIN' customer enhancements
2. Note 584902 - BAPI_REQUISITION_CHANGE: ExtensionIn not connected
3. Note 792132 - EBAN, EBKN: user-defined fields are not filled
Regards,
Harish -
How to use - BAPI_REQUISITION_CHANGE
Still no one has replied, I think you people couldn't understand my question..I repeat my question:
I need to use functional module : BAPI_REQUISITION_CHANGE to change the existing PR quantity and also to add new line items. But I dont know what are the parameters i need to pass to this FM ? Please help me out to resolve this issue
Thanks,
Kaarthick
Hii everybody,
I'm new to BAPI concepts. I have a requirement to use BAPI PR Change. So i need to know how to use this BAPI to change the PR quantity and also to add new line item for the PR.
Thanks in advance,
Kaarthick.VHi Kaarthick,
There is a simple process to find out the tables effected and to find out the fields . initially try to find out the tcode it is ME51 and then find out wht are the mandatory fields then goto function module where we can find it out in tcode Bapi-> heirarchial list-> materal management-> create->there in the rightside u can find the function module then double click on tht it will get u the bapi structure and if u want to know the tables effected u can find out by clickng on the busobject and click on the Keyfields u can find the key filed an dtable effected.
other ay to find fields is --> goto to tht functionmodule and test it ie run it thn u try to enter the values u can easily get the mandatory fields and code it.
u can check this sample code for clarififaction it is for POchange
u can do it for PR in this way but make sure u find the fields
<u>http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm</u>
Hope i hav answered it.
Regards,
Misbah Sultana. -
There is a PR needs to be updated.
I can update it with ME23n.
but when i use BAPI_REQUISITION_CHANGE to update.
it shows error as : Create account 5401xxxx for YYY/MM/DD as a cost element in control area XXX.
SO I maintain the cost element of account by FS00. it success.
My question is why I need to maintain the cost element when i execute BAPI_REQUISITION_CHANGE but ME23n need not.Hi
In the new version they have changed certain BAPI's for which you need to maintain certain fields constant(as required), in case of BAPI_REQUISITION_CHANGE the cost element has to be maintained.
These are the other few where you have to maintain certain things constant
Exit Name Description
LMR1M001 User exits in Logistics Invoice Verification
LMR1M002 Account grouping for GR/IR account maintenance
LMR1M003 Number assignment in Logistics Invoice Verification
LMR1M004 Logistics Invoice Verification: item text for follow-on docs
LMR1M005 Logistics Inv. Verification: Release Parked Doc. for Posting
LMR1M006 Logistics Invoice Verification: Process XML Invoice
MRMH0001 Logistics Invoice Verification: ERS procedure
MRMH0002 Logistics Invoice Verification: EDI inbound
MRMH0003 Logistics Invoice Verification: Revaluation/RAP
MRMN0001 Message output and creation: Logistics Invoice Verification
Possible useful BAPIs:
BAPI_GOODSMVT_CREATE
BAPI_GOODSMVT_RELEASE
BAPI_INCOMINGINVOICE_CREATE
BAPI_INCOMINGINVOICE_RELEASE
BAPI_PO_CHANGE
BAPI_PO_CREATE1
BAPI_REQUISITION_CHANGE
BAPI_MATERIAL_SAVEDATA
BTE:
MRM_PRELIMINARY_INVOICE
Reward if useul.
Regards
Divya -
BAPI_REQUISITION_CHANGE. where is the customer's data fields
hi all,
i need to use BAPI_REQUISITION_CHANGE to change PR's customer's tab fields but in the tables i didnt see the extended fields, how can i add these fields..Shashi,
Try this:
report z_po_req_create.
DATA : T_REQUISITION_ITEMS LIKE BAPIEBANC OCCURS 0 WITH HEADER LINE,
T_RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .
DATA : E_NUMBER LIKE BAPIEBANC-PREQ_NO.
T_REQUISITION_ITEMS-DOC_TYPE = 'NB'.
T_REQUISITION_ITEMS-DEL_DATCAT = '1'.
T_REQUISITION_ITEMS-DELIV_DATE = '20020626'.
T_REQUISITION_ITEMS-PLANT = 'P1'.
T_REQUISITION_ITEMS-STORE_LOC = '01'.
T_REQUISITION_ITEMS-PUR_GROUP = 'P01'.
T_REQUISITION_ITEMS-MAT_GRP = '01'.
T_REQUISITION_ITEMS-PREQ_ITEM = 1.
T_REQUISITION_ITEMS-MATERIAL = '1MAT1'.
T_REQUISITION_ITEMS-QUANTITY = 10.
T_REQUISITION_ITEMS-PREQ_NAME = '123456'.
T_REQUISITION_ITEMS-PURCH_ORG = '1000'.
T_REQUISITION_ITEMS-ACCTASSCAT = 'U' .
T_REQUISITION_ITEMS-VEND_MAT = 'G'.
APPEND T_REQUISITION_ITEMS.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
EXPORTING
SKIP_ITEMS_WITH_ERROR =
IMPORTING
NUMBER = E_NUMBER
TABLES
REQUISITION_ITEMS = T_REQUISITION_ITEMS
REQUISITION_ACCOUNT_ASSIGNMENT = T_REQ_ACCOUNT_ASSIGNMENT
REQUISITION_ITEM_TEXT =
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES =
REQUISITION_SRV_ACCASS_VALUES =
RETURN = T_RETURN
REQUISITION_SERVICES_TEXT =
EXTENSIONIN =
REQUISITION_ADDRDELIVERY =
IF NOT E_NUMBER IS INITIAL .
WRITE:/ 'REQ NO:' , E_NUMBER , 'CREATED'.
ELSE.
LOOP AT T_RETURN.
WRITE T_RETURN-MESSAGE.
ENDLOOP.
ENDIF.
Reddy -
BAPI_REQUISITION_CHANGE - SERVICES
Good Morning to All.
How do you change friends via BAPI items in the Services tab of a purchase requisition?
Today I do the following.
I use the BAPI_REQUISITION_GETDETAIL to retrieve existing information, then through external handle such information, the information can change using the Request BAPI_REQUISITION_CHANGE, but the tab in Services (based Activities) has no parameters to modify this Bapi.
Is there any other function to do this?
Ronaldo Nogueira.Hi,
unfortunately you can not use this BAPI for first point. Here is a quote from BAPI documentation
You cannot add any new items. The method only supports the changing
of already existing items.
Point 2 should not be a problem. Just read BAPI documentation how to do it. Basically you should call BAPI_REQUISITION_GETDETAIL and fill structures with data from this BAPI. Then just modify required fields and call your BAPI.
I am not sure if you can change header text with this BAPI.
Cheers -
BAPI_REQUISITION_CHANGE please suggest the mandatory fields.
I am using the Bapi_requisition_change in se 37 .
i am inputting the following parameters
NUMBER 10032908
REQUISITION_ITEMS_OLD
REQUISITION_ITEMS_NEW
REQUISITION_ACCOUNT_OLD
REQUISITION_ACCOUNT_NEW.
but following error is coming while executing the fs.
Data in REQUISITION_ITEM_OLD for item 00010 does not correspond to current database status
and also please suggest the mandatory fields for this bapiShashi,
Try this:
report z_po_req_create.
DATA : T_REQUISITION_ITEMS LIKE BAPIEBANC OCCURS 0 WITH HEADER LINE,
T_RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .
DATA : E_NUMBER LIKE BAPIEBANC-PREQ_NO.
T_REQUISITION_ITEMS-DOC_TYPE = 'NB'.
T_REQUISITION_ITEMS-DEL_DATCAT = '1'.
T_REQUISITION_ITEMS-DELIV_DATE = '20020626'.
T_REQUISITION_ITEMS-PLANT = 'P1'.
T_REQUISITION_ITEMS-STORE_LOC = '01'.
T_REQUISITION_ITEMS-PUR_GROUP = 'P01'.
T_REQUISITION_ITEMS-MAT_GRP = '01'.
T_REQUISITION_ITEMS-PREQ_ITEM = 1.
T_REQUISITION_ITEMS-MATERIAL = '1MAT1'.
T_REQUISITION_ITEMS-QUANTITY = 10.
T_REQUISITION_ITEMS-PREQ_NAME = '123456'.
T_REQUISITION_ITEMS-PURCH_ORG = '1000'.
T_REQUISITION_ITEMS-ACCTASSCAT = 'U' .
T_REQUISITION_ITEMS-VEND_MAT = 'G'.
APPEND T_REQUISITION_ITEMS.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
EXPORTING
SKIP_ITEMS_WITH_ERROR =
IMPORTING
NUMBER = E_NUMBER
TABLES
REQUISITION_ITEMS = T_REQUISITION_ITEMS
REQUISITION_ACCOUNT_ASSIGNMENT = T_REQ_ACCOUNT_ASSIGNMENT
REQUISITION_ITEM_TEXT =
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES =
REQUISITION_SRV_ACCASS_VALUES =
RETURN = T_RETURN
REQUISITION_SERVICES_TEXT =
EXTENSIONIN =
REQUISITION_ADDRDELIVERY =
IF NOT E_NUMBER IS INITIAL .
WRITE:/ 'REQ NO:' , E_NUMBER , 'CREATED'.
ELSE.
LOOP AT T_RETURN.
WRITE T_RETURN-MESSAGE.
ENDLOOP.
ENDIF.
Reddy -
BAPI_REQUISITION_CHANGE Price
Hi,
I try to use BAPI_REQUISITION_CHANGE to change price of my PREQ and I have always this message "Data in REQUISITION_ITEM_OLD for item 00010 does not correspond to current database status".
Do I have to fill all the field in the requisition_items_old or just the field I want to change.....
Does somebody already use this BAPI and can help me
Best regards
Andrebefore calling BAPI_REQUISITION_CHANGE you should read current data into ITEM (requisition_items and requisition_account_assignment).to do so :
data:
prnum TYPE bapieban-preq_no ,
i_pritem LIKE bapieban OCCURS 0 WITH HEADER LINE ,
i_acc LIKE bapiebkn OCCURS 0 WITH HEADER LINE ,
pritem LIKE bapiebanv OCCURS 0 WITH HEADER LINE ,
pritem_new LIKE bapiebanv OCCURS 0 WITH HEADER LINE ,
req_acc_old LIKE bapiebknv OCCURS 0 WITH HEADER LINE ,
req_acc_new LIKE bapiebknv OCCURS 0 WITH HEADER LINE
CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
EXPORTING
number = prnum
account_assignment = 'X'
ITEM_TEXTS = ' '
SERVICES = ' '
SERVICE_TEXTS = ' '
TABLES
requisition_items = i_pritem
requisition_account_assignment = i_acc
REQUISITION_TEXT =
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES =
REQUISITION_SERVICES_TEXTS =
REQUISITION_SRV_ACCASS_VALUES =
RETURN =
know you have data in internal tables and you can change these tables, you can loop in tables , but before change data MOVE these tables into New tables :
MOVE-CORRESPONDING i_pritem TO pritem .
MOVE-CORRESPONDING i_pritem TO pritem_new .
NOTE: dont change data in pritem ,just change pritem_new because we want to call BAPI_REQUISITION_CHANGE and we will send pritem_new and pritem.BAPI_REQUISITION_CHANGE will read pritem_new to change PR items.
also for account assingment:
MOVE-CORRESPONDING i_acc TO req_acc_old .
MOVE-CORRESPONDING req_acc_old TO req_acc_new.
APPEND req_acc_old.
" CHANGE VALUE IN req_acc_new (NOT IN req_acc_old)
req_acc_new-funds_ctr = 1000.
req_acc_new-cmmt_item = 482000.
append req_acc_new.
NOW CALL bapi fm -
DATA: c_x LIKE bapita-wait .
c_x = 'X'.
DATA:ret TYPE TABLE OF bapiret2 WITH HEADER LINE .
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
number = prnum
TABLES
requisition_items_old = pritem
requisition_items_new = pritem_new
requisition_account_old = req_acc_old
requisition_account_new = req_acc_new
REQUISITION_TEXT_OLD =
REQUISITION_TEXT_NEW =
return = ret
break rrostami.
READ TABLE ret INTO ret WITH KEY type = 'E' .
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
ENDIF. -
BAPI_REQUISITION_CHANGE error message
Hi.
I'm trying insert a Purchase Requisition Item - and the Accounts related - using the BAPI_REQUISITION_CHANGE.
The problem is that I'm getting this error - translating the message from portuguese to english:
"Item 00020 doesn't exist and can't be created"
Has anybody already faced this error?
Thanks in advance.
Tiago.By debugging the BAPI I've noticed that it doesn't regard new Purchase Requisition Items.
I think to be necessary to use another BAPI.
Does anyone know any BAPI for that purpose?
Thanks in advance.
Tiago.
Message was edited by:
Tiago Santos -
Problem in BAPI_REQUISITION_CHANGE
Hi Experts ,
Pls.help me regarding in using BAPI_REQUISITION_CHANGE. after excuting , i m getting the messeage like ' data in requistion_item_old for item 00010 does not correspond to current database status'
Pls.help me wt i need .
Regards
kiranCan you check the number range for item level, it is not 00010, it may be 00100 or 01000
-
Error while using BAPI_REQUISITION_CHANGE
Hello All,
I am using the bapi BAPI_REQUISITION_CHANGE, to change the quantity for the PR number.
Currently I am passing the following details:-
PR number in importing parameters
PR line item,
Storage Location,
Material Group,
Quantity, and
UOM
both in tables REQUISITION_ITEMS_OLD and REQUISITION_ITEMS_NEW
But I have changed the quantity field value.
When I execute it gives a message in table RETURN:
Data in Data in Data in REQUISITION_ITEM_OLD for item 00001 does not correspond to current database status
Am I missing some of the parameter values that needs to passed as input...??
Please help..!!
Thanks & Regards,
Tarun GambhirHi Tarun,
Try with the foloowing code.
data: lt_item_old TYPE STANDARD TABLE OF bapiebanv,
ls_item_old TYPE bapiebanv,
lt_item_new TYPE STANDARD TABLE OF bapiebanv,
ls_item_new TYPE bapiebanv.
data: iebantx_new LIKE bapiebantx OCCURS 0 WITH HEADER LINE,
iebantx_temp LIKE bapiebantx OCCURS 0 WITH HEADER LINE.
DATA: lt_bapi_return TYPE STANDARD TABLE OF bapireturn.
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
number = p_banfn
TABLES
requisition_items_old = lt_item_old
requisition_items_new = lt_item_new
requisition_text_old = iebantx_temp
requisition_text_new = iebantx_new
return = lt_bapi_return.
U have to pass the above fields.
Thanks,
Sreekala.
Maybe you are looking for
-
ACE30: Setting timezone issue
Hi Guys, This would seem trivial however I can't seem to set the appropriate timezone as indicated below: Trying to set the timezone on our ACE30 modules (running A5(1.2): clay1-ace/Admin(config)# clock timezone AEST +10
-
Open a several sessions in the same port 22224
i want to receave a severel streams from 3 PC in the same port 22224 using a several sessions of this port(22224). it's possible?and how? how i can know the source of the sender of stream (ip adresse for exemple)?. thinks a lot.
-
Unit tests: more than one startup (teardown) process
Whether I can create more than one startup (teardown) process? Mike
-
Hot Backup cloning vs Cold Backup CLoning
Hi, when we do cold backu cloning...we get same data as production database.. when we do hot backup cloning..i think we will loose current transactions which are recorded in redo log and not archived ....am i right????? when we do hot backup cloning.
-
Snapshot function doesn't works in APEX 9.3.2, if the Aero Design is turned on
Hello, the Snapshot function doesn't works in APEX 9.3.2, if the Aero Design is turned on. Once you click on tools > Snapshot > raster, the window where the displayed 3D model will be white. The same happens when you click on the taskbar. There one