<?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 not behaving as expected in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272928#M1530395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya. Even we don't need to do the recording for each combination. We can just manually see check the screen number for that particular special gl and posting key and put it in the code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Sep 2010 12:26:18 GMT</pubDate>
    <dc:creator>Private_Member_49934</dc:creator>
    <dc:date>2010-09-29T12:26:18Z</dc:date>
    <item>
      <title>BDC not behaving as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272923#M1530390</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;I had done BDC for FB05. It was working fine.&lt;/P&gt;&lt;P&gt;Now the requirement changed a bit and I need to pass one more field special gl indicator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I added a line in the FM i created using the recording and expected that bdc should work fine. But it didn't . The filed get populated correctly but then the next screen data is not getting populated . Any Idea what could be the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;perform bdc_field       using 'RF05A-NEWUM'
                              SPL_GL_LINE_1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION ZFM_FB05_BDC_BILL.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(CTU) LIKE  APQI-PUTACTIVE DEFAULT 'X'
*"     VALUE(MODE) LIKE  APQI-PUTACTIVE DEFAULT 'N'
*"     VALUE(UPDATE) LIKE  APQI-PUTACTIVE DEFAULT 'L'
*"     VALUE(GROUP) LIKE  APQI-GROUPID OPTIONAL
*"     VALUE(USER) LIKE  APQI-USERID OPTIONAL
*"     VALUE(KEEP) LIKE  APQI-QERASE OPTIONAL
*"     VALUE(HOLDDATE) LIKE  APQI-STARTDATE OPTIONAL
*"     VALUE(NODATA) LIKE  APQI-PUTACTIVE DEFAULT '/'
*"     VALUE(BLDAT_001) LIKE  BDCDATA-FVAL DEFAULT '09/09/2010'
*"     VALUE(BLART_002) LIKE  BDCDATA-FVAL DEFAULT 'sa'
*"     VALUE(BUKRS_003) LIKE  BDCDATA-FVAL DEFAULT 'K101'
*"     VALUE(BUDAT_004) LIKE  BDCDATA-FVAL DEFAULT '09/09/2010'
*"     VALUE(MONAT_005) LIKE  BDCDATA-FVAL DEFAULT '9'
*"     VALUE(WAERS_006) LIKE  BDCDATA-FVAL DEFAULT 'USD'
*"     VALUE(DOCID_007) LIKE  BDCDATA-FVAL DEFAULT '*'
*"     VALUE(NEWBS_008) LIKE  BDCDATA-FVAL DEFAULT '09'
*"     VALUE(NEWKO_009) LIKE  BDCDATA-FVAL DEFAULT '1000021'
*"     VALUE(SPL_GL_LINE_1) LIKE  BDCDATA-FVAL DEFAULT '2'
*"     VALUE(WRBTR_010) LIKE  BDCDATA-FVAL DEFAULT '100'
*"     VALUE(ZFBDT_011) LIKE  BDCDATA-FVAL DEFAULT '09/09/2010'
*"     VALUE(AGBUK_012) LIKE  BDCDATA-FVAL DEFAULT 'K101'
*"     VALUE(AGKON_013) LIKE  BDCDATA-FVAL DEFAULT '100000'
*"     VALUE(AGKOA_014) LIKE  BDCDATA-FVAL DEFAULT 'D'
*"     VALUE(AGUMS_015) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(XNOPS_016) LIKE  BDCDATA-FVAL DEFAULT ''
*"     VALUE(ABPOS_017) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_018) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_019) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_020) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(XPOS1_01_021) LIKE  BDCDATA-FVAL DEFAULT ''
*"     VALUE(XPOS1_03_022) LIKE  BDCDATA-FVAL DEFAULT 'X'
*"     VALUE(SEL01_01_023) LIKE  BDCDATA-FVAL DEFAULT '100000002'
*"     VALUE(ABPOS_024) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_025) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_026) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(PSZAH_01_027) LIKE  BDCDATA-FVAL DEFAULT '             50'
*"     VALUE(ABPOS_028) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_029) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(XPOS1_01_030) LIKE  BDCDATA-FVAL DEFAULT ''
*"     VALUE(XPOS1_03_031) LIKE  BDCDATA-FVAL DEFAULT 'X'
*"     VALUE(SEL01_01_032) LIKE  BDCDATA-FVAL DEFAULT '100000000'
*"     VALUE(ABPOS_033) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_034) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(ABPOS_035) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(PSZAH_01_036) LIKE  BDCDATA-FVAL DEFAULT '             50'
*"     VALUE(ABPOS_037) LIKE  BDCDATA-FVAL DEFAULT '1'
*"     VALUE(DOC_LIST) TYPE  ZTT_DOC_LIST
*"  EXPORTING
*"     VALUE(SUBRC) LIKE  SYST-SUBRC
*"  TABLES
*"      MESSTAB STRUCTURE  BDCMSGCOLL OPTIONAL
*"----------------------------------------------------------------------
data wa_doc_list type zst_doc_list.
subrc = 0.

