04-03-2006 11:44 AM
Hi,
Can any one suggest me how can I add a custom field on fb01 transaction which can also be updated in database i.e bkpf table(custome field)
thanks
04-03-2006 11:59 AM
Hi
Which fied DO YOU WANT TO ADD.
IT CONTAINS A MODULE POOL PROGRAM NAMED SAPMF05A
FROM THIS YOU CAN GET THE MAIL PROGRAM NAME AND CHANGE IT TO Z* PROGRAM AND ADD THE FIELD.
TO UPDATE THE DATABASE TABLE BKPF USE THE INCLUDE STRUCTURE PROCESS.
I HOPE THIS WILL HELP YOU TO SOLVE YOUR PROBLEM
THANKS
MRUTYUNJAYA TRIPATHY
04-03-2006 1:14 PM
Hello pankaj,
Can u try this approach....
U can ientify one of the user exit which will help u to post the field in BKPF. e.g EXIT_SAPLF048_001. In this user exit u can call a FM to popup a screen to capture the data e.g POC_CALL_USER_INPUT_POPUP. After u get the value u can move this to BKPF table using the follwoing code and the std SAP will take care of updation.
data:
data: get_val type poc_user,
fld(50) value '(SAPMF05A)xbkpf[]',
w_bkpf like bkpf.
field-symbols: <fs1> type table.
CALL FUNCTION 'POC_CALL_USER_INPUT_POPUP'
IMPORTING
EX_UNAME = get_val
EXCEPTIONS
INPUT_CANCELED = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
else.
assign (fld) to <fs1>.
read table <fs1> into w_bkpf index 1.
w_bkpf-ZADDFLD = get_val.
modify <fs1> from w_bkpf index sy-tabix.
ENDIF.
endif.
This does work, however u need to explore this from all other angles if it suits u.