Application Development and Automation 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: 
Read only

in the background process field tcode is clean

Former Member
0 Likes
2,470

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
Read only

Former Member
0 Likes
1,307

Is the transaction MIGO & Field BKPF-TCODE?

Read only

0 Likes
1,307

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?

Read only

Former Member
0 Likes
1,307

Hi Caterina,

You can use system variable sy-tcode.

Best regards,

Prashant

Read only

Former Member
0 Likes
1,307

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

Read only

0 Likes
1,307

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

Read only

Former Member
0 Likes
1,307

Please refer SAP Note

Note 178040 - SY-TCODE not supplied during settlement

Best regards,

Prashant

Read only

0 Likes
1,307

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