<?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 BDC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357367#M521046</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;   Is there any system variable which is returned after BDC is performed. For example for below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro using  'SAPMP50A' '1000'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'BDC_OKCODE'  '=INS'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-PERNR' it-pernr.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-TIMR6' 'X'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-BEGDA' it-begda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-ENDDA' it-endda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-CHOIC' '2006'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-SUBTY' it-ktart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro using 'MP200000' '2250'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'BDC_OKCODE' '=UPD'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-BEGDA' it-begda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-ENDDA' it-endda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-KTART' it-ktart.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-DESTA' it-begda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-DEEND' it-endda.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_transaction using 'PA30'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the possible variable i should use to see if BDC was successfull else generate log file for errors. As we use sy-subrc for select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Admir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2007 13:59:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-08T13:59:19Z</dc:date>
    <item>
      <title>BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357367#M521046</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;   Is there any system variable which is returned after BDC is performed. For example for below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro using  'SAPMP50A' '1000'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'BDC_OKCODE'  '=INS'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-PERNR' it-pernr.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-TIMR6' 'X'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-BEGDA' it-begda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-ENDDA' it-endda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-CHOIC' '2006'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'RP50G-SUBTY' it-ktart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_dynpro using 'MP200000' '2250'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'BDC_OKCODE' '=UPD'.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-BEGDA' it-begda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-ENDDA' it-endda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-KTART' it-ktart.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-DESTA' it-begda.&lt;/P&gt;&lt;P&gt;    perform bdc_field  using 'P2006-DEEND' it-endda.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform bdc_transaction using 'PA30'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the possible variable i should use to see if BDC was successfull else generate log file for errors. As we use sy-subrc for select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Admir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 13:59:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357367#M521046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T13:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357368#M521047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use BDCMSGCOLL Strcure &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transaction tcode using bdcdata mode 'A/E/N'&lt;/P&gt;&lt;P&gt;                                         messages into i_bdcmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i_bdcmsg is bdcmsgcoll ,you will get log records&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 14:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357368#M521047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T14:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357369#M521048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u r using the call transaction method then sy-subrc will be returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else u can capture the message into the message table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Addition 2d 
... MESSAGES INTO itab 


Effect 
Any messages that occur during CALL TRANSACTION USING ... are collected in the specified internal table. The internal table must have the structure BDCMSGCOLL. 



Example
DATA: BDCDATA TYPE TABLE OF BDCDATA. 

DATA: ITAB TYPE TABLE OF BDCMSGCOLL. 

DATA: PROGRAM LIKE SY-REPID, 

      WA_BDCDATA TYPE BDCDATA. 

WA_BDCDATA-PROGRAM  = 'SAPMS38M'. 
WA_BDCDATA-DYNPRO   = '0100'. 
WA_BDCDATA-DYNBEGIN = 'X'. 
APPEND WA_BDCDATA TO BDCDATA. 
CLEAR WA_BDCDATA. 
WA_BDCDATA-FNAM     = 'RS38M-PROGRAMM'. 
WA_BDCDATA-FVAL     = PROGRAM. 
APPEND WA_BDCDATA TO BDCDATA. 
... 
CALL TRANSACTION 'SE38'  USING BDCDATA  MODE 'N' 
                         MESSAGES INTO ITAB. 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;VAsanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 14:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357369#M521048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T14:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357370#M521049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.. See this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM bdc_transaction tables return USING tcode p_rule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA : T_BDCMSGCOLL LIKE STANDARD TABLE OF BDCMSGCOLL WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR w_ctu_params.&lt;/P&gt;&lt;P&gt;  w_ctu_params-dismode = 'N'.&lt;/P&gt;&lt;P&gt;  w_ctu_params-updmode = 'S'.&lt;/P&gt;&lt;P&gt;  w_ctu_params-cattmode = ' '.&lt;/P&gt;&lt;P&gt;  w_ctu_params-defsize = ' '.&lt;/P&gt;&lt;P&gt;  w_ctu_params-racommit = ' '.&lt;/P&gt;&lt;P&gt;  w_ctu_params-nobinpt = 'X'.&lt;/P&gt;&lt;P&gt;  w_ctu_params-nobiend = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL TRANSACTION tcode USING t_bdcdata OPTIONS FROM w_ctu_params&lt;/P&gt;&lt;P&gt;                                         MESSAGES INTO t_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    IF p_rule = 'P'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add 1 to successful PWS creation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      new_pws = new_pws + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add 1 to successful WSR creation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ELSEIF p_rule = 'W'.&lt;/P&gt;&lt;P&gt;      new_wsr = new_wsr + 1.&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; On successful WSR creation, create selection table for submit to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; RPTSHF00 (to generate WSR)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF new_wsr &amp;gt; 0.&lt;/P&gt;&lt;P&gt;      PERFORM create_sel_tab.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH t_bdcdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at t_bdcmsgcoll.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          ID        = t_bdcmsgcoll-msgid&lt;/P&gt;&lt;P&gt;          LANG      = SY-LANGU&lt;/P&gt;&lt;P&gt;          NO        = t_bdcmsgcoll-msgnr&lt;/P&gt;&lt;P&gt;          V1        = t_bdcmsgcoll-MSGV1&lt;/P&gt;&lt;P&gt;          V2        = t_bdcmsgcoll-MSGV2&lt;/P&gt;&lt;P&gt;          V3        = t_bdcmsgcoll-MSGV3&lt;/P&gt;&lt;P&gt;          V4        = t_bdcmsgcoll-MSGV4&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          MSG       = err_msg&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      move err_msg to w_return-message.&lt;/P&gt;&lt;P&gt;      append w_return to return.&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;&lt;/P&gt;&lt;P&gt;errors can be displayed like this..&lt;/P&gt;&lt;P&gt;Please reward points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2007 18:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2357370#M521049</guid>
      <dc:creator>manubhutani</dc:creator>
      <dc:date>2007-06-09T18:43:14Z</dc:date>
    </item>
  </channel>
</rss>