perform bdc_nodata      using NODATA.

perform open_group      using GROUP USER KEEP HOLDDATE CTU.

perform bdc_dynpro      using 'SAPMF05A' '0122'.


perform bdc_field       using 'BKPF-BLDAT'
                              BLDAT_001.
perform bdc_field       using 'BKPF-BLART'
                              BLART_002.
perform bdc_field       using 'BKPF-BUKRS'
                              BUKRS_003.
perform bdc_field       using 'BKPF-BUDAT'
                              BUDAT_004.
perform bdc_field       using 'BKPF-MONAT'
                              MONAT_005.
perform bdc_field       using 'BKPF-WAERS'
                              WAERS_006.
perform bdc_field       using 'FS006-DOCID'
                              DOCID_007.
perform bdc_field       using 'RF05A-NEWBS'
                              NEWBS_008.

perform bdc_field       using 'RF05A-NEWKO'
                              NEWKO_009.
*perform bdc_field       using 'RF05A-NEWUM'
*                              SPL_GL_LINE_1.  " Uncomment this line and the next screen '0301' values don't get populated.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-NEWUM'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.

perform bdc_dynpro      using 'SAPMF05A' '0301'.
perform bdc_field       using 'BDC_CURSOR'
                              'BSEG-WRBTR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SL'.
perform bdc_field       using 'BSEG-WRBTR'
                              WRBTR_010.
perform bdc_field       using 'BSEG-ZFBDT'
                              ZFBDT_011.
perform bdc_dynpro      using 'SAPMF05A' '0710'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-AGUMS'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PA'.
perform bdc_field       using 'RF05A-AGBUK'
                              AGBUK_012.
perform bdc_field       using 'RF05A-AGKON'
                              AGKON_013.
perform bdc_field       using 'RF05A-AGKOA'
                              AGKOA_014.
perform bdc_field       using 'RF05A-AGUMS'
                              AGUMS_015.
perform bdc_field       using 'RF05A-XNOPS'
                              XNOPS_016.
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PART'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-ABPOS'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_017.
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=OMX'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-ABPOS'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_018.
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=Z-'.

perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-ABPOS'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_019.
* here !!

loop at doc_list into wa_doc_list.
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=OSU'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-ABPOS'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_020.
perform bdc_dynpro      using 'SAPDF05X' '2000'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-XPOS1(03)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=GO'.
perform bdc_field       using 'RF05A-XPOS1(01)'
                              XPOS1_01_021.
perform bdc_field       using 'RF05A-XPOS1(03)'
                              XPOS1_03_022.
