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

Error in Bapi : Change Purchase Requisition

Former Member
0 Likes
756

Dear All,

We have requirement where we need to update the Purchase Requisition Quanity.

For this purpose, I am using Bapi '/AFS/CHANGE_AFS_PR_DATA'.

In this I want to change Sheduled Qty. (AFS Grid Qty.), but I m getting error like

"Line item 0010 : different quantities in item and schedule line". (Sy-subrc = 3)

Can any one help me out with this.

Thanks in advance.

Regards ,

Vishal.

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
690

Did you try BAPI_REQUISITION_CHANGE

4 REPLIES 4
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
691

Did you try BAPI_REQUISITION_CHANGE

Read only

0 Likes
690

Thanks Keshu for reply.

I will check this BAPI and will let u know abt it.

Read only

0 Likes
690

Hi,

Refer:


* BAPI to change the PR details
    CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
      EXPORTING
        number                = v_banfn            "<--PR Number
      TABLES
        requisition_items_old = it_old_detail      "<--pass in old PR details
        requisition_items_new = it_new_detail      "<--pass in new PR details
        return                = it_return_change.  "<--return table

*   "read for error message while changing details for PR
    READ TABLE it_return_change INTO wa_return_change WITH KEY type = 'E'.
    IF sy-subrc = 0.
      "check for ERROR
    ENDIF.

Hope this helps you.

Regards,

Tarun

Read only

0 Likes
690

Dear Keshu ,

Thanks yaar..... My Problem is solved.

Thank you very much.

Regards ,

Vishal Bhalsing.