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: 

Is it possible to set default company code in SM35?

Former Member
0 Kudos

Hi there,

I want to release my session in SM35 in certain company code. Please help to advice how to set the default company code in SM35 before release this BDC session?

9 REPLIES 9

Former Member
0 Kudos

Hi

You can do this.

go to SM35-select your session-goto menu and click on recording->change.

it will show you the screen with all the attributes of your screen for which you have done your recording.

Here you can change the value for your company code.

save it and process your session.

now you will see the bydefault value of the company code which you have selected .

Or

you can set the default value for your company code while doing the recording.

Please let me know if it is helpful

thanks

Lalit Gupta

Former Member
0 Kudos

Hi,

I want my session to be able to run in background modual, hence I am not record the screen to fill in company code. What I am saying is to set the default company code to be what I wanted. Take transaction MIRO for example, if you frequently change the company code, then when you open this transaction, the default company code is the lated company been used.

I have searched SM35 and can not find how to set the default company code.

Do you have any ideas?

Former Member
0 Kudos

Hi,

You need to use Badis to do this. Identify the Badi for that particular transaction holding the company code when the transaction starts and make the necessary changes in the appropriate method.

Regards,

Former Member
0 Kudos

Hi Nagraj.ashwath,

My problrm located at BDC session have already created. I want to set the default company code before release the BDC session. BAdi method can only usful when running the transaction. As far as I know, the BDC session will depend on the screen to process step by step. How can the BDC session to trigger the BADI for certain customer method?

And I am despered think it is not possible to do what I am asking for.

Former Member
0 Kudos

Hi,

If you have recorded the session, do you see the company code field in the recording ? Can you be bit more clear like the transaction and all please.

Thanks,

Former Member
0 Kudos

Hi,

My trsaction code is ABAVN, I want to retire the asset with BDC session. The recod can add in company code but due to there are may data for BDC session, hence if I assign the company code in screen SAPLSPO4 - 0300, then it can not be processed in background.

Instead I used SET PARAMETER ID 'BUK' FIELD p_bukrs. to set company code. But this is a global parameter and can be changed before you release the session and using other trsactions.

What I am asking is does there exist a way to set default company code before release my BDC session?

0 Kudos

Hi ,

Your qury is not so clear , but from my understanding ,

You have BDC for a transaction ABAVN , where it asks for the company code , and you want to assign some constant default value to this field whenever your BDC runs ... I hop ethat is what you need. If yes , then you need to do a very minor change in your BDC code , there you will be having a field BUKRS , set its value to the value that you need in your code.

Hope this will resolve your problem.

Regards,

Uma Dave

Former Member
0 Kudos

***>>Auto release the BDC session

SUBMIT rsbdcsub WITH mappe = p_sess

WITH von = sy-datum

WITH bis = sy-datum

WITH z_verarb = 'X'

WITH fehler = ' '

EXPORTING LIST TO MEMORY

AND RETURN.

0 Kudos

Hi,

I have solve this problem by auto release the BDC session with above coding.

Thanks for all your kindness concern and hlep!

Cheers!