‎2010 Jan 08 2:36 PM
Hi there,
I wonder if it's possible to "mix" a TCD and SAPGUI Scripts by chaining? I would like to record one part of the transaction using SAPGUI, and then TCD. I would call the TCD-Script by REF. I'm not sure if the TCD can run in the same session as the SAPGUI, since the SAPGUI is creating the record, without being saved, and then will be called the TCD-Script, working on the same record, previously created by SAPGUI-Script.
Cheers,
Dimce
‎2010 Jan 09 9:05 AM
In general it is possible to chain these command types. You should separate the parts by modul scripts:
Script Test_ERP:
...
REF (ZMM01_BY_TCD)
* pass here the data via parameters (export -> local -> import)
REF (ZVA01_BY_SAPGUI)
...
Between these scripts you can share test data by parameters. So MM01 can create a material with material number which can be passed to VA01 by parameter usage.
I am not sure, that TCD and SAPGUI session will be the same in the target system, because technically they are working different.
Best regards,
Christoph
‎2010 Jan 09 9:05 AM
In general it is possible to chain these command types. You should separate the parts by modul scripts:
Script Test_ERP:
...
REF (ZMM01_BY_TCD)
* pass here the data via parameters (export -> local -> import)
REF (ZVA01_BY_SAPGUI)
...
Between these scripts you can share test data by parameters. So MM01 can create a material with material number which can be passed to VA01 by parameter usage.
I am not sure, that TCD and SAPGUI session will be the same in the target system, because technically they are working different.
Best regards,
Christoph
‎2010 Jan 11 11:17 AM
Hi Christoph,
thank you for your response.
Want I want to achieve is to switch between SAPGUI and TCD in the same transaction. For example, the header data of the contract creation in VA41 using SAPGUI and the position data using the TCD. In order to achieve this, I recorded a TCD eCATT, from the start point in VA42 calling the contract with a specific number, and then entering some stuff in the position. After finishing the recording of TCD, I've entered into the generated TCD-interface and deleted the lines which I don't need (for example calling a conctract number). But, after calling the TCD-eCATT using REF, the TCD-eCATT starts playing from the very beginning of the recording, not considering the manually deleted lines by myself from the TCD-interface.
I think, I'm hitting some system-constraints related to interference of these different eCATT-interfaces, am I?
Cheers,
Dimce
‎2010 Jan 11 12:33 PM
Hello Dimce,
yes, you hit some system-constraints ;o)
In general it is not possible to mix SAPGUI- and TCD-Command in one SAP-Transaction
because of the technical differences between both commands. The TCD-Command has no
technical possibility to use a SAPGUI-Session and the SAPGUI-Command has no
chance to use a TCD-Session.
If you want to automate transactions with both commands, so make sure that every command block
(SAPGUI or TCD) has a regular start and end (=> SAVE-Button).
An example for your case:
- Create Header data in VA41 with SAPGUI.
- Add/change some data with TCD:
Start transaction VA42
make your changes (add position, ...)
save contract
IMHO you are more flexible if you automate this completely with SAPGUI.
Best regards,
Sebastian
‎2010 Jan 11 6:55 PM
Hi Sebastian,
thanky ou for your comprehensive response.
That was I afraid of.
I wanted actually to achieve a granularity and performance benefit with one stuck. Encapsulation-to have the repeatably actions in one script, and performance benefit-because of the powerful TCD-execution.
Implementing your workaround unfortunately is not acceptable for me, because of the long runinng SAVE-process (about 5-10 sec.) in VA41. This time frame has a significant importance of the whole process, because we are migrating some 20.000 contracts with an average execution of 1-1,5 min.
But anyhow, now I'm aware of it, what eCATT can, and what he can not do. I've outsorced my code in the SAPGUI script instead of a TCD.
Cheers,
Dimce