cancel
Showing results for 
Search instead for 
Did you mean: 

use of bapi_po_change

Former Member
0 Kudos

Hi,

I want to use BAPI_PO_CHANGE to change my PO.

here I want to pass mseg-mblnr and mseg-bwart i.e. no of material document and movement type respectively.

But didn't found any import field or table to pass both these fields.

can anyone help me on this .?

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

is it possible to change service PO data using bapi_po_change .?

I found in its documentation that its not possible. It requires to implement sap note 561507.But I am unable to implement this note on my system. So is any alternative there for this note.?

JL23
Active Contributor
0 Kudos

If your SAP system is not located in a museum then you should already be far beyond the validity of this OSS note, which means the changes are already in your system and no need to do any manual implementation of this note.

And then the other part of the question is as well obsolete as the note itself explains that service orders can be changed with this BAPI.

Former Member
0 Kudos

Hi,

What is the mapping field for ESLL-ACT_MENGE in BAPI_PO_CHANGE.

I want to move the value this field to quantity field of PO through BAPI.

Thanks,

Hrishikesh

Former Member
0 Kudos

hi,

I have solved all errors. But still unable to change PO. Getting message that 'Function change Purchase order' performed in test run.

What to do in this case.?

Thanks and regards.

Hrishikesh Vaishampayan

JL23
Active Contributor
0 Kudos

if SAP issues a message that you are running the BAPI as test run, then you have probably moved an X into the parameter for test run, so the reaction would be not to activate this test run indiator, isn't it?


Former Member
0 Kudos

hi.

I was moving X into all fields of change parameter tables. Now when I tried without moving X in all fields. Instead I am moving it only few required fields only. But still I am getting same message that function performed in test run along with one more message that 'No data changed' with message type 'S' and message ID and number as 06 and 022 respectively.

Thanks

BijayKumarBarik
Active Contributor
0 Kudos

Hi,

Your purchase order is already created and you are changing purchase order with BAPI.

What you are trying change in your PO and your PO is at what stage- Are your PO is completly open or PO is partially GR done or PO is partially invoice completed?

Regards,

Biju K

Former Member
0 Kudos

hi Bijay,

I want to change QUANTITY field in POSERVICES table.

My PO is partially GR done.

Thanks,

BijayKumarBarik
Active Contributor
0 Kudos

Hi,

Where you want change QUANTITY in service PO ...ie.....In Item Overview or in Item Detail?

Partially GR done for service PO but how much GR completed. Share your PO with PO history screens.

Regards,

Biju K

Former Member
0 Kudos

Hi,

Use the FM to commit BAPI_TRANSACTION_COMMIT along with your FM. This will update the PO.

Rgds,

Nayeem.

Former Member
0 Kudos

hi,

I tried your suggestion. But no effect. Still getting same message that function performed in test run.

thanks.

Hrishikesh

Former Member
0 Kudos

hi,

same bapi when I used with service PO is giving errors, saying to enter material number or account assignment category and delivery. but after entering both values also its giving same error.

I am taking account assignment category from EKPO-KNTTP and delivery date from EKET-EINDT.

and moving both them to POITEM-ACCTASSCAT and POSCHEDULE-DELIVERY_DATE.

is it ok.? or should I try something different.?

Former Member
0 Kudos

Hi,

For service PO you may need to enter the service line items in below tables of FM BAPI_PO_CHANGE.

Please keep in mind that you are doing the transaction ME22N through FM, You may need to enter all fields which you enters in ME22N T code.

POSERVICES

POSRVACCESSVALUES

Rgds,

Nayeem.

Former Member
0 Kudos

hi ,

I entered line no in POSERVACCESSVALUES table. But then also I am getting following errors.

BAPI        003     Instance 5200000195 of object type purchase order couldn't be changed,

MEPO     000     Purchase order still contains faulty items

ME          658     please also populate interface parameter POITEMX (this is warning)

06            026     Please enter material number or account assignment category

MEPO     042     Please enter a delivery date

Thanks

JL23
Active Contributor
0 Kudos

Can you do in ME22N what you want to do with the BAPI?

the BAPI is not meant to enhance functionality, it is meant to give you a chance to get almost the same functionality as in the online transaction via a call from own programs, maybe even from outside SAP.

Better explain what you actually want to achieve.

Former Member
0 Kudos

hi,

as explained above I want to make expo-menge = mseg-erfmg. And to do this I want to pass MBLNR, ERFMG and BWART fields of MSEG table.

thanks,

Former Member
0 Kudos

Hi,

BAPI_PO_CHANGE contains fields all fields related to PO header and line item. The fields which you are looking are from goods movement BAPI, as explain by Mr. Jurgen, you need to write framework program before calling BAPI_PO_CHANGE. Basically if you want to short close PO via reducing quantity equal to receipt quantity, then first read (sum) receipt quantity from EKBE table and then pass that quantity along with PO number to BAPI_PO_CHANGE and modify the PO.

Regards,

Former Member
0 Kudos

Dear Hrishikesh,

BAPI_PO_CHANGE is to modify the PO, but where as you are looking for field which are from MSEG table. Can you please explain the requirement?

Because with GRN document & movement type as input parameter you can not access PO using BAPI_PO_CHANGE.

Regards,

Former Member
0 Kudos

hi Sandip,

I want to make mseg for the purpose of closing PO by making ekpo-menge = mseg-erfmg.

This is the logic which I am applying here. that's why I want to pass mseg-mblnr, mseg-erfmg and mseg-bwart.

thanks,

JL23
Active Contributor
0 Kudos

SAP does not  do that for you, this check  has to be done earlier in your framework program before you call the BAPI to submit the new order quantity.

Instead of going to MSEG  it would be enough to look into EKBE, and do not forget than one PO can have several partial receipts.

Former Member
0 Kudos

But, if I will perform my check before calling BAPI then where should I pass to MBLNR and BWART.? What are the mapping fields in BAPI_PO_CHANGE for both these fields.?

JL23
Active Contributor
0 Kudos

Nowhere, what do you want achieve with passing that info?

If you want create a movement then you have to use a different BAPI, if you want update a PO then you don't need movements.

Former Member
0 Kudos

then what should I do with MBLNR.?

JL23
Active Contributor
0 Kudos

What should I do with a tractor?

You see this question does not make sense without background.

It was already said that the BAPI cannot do more than the ME22N transaction.

So tell me what you do with MBLNR in the ME22N transaction.