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: 

Problem while using BAPI_REQUISITION CHANGE

Former Member
0 Kudos
142

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
94

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

9 REPLIES 9

Former Member
0 Kudos
94

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

Former Member
0 Kudos
95

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

0 Kudos
94

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

0 Kudos
94

Hello

You must to use BAPI_REQUISITION_GETDETAIL for fill old status.

Then fill new status from file.

And then call BAPI_REQUISITION_CHANGE

0 Kudos
94

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

0 Kudos
94

Hello

Paste your code here ...

Former Member
0 Kudos
94

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.

0 Kudos
94

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

0 Kudos
94

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.