<?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: Send Notification (BDC Batch Input Session) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777222#M908828</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 can get the details about the processed or failed records from the table APQI. U can obtain this information from this table using GROUPID (Session name), TRANSCNT (Total number of Records) and TRANSCNTE (Transactions with errors) fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;data: tot_rec like apqi-transcnt,&lt;/P&gt;&lt;P&gt;        err_rec like apqi-transcnte,&lt;/P&gt;&lt;P&gt;        suc_rec type number.         "no. of successfully processed records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select TRANSCNT TRANSCNTE from APQI into (tot_rec, err_rec) where GROUPID = session_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suc_rec = tot_rec - err_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now format the document to be sent with the error messages according to ur requirements and call the FM SO_NEW_DOCUMENT_SEND_API to send the email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is enough for u according to ur requirements. Apart from this u can have a look at the following example also.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_lfa1 occurs 0,&lt;/P&gt;&lt;P&gt;KTOKK like lfa1-ktokk,&lt;/P&gt;&lt;P&gt;NAME1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;SORTL like lfa1-sortl,&lt;/P&gt;&lt;P&gt;LAND1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;end of it_lfa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*End generated data section *** &lt;/P&gt;&lt;P&gt;data : it_bdc like bdcdata occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: IT_MESSAGES TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;*DATA: LV_MESSAGE(255).&lt;/P&gt;&lt;P&gt;data : it_messages like bdcmsgcoll occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : V_message(255).&lt;/P&gt;&lt;P&gt;data : V_flag.&lt;/P&gt;&lt;P&gt;data : V_datum1 type sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_mesg occurs 0,&lt;/P&gt;&lt;P&gt;message(100),&lt;/P&gt;&lt;P&gt;end of it_mesg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*V_datum1 = sy-datum-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : P_Sess like APQI-GROUPID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform Get_data.&lt;/P&gt;&lt;P&gt;*perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_lfa1.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RF02K-KTOKK'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;it_lfa1-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-LAND1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=UPDA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;it_lfa1-name1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;it_lfa1-sortl.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;it_lfa1-land1.&lt;/P&gt;&lt;P&gt;call transaction 'XK01' using it_bdc&lt;/P&gt;&lt;P&gt;mode 'N'&lt;/P&gt;&lt;P&gt;update 'S'&lt;/P&gt;&lt;P&gt;messages into it_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc 0.&lt;/P&gt;&lt;P&gt;if V_flag 'X'.&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;V_flag = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform bdc_transaction. "using 'XK01'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform format_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : it_bdc,it_messages.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if V_flag = 'X'.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form Get_data&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM Get_data .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\srinu_vendor.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = it_lfa1&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CONVERSION_ERROR = 1&lt;/P&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 3&lt;/P&gt;&lt;P&gt;NO_BATCH = 4&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 5&lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 6&lt;/P&gt;&lt;P&gt;OTHERS = 7&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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " Get_data&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_dynpro&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;P_0061 text &lt;/P&gt;&lt;P&gt;--&amp;gt;P_0062 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM BDC_DYNPRO USING PROGRAM DYNPRO.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-PROGRAM = PROGRAM.&lt;/P&gt;&lt;P&gt;it_BDC-DYNPRO = DYNPRO.&lt;/P&gt;&lt;P&gt;it_BDC-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insert field * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;it_BDC-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form format_messages&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM format_messages .&lt;/P&gt;&lt;P&gt;loop at it_messages.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ID = it_messages-MSGID&lt;/P&gt;&lt;P&gt;LANG = 'EN'&lt;/P&gt;&lt;P&gt;NO = it_messages-MSGNR&lt;/P&gt;&lt;P&gt;V1 = it_messages-MSGV1&lt;/P&gt;&lt;P&gt;V2 = it_messages-MSGV2&lt;/P&gt;&lt;P&gt;V3 = it_messages-MSGV3&lt;/P&gt;&lt;P&gt;V4 = it_messages-MSGV4&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;MSG = V_message&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;write : / V_message.&lt;/P&gt;&lt;P&gt;clear : V_message.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;ENDFORM. " format_messages&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form open_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM open_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;GROUP = P_Sess&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOLDDATE = V_datum1 &lt;/P&gt;&lt;P&gt;KEEP = 'X'&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;write : / 'Session Creating wit Name : ',P_Sess.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " open_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form close_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM close_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'.&lt;/P&gt;&lt;P&gt;ENDFORM. " close_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_transaction&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;P_0132 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_transaction. "USING VALUE(P_0132).&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = 'XK01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POST_LOCAL = NOVBLOCAL &lt;/P&gt;&lt;P&gt;PRINTING = NOPRINT &lt;/P&gt;&lt;P&gt;SIMUBATCH = ' ' &lt;/P&gt;&lt;P&gt;CTUPARAMS = ' ' &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPROTAB = it_bdc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;P&gt;INTERNAL_ERROR = 1 &lt;/P&gt;&lt;P&gt;NOT_OPEN = 2 &lt;/P&gt;&lt;P&gt;QUEUE_ERROR = 3 &lt;/P&gt;&lt;P&gt;TCODE_INVALID = 4 &lt;/P&gt;&lt;P&gt;PRINTING_INVALID = 5 &lt;/P&gt;&lt;P&gt;POSTING_INVALID = 6 &lt;/P&gt;&lt;P&gt;OTHERS = 7 &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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrasekhar K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 May 2008 04:31:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-09T04:31:03Z</dc:date>
    <item>
      <title>Send Notification (BDC Batch Input Session)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777217#M908823</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;&lt;/P&gt;&lt;P&gt;I have a requirement in which I am updating two transactions using BDC(Batch Input) sessions. After BDC_CLOSE_GROUP, I am  using SUBMIT RSBDCSUB for processing these sessions from report itself.&lt;/P&gt;&lt;P&gt;Once the processing is done,I need to send a notification via e mail with the count loaded, count rejected and load time. Do we have some function modules to achieve this? Please help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Aparna Venugopal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 08:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777217#M908823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T08:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Send Notification (BDC Batch Input Session)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777218#M908824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aparna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the fuction module SO_DOCUMENT_SEND_API1 to send notification after your code for SUBMIT. To find the number of records uploaded successfully you can have the variable counter and from messtab of BDC you can come to know about number of error records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg. Total records = No of records from flat file. You can use describe command for internal table for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error records = No of records from messtab tab returned by BDC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Successful = Tolal - Error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And send the information in mail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 08:44:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777218#M908824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T08:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Send Notification (BDC Batch Input Session)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777219#M908825</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;Could you please elaborate on the point "messtab from BDC".I am using Batch Input Method and not Call Transaction method.In that case how will I get the messtab from BDC.&lt;/P&gt;&lt;P&gt;Your inputs will be really valuable as this is very urgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Aparna Venugopal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 09:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777219#M908825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T09:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Send Notification (BDC Batch Input Session)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777220#M908826</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;Use the following the example to count the error, success records and format the the error message into an internal table. Merge the entire information into an internal table and create an attachment using the FM&lt;/P&gt;&lt;P&gt;SO_DOCUMENT_SEND_API1  to send the notification.&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;Success Record Structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF ty_success,&lt;/P&gt;&lt;P&gt;           legven(16)     TYPE c,&lt;/P&gt;&lt;P&gt;           sapven(100)     TYPE c,&lt;/P&gt;&lt;P&gt;       END OF ty_success.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Error Record Structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF ty_error,&lt;/P&gt;&lt;P&gt;           errmsg1 TYPE string,&lt;/P&gt;&lt;P&gt;           errmsg2 TYPE string,&lt;/P&gt;&lt;P&gt;       END OF ty_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;        i_success        TYPE STANDARD TABLE OF ty_success, "Success Records Internal Table&lt;/P&gt;&lt;P&gt;        i_error          TYPE STANDARD TABLE OF ty_error,   "Error Records Internal Table&lt;/P&gt;&lt;P&gt;        w_success        TYPE ty_success,                   "Success Records Work Area&lt;/P&gt;&lt;P&gt;        w_error          TYPE ty_error,                     "Error Records Work Area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_data.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'XK01' USING i_bdcdata&lt;/P&gt;&lt;P&gt;                            MODE 'N'&lt;/P&gt;&lt;P&gt;                            UPDATE 'S'&lt;/P&gt;&lt;P&gt;                            MESSAGES INTO i_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM populate_status_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM populate_status_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT i_bdcmsgcoll BY msgtyp msgv1 DESCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE i_bdcmsgcoll&lt;/P&gt;&lt;P&gt;    INTO w_bdcmsgcoll&lt;/P&gt;&lt;P&gt;    WITH KEY msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;*Counter to count the error records.&lt;/P&gt;&lt;P&gt;    E = E + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Function Module for Formatting the Messages&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        id        = w_bdcmsgcoll-msgid&lt;/P&gt;&lt;P&gt;        lang      = '-D'&lt;/P&gt;&lt;P&gt;        no        = w_bdcmsgcoll-msgnr&lt;/P&gt;&lt;P&gt;        v1        = w_bdcmsgcoll-msgv1&lt;/P&gt;&lt;P&gt;        v2        = w_bdcmsgcoll-msgv2&lt;/P&gt;&lt;P&gt;        v3        = w_bdcmsgcoll-msgv3&lt;/P&gt;&lt;P&gt;        v4        = w_bdcmsgcoll-msgv4&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        msg       = v_msgstr&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        not_found = 1&lt;/P&gt;&lt;P&gt;        OTHERS    = 2.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;  Moving Error Records to Error Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    w_error-errmsg1 = w_xk01.&lt;/P&gt;&lt;P&gt;    w_error-errmsg2 = v_msgstr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND w_error TO i_error.&lt;/P&gt;&lt;P&gt;    CLEAR  w_error.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;  READ TABLE i_bdcmsgcoll&lt;/P&gt;&lt;P&gt;  INTO w_bdcmsgcoll&lt;/P&gt;&lt;P&gt;  WITH KEY msgtyp = 'S'.&lt;/P&gt;&lt;P&gt;&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;*Counter to count the success records.&lt;/P&gt;&lt;P&gt;    S = S + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Function Module for Formatting the Messages&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        id        = w_bdcmsgcoll-msgid&lt;/P&gt;&lt;P&gt;        lang      = '-D'&lt;/P&gt;&lt;P&gt;        no        = w_bdcmsgcoll-msgnr&lt;/P&gt;&lt;P&gt;        v1        = w_bdcmsgcoll-msgv1&lt;/P&gt;&lt;P&gt;        v2        = w_bdcmsgcoll-msgv2&lt;/P&gt;&lt;P&gt;        v3        = w_bdcmsgcoll-msgv3&lt;/P&gt;&lt;P&gt;        v4        = w_bdcmsgcoll-msgv4&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        msg       = v_msgstr&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        not_found = 1&lt;/P&gt;&lt;P&gt;        OTHERS    = 2.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;  Moving Success Records to Success Internal Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    w_success-legven = w_xk01-lifnr.&lt;/P&gt;&lt;P&gt;    w_success-sapven = w_bdcmsgcoll-msgv1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND w_success TO i_success.&lt;/P&gt;&lt;P&gt;    CLEAR w_success.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH i_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "DOWNLOAD_STAT_MSG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrasekhar K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 10:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777220#M908826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T10:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Send Notification (BDC Batch Input Session)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777221#M908827</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 am using Batch Input Session and not Call Transaction method.I want to get the messtab in case of Batch Input Method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Aparna Venugopal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 10:06:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777221#M908827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T10:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Send Notification (BDC Batch Input Session)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777222#M908828</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 can get the details about the processed or failed records from the table APQI. U can obtain this information from this table using GROUPID (Session name), TRANSCNT (Total number of Records) and TRANSCNTE (Transactions with errors) fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;data: tot_rec like apqi-transcnt,&lt;/P&gt;&lt;P&gt;        err_rec like apqi-transcnte,&lt;/P&gt;&lt;P&gt;        suc_rec type number.         "no. of successfully processed records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select TRANSCNT TRANSCNTE from APQI into (tot_rec, err_rec) where GROUPID = session_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suc_rec = tot_rec - err_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now format the document to be sent with the error messages according to ur requirements and call the FM SO_NEW_DOCUMENT_SEND_API to send the email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is enough for u according to ur requirements. Apart from this u can have a look at the following example also.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_lfa1 occurs 0,&lt;/P&gt;&lt;P&gt;KTOKK like lfa1-ktokk,&lt;/P&gt;&lt;P&gt;NAME1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;SORTL like lfa1-sortl,&lt;/P&gt;&lt;P&gt;LAND1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;end of it_lfa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*End generated data section *** &lt;/P&gt;&lt;P&gt;data : it_bdc like bdcdata occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: IT_MESSAGES TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;*DATA: LV_MESSAGE(255).&lt;/P&gt;&lt;P&gt;data : it_messages like bdcmsgcoll occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : V_message(255).&lt;/P&gt;&lt;P&gt;data : V_flag.&lt;/P&gt;&lt;P&gt;data : V_datum1 type sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_mesg occurs 0,&lt;/P&gt;&lt;P&gt;message(100),&lt;/P&gt;&lt;P&gt;end of it_mesg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*V_datum1 = sy-datum-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : P_Sess like APQI-GROUPID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform Get_data.&lt;/P&gt;&lt;P&gt;*perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_lfa1.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RF02K-KTOKK'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;it_lfa1-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-LAND1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=UPDA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;it_lfa1-name1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;it_lfa1-sortl.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;it_lfa1-land1.&lt;/P&gt;&lt;P&gt;call transaction 'XK01' using it_bdc&lt;/P&gt;&lt;P&gt;mode 'N'&lt;/P&gt;&lt;P&gt;update 'S'&lt;/P&gt;&lt;P&gt;messages into it_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc 0.&lt;/P&gt;&lt;P&gt;if V_flag 'X'.&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;V_flag = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform bdc_transaction. "using 'XK01'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform format_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : it_bdc,it_messages.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if V_flag = 'X'.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form Get_data&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM Get_data .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\srinu_vendor.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = it_lfa1&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CONVERSION_ERROR = 1&lt;/P&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 3&lt;/P&gt;&lt;P&gt;NO_BATCH = 4&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 5&lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 6&lt;/P&gt;&lt;P&gt;OTHERS = 7&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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " Get_data&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_dynpro&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;P_0061 text &lt;/P&gt;&lt;P&gt;--&amp;gt;P_0062 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM BDC_DYNPRO USING PROGRAM DYNPRO.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-PROGRAM = PROGRAM.&lt;/P&gt;&lt;P&gt;it_BDC-DYNPRO = DYNPRO.&lt;/P&gt;&lt;P&gt;it_BDC-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insert field * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;it_BDC-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form format_messages&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM format_messages .&lt;/P&gt;&lt;P&gt;loop at it_messages.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ID = it_messages-MSGID&lt;/P&gt;&lt;P&gt;LANG = 'EN'&lt;/P&gt;&lt;P&gt;NO = it_messages-MSGNR&lt;/P&gt;&lt;P&gt;V1 = it_messages-MSGV1&lt;/P&gt;&lt;P&gt;V2 = it_messages-MSGV2&lt;/P&gt;&lt;P&gt;V3 = it_messages-MSGV3&lt;/P&gt;&lt;P&gt;V4 = it_messages-MSGV4&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;MSG = V_message&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;write : / V_message.&lt;/P&gt;&lt;P&gt;clear : V_message.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;ENDFORM. " format_messages&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form open_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM open_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;GROUP = P_Sess&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOLDDATE = V_datum1 &lt;/P&gt;&lt;P&gt;KEEP = 'X'&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;write : / 'Session Creating wit Name : ',P_Sess.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " open_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form close_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; p1 text &lt;/P&gt;&lt;P&gt;&amp;lt;-- p2 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM close_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'.&lt;/P&gt;&lt;P&gt;ENDFORM. " close_group&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_transaction&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;P_0132 text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_transaction. "USING VALUE(P_0132).&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = 'XK01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POST_LOCAL = NOVBLOCAL &lt;/P&gt;&lt;P&gt;PRINTING = NOPRINT &lt;/P&gt;&lt;P&gt;SIMUBATCH = ' ' &lt;/P&gt;&lt;P&gt;CTUPARAMS = ' ' &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPROTAB = it_bdc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;P&gt;INTERNAL_ERROR = 1 &lt;/P&gt;&lt;P&gt;NOT_OPEN = 2 &lt;/P&gt;&lt;P&gt;QUEUE_ERROR = 3 &lt;/P&gt;&lt;P&gt;TCODE_INVALID = 4 &lt;/P&gt;&lt;P&gt;PRINTING_INVALID = 5 &lt;/P&gt;&lt;P&gt;POSTING_INVALID = 6 &lt;/P&gt;&lt;P&gt;OTHERS = 7 &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;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO &lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chandrasekhar K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2008 04:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-notification-bdc-batch-input-session/m-p/3777222#M908828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-09T04:31:03Z</dc:date>
    </item>
  </channel>
</rss>

