cancel
Showing results for 
Search instead for 
Did you mean: 

how to use BAPI_REQUISITION_CHANGE?

Former Member
0 Kudos

How come it can't find the PR_NO that I created (though it's already in the dbase)? Do I have to fill up the old & new requisition? What if Ii'm going to change just 1 field, like the Delivery date?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hai Maui Bayog

Check with the SAP Standard Program 'RBUS2105'

CALL FUNCTION 'BAPI_REQUISITION_CHANGE'

EXPORTING

number = object-key-number

TABLES

return = return

requisition_text_new = requisitiontextnew

requisition_text_old = requisitiontextold

requisition_account_new = requisitionaccountne

requisition_account_old = requisitionaccountol

requisition_items_new = requisitionitemsnew

requisition_items_old = requisitionitemsold

EXCEPTIONS

OTHERS = 01.

Thanks & Regards

Sreenivasulu P

Former Member
0 Kudos

Hi,

Can you explain a little more in detail what exactly are you trying to do?

You don't have to pass the new PR no as you are not changing the PR no. But you will have to pass a flag for each field you are changing.

What is the error?

Regards,

Ravi

Former Member
0 Kudos

Thanks guys!

The PR number that I used in BAPI_REQUISITION_CHANGE is already existing in the dbase. You were saying that I'll just put an flag/ indicator (like X) in the field. Meaning, I don't need to put the data to replace the existing record?

And also in BAPI_REQUISITION_DELETE.

The return message was like 'The PR number '10000241' was successfully changed'. Supposedly, it should be deleted. There are 3 fields to be input. PR_number (I think), delete indicator and closed. I don't know what it means. I just put an X for DELETE and CLOSED but still returns the same message.

Former Member
0 Kudos

Hi,

For Change -

You just will have to pass the old and new values. Ignore my comment about the flag, as I was thinking of the PO BAPI, where you need to set a flag for each field you are changing.

For Delete -

From a SAP perspective, the data is not getting deleted from the database, but it just sets a deletion indicator, which is nothing but a change to the PR. That is why that message of "PR CHANGED". As long as you are able to see the deletion indicators on the PR, you should be OK.

Regards,

Ravi

Note - Please mark all the helpful answers

Former Member
0 Kudos

PR_CHANGE:

I already made a new record. But still it doesn't recognized my PR number. It says "Purchase requisition 0010000241 does not exist." Would it be better to use BDC? Or the BAPI_REQUISITION_DELETE as alternative for PR_CHANGE since technically, it change the data.

Former Member
0 Kudos

Well, You cannot use BAPI_REQUISITION_DELETE for changing as it does not have the relevant parameters.

BAPI_REQUISITION_CHANGE should still work. Can you debug the standard function and find out why its not able to find the requisition. May be its looking for some specific value in a parameter, which you are not passing.

I suggest you debgu and find out.

BDC : You cannot write a BDC on ME52n as its a enjoy transaction - so you have to go back to ME52.

Regards,

Ravi

Note : Please mark all the helpful answers