<?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 question on program logic using SKC1A in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-program-logic-using-skc1a/m-p/1204860#M131863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Account -     Using SAKNR and selected company code (BUKRS) get alternative account using table SKB1&lt;/P&gt;&lt;P&gt;Description - To be obtained from SKA1 using account number found above in chart of accounts  CEFR&lt;/P&gt;&lt;P&gt;Carry-forward debit - UMSAV&lt;/P&gt;&lt;P&gt;Debit period from 1 to n - ii=01 to pp UMiiS&lt;/P&gt;&lt;P&gt;Credit period from 1 to n - ii=01 to pp UMiiH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to obtain this text file, an ABAP program should be written. The extraction program should use structure SKC1A to obtain data and use the following selections:&lt;/P&gt;&lt;P&gt;BUKRS : Company code&lt;/P&gt;&lt;P&gt;SAKNR : no selection&lt;/P&gt;&lt;P&gt;GJAHR : Fiscal Year&lt;/P&gt;&lt;P&gt;GSBER : no selection&lt;/P&gt;&lt;P&gt;CURTP : 10 (can be hardcoded and displayed)&lt;/P&gt;&lt;P&gt;HWAER : EUR (can be hard-coded and displayed)&lt;/P&gt;&lt;P&gt;Period : pp (from 01 to special period 13)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote the program using the function 'FOR_ALL_SKC1A'. I have attached it below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the final specs came from the user, this following line was included&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of the use of this structure can be found in program RFSSLD00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the program RFSSLD00 and it's logic is nowhere near mine. It uses a statement GET SKC1A. after looking at this program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not I have the program coded correctly based on the specs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can somebody let me know if I am doing this correctly or if I need to mirror my program after the RFSSLD00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZFI_FR_ETAFI&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZFI_FR_ETAFI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:&lt;/P&gt;&lt;P&gt;    skat.    "G/L Account Master Record (Chart of Accounts: Description)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TYPES&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:  BEGIN OF ty_skat,&lt;/P&gt;&lt;P&gt;        saknr TYPE skat-saknr, "Account Number&lt;/P&gt;&lt;P&gt;        txt50 TYPE skat-txt50, "account Description&lt;/P&gt;&lt;P&gt;        END OF ty_skat.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      filler1(5)      TYPE C,&lt;/P&gt;&lt;P&gt;      account(6)      TYPE C,&lt;/P&gt;&lt;P&gt;      filler2(4)      TYPE C,&lt;/P&gt;&lt;P&gt;      description(35) TYPE c,&lt;/P&gt;&lt;P&gt;      filler3(39)     TYPE c,&lt;/P&gt;&lt;P&gt;      carryfwdamt(21) TYPE c,&lt;/P&gt;&lt;P&gt;      filler4(70)     TYPE c,&lt;/P&gt;&lt;P&gt;      totdeb(18)      TYPE c,&lt;/P&gt;&lt;P&gt;      filler5(63)     TYPE c,&lt;/P&gt;&lt;P&gt;      totcred(18)     TYPE c,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;data: iskc1a  TYPE TABLE          of skc1a   with header line.&lt;/P&gt;&lt;P&gt;data: it_skat TYPE STANDARD TABLE OF ty_skat with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: w_totcred   like skc1a-um01s.&lt;/P&gt;&lt;P&gt;data: w_totdeb    like skc1a-um01s.&lt;/P&gt;&lt;P&gt;data: w_cramount  like skc1a-um01s.&lt;/P&gt;&lt;P&gt;data: w_dbamount  like skc1a-um01s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PARAMETERS                                                           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_ktopl TYPE skat-ktopl    OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_bukrs TYPE skb1-bukrs    OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_year  TYPE payr-gjahr    OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_poper TYPE bkpf-monat    OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END   OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION                                                    *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT saknr txt50&lt;/P&gt;&lt;P&gt;  FROM skat INTO TABLE it_skat&lt;/P&gt;&lt;P&gt; WHERE ktopl = p_ktopl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_skat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR iskc1a. REFRESH iskc1a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'FOR_ALL_SKC1A'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      xbukrs = p_bukrs&lt;/P&gt;&lt;P&gt;      xsaknr = it_skat-saknr&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      xskc1a = iskc1a&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      key_incomplete = 1&lt;/P&gt;&lt;P&gt;      not_authorized = 2&lt;/P&gt;&lt;P&gt;      not_found      = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at iskc1a.&lt;/P&gt;&lt;P&gt;    if iskc1a-gjahr = p_year.&lt;/P&gt;&lt;P&gt;      w_cramount = 0.&lt;/P&gt;&lt;P&gt;      w_dbamount = 0.&lt;/P&gt;&lt;P&gt;      w_totcred  = 0.&lt;/P&gt;&lt;P&gt;      w_totdeb   = 0.&lt;/P&gt;&lt;P&gt;      do p_poper times&lt;/P&gt;&lt;P&gt;        varying w_cramount from iskc1a-um01s next iskc1a-um02s.&lt;/P&gt;&lt;P&gt;        w_totcred = w_totcred + w_cramount.&lt;/P&gt;&lt;P&gt;      enddo.&lt;/P&gt;&lt;P&gt;      do p_poper times&lt;/P&gt;&lt;P&gt;        varying w_dbamount from iskc1a-um01h next iskc1a-um02h.&lt;/P&gt;&lt;P&gt;        w_totdeb  = w_totdeb  + w_dbamount.&lt;/P&gt;&lt;P&gt;     enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if it_skat-saknr(4) = '0000'.&lt;/P&gt;&lt;P&gt;      itab-account      = it_skat-saknr+4.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      itab-account      = it_skat-saknr.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab-description  = it_skat-txt50.&lt;/P&gt;&lt;P&gt;    itab-carryfwdamt  = iskc1a-umsav.&lt;/P&gt;&lt;P&gt;    shift itab-carryfwdamt right deleting trailing space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab-totdeb       = w_totdeb.&lt;/P&gt;&lt;P&gt;    shift itab-totdeb right deleting trailing space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab-totcred      = w_totcred.&lt;/P&gt;&lt;P&gt;    shift itab-totcred right deleting trailing space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if itab-carryfwdamt &amp;lt;&amp;gt; 0 or&lt;/P&gt;&lt;P&gt;       itab-totdeb      &amp;lt;&amp;gt; 0 or&lt;/P&gt;&lt;P&gt;       itab-totcred     &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        append itab.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    filename = 'C:\ETAFI.txt'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab = itab&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;     file_write_error                = 1&lt;/P&gt;&lt;P&gt;     no_batch                        = 2&lt;/P&gt;&lt;P&gt;     gui_refuse_filetransfer         = 3&lt;/P&gt;&lt;P&gt;     invalid_type                    = 4&lt;/P&gt;&lt;P&gt;     no_authority                    = 5&lt;/P&gt;&lt;P&gt;     unknown_error                   = 6&lt;/P&gt;&lt;P&gt;     header_not_allowed              = 7&lt;/P&gt;&lt;P&gt;     separator_not_allowed           = 8&lt;/P&gt;&lt;P&gt;     filesize_not_allowed            = 9&lt;/P&gt;&lt;P&gt;     header_too_long                 = 10&lt;/P&gt;&lt;P&gt;     dp_error_create                 = 11&lt;/P&gt;&lt;P&gt;     dp_error_send                   = 12&lt;/P&gt;&lt;P&gt;     dp_error_write                  = 13&lt;/P&gt;&lt;P&gt;     unknown_dp_error                = 14&lt;/P&gt;&lt;P&gt;     access_denied                   = 15&lt;/P&gt;&lt;P&gt;     dp_out_of_memory                = 16&lt;/P&gt;&lt;P&gt;     disk_full                       = 17&lt;/P&gt;&lt;P&gt;     dp_timeout                      = 18&lt;/P&gt;&lt;P&gt;     file_not_found                  = 19&lt;/P&gt;&lt;P&gt;     dataprovider_exception          = 20&lt;/P&gt;&lt;P&gt;     control_flush_error             = 21&lt;/P&gt;&lt;P&gt;     OTHERS                          = 22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   write: / ' process unsuccessful'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;   write: / 'process successful'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*END-OF-SELECTION                                                      *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2006 20:07:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-04T20:07:56Z</dc:date>
    <item>
      <title>question on program logic using SKC1A</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-program-logic-using-skc1a/m-p/1204860#M131863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Account -     Using SAKNR and selected company code (BUKRS) get alternative account using table SKB1&lt;/P&gt;&lt;P&gt;Description - To be obtained from SKA1 using account number found above in chart of accounts  CEFR&lt;/P&gt;&lt;P&gt;Carry-forward debit - UMSAV&lt;/P&gt;&lt;P&gt;Debit period from 1 to n - ii=01 to pp UMiiS&lt;/P&gt;&lt;P&gt;Credit period from 1 to n - ii=01 to pp UMiiH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to obtain this text file, an ABAP program should be written. The extraction program should use structure SKC1A to obtain data and use the following selections:&lt;/P&gt;&lt;P&gt;BUKRS : Company code&lt;/P&gt;&lt;P&gt;SAKNR : no selection&lt;/P&gt;&lt;P&gt;GJAHR : Fiscal Year&lt;/P&gt;&lt;P&gt;GSBER : no selection&lt;/P&gt;&lt;P&gt;CURTP : 10 (can be hardcoded and displayed)&lt;/P&gt;&lt;P&gt;HWAER : EUR (can be hard-coded and displayed)&lt;/P&gt;&lt;P&gt;Period : pp (from 01 to special period 13)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote the program using the function 'FOR_ALL_SKC1A'. I have attached it below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the final specs came from the user, this following line was included&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of the use of this structure can be found in program RFSSLD00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the program RFSSLD00 and it's logic is nowhere near mine. It uses a statement GET SKC1A. after looking at this program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not I have the program coded correctly based on the specs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can somebody let me know if I am doing this correctly or if I need to mirror my program after the RFSSLD00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZFI_FR_ETAFI&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZFI_FR_ETAFI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:&lt;/P&gt;&lt;P&gt;    skat.    "G/L Account Master Record (Chart of Accounts: Description)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TYPES&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:  BEGIN OF ty_skat,&lt;/P&gt;&lt;P&gt;        saknr TYPE skat-saknr, "Account Number&lt;/P&gt;&lt;P&gt;        txt50 TYPE skat-txt50, "account Description&lt;/P&gt;&lt;P&gt;        END OF ty_skat.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;      filler1(5)      TYPE C,&lt;/P&gt;&lt;P&gt;      account(6)      TYPE C,&lt;/P&gt;&lt;P&gt;      filler2(4)      TYPE C,&lt;/P&gt;&lt;P&gt;      description(35) TYPE c,&lt;/P&gt;&lt;P&gt;      filler3(39)     TYPE c,&lt;/P&gt;&lt;P&gt;      carryfwdamt(21) TYPE c,&lt;/P&gt;&lt;P&gt;      filler4(70)     TYPE c,&lt;/P&gt;&lt;P&gt;      totdeb(18)      TYPE c,&lt;/P&gt;&lt;P&gt;      filler5(63)     TYPE c,&lt;/P&gt;&lt;P&gt;      totcred(18)     TYPE c,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;data: iskc1a  TYPE TABLE          of skc1a   with header line.&lt;/P&gt;&lt;P&gt;data: it_skat TYPE STANDARD TABLE OF ty_skat with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: w_totcred   like skc1a-um01s.&lt;/P&gt;&lt;P&gt;data: w_totdeb    like skc1a-um01s.&lt;/P&gt;&lt;P&gt;data: w_cramount  like skc1a-um01s.&lt;/P&gt;&lt;P&gt;data: w_dbamount  like skc1a-um01s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PARAMETERS                                                           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_ktopl TYPE skat-ktopl    OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_bukrs TYPE skb1-bukrs    OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_year  TYPE payr-gjahr    OBLIGATORY,&lt;/P&gt;&lt;P&gt;            p_poper TYPE bkpf-monat    OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END   OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION                                                    *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT saknr txt50&lt;/P&gt;&lt;P&gt;  FROM skat INTO TABLE it_skat&lt;/P&gt;&lt;P&gt; WHERE ktopl = p_ktopl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_skat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR iskc1a. REFRESH iskc1a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'FOR_ALL_SKC1A'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      xbukrs = p_bukrs&lt;/P&gt;&lt;P&gt;      xsaknr = it_skat-saknr&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      xskc1a = iskc1a&lt;/P&gt;&lt;P&gt;    exceptions&lt;/P&gt;&lt;P&gt;      key_incomplete = 1&lt;/P&gt;&lt;P&gt;      not_authorized = 2&lt;/P&gt;&lt;P&gt;      not_found      = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at iskc1a.&lt;/P&gt;&lt;P&gt;    if iskc1a-gjahr = p_year.&lt;/P&gt;&lt;P&gt;      w_cramount = 0.&lt;/P&gt;&lt;P&gt;      w_dbamount = 0.&lt;/P&gt;&lt;P&gt;      w_totcred  = 0.&lt;/P&gt;&lt;P&gt;      w_totdeb   = 0.&lt;/P&gt;&lt;P&gt;      do p_poper times&lt;/P&gt;&lt;P&gt;        varying w_cramount from iskc1a-um01s next iskc1a-um02s.&lt;/P&gt;&lt;P&gt;        w_totcred = w_totcred + w_cramount.&lt;/P&gt;&lt;P&gt;      enddo.&lt;/P&gt;&lt;P&gt;      do p_poper times&lt;/P&gt;&lt;P&gt;        varying w_dbamount from iskc1a-um01h next iskc1a-um02h.&lt;/P&gt;&lt;P&gt;        w_totdeb  = w_totdeb  + w_dbamount.&lt;/P&gt;&lt;P&gt;     enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if it_skat-saknr(4) = '0000'.&lt;/P&gt;&lt;P&gt;      itab-account      = it_skat-saknr+4.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      itab-account      = it_skat-saknr.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab-description  = it_skat-txt50.&lt;/P&gt;&lt;P&gt;    itab-carryfwdamt  = iskc1a-umsav.&lt;/P&gt;&lt;P&gt;    shift itab-carryfwdamt right deleting trailing space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab-totdeb       = w_totdeb.&lt;/P&gt;&lt;P&gt;    shift itab-totdeb right deleting trailing space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    itab-totcred      = w_totcred.&lt;/P&gt;&lt;P&gt;    shift itab-totcred right deleting trailing space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if itab-carryfwdamt &amp;lt;&amp;gt; 0 or&lt;/P&gt;&lt;P&gt;       itab-totdeb      &amp;lt;&amp;gt; 0 or&lt;/P&gt;&lt;P&gt;       itab-totcred     &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        append itab.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    filename = 'C:\ETAFI.txt'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab = itab&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;     file_write_error                = 1&lt;/P&gt;&lt;P&gt;     no_batch                        = 2&lt;/P&gt;&lt;P&gt;     gui_refuse_filetransfer         = 3&lt;/P&gt;&lt;P&gt;     invalid_type                    = 4&lt;/P&gt;&lt;P&gt;     no_authority                    = 5&lt;/P&gt;&lt;P&gt;     unknown_error                   = 6&lt;/P&gt;&lt;P&gt;     header_not_allowed              = 7&lt;/P&gt;&lt;P&gt;     separator_not_allowed           = 8&lt;/P&gt;&lt;P&gt;     filesize_not_allowed            = 9&lt;/P&gt;&lt;P&gt;     header_too_long                 = 10&lt;/P&gt;&lt;P&gt;     dp_error_create                 = 11&lt;/P&gt;&lt;P&gt;     dp_error_send                   = 12&lt;/P&gt;&lt;P&gt;     dp_error_write                  = 13&lt;/P&gt;&lt;P&gt;     unknown_dp_error                = 14&lt;/P&gt;&lt;P&gt;     access_denied                   = 15&lt;/P&gt;&lt;P&gt;     dp_out_of_memory                = 16&lt;/P&gt;&lt;P&gt;     disk_full                       = 17&lt;/P&gt;&lt;P&gt;     dp_timeout                      = 18&lt;/P&gt;&lt;P&gt;     file_not_found                  = 19&lt;/P&gt;&lt;P&gt;     dataprovider_exception          = 20&lt;/P&gt;&lt;P&gt;     control_flush_error             = 21&lt;/P&gt;&lt;P&gt;     OTHERS                          = 22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   write: / ' process unsuccessful'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;   write: / 'process successful'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*END-OF-SELECTION                                                      *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 20:07:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-program-logic-using-skc1a/m-p/1204860#M131863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T20:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: question on program logic using SKC1A</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-program-logic-using-skc1a/m-p/1204861#M131864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't change the program based on the suggestion. The important thing is - does it work the way it's supposed to. If you think it does, show it to the person who gave you the specs. He or she'll let you know if there's a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 20:23:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-program-logic-using-skc1a/m-p/1204861#M131864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T20:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: question on program logic using SKC1A</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-program-logic-using-skc1a/m-p/1204862#M131865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That program uses a logical database to get the data.  This is why it looks different.  Don't worry, as long as you can verify the data against something else, you can do it the way that you are.  Personally, I never use logical databases.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 20:24:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-on-program-logic-using-skc1a/m-p/1204862#M131865</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-04-04T20:24:26Z</dc:date>
    </item>
  </channel>
</rss>

