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: 

FB60/MIRO company code popup

Former Member
0 Kudos

Hi,

I have a workflow workitem which tries to call transactions FB60 and MIRO depending on whether the invoice is based on a non-PO or not. When the transaction is called, the company code screen pops up; I managed to suppress this for MIRO by explicitly specifying company code value in screen 1000 for FM DOCHEADER_COMP_CODE_WITH_POPUP - basically I did a BDC. But the same thing for some reason does not work for FB60. Does anybody have any idea why this happens or any other way in which I can suppress the company code popup?

Thanks in advance.

Nanditha

19 REPLIES 19

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I have managed to re-create your senerio in my system. Looks like if you have the parameter id set in your user profile, the popup will not come. For example, i have the parameter id BUK set to 0010 in my parameter ids in my user profile. When I go to FB60, the popup does not come. If i delete that parameter id from my user id, then I do get the popup.

You can add the parameter id by clicking ....

System->User Profile>Own Data

New session will open, click on the parameters tab.

Enter BUK in the first field and the value in the second.

Save your changes. Log off and log back on.

Regards,

Rich Heilman

Former Member
0 Kudos

hey Rich,

thanks for your reply! I assume you opened FB60 as a separate transaction and not through a workflow workitem. I have noticed that if you just open a new SAP session and type in FB60 or MIRO, no popup appears. Also, if you try to do a call transaction FB60/MIRO from a report, again the popup does not appear. My case is specific to when you try calling the transaction through a workitem. Also FYI, my user profile does have a parameter id BUK with a default value.

Nanditha

0 Kudos

Hi Nanditha,

can't you write a short fm or prog,

which sets a defined company code (bukrs),

and start it before starting fb60 ?

regards Andreas

Former Member
0 Kudos

Hi Nanditha,

Try using statement

Set parameter id 'BUK' field W_comp

where w_comp is company code. You need to call this statement before the call of transaction FB60 in workflow.

One question: Does this pop up appear during every workitem execution of FB60 ?

Regards,

Vin

Former Member
0 Kudos

Hi,

thanks for your repsonse. I tried a set param id without any luck. the popup still appears and yes, the popup appears at every workitem execution.

0 Kudos

Hi,

Try put update the user master record, just put the parameter id = 'BUK' with value .... on the Parameters tab.

Regards,

Maria João Rocha

Former Member
0 Kudos

Tried updating user master record with param id, no use

The surprising thing is MIRO works fine but not FB60.

Andreas, do you know any FM which sets company code?

0 Kudos

Hi Nanditha,

Have had the same problem with FB50 from workflow, and had to solve it by doing as below. The problem appears when using 'enjoy' transactions.

The code to solve ít look like this:

SET PARAMETER ID 'BUK' FIELD E_BKPF-BUKRS.

PERFORM bdc_dynpro using 'SAPLACHD' '1000'.

PERFORM bdc_field using 'BDC_OKCODE'

'=ENTR'.

PERFORM bdc_field using 'BDC_CURSOR'

'BKPF-BUKRS'.

PERFORM bdc_field using 'BKPF-BUKRS'

e_bkpf-bukrs.

Hope this will help you too!

Regards Benita Östman

0 Kudos

Hi Benita,

it's a very old thread, however, for tracing purposes, I would like to share this solution for your problem: Note 201493 - FB50: Dialog box for entering a company code.

Regards,

Antonio

Former Member
0 Kudos

Hi Benita,

Thanks for your reply! I had tried something similar to your solution earlier, but it didn't work. I tried your solution too, it doesn't work. I was wondering whether there are any settings which should be done for FB60 for this to work, also what version of SAP did you try this on?

Thanks and Regards,

Nanditha

0 Kudos

Hi Nanditha,

I tried it on version 4.6C. Is there any other transaction you could use instead of FB60? Not an 'enjoy' transaction? I was advised to use FB01 instead of FB50.

Or maybe there is some customizing that have to be done in table T003D, before it will work?

Regards Benita

0 Kudos

Hi,

I've found , where default-bukrs is stored for enjoy-ta: in table TFBUF ( so <b>not</b> with sap-memory)

-> look for 'acc_kontext' in Prg SAPMF05A / MF05AFRENJ

so what happen's if you manipulate table tfbuf ?

regards Andreas

Former Member
0 Kudos

Hi Guys,

I found OSS notes for rectifying this problem. Please refer to the following notes for the respective versions.

4.6A - 4.6B note 201493, 305821

4.6C note 305821

4.7 and ECC 5.0 note 802148

Haven't actually applied the note,but am hoping it will work!

0 Kudos

Hi Nanditha,

we're on 4.6c and have a similar problem with calling FB60. However we have the note installed but can't make it work. Have you found out any other solution alternatives?

Thanks,

-Mikko

0 Kudos

Hi Mikko,

have you read my post from July 19th ?

and debugged / analysed the named program ?

regards Andreas

0 Kudos

Yes, I read it but didn't have the guts yet to go that way.. It could be the only way though so I might end up modifying the buffers. I'll wait though for a while for other tips and will let you know if it works.

Thanks,

-Mikko

0 Kudos

Hi Andreas,

it looks like it's working now. What I did was that I just got the compcode value from tfbuf, stored it locally, updated tfbuf with the new value, called the transaction and after the call put the old value back. Works like a dream.

The funny thing however is that if I wrap the fully working method inside a workflow standard task, it's not working completely because I get to see the popup again (with the company code entered).. Would you have any idea why this is happening?

Regards,

Mikko

Former Member
0 Kudos

Hi Nanditha,

The table TFBUF stores the last entered company code data for a particular user. If this table entry does not exist for a given user ID then you get the pop-up. So while executing BDC for FB60 create a record explicitly if none exists for the user. This validation should be there in the BDC program.

Regards,

Pankaj

Subhankar
Active Contributor
0 Kudos

Check subroutine PERFORM comp_code_init. in program MF05AOENJ. there you will get the statement like

GET PARAMETER ID 'BUK' FIELD bkpf-bukrs.

Just check in debug mode.

If this statement executed then , before the cal transaction statement you have to do SET PARAMETER ID 'BUK' with company code value.

If this line not triggered check the note 570605.

Thanks

Subhankar