cancel
Showing results for 
Search instead for 
Did you mean: 

Line Item Details

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Try to use BBP_DET_TAXCODE_BADI..method..DETERMINE_TAX_CODE..

and place ur condition for WBS element and pass the approipate tax code to EV_TAX_CODE field.

hope this helps...

Former Member
0 Kudos

thanks...solved..

Answers (0)