<?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: Abap code in bw please help me in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-in-bw-please-help-me/m-p/2994463#M707351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Patnaik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u know upto 2nd step of ABAP part of ur solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think following helps you.&lt;/P&gt;&lt;P&gt;Triggering an event notifies the background processing system that a named condition has been reached. &lt;/P&gt;&lt;P&gt;The background processing system reacts by starting any jobs that were waiting for the event. &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e37543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e37543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use function module BP_EVENT_RAISE to trigger an event from an ABAP program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report processing before triggering event... &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Trigger event to start background jobs waiting for the event. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: EVENTID LIKE TBTCJOB-EVENTID. &lt;/P&gt;&lt;P&gt;DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EVENTID = 'SP_TEST_EVENT'. " Event name must be defined &lt;/P&gt;&lt;P&gt;" with transaction SM62. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EVENTPARM = 'EVENT1'. " Optional: a job can be &lt;/P&gt;&lt;P&gt;" scheduled to wait for an &lt;/P&gt;&lt;P&gt;" EVENTID or combination of &lt;/P&gt;&lt;P&gt;" EVENTID and EVENTPARM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BP_EVENT_RAISE' " Event is triggered. Jobs &lt;/P&gt;&lt;P&gt;EXPORTING " waiting for event will be &lt;/P&gt;&lt;P&gt;EVENTID = EVENTID " started.&lt;/P&gt;&lt;P&gt;EVENTPARM = EVENTPARM &lt;/P&gt;&lt;P&gt;TARGET_INSTANCE = &amp;#145; &amp;#145; " Instance at which an event &lt;/P&gt;&lt;P&gt;" should be processed. Can &lt;/P&gt;&lt;P&gt;" generally be omitted. &lt;/P&gt;&lt;P&gt;EXCEPTIONS OTHERS = 1. " Exceptions include event not &lt;/P&gt;&lt;P&gt;" defined, no EVENTID &lt;/P&gt;&lt;P&gt;" exported, etc&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRaneeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Nov 2007 04:45:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-07T04:45:28Z</dc:date>
    <item>
      <title>Abap code in bw please help me</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-in-bw-please-help-me/m-p/2994462#M707350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;My requirement is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Users will be using the file upload Tcode in BW ( This TCode access will be authorized to specifi users)&lt;/P&gt;&lt;P&gt;2. ABAP Program need to place the file in the specified folder. Use the Z_FLATFILE_UPLOAD as a start. Copy to New program and work witht he New program&lt;/P&gt;&lt;P&gt;3. The ABAP program should be able to sent Trigger event after placingt he file to start the Process Chain, in which The flat file should be able to load to the ODS. &lt;/P&gt;&lt;P&gt;4. On Successful completion of the Process chain, the specific user group should be able to recive the email Message that the uploaded file has been loaded and avaible for reporting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP program should be able to handle the follwing:&lt;/P&gt;&lt;P&gt;1. If the File Format is not correct the user should get an error message that the file is not in the expected format.&lt;/P&gt;&lt;P&gt;2. Once the File upload complete, user should see the message that the file uploaded correctly.&lt;/P&gt;&lt;P&gt;3. on Successful completion of the FileUpload, The program should trigger event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the program Z_FLATFILE_UPLOAD is given below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Z_FLATFILE_UPLOAD message-id zx .&lt;/P&gt;&lt;P&gt;PARAMETERS: FILE_NM LIKE RLGRAP-FILENAME obligatory.&lt;/P&gt;&lt;P&gt;PARAMETERS: P2 LIKE RLGRAP-FILENAME&lt;/P&gt;&lt;P&gt;DEFAULT '/Userdata/IFIN/0557'.&lt;/P&gt;&lt;P&gt;DATA: INRECORD_COUNT TYPE i,&lt;/P&gt;&lt;P&gt;OUTRECORD_COUNT TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : MASK(20) TYPE C VALUE ',&lt;STRONG&gt;.&lt;/STRONG&gt; ,&lt;STRONG&gt;.&lt;/STRONG&gt;.'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;RECORD(3000),&lt;/P&gt;&lt;P&gt;END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;AT selection screen help and F4 statements&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE_NM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;DEF_FILENAME = ' '&lt;/P&gt;&lt;P&gt;DEF_PATH = FILE_NM&lt;/P&gt;&lt;P&gt;MASK = MASK&lt;/P&gt;&lt;P&gt;MODE = 'O'&lt;/P&gt;&lt;P&gt;TITLE = 'File Select'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;FILENAME = FILE_NM&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;INV_WINSYS = 04&lt;/P&gt;&lt;P&gt;NO_BATCH = 08&lt;/P&gt;&lt;P&gt;SELECTION_CANCEL = 12&lt;/P&gt;&lt;P&gt;SELECTION_ERROR = 16.&lt;/P&gt;&lt;P&gt;IF FILE_NM = ' ' AND SY-SUBRC = 12.&lt;/P&gt;&lt;P&gt;SET CURSOR FIELD 'FILE_NM'.&lt;/P&gt;&lt;P&gt;MESSAGE I000(ZX) with 'File Selection cancelled.'&lt;/P&gt;&lt;P&gt;'Please select a valid file to proceed'.&lt;/P&gt;&lt;P&gt;ELSEIF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE E000(ZX) WITH FILE_NM.&lt;/P&gt;&lt;P&gt;EXIT.&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;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = FILE_NM&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = ITAB.&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;message i000(ZX) with 'Upload Failed'.&lt;/P&gt;&lt;P&gt;LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*editor-call for input_rec.&lt;/P&gt;&lt;P&gt;OPEN DATASET P2 FOR output IN text mode encoding default.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message i000(ZX) with 'COULD NOT OPEN THE FILE'.&lt;/P&gt;&lt;P&gt;LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INRECORD_COUNT = 0.&lt;/P&gt;&lt;P&gt;OUTRECORD_COUNT = 0.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB. .&lt;/P&gt;&lt;P&gt;INRECORD_COUNT = INRECORD_COUNT + 1.&lt;/P&gt;&lt;P&gt;TRANSFER ITAB-RECORD TO P2.&lt;/P&gt;&lt;P&gt;OUTRECORD_COUNT = OUTRECORD_COUNT + 1.&lt;/P&gt;&lt;P&gt;ENDLOOP. "itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;CLOSE DATASET P2.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message e000(ZX) with 'COULD NOT OPEN THE FILE'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / '# of records read ', INRECORD_COUNT,&lt;/P&gt;&lt;P&gt;/ '# of records transfered', OUTRECORD_COUNT.&lt;/P&gt;&lt;P&gt;WRITE:/ 'upload filename', FILE_NM.&lt;/P&gt;&lt;P&gt;WRITE:/ ' aix filename', P2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this code i need to trigger my event can any onle tell me the steps after this program and the code also plese&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;P&gt;points will be assigned&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 04:28:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-in-bw-please-help-me/m-p/2994462#M707350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-07T04:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Abap code in bw please help me</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-in-bw-please-help-me/m-p/2994463#M707351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Patnaik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u know upto 2nd step of ABAP part of ur solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think following helps you.&lt;/P&gt;&lt;P&gt;Triggering an event notifies the background processing system that a named condition has been reached. &lt;/P&gt;&lt;P&gt;The background processing system reacts by starting any jobs that were waiting for the event. &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e37543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e37543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use function module BP_EVENT_RAISE to trigger an event from an ABAP program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report processing before triggering event... &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Trigger event to start background jobs waiting for the event. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: EVENTID LIKE TBTCJOB-EVENTID. &lt;/P&gt;&lt;P&gt;DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EVENTID = 'SP_TEST_EVENT'. " Event name must be defined &lt;/P&gt;&lt;P&gt;" with transaction SM62. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EVENTPARM = 'EVENT1'. " Optional: a job can be &lt;/P&gt;&lt;P&gt;" scheduled to wait for an &lt;/P&gt;&lt;P&gt;" EVENTID or combination of &lt;/P&gt;&lt;P&gt;" EVENTID and EVENTPARM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BP_EVENT_RAISE' " Event is triggered. Jobs &lt;/P&gt;&lt;P&gt;EXPORTING " waiting for event will be &lt;/P&gt;&lt;P&gt;EVENTID = EVENTID " started.&lt;/P&gt;&lt;P&gt;EVENTPARM = EVENTPARM &lt;/P&gt;&lt;P&gt;TARGET_INSTANCE = &amp;#145; &amp;#145; " Instance at which an event &lt;/P&gt;&lt;P&gt;" should be processed. Can &lt;/P&gt;&lt;P&gt;" generally be omitted. &lt;/P&gt;&lt;P&gt;EXCEPTIONS OTHERS = 1. " Exceptions include event not &lt;/P&gt;&lt;P&gt;" defined, no EVENTID &lt;/P&gt;&lt;P&gt;" exported, etc&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRaneeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 04:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-in-bw-please-help-me/m-p/2994463#M707351</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-07T04:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Abap code in bw please help me</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-in-bw-please-help-me/m-p/2994464#M707352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank u guyz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 07:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-in-bw-please-help-me/m-p/2994464#M707352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T07:23:55Z</dc:date>
    </item>
  </channel>
</rss>

