Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

way to add custom field in fb01 screen

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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.