<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TCD error in Secatt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151891#M749553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you can see sample test script &amp;lt;b&amp;gt;ZUS_SDN_ECATT_EXECUTE_FILE &amp;lt;/b&amp;gt;which shows you how to organize your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ABAP.
* Simulate upload of file with n records
  SELECT * FROM knb1 INTO TABLE lt_knb1 UP TO 20 ROWS.

  DESCRIBE TABLE lt_knb1.
  ld_lines = syst-tfill.

ENDABAP.


ld_idx = 0.

DO ( LD_LINES ).
  ld_idx = ld_idx + 1.

  ABAP.
    READ TABLE lt_knb1 INTO ls_knb1 INDEX ld_idx.
  ENDABAP.

* Move values from LS_KNB1 to single fields for calling TCD
  ld_bukrs = ls_knb1-bukrs.
  ld_kunnr = ls_knb1-kunnr.
* ...

  TCD(VA01, VA01_1).
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Dec 2007 04:29:03 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2007-12-10T04:29:03Z</dc:date>
    <item>
      <title>TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151888#M749550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gurus,&lt;/P&gt;&lt;P&gt;Below given is my code in Ecatt.&lt;/P&gt;&lt;P&gt;I want to give TCD in loop.But it is not allowing me .Can any one help me in this??&lt;/P&gt;&lt;P&gt;Its urgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;ABAP.&lt;/P&gt;&lt;P&gt;*DO COUNT TIMES.&lt;/P&gt;&lt;P&gt;*ABAP BLOCK TO GET THE NUMBER OF TEST CASES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*TOT - HOLDS TOTAL NUMBER OF RECORDS&lt;/P&gt;&lt;P&gt;*FILE- HOLDS FILE PATH OF TEST FILE&lt;/P&gt;&lt;P&gt;DATA:TOT TYPE I VALUE 0,&lt;/P&gt;&lt;P&gt;     FILE TYPE STRING.&lt;/P&gt;&lt;P&gt;*ITAB TO HOLD TEST DATA FROM FILE&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF I_LOANFA OCCURS 0,&lt;/P&gt;&lt;P&gt;        PERNR LIKE PA0045-PERNR,&lt;/P&gt;&lt;P&gt;        BEGDA LIKE PA0045-BEGDA,&lt;/P&gt;&lt;P&gt;        ENDDA LIKE PA0045-ENDDA,&lt;/P&gt;&lt;P&gt;        EXTDL LIKE PA0045-EXTDL,&lt;/P&gt;&lt;P&gt;        DATBW LIKE PA0045-DATBW,&lt;/P&gt;&lt;P&gt;        DARBT LIKE PA0045-DARBT,&lt;/P&gt;&lt;P&gt;        TILBG LIKE PA0045-TILBG,&lt;/P&gt;&lt;P&gt;        TILBT LIKE PA0045-TILBT,&lt;/P&gt;&lt;P&gt;        ZAHLD LIKE PA0078-ZAHLD,&lt;/P&gt;&lt;P&gt;        ZAHLA LIKE PA0078-ZAHLA,&lt;/P&gt;&lt;P&gt;    BETRG LIKE PA0078-BETRG,&lt;/P&gt;&lt;P&gt;END OF I_LOANFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*WORK AREA TO HOLD I_LOANFA DATA&lt;/P&gt;&lt;P&gt;DATA:WA LIKE I_LOANFA.&lt;/P&gt;&lt;P&gt;V_FILE-PATH = 'C:\TEST.TXT'.&lt;/P&gt;&lt;P&gt;FILE = V_FILE-PATH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*LOADING MASTER DATA FROM THE FILE&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     FILENAME                      = FILE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    HAS_FIELD_SEPARATOR           = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DAT_MODE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   IGNORE_CERR                   = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   REPLACEMENT                   = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CHECK_BOM                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_AUTH_CHECK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;     DATA_TAB                      = I_LOANFA&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILE_READ_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_BATCH                      = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   INVALID_TYPE                  = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_AUTHORITY                  = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   UNKNOWN_ERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   BAD_DATA_FORMAT               = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   HEADER_NOT_ALLOWED            = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SEPARATOR_NOT_ALLOWED         = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   HEADER_TOO_LONG               = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   UNKNOWN_DP_ERROR              = 12&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ACCESS_DENIED                 = 13&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DP_OUT_OF_MEMORY              = 14&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DISK_FULL                     = 15&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DP_TIMEOUT                    = 16&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   OTHERS                        = 17&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           .&lt;/P&gt;&lt;P&gt; IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;*GETTING NUMBER OF RECORDS IN THE TABLE&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE I_LOANFA LINES TOT.&lt;/P&gt;&lt;P&gt;*STORING NUMBER OF RECORDS IN LOCAL VARIABLE&lt;/P&gt;&lt;P&gt;COUNT = TOT.&lt;/P&gt;&lt;P&gt;*CLEARING INTERNAL TABLE&lt;/P&gt;&lt;P&gt;CLEAR I_LOANFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;V_READINDX : holds index number to read the internal table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILE: holds file path of test file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : V_READINDX TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO COUNT TIMES.&lt;/P&gt;&lt;P&gt;V_READINDX = INT_LOC.&lt;/P&gt;&lt;P&gt;READ TABLE I_LOANFA INDEX V_READINDX INTO WA.&lt;/P&gt;&lt;P&gt;*Assigning Work Area Values To The Screen Field Values&lt;/P&gt;&lt;P&gt;V_PERNR = WA-PERNR.&lt;/P&gt;&lt;P&gt;V_BEGDA = WA-BEGDA.&lt;/P&gt;&lt;P&gt;V_ENDDA = WA-ENDDA.&lt;/P&gt;&lt;P&gt;V_EXTDL = WA-EXTDL.&lt;/P&gt;&lt;P&gt;V_DATBW = WA-DATBW.&lt;/P&gt;&lt;P&gt;V_DARBT = WA-DARBT.&lt;/P&gt;&lt;P&gt;V_TILBG = WA-TILBG.&lt;/P&gt;&lt;P&gt;V_TILBT = WA-TILBT.&lt;/P&gt;&lt;P&gt;V_ZAHLD = WA-ZAHLD.&lt;/P&gt;&lt;P&gt;V_ZAHLA = WA-ZAHLA.&lt;/P&gt;&lt;P&gt;V_BETRG = WA-BETRG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TCD(PA30,PA30_1).&lt;/P&gt;&lt;P&gt;INT_LOC = INT_LOC + 1.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;ENDABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx,&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Dec 2007 14:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151888#M749550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-09T14:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151889#M749551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are &amp;lt;i&amp;gt;syntactical &amp;lt;/i&amp;gt;and &amp;lt;i&amp;gt;logical &amp;lt;/i&amp;gt;errors in your eCATT test script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logical error is that every eCATT test script should handle a single test case (not multiple at the same time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I admit that there may be situations where we need to handle multiple test cases at the same time.&lt;/P&gt;&lt;P&gt;The syntax error in your test script is that you are mixing eCATT sections with ABAP sections (calling TCD pattern within ABAP...ENDABAP -&amp;gt; not possible).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct flow of logic would be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DO count TIMES.  " ecATT section: begin

  " NOTE: transfer of eCATT variables (import / export) to ABAP (local) required
  ABAP.  " ABAP section: begin
    ...
  ENDABAP.

  TCD(PA30,PA30_1).
  ...

ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Dec 2007 20:21:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151889#M749551</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-12-09T20:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151890#M749552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Uwe,&lt;/P&gt;&lt;P&gt;i tried  to use code as per your guidance,but it is givin me 2 error:&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;Parser: COUNT TIMES is not declared&lt;/P&gt;&lt;P&gt;Parser: ENDDO without DO		&lt;/P&gt;&lt;P&gt;***************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx &lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 03:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151890#M749552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-10T03:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151891#M749553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you can see sample test script &amp;lt;b&amp;gt;ZUS_SDN_ECATT_EXECUTE_FILE &amp;lt;/b&amp;gt;which shows you how to organize your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ABAP.
* Simulate upload of file with n records
  SELECT * FROM knb1 INTO TABLE lt_knb1 UP TO 20 ROWS.

  DESCRIBE TABLE lt_knb1.
  ld_lines = syst-tfill.

