<?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: Validating flat file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056530#M969711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U have to check at flat file level only.... that is down by functional consultants.. As an abaper we need to use that flat file only.. and one more thing if yo uwant to check whether the field holds the data/value  that can be down at internal table level...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward Points if useful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Raghunath.S&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9986076729&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jul 2008 05:49:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-10T05:49:08Z</dc:date>
    <item>
      <title>Validating flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056525#M969706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          I have to validate the entris in my flat file before passing it to the BDC.I have a RATE field as 5th field. How to check whther the 5th field contains valid RATE values.We cannot check the entries from the table. Becaus we can give even new entries here. I think we have to check the data type. Could any body let me know, how to check this..Thansk in advance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                    Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 04:33:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056525#M969706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T04:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Validating flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056526#M969707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Design a Selection screen which has a table control, Put the fields onto it. And also place some buttons like INSERT , DELETE EXIT on the selection screen.&lt;/P&gt;&lt;P&gt; Where INSERT is to INSERT the records into the database. &lt;/P&gt;&lt;P&gt;           DELETE is to DELETE the record which has wrong entry.&lt;/P&gt;&lt;P&gt;           EXIT is to exit from the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the Call transaction method with MODE as 'A' and check the records. and then insert into the database. This solves the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 04:40:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056526#M969707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T04:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Validating flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056527#M969708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi when you get the records from flat file and split and put into ur internal table structure... validate that 5th field before appending into the internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;split wa_flat into &lt;/P&gt;&lt;P&gt;          wa_f1 wa_f2 wa_f3...&lt;/P&gt;&lt;P&gt;          at '|'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;validate 5th record here...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa to itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 04:46:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056527#M969708</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-07-10T04:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Validating flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056528#M969709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;i have same done for FB60.(validating the flat file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check these code&lt;/P&gt;&lt;P&gt;report ZZFB60 no standard page heading&lt;/P&gt;&lt;P&gt;                            line-size 550.&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; Database Tables Declaration&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;tables: t100,  "Messages&lt;/P&gt;&lt;P&gt;        lfa1,  "Vendor Master (General Section)&lt;/P&gt;&lt;P&gt;        lfb1,  "Vendor Master (Company Code)&lt;/P&gt;&lt;P&gt;        skb1,  "G/L account master (company code)&lt;/P&gt;&lt;P&gt;        lfbw,  "Vendor master record (withholding tax types) X&lt;/P&gt;&lt;P&gt;        csks,  "Cost Center Master Data&lt;/P&gt;&lt;P&gt;        bkpf,  "Accounting Document Header&lt;/P&gt;&lt;P&gt;        bseg,  "Accounting Document Segment&lt;/P&gt;&lt;P&gt;        usr02, "Logon data&lt;/P&gt;&lt;P&gt;        bsip.  "Index for Vendor Validation of Double Documents&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;  Selection Screen&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;selection-screen begin of block b1 with frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : p_file1  like  rlgrap-filename obligatory,&lt;/P&gt;&lt;P&gt;             p_doctyp like  invfo-blart obligatory,&lt;/P&gt;&lt;P&gt;             p_invdat like  invfo-bldat obligatory,&lt;/P&gt;&lt;P&gt;             p_posdat like  invfo-budat obligatory.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b2 with frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters :ZTEST RADIOBUTTON GROUP radi default 'X' user-command chang,&lt;/P&gt;&lt;P&gt;            ZRUN  RADIOBUTTON GROUP radi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen end of block b2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;skip 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b3 with frame title text-002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : SUCCREC      RADIOBUTTON GROUP rad1 modif id Z1,&lt;/P&gt;&lt;P&gt;             ERRORLOG     RADIOBUTTON GROUP rad1 modif id Z1.&lt;/P&gt;&lt;P&gt;selection-screen end of block b3.&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;  Constants Declaration&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;CONSTANTS  :  C_TRANS_FB60(4) VALUE 'FB60'.&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;  Variables Declaration&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;data       : v_name like lfa1-name1,&lt;/P&gt;&lt;P&gt;             v_belnr like bseg-belnr,&lt;/P&gt;&lt;P&gt;             v_username type char12,&lt;/P&gt;&lt;P&gt;             v_kostl like csks-kostl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data       : day   type char2,&lt;/P&gt;&lt;P&gt;             month type char2,&lt;/P&gt;&lt;P&gt;             year  type char4,&lt;/P&gt;&lt;P&gt;             date1 type char10,&lt;/P&gt;&lt;P&gt;             date2 type char10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data      :  c1(8) type c value '.txt',&lt;/P&gt;&lt;P&gt;             cnt(2) TYPE n,&lt;/P&gt;&lt;P&gt;             cnt1 type i,&lt;/P&gt;&lt;P&gt;             fld(25) TYPE c,&lt;/P&gt;&lt;P&gt;             fld2(67) type c,&lt;/P&gt;&lt;P&gt;             flag type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data      :  v_belnr1 like bseg-belnr,&lt;/P&gt;&lt;P&gt;             amount like bseg-wrbtr,&lt;/P&gt;&lt;P&gt;             totalamount like bseg-wrbtr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data      :  MESSG   TYPE STRING.&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; Internal Tables Declaration&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;data  : begin of t_record occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         BUKRS(004),&lt;/P&gt;&lt;P&gt;         ACCNT(010),&lt;/P&gt;&lt;P&gt;         XBLNR(016),&lt;/P&gt;&lt;P&gt;         WRBTR1(016),&lt;/P&gt;&lt;P&gt;         WAERS(005),&lt;/P&gt;&lt;P&gt;         SECCO(004) ,&lt;/P&gt;&lt;P&gt;         SGTXT(050),&lt;/P&gt;&lt;P&gt;         HKONT(010),&lt;/P&gt;&lt;P&gt;         WRBTR2(017),&lt;/P&gt;&lt;P&gt;         MWSKZ(002),&lt;/P&gt;&lt;P&gt;         GSBER(004),&lt;/P&gt;&lt;P&gt;         KOSTL(010),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end of t_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data  : begin of error_record occurs 0,&lt;/P&gt;&lt;P&gt;         ROWNO type i,&lt;/P&gt;&lt;P&gt;         BUKRS(004),&lt;/P&gt;&lt;P&gt;         ACCNT(010),&lt;/P&gt;&lt;P&gt;         XBLNR(016),&lt;/P&gt;&lt;P&gt;         WRBTR1(016),&lt;/P&gt;&lt;P&gt;         WAERS(005),&lt;/P&gt;&lt;P&gt;         SECCO(004) ,&lt;/P&gt;&lt;P&gt;         SGTXT(020),&lt;/P&gt;&lt;P&gt;         HKONT(010),&lt;/P&gt;&lt;P&gt;         WRBTR2(017),&lt;/P&gt;&lt;P&gt;         MWSKZ(002),&lt;/P&gt;&lt;P&gt;         GSBER(004),&lt;/P&gt;&lt;P&gt;         KOSTL(010),&lt;/P&gt;&lt;P&gt;         text1(50),&lt;/P&gt;&lt;P&gt;         text2(55),&lt;/P&gt;&lt;P&gt;         text3(50),&lt;/P&gt;&lt;P&gt;         text4(50),&lt;/P&gt;&lt;P&gt;         text5(70),&lt;/P&gt;&lt;P&gt;         text6(50),&lt;/P&gt;&lt;P&gt;         flag,&lt;/P&gt;&lt;P&gt;        end of error_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data   : n_record like error_record occurs 0 with header line,&lt;/P&gt;&lt;P&gt;         f_record like error_record occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data   : WA_BDCMSGCOLL  TYPE  BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data   : begin of  t_head occurs 0,&lt;/P&gt;&lt;P&gt;            BUKRS(004),      "Company Code&lt;/P&gt;&lt;P&gt;            ACCNT(010),      "Account or Vendor&lt;/P&gt;&lt;P&gt;            XBLNR(016),      "Reference&lt;/P&gt;&lt;P&gt;            WRBTR1(017),     "Amount in document currency&lt;/P&gt;&lt;P&gt;            WAERS(005),      "Currency&lt;/P&gt;&lt;P&gt;            SECCO(004),      "Section Code&lt;/P&gt;&lt;P&gt;            SGTXT(050),      "Text&lt;/P&gt;&lt;P&gt;         end of t_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data   : begin of  error_head1 occurs 0,&lt;/P&gt;&lt;P&gt;           BUKRS(004),      "Company Code&lt;/P&gt;&lt;P&gt;           ACCNT(010),      "Account or Vendor&lt;/P&gt;&lt;P&gt;           XBLNR(016),      "Reference&lt;/P&gt;&lt;P&gt;           WRBTR1(017),     "Amount in document currency&lt;/P&gt;&lt;P&gt;           WAERS(005),      "Currency&lt;/P&gt;&lt;P&gt;           SECCO(004),      "Section Code&lt;/P&gt;&lt;P&gt;           SGTXT(050),      "Text&lt;/P&gt;&lt;P&gt;           messtyp      type char1,&lt;/P&gt;&lt;P&gt;           MESSG        type  char256,&lt;/P&gt;&lt;P&gt;         end of error_head1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data   : succ_head like t_head occurs 0 with header line,&lt;/P&gt;&lt;P&gt;         error_head like t_head occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data   : begin of t_item occurs 0,&lt;/P&gt;&lt;P&gt;          ACCNT(010),      "Account&lt;/P&gt;&lt;P&gt;          XBLNR(016),      "Reference&lt;/P&gt;&lt;P&gt;          WRBTR1(017),     "Amount in document currency&lt;/P&gt;&lt;P&gt;          HKONT(010),     "GL Account&lt;/P&gt;&lt;P&gt;          WRBTR2(017),    "Line item Amount in document currency&lt;/P&gt;&lt;P&gt;          MWSKZ(002),     "Tax Code&lt;/P&gt;&lt;P&gt;          GSBER(004),     " Business Area&lt;/P&gt;&lt;P&gt;          KOSTL(010),     "Cost centre&lt;/P&gt;&lt;P&gt;        end of t_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :  IT_BDCDATA      LIKE  BDCDATA OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        IT_BDC_MESSAGES LIKE  BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&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;  At  Selection-Screen&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;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM  file_selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON p_file1.&lt;/P&gt;&lt;P&gt;  if p_file1 CS c1.&lt;/P&gt;&lt;P&gt;    PERFORM data_upload.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    message e303(ME) with 'File is not with .TXT extension'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF SCREEN-GROUP1 = 'Z1'.&lt;/P&gt;&lt;P&gt;      IF zrun = 'X'.&lt;/P&gt;&lt;P&gt;        SCREEN-INPUT = 1.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        SCREEN-INPUT = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&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;  Start-of-Selection&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;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM date.&lt;/P&gt;&lt;P&gt;  PERFORM validate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if ZTEST = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM header.&lt;/P&gt;&lt;P&gt;    PERFORM disperrortestrun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if ZRUN = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM  head_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM form_bdcbenerate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if SUCCREC  = 'X'.&lt;/P&gt;&lt;P&gt;      PERFORM dispsuccrec.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if ERRORLOG  = 'X'.&lt;/P&gt;&lt;P&gt;      PERFORM disperrorrec.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End-of-selection.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Mappping                                                            *&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;&lt;/P&gt;&lt;P&gt;form form_bdcbenerate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh  error_head.&lt;/P&gt;&lt;P&gt;  refresh  succ_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH : IT_BDCDATA,IT_BDC_MESSAGES.&lt;/P&gt;&lt;P&gt;    CLEAR  :IT_BDCDATA, IT_BDC_MESSAGES, WA_BDCMSGCOLL..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro      using   'SAPLACHD'         '1000'.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'BDC_OKCODE'        '=ENTR'.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'BKPF-BUKRS'        t_head-bukrs.&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro      using   'SAPMF05A'          '1100'.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'BDC_OKCODE'        '/00'.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-ACCNT'       t_head-accnt.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-BLDAT'       date1.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-BUDAT'       date2.&lt;/P&gt;&lt;P&gt;    perform bdC_field       using   'INVFO-BLART'       p_doctyp.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-XBLNR'       t_head-xblnr.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-WRBTR'       t_head-wrbtr1.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-WAERS'       t_head-waers.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-SECCO'       t_head-secco.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using   'INVFO-SGTXT'       t_head-sgtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    cnt = 1.&lt;/P&gt;&lt;P&gt;    cnt1 = 1.&lt;/P&gt;&lt;P&gt;    loop at t_item where accnt = t_head-accnt&lt;/P&gt;&lt;P&gt;                        and  xblnr = t_head-xblnr&lt;/P&gt;&lt;P&gt;                        and wrbtr1 = t_head-wrbtr1.&lt;/P&gt;&lt;P&gt;      if cnt1 gt 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.&lt;/P&gt;&lt;P&gt;        perform bdc_field      using   fld                   'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        perform bdc_dynpro      using 'SAPMF05A'          '1100'.&lt;/P&gt;&lt;P&gt;        perform bdc_field       using 'BDC_OKCODE'        '=0005'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      perform bdc_dynpro      using 'SAPMF05A'          '1100'.&lt;/P&gt;&lt;P&gt;      perform bdc_field       using   'BDC_OKCODE'        '/00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONCATENATE 'ACGL_ITEM-HKONT(' cnt ')' INTO fld.&lt;/P&gt;&lt;P&gt;      perform bdc_field       using  fld                t_item-hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONCATENATE 'ACGL_ITEM-WRBTR(' cnt ')' INTO fld.&lt;/P&gt;&lt;P&gt;      perform bdc_field  using       fld                t_item-wrbtr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONCATENATE 'ACGL_ITEM-MWSKZ(' cnt ')' INTO fld.&lt;/P&gt;&lt;P&gt;      perform bdc_field       using  fld                t_item-mwskz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONCATENATE 'ACGL_ITEM-GSBER(' cnt ')' INTO fld.&lt;/P&gt;&lt;P&gt;      perform bdc_field       using  fld                t_item-gsber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CONCATENATE 'ACGL_ITEM-KOSTL(' cnt ')' INTO fld.&lt;/P&gt;&lt;P&gt;      perform bdc_field       using  fld                t_item-kostl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      perform bdc_field      using  'BDC_CURSOR'  fld.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      cnt1 = cnt1 + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro      using 'SAPMF05A' '1100'.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                                  '=BS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro      using 'SAPMSSY0' '0120'.&lt;/P&gt;&lt;P&gt;    perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                                  '=BU'.&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;  Calling Transaction FB60&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;    CALL TRANSACTION C_TRANS_FB60 USING IT_BDCDATA mode 'N'&lt;/P&gt;&lt;P&gt;                                 update 'S'&lt;/P&gt;&lt;P&gt;                                 MESSAGES INTO IT_BDC_MESSAGES.&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     MOVE-CORRESPONDING t_head TO error_head.&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;     append error_head.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;     clear error_head.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;      loop at IT_BDC_MESSAGES into WA_BDCMSGCOLL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;             EXPORTING&lt;/P&gt;&lt;P&gt;                  ID   = WA_BDCMSGCOLL-MSGID&lt;/P&gt;&lt;P&gt;                  LANG = WA_BDCMSGCOLL-MSGSPRA&lt;/P&gt;&lt;P&gt;                  NO   = WA_BDCMSGCOLL-MSGNR&lt;/P&gt;&lt;P&gt;                  V1   = WA_BDCMSGCOLL-MSGV1&lt;/P&gt;&lt;P&gt;                  V2   = WA_BDCMSGCOLL-MSGV2&lt;/P&gt;&lt;P&gt;                  V3   = WA_BDCMSGCOLL-MSGV3&lt;/P&gt;&lt;P&gt;                  V4   = WA_BDCMSGCOLL-MSGV4&lt;/P&gt;&lt;P&gt;             IMPORTING&lt;/P&gt;&lt;P&gt;                  MSG  = MESSG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF ( WA_BDCMSGCOLL-MSGTYP = 'S' ) OR ( WA_BDCMSGCOLL-MSGTYP = 'E' )&lt;/P&gt;&lt;P&gt;                                     OR ( WA_BDCMSGCOLL-MSGTYP = 'W' ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      move-corresponding error_head to error_head1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          move-corresponding t_head to error_head1.&lt;/P&gt;&lt;P&gt;          error_head1-messg = MESSG. "ERROR MESSAGE&lt;/P&gt;&lt;P&gt;          error_head1-messtyp =  WA_BDCMSGCOLL-MSGTYP.&lt;/P&gt;&lt;P&gt;          APPEND error_head1.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING t_head TO succ_head.&lt;/P&gt;&lt;P&gt;      append succ_head.&lt;/P&gt;&lt;P&gt;      clear succ_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&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;  Form  data_upload&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;FORM data_upload .&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            FILENAME = p_file1&lt;/P&gt;&lt;P&gt;            FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            DATA_TAB = t_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " data_upload&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;  Form  file_selection&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;FORM file_selection .&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            program_name  = syst-cprog&lt;/P&gt;&lt;P&gt;            dynpro_number = syst-dynnr&lt;/P&gt;&lt;P&gt;            field_name    = 'p_file1'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            file_name     = p_file1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " file_selection&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;  Form  BDC_DYNPRO&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;FORM BDC_DYNPRO using program dynpro.&lt;/P&gt;&lt;P&gt;  CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-PROGRAM = PROGRAM.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-DYNPRO = DYNPRO.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND  IT_BDCDATA.&lt;/P&gt;&lt;P&gt;endform.&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;  Form  BDC_FIELD&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;FORM  bdc_field using fnam fval.&lt;/P&gt;&lt;P&gt;  CLEAR  IT_BDCDATA.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;  APPEND  IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM validate                                                 *&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;&lt;/P&gt;&lt;P&gt;FORM validate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  delete t_record index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    delete t_record where accnt = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    translate t_record-bukrs to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-accnt to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-waers to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-xblnr to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              INPUT  = t_record-accnt&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              OUTPUT = t_record-accnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move-corresponding t_record to n_record.&lt;/P&gt;&lt;P&gt;    append n_record.&lt;/P&gt;&lt;P&gt;    clear n_record.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_record.&lt;/P&gt;&lt;P&gt;    clear flag.&lt;/P&gt;&lt;P&gt;    delete t_record where accnt = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vendor  and company code checking.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    translate t_record-accnt to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-bukrs to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              INPUT  = t_record-accnt&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              OUTPUT = t_record-accnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single * from lfb1 where bukrs = t_record-bukrs&lt;/P&gt;&lt;P&gt;                                  and  lifnr = t_record-accnt.&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      flag = 'X'.&lt;/P&gt;&lt;P&gt;      error_record-rowno = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding t_record to error_record.&lt;/P&gt;&lt;P&gt;      error_record-text1 = 'The Vendor not Under this company Code'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With holding liability.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single * from lfbw where bukrs = t_record-bukrs&lt;/P&gt;&lt;P&gt;                                    and  lifnr = t_record-accnt&lt;/P&gt;&lt;P&gt;                                  and  WT_SUBJCT = 'X'.&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      flag = 'X'.&lt;/P&gt;&lt;P&gt;      error_record-rowno = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding t_record to error_record.&lt;/P&gt;&lt;P&gt;error_record-text2 = 'The Vendor doesnt have Withholding Tax Liability'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;G/L account check with company code*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single * from skb1 where bukrs = t_record-bukrs&lt;/P&gt;&lt;P&gt;                                  and saknr = t_record-hkont.&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      flag = 'X'.&lt;/P&gt;&lt;P&gt;      error_record-rowno = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding t_record to error_record.&lt;/P&gt;&lt;P&gt;    error_record-text3 = 'The G/L acc not under the given company code'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*cost centre checking&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this FM for leading zeros&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              INPUT  = t_record-kostl&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              OUTPUT = v_kostl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single kostl from csks into v_kostl where bukrs = t_record-bukrs&lt;/P&gt;&lt;P&gt;                                         and kostl = v_kostl.&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      flag = 'X'.&lt;/P&gt;&lt;P&gt;      error_record-rowno = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding t_record to error_record.&lt;/P&gt;&lt;P&gt; error_record-text4 = 'The costcentre not under the given company code'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it check the invioce alredy posted or not.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    translate t_record-waers to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-xblnr to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single belnr into v_belnr1 from bsip where bukrs = t_record-bukrs&lt;/P&gt;&lt;P&gt;                                          and   lifnr  = t_record-accnt&lt;/P&gt;&lt;P&gt;                                          and   waers  = t_record-waers&lt;/P&gt;&lt;P&gt;                                              and   bldat  = p_invdat&lt;/P&gt;&lt;P&gt;                                          and   xblnr  = t_record-xblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      day   =  p_invdat+6(2).&lt;/P&gt;&lt;P&gt;      month =  p_invdat+4(2).&lt;/P&gt;&lt;P&gt;      year  =  p_invdat+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      concatenate day month year into date1 SEPARATED BY '.'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      error_record-rowno = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding t_record to error_record.&lt;/P&gt;&lt;P&gt; concatenate 'This document under number' v_belnr1 'already posted on '&lt;/P&gt;&lt;P&gt;      date1 into fld2  separated by space.&lt;/P&gt;&lt;P&gt;      error_record-text5 = fld2.&lt;/P&gt;&lt;P&gt;      flag = 'X'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*zero balance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    on change of t_record-accnt or t_record-xblnr.&lt;/P&gt;&lt;P&gt;      amount = 0.&lt;/P&gt;&lt;P&gt;      totalamount = 0.&lt;/P&gt;&lt;P&gt;      amount = t_record-wrbtr1.&lt;/P&gt;&lt;P&gt;      loop at n_record where bukrs = t_record-bukrs&lt;/P&gt;&lt;P&gt;                           and  accnt = t_record-accnt&lt;/P&gt;&lt;P&gt;                           and xblnr = t_record-xblnr&lt;/P&gt;&lt;P&gt;                           and wrbtr1 = t_record-wrbtr1&lt;/P&gt;&lt;P&gt;                           and waers = t_record-waers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        totalamount = totalamount  + n_record-wrbtr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;    endon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if amount ne totalamount.&lt;/P&gt;&lt;P&gt;      error_record-rowno = sy-tabix + 1.&lt;/P&gt;&lt;P&gt;      move-corresponding t_record to error_record.&lt;/P&gt;&lt;P&gt;      error_record-text6 = 'Posting only possible with zero balance'.&lt;/P&gt;&lt;P&gt;      flag = 'X'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if flag = 'X'.&lt;/P&gt;&lt;P&gt;      error_record-flag = 'X'.&lt;/P&gt;&lt;P&gt;      append error_record.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if flag &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;      move-corresponding t_record to f_record.&lt;/P&gt;&lt;P&gt;      append f_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear f_record.&lt;/P&gt;&lt;P&gt;    clear error_record.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endform.&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;  Form  Table Control&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;FORM head_item .&lt;/P&gt;&lt;P&gt;  clear t_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    delete t_record where accnt = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    translate t_record-bukrs to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-accnt to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-waers to upper case.&lt;/P&gt;&lt;P&gt;    translate t_record-xblnr to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              INPUT  = t_record-accnt&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              OUTPUT = t_record-accnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    on change of t_record-accnt or t_record-xblnr or t_record-wrbtr1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING t_record TO t_head.&lt;/P&gt;&lt;P&gt;      APPEND t_head.&lt;/P&gt;&lt;P&gt;    endon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING t_record TO t_item.&lt;/P&gt;&lt;P&gt;    APPEND t_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear : t_item,t_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&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;  Download  the Internal Table to Local File.&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;form disperrorrec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform top-of-page1.&lt;/P&gt;&lt;P&gt;  PERFORM diserrorrecpostrun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&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;  Date form&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;FORM  date.&lt;/P&gt;&lt;P&gt;  day = p_invdat+6(2).&lt;/P&gt;&lt;P&gt;  month = p_invdat+4(2).&lt;/P&gt;&lt;P&gt;  year =  p_invdat+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate day month year into date1 SEPARATED BY '.'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  day = p_posdat+6(2).&lt;/P&gt;&lt;P&gt;  month = p_posdat+4(2).&lt;/P&gt;&lt;P&gt;  year =  p_posdat+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate day month year into date2 SEPARATED BY '.'.&lt;/P&gt;&lt;P&gt;ENDFORM.&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;  Display the errors in flat file test run&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;form disperrortestrun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at error_record.&lt;/P&gt;&lt;P&gt;    format color 2 intensified on.&lt;/P&gt;&lt;P&gt;    set left scroll-boundary column 70.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    write :   /'|',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (6) error_record-rowno,         '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (14) error_record-bukrs,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (12) error_record-accnt,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (16) error_record-xblnr,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (16) error_record-wrbtr1,       '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (8)  error_record-waers,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (13) error_record-secco,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (20) error_record-sgtxt,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (14) error_record-hkont,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (15) error_record-wrbtr2,       '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (10) error_record-mwskz,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (20) error_record-gsber,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (12) error_record-kostl,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (5)  error_record-flag,         '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (50) error_record-text1,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (53) error_record-text2,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (50) error_record-text3,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (50) error_record-text4,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (67) error_record-text5,        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             (45) error_record-text6,        '|'  .&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  uline at /1(538).&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;endform.&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;Report Header for Test Run                                          *&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;&lt;/P&gt;&lt;P&gt;form header.&lt;/P&gt;&lt;P&gt;  set left scroll-boundary column 70.&lt;/P&gt;&lt;P&gt;  format color 5 .&lt;/P&gt;&lt;P&gt;  write: 'REPORT :', sy-repid,&lt;/P&gt;&lt;P&gt; 38 'ERROR RECORDS DETAILS OF TEST RUN OF FB60(VENDOR INVIOCE POSTING)'&lt;/P&gt;&lt;P&gt;  ,123 'DATE :', sy-datum .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;  skip 3.&lt;/P&gt;&lt;P&gt;  format color 1 intensified on.&lt;/P&gt;&lt;P&gt;  uline at 1(538).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write : /'|',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          (6) 'Row No',                             '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (14) 'Company Code',                       '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (12) 'Vendor No',                          '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (16) 'Reference',                          '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (16) 'Invioce Amount',                     '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (8) 'Currency',                            '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (13) 'Section Code',                       '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (20) 'text',                               '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (14) 'G/L Account',                        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (15) 'Item Amount',                        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (10) 'Tax Code',                           '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (20) 'Business Area',                      '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (12) 'Cost Centre',                        '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (5)  'Error record Status',                '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (50) 'Company Code/Vendor',                '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (53) 'Vendor/With holding tax Liability',  '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (50) 'Company Code/ G/L Account',          '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (50) 'Company Code / Cost Centre',         '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (67) 'Invioce Status',                     '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (45) 'Invalid Balance',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        '|'.&lt;/P&gt;&lt;P&gt;  uline at /1(538).&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report Header for Uploaded records of post run                      *&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;&lt;/P&gt;&lt;P&gt;form top-of-page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  format color 5 .&lt;/P&gt;&lt;P&gt;  write: 'REPORT :', sy-repid,60 'UPLOADED RECORDS DETAILS',&lt;/P&gt;&lt;P&gt;                                    123 'DATE :', sy-datum .&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;  skip 3.&lt;/P&gt;&lt;P&gt;  format color 1 intensified on.&lt;/P&gt;&lt;P&gt;  uline at 1(140).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write : /'|',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (14) 'Company Code',   '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (17) 'Vendor Code',    '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (32) 'Vendor Name',    '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (13) 'Document No',    '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (12) 'Posting Date',   '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (24) 'Invioce Amount', '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (12) 'UserName',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        '|'.&lt;/P&gt;&lt;P&gt;  uline at /1(140).&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&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;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;Display the upload records of post run                              *&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;&lt;/P&gt;&lt;P&gt;form dispsuccrec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM top-of-page.&lt;/P&gt;&lt;P&gt;  format color 2 intensified on.&lt;/P&gt;&lt;P&gt;  loop at succ_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single bname into (v_username) from usr02&lt;/P&gt;&lt;P&gt;                                  where bname = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Translate succ_head-accnt to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              INPUT  = succ_head-accnt&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;P&gt;              OUTPUT = succ_head-accnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single  name1 into (v_name) from lfa1&lt;/P&gt;&lt;P&gt;                          where lifnr = succ_head-accnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    translate succ_head-waers to upper case.&lt;/P&gt;&lt;P&gt;    translate succ_head-xblnr to upper case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single belnr into v_belnr from bsip where&lt;/P&gt;&lt;P&gt;                                               bukrs =  succ_head-bukrs&lt;/P&gt;&lt;P&gt;                                         and   lifnr =  succ_head-accnt&lt;/P&gt;&lt;P&gt;                                         and   waers =  succ_head-waers&lt;/P&gt;&lt;P&gt;                                         and   bldat =  p_invdat&lt;/P&gt;&lt;P&gt;                                         and   xblnr =  succ_head-xblnr&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    write :   /'|',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                (14) succ_head-bukrs,  '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                (17) succ_head-accnt,  '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                (32) v_name,           '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                (13) v_belnr,          '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                (12) date2,            '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                (24) succ_head-wrbtr1, '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                (12) v_username,       '|' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  uline at /1(140).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;endform.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report for error records of post run                                *&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form diserrorrecpostrun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  format color 2 intensified on.&lt;/P&gt;&lt;P&gt;  set left scroll-boundary column 70.&lt;/P&gt;&lt;P&gt;  loop at error_head1.&lt;/P&gt;&lt;P&gt;    write :   /'|',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (14) error_head1-bukrs,      '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (17) error_head1-accnt,      '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (15) error_head1-xblnr,      '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (10) error_head1-waers,      '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (20) error_head1-wrbtr1,     '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (12) error_head1-secco,      '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (30) error_head1-sgtxt,      '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (14) error_head1-messtyp ,   '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                  (82)  error_head1-messg    , '|'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  uline at /1(234).&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report Header for error records of post run                         *&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;&lt;/P&gt;&lt;P&gt;form top-of-page1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  format color 5 .&lt;/P&gt;&lt;P&gt;  write: 'REPORT :', sy-repid,60 'ERROR RECORDS DETAILS',&lt;/P&gt;&lt;P&gt;                                    123 'DATE :', sy-datum .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  set left scroll-boundary column 70.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;  skip 3.&lt;/P&gt;&lt;P&gt;  format color 1 intensified on.&lt;/P&gt;&lt;P&gt;  uline at 1(234).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write : /'|',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (14) 'Company Code',         '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (17) 'Vendor Code',          '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (15) 'Reference ',           '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (10) 'Currency',             '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (20) 'Amount in Document',   '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (12) 'Section Code',         '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (30) 'Item text',            '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (14) 'Message Type',         '|' no-gap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         (82) 'Message Text',&lt;/P&gt;&lt;P&gt;        '|'.&lt;/P&gt;&lt;P&gt;  uline at /1(234).&lt;/P&gt;&lt;P&gt;  format color off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;sitaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 04:49:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056528#M969709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T04:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Validating flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056529#M969710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   After uploading ur flat file into ur itab, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then do this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; LOOP AT ITAB.
              IF ITAB-RATE LT 0.
                ---- PRINT ERROR  MESSAGE
              ENDIF.
         ENDLOOP. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Rgds,&lt;/P&gt;&lt;P&gt;S.Bharani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 04:54:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056529#M969710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T04:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Validating flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056530#M969711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U have to check at flat file level only.... that is down by functional consultants.. As an abaper we need to use that flat file only.. and one more thing if yo uwant to check whether the field holds the data/value  that can be down at internal table level...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward Points if useful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Raghunath.S&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9986076729&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 05:49:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056530#M969711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T05:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Validating flat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056531#M969712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Validating rate means wat do u mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If ur trying to check whether it is decimal or not u can use this piece of code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ztest2  . "IDES Textpool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA rate(11) TYPE c ."p DECIMALS 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA rate1(12) TYPE c." p DECIMALS 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rate1 = '.0123456789'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rate = '10.90'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF rate CO&lt;/P&gt;&lt;P&gt; rate1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE 'error'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace rate with some..'a123h' &amp;amp; check result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-flat-file/m-p/4056531#M969712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:25:22Z</dc:date>
    </item>
  </channel>
</rss>

