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: 

purchase requisition update

Former Member
0 Kudos

Hi expert,

I have to modify le status in purchase requisition, so in other word only the field 'EBAN-BLCKD'.

Wich Bapi can I use ?

I tried ME_UPDATE_REQUISITION. In the field I putted the entire line of eban, ( and BLCKD modified )

but not run.

I tried BAPI_PR_CHANGE but I don't know wich parameters have to pass ....

some idea ????

tks a lot,

bye....

10 REPLIES 10

Former Member
0 Kudos

Hi,

Try BAPI_REQUISITION_CHANGE.

You just need to pass the PR number and the fields to update.

Regards,

Gilberto Li

Edited by: Gilberto Li on Feb 26, 2009 6:21 PM

0 Kudos

I tried with BAPI_PR_CHANGE and i returned this error

3 I ME 664

Impossible d'effectuer la modification BNFPO

00000 BNFPO

any idea ???

0 Kudos

Hi,

Did you pass the item number you want to modify?

BNFPO = Item number.

Regards,

Gilberto Li

0 Kudos

yes, i think is mandatory.... but in the 2° table ( it_pritemx ) I pass also the n°item but without 'X'...

0 Kudos

Hi,

You need to pass the X so the function takes the value. Otherwise would be like if you didn't fill anything in BNFPO.

Regards,

Gilberto Li

0 Kudos

solved by BAPI_PR_CHANGE.

0 Kudos

Hi Roberto,

How did you solve the problem with BAPI_PR_CHANGE.

I have exactly the same problem.

I have a PR with 2 items 00010 and 00020.

I want to block item 00010 but filling

PRITEM with 00010 for PREQ_ITEM and 1 for REQ_BLOCKED

PRITEMX with 00010 for PREQ_ITEM and X for REQ_BLOCKED

does not seem to block the first item in the PR.

I also added BAPI_TRANSACTION_COMMIT but I don't succeed in blocking the first item.

Could you please help me out and indicate which fields I have to fill in which tables.

Thanks

0 Kudos

Hello,

I can check my solution later, tomorrow night. Now i can't have access to the system ...

0 Kudos

Hi Roberto,

Did you already find the time to check your solution please?

Thanks very much for helping me out.

Marina

0 Kudos

Alright, so I know it's an old post, but for future reference...

I managed to update using the following:

REPORT  YPDTST_PREQ_UPDATE.

data: l_banfn type banfn VALUE '0010209265'.

data: w_MEREQ_ITEM type MEREQ_ITEM,

      t_MEREQ_ITEM type TABLE OF MEREQ_ITEM,

      w_MEREQ_ITEMx type MEREQ_ITEMx,

      t_MEREQ_ITEMx type TABLE OF MEREQ_ITEMx,

      t_bapiret2 type TABLE OF bapiret2.

w_MEREQ_ITEM-BNFPO = '00010'.

w_MEREQ_ITEMx-BNFPO = '00010'.

w_MEREQ_ITEM-blckd = '1'.

w_MEREQ_ITEMx-blckd = 'X'.

append w_mereq_item to t_mereq_item.

append w_mereq_itemx to t_mereq_itemx.

CALL FUNCTION 'FMFG_MM_REQ_CHANGE'

  EXPORTING

    IM_BANFN              = l_banfn

  TABLES

    RETURN                = t_bapiret2

    IM_MEREQ_ITEM         = t_mereq_item

    IM_MEREQ_ITEMX        = t_mereq_itemx.

commit WORK AND WAIT.