Application Development and Automation 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: 
Read only

Change Purchase Requisition Delivery Address Via Function Module/ BAPI

Former Member
0 Likes
1,989

Dear Experts,

Is there any function module/ bapi to update Purchase Requisition's Delivery Address?

Thanks.

Tee

1 ACCEPTED SOLUTION
Read only

mvoros
Active Contributor
0 Likes
1,272

Hi,

I am not sure but maybe you can do it via BAPI BAPI_ADDRESSORG_CHANGE. This is a generic BAPI to change address of various BOR objects. You need to enter correct BOR object type. These object types are defined in the table TOJTB. You can see that object type BUS2105 corresponds to purchase requisition. I would start with BAPI BAPI_ADDRESSORG_GETDETAIL. I would pick one pur. req. and try to test it with this BAPI. I would set parameter OBJ_TYPE to BUS2105 and OBJ_ID to pur. req. number. If you get a correct address then you should be able to use BAPI BAPI_ADDRESSORG_CHANGE to change this address as well. I don't have access to the system with pur. requisition so I haven't tested it.

Cheers

Dear Experts,

Is there any function module/ bapi to update Purchase Requisition's Delivery Address?

Thanks.

Tee

3 REPLIES 3
Read only

mvoros
Active Contributor
0 Likes
1,273

Hi,

I am not sure but maybe you can do it via BAPI BAPI_ADDRESSORG_CHANGE. This is a generic BAPI to change address of various BOR objects. You need to enter correct BOR object type. These object types are defined in the table TOJTB. You can see that object type BUS2105 corresponds to purchase requisition. I would start with BAPI BAPI_ADDRESSORG_GETDETAIL. I would pick one pur. req. and try to test it with this BAPI. I would set parameter OBJ_TYPE to BUS2105 and OBJ_ID to pur. req. number. If you get a correct address then you should be able to use BAPI BAPI_ADDRESSORG_CHANGE to change this address as well. I don't have access to the system with pur. requisition so I haven't tested it.

Cheers

Read only

Former Member
0 Likes
1,272

Martin,

Thanks for your reply.

I have got the answer.

It's the BAPI_PR_CHANGE.

Thanks again.

Tee

Read only

0 Likes
1,272

Hi Fooklin Tee,

I am trying to update the Delivery address details of a purchase requisition by using the BAPI BAPI_PR_CHANGE, For this bapi i am passing the Address details to PRADDRDELIVERY component , Purchase requisition item details to PRITEM Details and the Purchase requisition number to Number Field.But the Delivery address is not getting updated.and i am also not getting any Error mesages into Return.I have even called the BAPI_Transaction_commit BAPI after Our BAPI, but not much use.Can you please help me in how to update the Purchase requisition using the BAPI_PR_CHANGE.Please let me know are there any other mandatory parameters i am missing to pass to the BAPI.