cancel
Showing results for 
Search instead for 
Did you mean: 

issue in Account Assignment tab in PO

Former Member
0 Kudos

Hello Guys,

There are 4 line items in PO, in Account assignment tab there is one custom field, now i want to change the value of custom field in one of the item, when i click copy button, it should copy in all items,  can any please help me, how to solve this issue

Thanks

Vijaya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vijaya,

The BBP_DOC_CHANGE_BADI should help. Place a breakpoint in the badi and see if it stops there once you click on the copy button. If it does then write your code for the rest of the items.

Regards,

Naveen

Former Member
0 Kudos

Thanks Naveen

i have written this code, but its not working, can u please check this code and let me know the solution

READ TABLE lt_acc INTO ls_acc TRANSPORTING guid WITH KEY

    guid   wa_acc-guid.


    IF sy-subrc = 0.

      MOVE ls_acc-zzrks TO ls_acc-zzrks.

    MODIFY lt_acc FROM ls_acc.   " i am getting error here

    ENDIF.

    ENDLOOP.

Advance Thanks

Vijaya

Former Member
0 Kudos

Hi Vijaya,

In the BADI BBP_DOC_CHANGE_BADI implementation write the below code.

  LOOP AT it_account INTO ls_i_account.
    MOVE-CORRESPONDING ls_i_account TO ls_e_account.

* If required move your custom value to ls_e_account

*  ls_e_account-zzrks = identified value before the loop call


    APPEND ls_e_account TO et_account.
  ENDLOOP.

Regards

Praveen

Former Member
0 Kudos

Hi Vijaya,

In it_account are you getting value of all line items??? I mean is there more than 1 record in the internal table on the click of a Copy button?

Regards,

Naveen

Former Member
0 Kudos

Hi Vijaya,

After Copy you need to select "Change All Items" and the data which was copied in clipboard will be carried forward in all the line items. If you want to change in single line item than use "Paste" button.

Best Regards,

Anil