09-04-2008 12:17 AM
Hi I am trying to get items in PROCESS_HEADER method of BADI ME_PROCESS_REQ_CUST, while creating PR using ME51N, when I change the default document type to another . process header triggers in that I am getting items so that I can set a default value to a account assignment category based on document type.
The issue is LT_ITEMS is empty, I know it wont be empty in change mode ( ME52N ). bottom line, I am trying to default account assignment category value in creation mode. PROCESS_ITEM doesn't trigger while changing document type in ME51N. so I need to write code in PROCESS_HEADER or OPEN. I am not able to get the Item interface instance in LT_ITEMS, which I get in ME52N. Please let me know your inputs.
Thanks
CALL METHOD IM_HEADER->GET_ITEMS
RECEIVING
RE_ITEMS = LT_ITEMS.
LOOP AT LT_ITEMS ASSIGNING <FS_ITEM>.
LS_ITEM = <FS_ITEM>-ITEM->GET_DATA( ).
ENDLOOP.
09-04-2008 9:52 PM