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: 

Company Code not defined

Former Member
0 Kudos

Hi,

I have copied the standard program behind FB60 and created a new transaction named ZFB60. There is no change in the code except that I have added a field on the main screen.

Now the problem is when I run my transaction, it pops a dialog box and asks me

for the Company code. After entering that, it takes me to the main screen where when I enter fields 'Vendor' , 'Invoice date' and 'Reference', it gives me an error "Company code is not defined". But if with the same set of data I execute the original transaction FB60, it gives me no error.

My problem is that can any one tell me, why this error is coming, when I have made no changes to the original code. The only change that I have made is adding a field in the tablecontrol that comes on the main screen.

Can anyone help me?

Points assured for helpful answers.

5 REPLIES 5

Former Member
0 Kudos

When you run the trasaction first time it will ask you for the company code, because the Com. Code is mandatory.

But once successsful completion of the trasaction the company code value will be reatined for the next process level.

Check the company code value in T001 table, whether it is existing or not?

- Raj

0 Kudos

Check this part of code in Screen 1000 of the standard program.

field bkpf-bukrs: module check_comp_code on input. "P00K020831

module user_command_1000.

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Check in Table T001.

Regards,

Sreeram

Former Member
0 Kudos

Hi

Probably the program does some controls using the value of SY-TCODE, so u should find and replace them.

So if you have : IF TCODE = 'FB60', you should replace it with IF TCODE = 'ZFB60'.

It's not easy to create a copy of FB60, because the main program (SAPMF05A) of FB60 is called by many transactions, so it has a different behavior for every trx.

Max

Former Member
0 Kudos

hi

good

there might be the following reason.

1-while converting the FB60 to ZFB60 some of the function module might not be copied properly,so open the main program in se80 and activate all the includes programs.

2-while creating the z* tcode you might not have mentioned the program name properly in se93.

thanks

mrutyun^