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: 

in the background process field tcode is clean

Former Member
0 Kudos

Executing a transaction in the background field tcode is clean.

For example the transaction mir11 run in the background does not fill the field BKPG-TCODE as it happens running online.

there 'a solution?

thanks

7 REPLIES 7

0 Kudos

Is the transaction MIGO & Field BKPF-TCODE?

0 Kudos

Excuse, transaction is MR11 and Field SY-TCODE or BKPF-TCODE(online it's set to SY-TCODE but in background are empty).

However it seems that any transaction executed in background set SY-TCODE empty.

thanks to all.

Prashant thanks, but there is a rule/note that says that?

former_member223537
Active Contributor
0 Kudos

Hi Caterina,

You can use system variable sy-tcode.

Best regards,

Prashant

former_member223537
Active Contributor
0 Kudos

Hi Caterina,

Sorry, i tested it now & found tht the value of sy-tcode is blank in background job.

But why do you require TCODE value in background job. I mean in any case you would be knowing the TCODE value before hand i.e. while creating the program/job. So can't we hardcode the same in the program.

Best regards,

Prashant

0 Kudos

Hi Prashant,

I know that the value is empty.

I need for example, because there are rules that check the TCODE to control (user exit), replacements and / or validation.

These work online while in the background is not.

Moreover, in the transaction MR11, sap record documents setting the transaction who created (BKPF-TCODE) and there is a check for the transfer (MR11SHOW) which controls the TCODE to do other things.

However I would also like to know if there is a rule or SAP note clarifying that the TCODE is never set in the background and that can not be used so as to seek other solutions.

thanks and excuse my English!

Caterina

former_member223537
Active Contributor
0 Kudos

Please refer SAP Note

Note 178040 - SY-TCODE not supplied during settlement

Best regards,

Prashant

0 Kudos

thanks, I found that note, but I did not know if he was referring only to transactions mentioned in the note or all and I am amazed that they had not found anyone who spoke in the forum of this problem

Thank you

Edited by: Caterina Curci on Dec 11, 2008 11:26 AM