<?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: BDC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421572#M202336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kalluri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use GUI_UPLOAD FM is good option to go ahead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jul 2006 10:18:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-06T10:18:57Z</dc:date>
    <item>
      <title>BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421568#M202332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;P&gt;          I have a text of around 250 chars and i am reading the text along with other fields into internal table using function module, 'ALSM_EXCEL_TO_INTERNAL_TABLE'.  &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;         The actual issue is the field length supported by structure 'ALSMEX_TABLINE' in the function module is 50 chars. So, i am unable to read the entire 250 chars into my interal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      what is your solution for this.&lt;/P&gt;&lt;P&gt;Help in this regard will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 09:47:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421568#M202332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T09:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421569#M202333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;If you have to use the 'ALSM_EXCEL_TO_INTERNAL_TABLE' then there is no way but to read only 50 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you could use GUI_UPLOAD to read data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 09:49:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421569#M202333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T09:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421570#M202334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kalluri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. It is always better to save the excel &lt;/P&gt;&lt;P&gt;file as TAB Delimited file,&lt;/P&gt;&lt;P&gt;using excel only,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. and then upload this text file,&lt;/P&gt;&lt;P&gt;  using GUI_UPLOAD&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 09:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421570#M202334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T09:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421571#M202335</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;You can use &amp;lt;b&amp;gt;GUI_UPLOAD&amp;lt;/b&amp;gt; instead of that FM.it will support 250 chars.it will read the full text into Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 09:55:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421571#M202335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T09:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421572#M202336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kalluri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use GUI_UPLOAD FM is good option to go ahead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 10:18:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421572#M202336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T10:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421573#M202337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The flat file consists of no indicators, so that i can identify as header, item , and subitem, and more over it consists of lot of spaces in between the fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 10:32:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421573#M202337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T10:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421574#M202338</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;are you not saving the File as Tab delimited text file, that will be more easy to get the data to itab from the internal table.&lt;/P&gt;&lt;P&gt;and what is the field with 250chars you are uploading from flat file.how you declated your itab when you use the FM &amp;lt;b&amp;gt;ALSM_EXCEL_TO_INTERNAL_TABLE&amp;lt;/b&amp;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;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 10:44:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421574#M202338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T10:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421575#M202339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had written a program some time back for uploading notifications. I had designed the file format to have a indicator to identify the header, line item and classification records. The file was a pipe delimited file. Please go through the code below to undestand how I read the file. Might Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zwam_create_notifications MESSAGE-ID vz NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS : c_comma TYPE c VALUE '|'. "Was changed from comma to pipe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: filename(255) TYPE c,&lt;/P&gt;&lt;P&gt;       str_line      TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF nothdr,&lt;/P&gt;&lt;P&gt;        ind,&lt;/P&gt;&lt;P&gt;        exnum LIKE viqmel-qmnum,&lt;/P&gt;&lt;P&gt;        ntype(2),&lt;/P&gt;&lt;P&gt;        stext LIKE viqmel-qmtxt,&lt;/P&gt;&lt;P&gt;        ingrp LIKE viqmel-ingrp,&lt;/P&gt;&lt;P&gt;        gewrk LIKE riwo00-gewrk,&lt;/P&gt;&lt;P&gt;        iwerk LIKE viqmel-iwerk,&lt;/P&gt;&lt;P&gt;        qmnam LIKE viqmel-qmnam,&lt;/P&gt;&lt;P&gt;        qmdat LIKE viqmel-qmdat,&lt;/P&gt;&lt;P&gt;        qmtim LIKE viqmel-mzeit,&lt;/P&gt;&lt;P&gt;        tplnr LIKE viqmel-tplnr,&lt;/P&gt;&lt;P&gt;        equnr LIKE viqmel-equnr,&lt;/P&gt;&lt;P&gt;       END OF nothdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF nottxt,&lt;/P&gt;&lt;P&gt;        ind,&lt;/P&gt;&lt;P&gt;        exnum LIKE viqmel-qmnum,&lt;/P&gt;&lt;P&gt;        ltext LIKE tline-tdline,&lt;/P&gt;&lt;P&gt;       END OF nottxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF notitm,&lt;/P&gt;&lt;P&gt;        ind,&lt;/P&gt;&lt;P&gt;        exnum LIKE viqmel-qmnum,&lt;/P&gt;&lt;P&gt;        itmno LIKE viqmfe-fenum,&lt;/P&gt;&lt;P&gt;        otgrp LIKE viqmfe-otgrp,&lt;/P&gt;&lt;P&gt;        oteil LIKE viqmfe-oteil,&lt;/P&gt;&lt;P&gt;        fegrp LIKE viqmfe-fegrp,&lt;/P&gt;&lt;P&gt;        fecod LIKE viqmfe-fecod,&lt;/P&gt;&lt;P&gt;        urgrp LIKE viqmur-urgrp,&lt;/P&gt;&lt;P&gt;        urcod LIKE viqmur-urcod,&lt;/P&gt;&lt;P&gt;        mngrp LIKE viqmma-mngrp,&lt;/P&gt;&lt;P&gt;        mncod LIKE viqmma-mncod,&lt;/P&gt;&lt;P&gt;        class LIKE rmclm-class,&lt;/P&gt;&lt;P&gt;       END OF notitm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF itmchr,&lt;/P&gt;&lt;P&gt;        ind,&lt;/P&gt;&lt;P&gt;        exnum LIKE viqmel-qmnum,&lt;/P&gt;&lt;P&gt;        itmno LIKE viqmfe-fenum,&lt;/P&gt;&lt;P&gt;        type,&lt;/P&gt;&lt;P&gt;        chrt(30),&lt;/P&gt;&lt;P&gt;        chvl(30),&lt;/P&gt;&lt;P&gt;       END OF itmchr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_allocnum.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi1003_alloc_values_num.&lt;/P&gt;&lt;P&gt;TYPES : END OF ty_allocnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_allocchar.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi1003_alloc_values_char.&lt;/P&gt;&lt;P&gt;TYPES : END OF ty_allocchar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_objtable.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi1003_key .&lt;/P&gt;&lt;P&gt;TYPES : END OF ty_objtable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_alloccurr.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapi1003_alloc_values_curr.&lt;/P&gt;&lt;P&gt;TYPES : END OF ty_alloccurr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : wa_hdr    TYPE nothdr,&lt;/P&gt;&lt;P&gt;       wa_itm    TYPE notitm,&lt;/P&gt;&lt;P&gt;       wa_txt    TYPE nottxt,&lt;/P&gt;&lt;P&gt;       wa_chr    TYPE itmchr,&lt;/P&gt;&lt;P&gt;       it_hdr    TYPE STANDARD TABLE OF nothdr,&lt;/P&gt;&lt;P&gt;       it_itm    TYPE STANDARD TABLE OF notitm,&lt;/P&gt;&lt;P&gt;       it_txt    TYPE STANDARD TABLE OF nottxt,&lt;/P&gt;&lt;P&gt;       it_chr    TYPE STANDARD TABLE OF itmchr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_log OCCURS 0,&lt;/P&gt;&lt;P&gt;       exnum  LIKE viqmel-qmnum,&lt;/P&gt;&lt;P&gt;       notif  LIKE viqmel-qmnum,&lt;/P&gt;&lt;P&gt;       itmno  LIKE viqmfe-fenum,&lt;/P&gt;&lt;P&gt;       msgtx(100),&lt;/P&gt;&lt;P&gt;      END OF it_log,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      BEGIN OF it_cls OCCURS 0,&lt;/P&gt;&lt;P&gt;        exnum LIKE viqmel-qmnum,&lt;/P&gt;&lt;P&gt;        itmno LIKE viqmfe-fenum,&lt;/P&gt;&lt;P&gt;        class LIKE rmclm-class,&lt;/P&gt;&lt;P&gt;      END OF it_cls,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      wa_cls     LIKE LINE OF it_cls,&lt;/P&gt;&lt;P&gt;      notif_data TYPE string,&lt;/P&gt;&lt;P&gt;      fname_str  TYPE string,&lt;/P&gt;&lt;P&gt;      ds_name    TYPE string,&lt;/P&gt;&lt;P&gt;      len        TYPE i,&lt;/P&gt;&lt;P&gt;      hdr_recs   TYPE i,&lt;/P&gt;&lt;P&gt;      log_recs   TYPE i,&lt;/P&gt;&lt;P&gt;      indicator,&lt;/P&gt;&lt;P&gt;      faltu,&lt;/P&gt;&lt;P&gt;      it_ipdat   TYPE TABLE OF str_line WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_allocvaluesnum     TYPE STANDARD TABLE OF ty_allocnum  WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      i_allocvaluescurr    TYPE STANDARD TABLE OF ty_alloccurr WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      i_allocvalueschar    TYPE STANDARD TABLE OF ty_allocchar WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      i_objtable           TYPE STANDARD TABLE OF ty_objtable  WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : notitem            LIKE bapi2080_notitemi    OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       notifcaus          LIKE bapi2080_notcausi    OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       notifactv          LIKE bapi2080_notactvi    OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       notiftask          LIKE bapi2080_nottaski    OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       notifpartnr        LIKE bapi2080_notpartnri  OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       longtexts          LIKE bapi2080_notfulltxti OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       key_relationships  LIKE bapi2080_notkeye     OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       return             LIKE bapiret2             OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       notifheader_export LIKE bapi2080_nothdre,&lt;/P&gt;&lt;P&gt;       external_number    LIKE bapi2080_nothdre-notif_no,&lt;/P&gt;&lt;P&gt;       notif_type         LIKE bapi2080-notif_type,&lt;/P&gt;&lt;P&gt;       notifheader        LIKE bapi2080_nothdri,&lt;/P&gt;&lt;P&gt;       task_determination LIKE bapiflag,&lt;/P&gt;&lt;P&gt;       sender             LIKE bapi_sender,&lt;/P&gt;&lt;P&gt;       orderid            LIKE bapi2080_nothdre-orderid,&lt;/P&gt;&lt;P&gt;       p_file1            LIKE filename-fileintern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file2 LIKE filename-fileintern OBLIGATORY LOWER CASE,&lt;/P&gt;&lt;P&gt;            r_pres  RADIOBUTTON GROUP rb1 DEFAULT 'X',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-ucomm = 'SJOB' AND r_pres = 'X'.&lt;/P&gt;&lt;P&gt;    MESSAGE e000 WITH 'Please place the file on the application'&lt;/P&gt;&lt;P&gt;                      'server if the program is to be'&lt;/P&gt;&lt;P&gt;                      'processed in the background' ''.&lt;/P&gt;&lt;P&gt;  ENDIF.&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 upload_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM read_input_data.&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;  PERFORM create_notifications.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM write_header.&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;      Form  upload_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 upload_file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM upload_from_application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM upload_from_presentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " upload_file&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  upload_from_application&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;FORM upload_from_application .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK r_appl = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR ds_name.&lt;/P&gt;&lt;P&gt;  p_file1 = 'ZNOTIFICATION'.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FILE_GET_NAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      logical_filename = p_file1&lt;/P&gt;&lt;P&gt;      parameter_1      = p_file2&lt;/P&gt;&lt;P&gt;      parameter_2      = 'ipfiles'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name        = ds_name&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_not_found   = 1&lt;/P&gt;&lt;P&gt;      OTHERS           = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e102(lx) WITH p_file2.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET ds_name FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e105(lx) WITH ds_name.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    READ DATASET ds_name INTO notif_data.&lt;/P&gt;&lt;P&gt;    IF syst-subrc GT 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    APPEND notif_data TO it_ipdat.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLOSE DATASET ds_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " upload_from_application&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  upload_from_presentation&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;FORM upload_from_presentation .&lt;/P&gt;&lt;P&gt;  CHECK r_pres = 'X'.&lt;/P&gt;&lt;P&gt;  fname_str = p_file2.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = fname_str&lt;/P&gt;&lt;P&gt;      filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator     = ' '&lt;/P&gt;&lt;P&gt;      header_length           = 0&lt;/P&gt;&lt;P&gt;      read_by_line            = 'X'&lt;/P&gt;&lt;P&gt;      dat_mode                = ' '&lt;/P&gt;&lt;P&gt;      codepage                = ' '&lt;/P&gt;&lt;P&gt;      ignore_cerr             = 'X'&lt;/P&gt;&lt;P&gt;      replacement             = '#'&lt;/P&gt;&lt;P&gt;      check_bom               = ' '&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                = it_ipdat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_error         = 1&lt;/P&gt;&lt;P&gt;      file_read_error         = 2&lt;/P&gt;&lt;P&gt;      no_batch                = 3&lt;/P&gt;&lt;P&gt;      gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;      invalid_type            = 5&lt;/P&gt;&lt;P&gt;      no_authority            = 6&lt;/P&gt;&lt;P&gt;      unknown_error           = 7&lt;/P&gt;&lt;P&gt;      bad_data_format         = 8&lt;/P&gt;&lt;P&gt;      header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;      separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;      header_too_long         = 11&lt;/P&gt;&lt;P&gt;      unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;      access_denied           = 13&lt;/P&gt;&lt;P&gt;      dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;      disk_full               = 15&lt;/P&gt;&lt;P&gt;      dp_timeout              = 16&lt;/P&gt;&lt;P&gt;      OTHERS                  = 17.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE i000(vz) WITH 'Error uploading' 'input file.' 'Return Code' sy-subrc.&lt;/P&gt;&lt;P&gt;    STOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " upload_from_presentation&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  read_input_data&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;FORM read_input_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR   : wa_hdr, wa_itm, wa_txt, wa_chr, wa_cls.&lt;/P&gt;&lt;P&gt;  REFRESH : it_hdr, it_itm, it_txt, it_chr, it_cls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM build_tmp_tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  hdr_recs = LINES( it_hdr ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF hdr_recs EQ 0.&lt;/P&gt;&lt;P&gt;    MESSAGE i000(vz) WITH 'No Header records' 'found in' 'the input' 'file.'.&lt;/P&gt;&lt;P&gt;    STOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "read_input_data&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  build_tmp_tables&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;FORM build_tmp_tables .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_ipdat INTO notif_data.&lt;/P&gt;&lt;P&gt;    len = STRLEN( notif_data ).&lt;/P&gt;&lt;P&gt;    IF len GT 0.&lt;/P&gt;&lt;P&gt;      indicator = notif_data+0(1).&lt;/P&gt;&lt;P&gt;      IF indicator = 'H'.&lt;/P&gt;&lt;P&gt;        CLEAR wa_hdr.&lt;/P&gt;&lt;P&gt;        SPLIT notif_data AT c_comma INTO wa_hdr-ind&lt;/P&gt;&lt;P&gt;                                         wa_hdr-exnum&lt;/P&gt;&lt;P&gt;                                         wa_hdr-ntype&lt;/P&gt;&lt;P&gt;                                         wa_hdr-stext&lt;/P&gt;&lt;P&gt;                                         wa_hdr-ingrp&lt;/P&gt;&lt;P&gt;                                         wa_hdr-gewrk&lt;/P&gt;&lt;P&gt;                                         wa_hdr-iwerk&lt;/P&gt;&lt;P&gt;                                         wa_hdr-qmnam&lt;/P&gt;&lt;P&gt;                                         wa_hdr-qmdat&lt;/P&gt;&lt;P&gt;                                         wa_hdr-qmtim&lt;/P&gt;&lt;P&gt;                                         wa_hdr-tplnr&lt;/P&gt;&lt;P&gt;                                         wa_hdr-equnr&lt;/P&gt;&lt;P&gt;                                         faltu.&lt;/P&gt;&lt;P&gt;        APPEND wa_hdr TO it_hdr.&lt;/P&gt;&lt;P&gt;      ELSEIF indicator = 'L'.&lt;/P&gt;&lt;P&gt;        CLEAR wa_txt.&lt;/P&gt;&lt;P&gt;        SPLIT notif_data AT c_comma INTO wa_txt-ind&lt;/P&gt;&lt;P&gt;                                         wa_txt-exnum&lt;/P&gt;&lt;P&gt;                                         wa_txt-ltext&lt;/P&gt;&lt;P&gt;                                         faltu.&lt;/P&gt;&lt;P&gt;        APPEND wa_txt TO it_txt.&lt;/P&gt;&lt;P&gt;      ELSEIF indicator = 'I'.&lt;/P&gt;&lt;P&gt;        CLEAR wa_itm.&lt;/P&gt;&lt;P&gt;        SPLIT notif_data AT c_comma INTO wa_itm-ind&lt;/P&gt;&lt;P&gt;                                         wa_itm-exnum&lt;/P&gt;&lt;P&gt;                                         wa_itm-itmno&lt;/P&gt;&lt;P&gt;                                         wa_itm-otgrp&lt;/P&gt;&lt;P&gt;                                         wa_itm-oteil&lt;/P&gt;&lt;P&gt;                                         wa_itm-fegrp&lt;/P&gt;&lt;P&gt;                                         wa_itm-fecod&lt;/P&gt;&lt;P&gt;                                         wa_itm-urgrp&lt;/P&gt;&lt;P&gt;                                         wa_itm-urcod&lt;/P&gt;&lt;P&gt;                                         wa_itm-mngrp&lt;/P&gt;&lt;P&gt;                                         wa_itm-mncod&lt;/P&gt;&lt;P&gt;                                         wa_itm-class&lt;/P&gt;&lt;P&gt;                                         faltu.&lt;/P&gt;&lt;P&gt;        APPEND wa_itm TO it_itm.&lt;/P&gt;&lt;P&gt;        MOVE-CORRESPONDING wa_itm TO wa_cls.&lt;/P&gt;&lt;P&gt;        APPEND wa_cls TO it_cls.&lt;/P&gt;&lt;P&gt;      ELSEIF indicator = 'C'.&lt;/P&gt;&lt;P&gt;        CLEAR wa_chr.&lt;/P&gt;&lt;P&gt;        SPLIT notif_data AT c_comma INTO wa_chr-ind&lt;/P&gt;&lt;P&gt;                                         wa_chr-exnum&lt;/P&gt;&lt;P&gt;                                         wa_chr-itmno&lt;/P&gt;&lt;P&gt;                                         wa_chr-type&lt;/P&gt;&lt;P&gt;                                         wa_chr-chrt&lt;/P&gt;&lt;P&gt;                                         wa_chr-chvl&lt;/P&gt;&lt;P&gt;                                         faltu.&lt;/P&gt;&lt;P&gt;        APPEND wa_chr TO it_chr.&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;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " build_tmp_tables&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  create_notifications&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;FORM create_notifications .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_hdr BY exnum.&lt;/P&gt;&lt;P&gt;  SORT it_itm BY exnum itmno.&lt;/P&gt;&lt;P&gt;  SORT it_cls BY exnum itmno.&lt;/P&gt;&lt;P&gt;  SORT it_chr BY exnum itmno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_hdr INTO wa_hdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM build_bapi_interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM call_bapi1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM display_log.&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.                    " create_notifications&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  build_bapi_interface&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;FORM build_bapi_interface .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR: notitem,&lt;/P&gt;&lt;P&gt;         notifcaus,&lt;/P&gt;&lt;P&gt;         notifactv,&lt;/P&gt;&lt;P&gt;         notiftask,&lt;/P&gt;&lt;P&gt;         notifpartnr,&lt;/P&gt;&lt;P&gt;         longtexts,&lt;/P&gt;&lt;P&gt;         key_relationships,&lt;/P&gt;&lt;P&gt;         return,&lt;/P&gt;&lt;P&gt;         notifheader_export,&lt;/P&gt;&lt;P&gt;         external_number,&lt;/P&gt;&lt;P&gt;         notif_type,&lt;/P&gt;&lt;P&gt;         notifheader,&lt;/P&gt;&lt;P&gt;         task_determination,&lt;/P&gt;&lt;P&gt;         sender,&lt;/P&gt;&lt;P&gt;         orderid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH: notitem,&lt;/P&gt;&lt;P&gt;           notifcaus,&lt;/P&gt;&lt;P&gt;           notifactv,&lt;/P&gt;&lt;P&gt;           notiftask,&lt;/P&gt;&lt;P&gt;           notifpartnr,&lt;/P&gt;&lt;P&gt;           longtexts,&lt;/P&gt;&lt;P&gt;           key_relationships,&lt;/P&gt;&lt;P&gt;           return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  external_number = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;  notif_type      = wa_hdr-ntype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  notifheader-refobjectkey  = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;  notifheader-equipment     = wa_hdr-equnr.&lt;/P&gt;&lt;P&gt;  notifheader-funct_loc     = wa_hdr-tplnr.&lt;/P&gt;&lt;P&gt;  notifheader-short_text    = wa_hdr-stext.&lt;/P&gt;&lt;P&gt;  notifheader-reportedby    = wa_hdr-qmnam.&lt;/P&gt;&lt;P&gt;  notifheader-notif_date    = wa_hdr-qmdat.&lt;/P&gt;&lt;P&gt;  notifheader-notiftime     = wa_hdr-qmtim.&lt;/P&gt;&lt;P&gt;  notifheader-planplant     = wa_hdr-iwerk.&lt;/P&gt;&lt;P&gt;  notifheader-plangroup     = wa_hdr-ingrp.&lt;/P&gt;&lt;P&gt;  notifheader-pm_wkctr      = wa_hdr-gewrk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_txt INTO wa_txt WHERE exnum = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;    longtexts-objtype    = 'QMEL'.&lt;/P&gt;&lt;P&gt;    longtexts-format_col = '*' .&lt;/P&gt;&lt;P&gt;    longtexts-text_line  = wa_txt-ltext.&lt;/P&gt;&lt;P&gt;    APPEND longtexts. CLEAR longtexts.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_itm INTO wa_itm WHERE exnum = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;    IF NOT wa_itm-otgrp IS INITIAL OR NOT wa_itm-fegrp IS INITIAL.&lt;/P&gt;&lt;P&gt;*Object Code and Damage Code&lt;/P&gt;&lt;P&gt;      notitem-refobjectkey  = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;      notitem-item_sort_no  = wa_itm-itmno.&lt;/P&gt;&lt;P&gt;      notitem-dl_codegrp    = wa_itm-otgrp.&lt;/P&gt;&lt;P&gt;      notitem-dl_code       = wa_itm-oteil.&lt;/P&gt;&lt;P&gt;      notitem-d_codegrp     = wa_itm-fegrp.&lt;/P&gt;&lt;P&gt;      notitem-d_code        = wa_itm-fecod.&lt;/P&gt;&lt;P&gt;      APPEND notitem.&lt;/P&gt;&lt;P&gt;*Cause Code&lt;/P&gt;&lt;P&gt;      IF NOT wa_itm-urgrp IS INITIAL.&lt;/P&gt;&lt;P&gt;        notifcaus-refobjectkey  = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;        notifcaus-cause_sort_no = wa_itm-itmno.&lt;/P&gt;&lt;P&gt;        notifcaus-cause_codegrp = wa_itm-urgrp.&lt;/P&gt;&lt;P&gt;        notifcaus-cause_code    = wa_itm-urcod.&lt;/P&gt;&lt;P&gt;        notifcaus-item_sort_no  = wa_itm-itmno.&lt;/P&gt;&lt;P&gt;        APPEND notifcaus. CLEAR notifcaus.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*Activity Code&lt;/P&gt;&lt;P&gt;      IF NOT wa_itm-mngrp IS INITIAL.&lt;/P&gt;&lt;P&gt;        notifactv-refobjectkey = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;        notifactv-act_sort_no  = wa_itm-itmno.&lt;/P&gt;&lt;P&gt;        notifactv-act_codegrp  = wa_itm-mngrp.&lt;/P&gt;&lt;P&gt;        notifactv-act_code     = wa_itm-mncod.&lt;/P&gt;&lt;P&gt;        notifactv-item_sort_no = wa_itm-itmno.&lt;/P&gt;&lt;P&gt;        APPEND notifactv. CLEAR notifactv.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;ENDFORM.                    " build_bapi_interface&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  call_bapi1&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;FORM call_bapi1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR it_log. REFRESH it_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      external_number    = external_number&lt;/P&gt;&lt;P&gt;      notif_type         = notif_type&lt;/P&gt;&lt;P&gt;      notifheader        = notifheader&lt;/P&gt;&lt;P&gt;      task_determination = task_determination&lt;/P&gt;&lt;P&gt;      sender             = sender&lt;/P&gt;&lt;P&gt;      orderid            = orderid&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      notifheader_export = notifheader_export&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      notitem            = notitem&lt;/P&gt;&lt;P&gt;      notifcaus          = notifcaus&lt;/P&gt;&lt;P&gt;      notifactv          = notifactv&lt;/P&gt;&lt;P&gt;      notiftask          = notiftask&lt;/P&gt;&lt;P&gt;      notifpartnr        = notifpartnr&lt;/P&gt;&lt;P&gt;      longtexts          = longtexts&lt;/P&gt;&lt;P&gt;      key_relationships  = key_relationships&lt;/P&gt;&lt;P&gt;      return             = return.&lt;/P&gt;&lt;P&gt;  READ TABLE return WITH KEY type = 'E' BINARY SEARCH.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    REFRESH return.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        number      = notifheader_export-notif_no&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        notifheader = notifheader_export&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        return      = return.&lt;/P&gt;&lt;P&gt;    READ TABLE return WITH KEY type = 'E' BINARY SEARCH.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          wait = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    it_log-exnum = wa_hdr-exnum.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    it_log-notif = notifheader_export-notif_no.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    it_log-msgtx = 'Notification created'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    APPEND it_log. CLEAR it_log.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      PERFORM call_bapi2.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      PERFORM add_bapi1_error.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    PERFORM add_bapi1_error.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                                                    "call_bapi1&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  call_bapi2&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;FORM call_bapi2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_cls INTO wa_cls WHERE exnum = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH : i_allocvalueschar, i_allocvaluescurr, i_allocvaluesnum.&lt;/P&gt;&lt;P&gt;    CLEAR   : i_allocvalueschar, i_allocvaluescurr, i_allocvaluesnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TRANSLATE wa_cls-class TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_chr INTO wa_chr WHERE exnum = wa_cls-exnum&lt;/P&gt;&lt;P&gt;                                 AND itmno = wa_cls-itmno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TRANSLATE wa_chr-chrt TO UPPER CASE.&lt;/P&gt;&lt;P&gt;      IF wa_chr-type = 'N'.&lt;/P&gt;&lt;P&gt;        i_allocvaluesnum-charact     = wa_chr-chrt.&lt;/P&gt;&lt;P&gt;        i_allocvaluesnum-value_from  = wa_chr-chvl.&lt;/P&gt;&lt;P&gt;        APPEND i_allocvaluesnum.&lt;/P&gt;&lt;P&gt;      ELSEIF wa_chr-type = 'C'.&lt;/P&gt;&lt;P&gt;        i_allocvalueschar-charact       = wa_chr-chrt.&lt;/P&gt;&lt;P&gt;        i_allocvalueschar-value_neutral = wa_chr-chvl.&lt;/P&gt;&lt;P&gt;        APPEND i_allocvalueschar.&lt;/P&gt;&lt;P&gt;      ELSEIF wa_chr-type = 'X'.&lt;/P&gt;&lt;P&gt;        i_allocvaluescurr-charact       = wa_chr-chrt.&lt;/P&gt;&lt;P&gt;        i_allocvaluescurr-value_from    = wa_chr-chvl.&lt;/P&gt;&lt;P&gt;        APPEND i_allocvaluescurr.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      AT END OF itmno.&lt;/P&gt;&lt;P&gt;        DELETE i_allocvalueschar WHERE value_neutral IS INITIAL.&lt;/P&gt;&lt;P&gt;        DELETE i_allocvaluesnum  WHERE value_from    IS INITIAL.&lt;/P&gt;&lt;P&gt;        DELETE i_allocvaluescurr WHERE value_from    IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF NOT i_allocvalueschar[] IS INITIAL OR&lt;/P&gt;&lt;P&gt;           NOT i_allocvaluesnum[]  IS INITIAL.&lt;/P&gt;&lt;P&gt;          CLEAR i_objtable.&lt;/P&gt;&lt;P&gt;          i_objtable-objecttable = 'QMFE'.&lt;/P&gt;&lt;P&gt;          i_objtable-classnum    = wa_cls-class.&lt;/P&gt;&lt;P&gt;          i_objtable-classtype   = '015'.&lt;/P&gt;&lt;P&gt;          i_objtable-object      = notifheader_export-notif_no.&lt;/P&gt;&lt;P&gt;          CONCATENATE notifheader_export-notif_no wa_chr-itmno&lt;/P&gt;&lt;P&gt;                 INTO i_objtable-object.&lt;/P&gt;&lt;P&gt;          REFRESH return.&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'BAPI_OBJCL_CREATE'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              objectkeynew    = i_objtable-object&lt;/P&gt;&lt;P&gt;              objecttablenew  = i_objtable-objecttable&lt;/P&gt;&lt;P&gt;              classnumnew     = i_objtable-classnum&lt;/P&gt;&lt;P&gt;              classtypenew    = i_objtable-classtype&lt;/P&gt;&lt;P&gt;            TABLES&lt;/P&gt;&lt;P&gt;              allocvaluesnum  = i_allocvaluesnum&lt;/P&gt;&lt;P&gt;              allocvalueschar = i_allocvalueschar&lt;/P&gt;&lt;P&gt;              allocvaluescurr = i_allocvaluescurr&lt;/P&gt;&lt;P&gt;              return          = return.&lt;/P&gt;&lt;P&gt;          READ TABLE return WITH KEY type = 'E' BINARY SEARCH.&lt;/P&gt;&lt;P&gt;          IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;            COMMIT WORK AND WAIT.&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            PERFORM add_bapi2_error.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDAT.&lt;/P&gt;&lt;P&gt;&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;ENDFORM.                    " call_bapi2&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  display_log&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;FORM display_log .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  log_recs = LINES( it_log ).&lt;/P&gt;&lt;P&gt;  IF log_recs GT 0.&lt;/P&gt;&lt;P&gt;    LOOP AT it_log.&lt;/P&gt;&lt;P&gt;      WRITE:/1   it_log-exnum,&lt;/P&gt;&lt;P&gt;             20  it_log-notif,&lt;/P&gt;&lt;P&gt;             40  it_log-itmno,&lt;/P&gt;&lt;P&gt;             50  it_log-msgtx.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;    SKIP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " display_log&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  write_header&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;FORM write_header .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ULINE.&lt;/P&gt;&lt;P&gt;  WRITE:/1   'External Number',&lt;/P&gt;&lt;P&gt;         20  'SAP Notification',&lt;/P&gt;&lt;P&gt;         40  'Item No',&lt;/P&gt;&lt;P&gt;         50  'Message'.&lt;/P&gt;&lt;P&gt;  ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " write_header&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  add_bapi1_error&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;FORM add_bapi1_error .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_log-exnum = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;  it_log-notif = notifheader_export-notif_no.&lt;/P&gt;&lt;P&gt;  it_log-msgtx = 'Error while creating Notification'.&lt;/P&gt;&lt;P&gt;  APPEND it_log. CLEAR it_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT return.&lt;/P&gt;&lt;P&gt;    it_log-exnum = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;    it_log-notif = notifheader_export-notif_no.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'MESSAGE_TEXT_BUILD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        msgid               = return-id&lt;/P&gt;&lt;P&gt;        msgnr               = return-number&lt;/P&gt;&lt;P&gt;        msgv1               = return-message_v1&lt;/P&gt;&lt;P&gt;        msgv2               = return-message_v2&lt;/P&gt;&lt;P&gt;        msgv3               = return-message_v3&lt;/P&gt;&lt;P&gt;        msgv4               = return-message_v4&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        message_text_output = it_log-msgtx.&lt;/P&gt;&lt;P&gt;    APPEND it_log. CLEAR it_log.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " add_bapi1_error&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  add_bapi2_error&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;FORM add_bapi2_error .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_log-exnum = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;  it_log-notif = notifheader_export-notif_no.&lt;/P&gt;&lt;P&gt;  it_log-itmno = wa_chr-itmno.&lt;/P&gt;&lt;P&gt;  it_log-msgtx = 'Error while classifying item'.&lt;/P&gt;&lt;P&gt;  APPEND it_log. CLEAR it_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT return.&lt;/P&gt;&lt;P&gt;    it_log-exnum = wa_hdr-exnum.&lt;/P&gt;&lt;P&gt;    it_log-notif = notifheader_export-notif_no.&lt;/P&gt;&lt;P&gt;    it_log-itmno = wa_chr-itmno.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'MESSAGE_TEXT_BUILD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        msgid               = return-id&lt;/P&gt;&lt;P&gt;        msgnr               = return-number&lt;/P&gt;&lt;P&gt;        msgv1               = return-message_v1&lt;/P&gt;&lt;P&gt;        msgv2               = return-message_v2&lt;/P&gt;&lt;P&gt;        msgv3               = return-message_v3&lt;/P&gt;&lt;P&gt;        msgv4               = return-message_v4&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        message_text_output = it_log-msgtx.&lt;/P&gt;&lt;P&gt;    APPEND it_log. CLEAR it_log.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " add_bapi2_error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kiran&lt;/P&gt;&lt;P&gt;*Please reward useful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jul 2006 10:44:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1421575#M202339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-06T10:44:44Z</dc:date>
    </item>
  </channel>
</rss>

