2009 Jun 08 10:17 AM
Dear All,
I am using BAPI_REQUISITION_CHANGE for change some requisition value say quantity or delivery date.
I am passing requisition number as well as all required data in BAPI.But I am not getting desired output.
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
NUMBER = it_data-pr_no
TABLES
REQUISITION_ITEMS_OLD = it_data
REQUISITION_ITEMS_NEW =
REQUISITION_ACCOUNT_OLD =
REQUISITION_ACCOUNT_NEW =
REQUISITION_TEXT_OLD =
REQUISITION_TEXT_NEW =
RETURN = BAPI_RETURN
Above is the code that I have written in my program.
Could you tell me is it right or what should I do for desired output.
Regards,
Amar
2009 Jun 08 10:25 AM
Hello
You must fill table REQUISITION_ITEMS_OLD with old data and
table REQUISITION_ITEMS_NEW with new data.
Than:
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
NUMBER = it_data-pr_no
TABLES
REQUISITION_ITEMS_OLD = old_data_table
REQUISITION_ITEMS_NEW = new_data_table
RETURN = BAPI_RETURN
2009 Jun 08 10:22 AM
Hi Aman,
you make sure you are passing all mandatory field of this BAPI and also updation flag as 'X' for date and quantity if exist in bapi structure.
Thanks
Mohit
2009 Jun 08 10:25 AM
Hello
You must fill table REQUISITION_ITEMS_OLD with old data and
table REQUISITION_ITEMS_NEW with new data.
Than:
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
NUMBER = it_data-pr_no
TABLES
REQUISITION_ITEMS_OLD = old_data_table
REQUISITION_ITEMS_NEW = new_data_table
RETURN = BAPI_RETURN
2009 Jun 08 10:52 AM
Hi,
How can it possible to pass old data ,means I have to change mass data from uploaded file.
Could you guide me.
Regards,
Amar
2009 Jun 08 11:03 AM
Hello
You must to use BAPI_REQUISITION_GETDETAIL for fill old status.
Then fill new status from file.
And then call BAPI_REQUISITION_CHANGE
2009 Jun 08 11:50 AM
Hi,
Thanks for your support.....thru BAPI_REQUISITION_GETDETAIL I got REQUISITION_ITEMS_OLD and I passed the data to REQUISITION_ITEMS_NEW through file.
But still it is not getting desired output.
Regards,
AMAR
2009 Jun 08 12:09 PM
2009 Jun 08 11:16 AM
Please make sure that you are passing updation flags as 'X' for all the fields for which you want to update data.
Also, call transaction BAPI_TRANSACTION_COMMIT so that data is updated in tables.
2009 Jun 08 11:20 AM
Hi Swati,
Could you please tell me how can I Pass updation flag in BAPI, Bcoz there is no option for updation flag.
Regards,
AMar
2009 Jun 08 12:08 PM
Hi Amar,
In this BAPI, you have to ensure that all fields for which you do not want to change the data should have the same values as in database. To ensure this, do the following:
1. First enter all values from RequisitionsItemsOld in RequisitionItemsNew(Like u use lt_re_item_new[] = lt_re_item_old[]).
2. Then change the desired field values of requisition_items_new.
Ensure that all field that are not to be changed contain the values from the database.
Please go through the function module documentation for more clarification.
I hope it helps you.