Skip to Content
avatar image
Former Member

Line Item Details

Hi all,

I have placed some conditions for WBS elements in the account assignment fields in the line item details..the condition i have place is if i select any specific IDA WBS elements i need to fill( or auto attach) tax code feild (it_item_tax_code) as 'I3' which is our specific tax code..

for this i wrote code in DOC_SAVE_BADI..it is not working pls help..code in DOC_SAVE_BADI is:

LOOP AT LT_PO_ITEM INTO WA_PO_ITEM.

READ TABLE LT_PO_ACC INTO WA_PO_ACC WITH KEY ACC_CAT = 'WBS'.

IF SY-SUBRC = 0.

READ TABLE LT_ZTWBS_R3 INTO WA_ZTWBS_R3

WITH KEY POSID = LS_ACCOUNT-WBS_ELEM_E.

IF SY-SUBRC = 0.

MOVE 'I3' TO WA_PO_ITEM-TAX_CODE.

ENDIF.

ENDIF.

ENDLOOP..

*table LT_ZTWBS_R3 contains IDA WBSE

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 30, 2008 at 07:28 PM

    Ravi,

    You are using the wrong BADI to achieve the desired results. The DOC_SAVE_BADI is for updating custom fields and tables. You need to use the DOC_CHANGE_BADI and fill the accounting structure.

    You need to choose the appropriate method to place your code in.

    Regards,

    Bill

    Add comment
    10|10000 characters needed characters exceeded