ENDABAP.


ld_idx = 0.

DO ( LD_LINES ).
  ld_idx = ld_idx + 1.

  ABAP.
    READ TABLE lt_knb1 INTO ls_knb1 INDEX ld_idx.
  ENDABAP.

* Move values from LS_KNB1 to single fields for calling TCD
  ld_bukrs = ls_knb1-bukrs.
  ld_kunnr = ls_knb1-kunnr.
* ...

  TCD(VA01, VA01_1).
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 04:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151891#M749553</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-12-10T04:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151892#M749554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forgot to mention that you should use the &amp;lt;b&amp;gt;MESSAGE...ENDMESSAGE&amp;lt;/b&amp;gt; pattern in order to verify that your transaction has been executed successfully:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MESSAGE ( MSG_1 ).
  TCD(PA30, PA30_1).
ENDMESSAGE ( E_MSG_1 ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;   Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 04:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151892#M749554</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-12-10T04:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151893#M749555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thnx Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its working now.But one more i want to know can i use more than 1 recording in one program. i.e. can i use 2 TCD in one program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanx&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 05:16:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151893#M749555</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-10T05:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151894#M749556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course you can use &amp;lt;i&amp;gt;multiple &amp;lt;/i&amp;gt;patterns within the same recording, e.g.:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* (1) Create customer
TCD(XD01, XD01_1).

* (2) Create sales order for customer
TCD(VA01, VA01_1).

* (3) Billing of sales order
...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you should think about modularization and reusability of your test scripts. Instead of recording multiple transactions (pattern TCD) within the same test script I would recommend another approach:&lt;/P&gt;&lt;P&gt;(1) Create a test script for: "Create customer" (XD01)      -&amp;gt; e.g. ZECATT_CREATE_CUSTOMER&lt;/P&gt;&lt;P&gt;(2) Create a test script for: "Create sales order" (VA01)   -&amp;gt; e.g. ZECATT_CREATE_SALESORDER&lt;/P&gt;&lt;P&gt;(3) Create a test script for: "Billing sales order"   -&amp;gt; e.g. ZECATT_CREATE_BILLINGDOC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(4) Create a "process" test script which refers to the required test scripts, .e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REF(ZECATT_CREATE_CUSTOMER,...).
REF(ZECATT_CREATE_SALESORDER,...).
REF(ZECATT_CREATE_BILLINGDOC,...).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;   Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 05:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151894#M749556</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-12-10T05:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151895#M749557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Uwe,&lt;/P&gt;&lt;P&gt;Thanx for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use to use TCD based on some condition i.e. if some condtions satisfy first TCD should run &amp;amp; for some conditon second TCD .Is it possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i want to make TCD for Sales Orderin Confirmation of Material in Sceduled Line in batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But their can be any number of material,so the confirmation screen can come at any number of times.I have tried to use BDC,LSMW.But nothing work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Secatt,i am able to do confrimation,but the number of material is my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want to know that based on some condition ican i run TCD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if n = 1.&lt;/P&gt;&lt;P&gt;TCD(VA02,VA02_1)&lt;/P&gt;&lt;P&gt;elseif n = 2.&lt;/P&gt;&lt;P&gt;TCD(VA02,VA02_2)&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you have any suggestion please help me in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx &lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 05:05:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151895#M749557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T05:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: TCD error in Secatt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151896#M749558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not a business analyst so I do not really know when the confirmation screen is displayed. However, given your description I assume it is shown after the last order item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this assumption is correct then a pseudo-coding would look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF ( n &amp;lt; max. number of items ).
  TCD(VA02,VA02_1).
ELSE.
  TCD(VA02,VA02_2).
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I would call a function module to retrieve the sales order items, determine the number of items and then loop over the items:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;" Example: n = 4   =&amp;gt; ld_max

  ld_count = ld_max - 1.
  ld_idx = 0.

  DO ( ld_count ).
    ld_idx = ld_idx + 1.

    ABAP.
      READ TABLE lt_items INTO ls_item INDEX ld_idx.
    ENDABAP.

    TCD(VA02,VA02_1).  " transaction without confirmation
  ENDDO.

    ABAP.
      READ TABLE lt_items INTO ls_item INDEX ld_max.
    ENDABAP.  

    TCD(VA02,VA02_2).  " transaction with confirmation&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that your TCD recording should handle a &amp;lt;b&amp;gt;single item only&amp;lt;/b&amp;gt;. Therefore you somehow need to take care of the selected item number within the transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 07:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tcd-error-in-secatt/m-p/3151896#M749558</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-12-11T07:00:05Z</dc:date>
    </item>
  </channel>
</rss>

