12-10-2008 10:05 PM
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
12-10-2008 11:01 PM
12-11-2008 9:18 AM
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?
12-11-2008 3:19 AM
Hi Caterina,
You can use system variable sy-tcode.
Best regards,
Prashant
12-11-2008 9:27 AM
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
12-11-2008 9:41 AM
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
12-11-2008 9:48 AM
Please refer SAP Note
Note 178040 - SY-TCODE not supplied during settlement
Best regards,
Prashant
12-11-2008 9:55 AM
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