perform bdc_dynpro      using 'SAPDF05X' '0731'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-SEL01(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=GO'.
perform bdc_field       using 'RF05A-SEL01(01)'
*                              SEL01_01_023.
                               wa_doc_list-belnr.
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=OMX'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-ABPOS'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_024.
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=Z+'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF05A-ABPOS'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_025.
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'BDC_CURSOR'
                              'DF05B-PSZAH(01)'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_026.
perform bdc_field       using 'DF05B-PSZAH(01)'
*                              PSZAH_01_027.
                              wa_doc_list-WRBTR.


"here
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=OSE'.
perform bdc_field       using 'BDC_CURSOR'
                              'DF05B-PSZAH(01)'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_028.
endloop.
*perform bdc_dynpro      using 'SAPDF05X' '3100'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=OSU'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RF05A-ABPOS'.
*perform bdc_field       using 'RF05A-ABPOS'
*                              ABPOS_029.
*perform bdc_dynpro      using 'SAPDF05X' '2000'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RF05A-XPOS1(03)'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=GO'.
*perform bdc_field       using 'RF05A-XPOS1(01)'
*                              XPOS1_01_030.
*perform bdc_field       using 'RF05A-XPOS1(03)'
*                              XPOS1_03_031.
*perform bdc_dynpro      using 'SAPDF05X' '0731'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RF05A-SEL01(01)'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=GO'.
*perform bdc_field       using 'RF05A-SEL01(01)'
**                              SEL01_01_032.
*                              wa_doc_list-WRBTR.
*perform bdc_dynpro      using 'SAPDF05X' '3100'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=OMX'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RF05A-ABPOS'.
*perform bdc_field       using 'RF05A-ABPOS'
*                              ABPOS_033.
*perform bdc_dynpro      using 'SAPDF05X' '3100'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '=Z+'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'RF05A-ABPOS'.
*perform bdc_field       using 'RF05A-ABPOS'
*                              ABPOS_034.
*perform bdc_dynpro      using 'SAPDF05X' '3100'.
*perform bdc_field       using 'BDC_OKCODE'
*                              '/00'.
*perform bdc_field       using 'BDC_CURSOR'
*                              'DF05B-PSZAH(01)'.
*perform bdc_field       using 'RF05A-ABPOS'
*                              ABPOS_035.
*perform bdc_field       using 'DF05B-PSZAH(01)'
*                              PSZAH_01_036.
*"here
perform bdc_dynpro      using 'SAPDF05X' '3100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BU'.
perform bdc_field       using 'BDC_CURSOR'
                              'DF05B-PSZAH(01)'.
perform bdc_field       using 'RF05A-ABPOS'
                              ABPOS_037.
perform bdc_transaction tables messtab
using                         'FB05'
                              CTU
                              MODE
                              UPDATE.
if sy-subrc &amp;lt;&amp;gt; 0.
  subrc = sy-subrc.
  exit.
endif.

perform close_group using     CTU.





ENDFUNCTION.
INCLUDE BDCRECXY .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 10:02:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272923#M1530390</guid>
      <dc:creator>Private_Member_49934</dc:creator>
      <dc:date>2010-09-29T10:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: BDC not behaving as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272924#M1530391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you want to add a new field in the BDC after you have created the program. Record it once more as screens may have changed and adjust your program based on the same. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ex , like the one below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If w_splgl = 'X'.&lt;/P&gt;&lt;P&gt;  PERFORM bdc_dynpro  using 'SAPMF05K'  '1000'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  PERFORM bdc_dynpro  using 'SAPMF05K'  '1010'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 10:16:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272924#M1530391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T10:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: BDC not behaving as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272925#M1530392</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;   Please &lt;STRONG&gt;highlight&lt;/STRONG&gt; the lines were you have done changes....&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;GK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 10:19:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272925#M1530392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T10:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: BDC not behaving as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272926#M1530393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sujay,&lt;/P&gt;&lt;P&gt;Thanks a lot man. I spent around 3 hrs changing the BDCDATA. The screens look so similar that it didn't come to my mind that screen number could be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;KG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 10:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272926#M1530393</guid>
      <dc:creator>Private_Member_49934</dc:creator>
      <dc:date>2010-09-29T10:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: BDC not behaving as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272927#M1530394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Sujay.......redo recording...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason of error maight be the GL Indicator.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the combination of Posting Key &amp;amp; GL Indicator exits or not.......by posting directly thru txn FB05....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the GL indicator &amp;amp; Posting key...might be the next screen no. changes.....just check...wild guess....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so....Redo the recording for each combination of PK &amp;amp; GL Ind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx&lt;/P&gt;&lt;P&gt;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 10:32:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272927#M1530394</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2010-09-29T10:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: BDC not behaving as expected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272928#M1530395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya. Even we don't need to do the recording for each combination. We can just manually see check the screen number for that particular special gl and posting key and put it in the code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 12:26:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-not-behaving-as-expected/m-p/7272928#M1530395</guid>
      <dc:creator>Private_Member_49934</dc:creator>
      <dc:date>2010-09-29T12:26:18Z</dc:date>
    </item>
  </channel>
</rss>

