<?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 Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-issue/m-p/3023348#M714791</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 issue in BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a program i am doing BDC for MM01 using call transaction method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this multiple materials will be processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that i need to pass these material no's generated &amp;amp; other flatfile data into BDC of CS01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now issue over here is after creating materials when i am passing first material to CS01 it is taking last material no as default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to avoid this situation, Though my BDCDATA table shows first material it is showing last material created in CS01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: I will get 3 records from flat file, Then i will loop at these data and pass the same to MM01 TCode. Then 3 materials 148, 149, 150 are created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i will loop at these material and pass recording data with first material to CS01 TCode. but in CS01 it is showing lat created material 150 though BDCDATA has 148 as material. How to rectify this issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using CALL Transaction method for both the TCodes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Deep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Nov 2007 06:16:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-12T06:16:06Z</dc:date>
    <item>
      <title>BDC Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-issue/m-p/3023348#M714791</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 issue in BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a program i am doing BDC for MM01 using call transaction method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this multiple materials will be processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that i need to pass these material no's generated &amp;amp; other flatfile data into BDC of CS01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now issue over here is after creating materials when i am passing first material to CS01 it is taking last material no as default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to avoid this situation, Though my BDCDATA table shows first material it is showing last material created in CS01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: I will get 3 records from flat file, Then i will loop at these data and pass the same to MM01 TCode. Then 3 materials 148, 149, 150 are created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i will loop at these material and pass recording data with first material to CS01 TCode. but in CS01 it is showing lat created material 150 though BDCDATA has 148 as material. How to rectify this issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using CALL Transaction method for both the TCodes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Deep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 06:16:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-issue/m-p/3023348#M714791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T06:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: BDC Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-issue/m-p/3023349#M714792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After MM01 upload, use the FM 'CS_BI_BOM_CREATE_BATCH_INPUT1' to create BOM. See below code for reference... should help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- creating BOM using FUNCTION 'CS_BI_BOM_CREATE_BATCH_INPUT1'&lt;/P&gt;&lt;P&gt;      loop at it_data2. (Containing materials created in the first upload - MM01)&lt;/P&gt;&lt;P&gt;        perform create_bom.&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;Reward if helpful,&lt;/P&gt;&lt;P&gt;Karthik&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_bom&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 create_bom .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;      x_msgid LIKE sy-msgid,&lt;/P&gt;&lt;P&gt;      x_msgno LIKE t100-msgnr,&lt;/P&gt;&lt;P&gt;      x_msgty LIKE sy-msgty,&lt;/P&gt;&lt;P&gt;      x_msgv1 LIKE sy-msgv1,&lt;/P&gt;&lt;P&gt;      x_msgv2 LIKE sy-msgv2,&lt;/P&gt;&lt;P&gt;      x_msgv3 LIKE sy-msgv3,&lt;/P&gt;&lt;P&gt;      x_msgv4 LIKE sy-msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: x_bgr00 LIKE bgr00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local declarations&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA: bom_header LIKE bicsk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF bom_items OCCURS 0.&lt;/P&gt;&lt;P&gt;          INCLUDE STRUCTURE bicsp.&lt;/P&gt;&lt;P&gt;  DATA: END OF bom_items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- new addition by Karthik&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF BOM_SUBITEMS OCCURS 0.&lt;/P&gt;&lt;P&gt;          INCLUDE STRUCTURE BICSU.&lt;/P&gt;&lt;P&gt;  DATA: END OF BOM_SUBITEMS.&lt;/P&gt;&lt;P&gt;*--- end of addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF j_3a_size_item OCCURS 0.&lt;/P&gt;&lt;P&gt;          INCLUDE STRUCTURE j_3abombi.&lt;/P&gt;&lt;P&gt;  DATA: END OF j_3a_size_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill batch input structure CLBGR00 for session data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MOVE:&lt;/P&gt;&lt;P&gt;       '0'           TO  x_bgr00-stype,&lt;/P&gt;&lt;P&gt;       'TESTBOM'     TO  x_bgr00-group,&lt;/P&gt;&lt;P&gt;       sy-mandt      TO  x_bgr00-mandt,&lt;/P&gt;&lt;P&gt;       sy-uname      TO  x_bgr00-usnam,&lt;/P&gt;&lt;P&gt;       'X'           TO  x_bgr00-xkeep,&lt;/P&gt;&lt;P&gt;       ' '           TO  x_bgr00-nodata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set material bom key data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  WRITE '1'         TO bom_header-stype.&lt;/P&gt;&lt;P&gt;  WRITE 'CS01'      TO bom_header-tcode.&lt;/P&gt;&lt;P&gt;  bom_header-matnr = it_data2-matnr.&lt;/P&gt;&lt;P&gt;  bom_header-werks = '0001'.&lt;/P&gt;&lt;P&gt;  bom_header-stlan = '5'.&lt;/P&gt;&lt;P&gt;  WRITE sy-datum    TO bom_header-datuv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  bom_header-bmeng = '1'.&lt;/P&gt;&lt;P&gt;  bom_header-exstl = ' '.&lt;/P&gt;&lt;P&gt;  bom_header-stlst = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  no ext.ID given, use internal ID (STPO)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  bom_items-stype = '2'.&lt;/P&gt;&lt;P&gt;  bom_items-xline = '1'.&lt;/P&gt;&lt;P&gt;  bom_items-postp = 'L'.&lt;/P&gt;&lt;P&gt;  bom_items-idnrk = it_data2-matnr2.&lt;/P&gt;&lt;P&gt;  bom_items-menge = '1'.&lt;/P&gt;&lt;P&gt;  bom_items-meins = 'PAA'.&lt;/P&gt;&lt;P&gt;  bom_items-rvrel = 'X'.&lt;/P&gt;&lt;P&gt;  bom_items-auskz = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND bom_items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: item_count2 LIKE sy-tabix.&lt;/P&gt;&lt;P&gt;  ADD 1 TO item_count2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BOM-Item-Size_Data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*--- Looping at it_zpackcode to get BOM-item data&lt;/P&gt;&lt;P&gt;  loop at it_zpackcode.&lt;/P&gt;&lt;P&gt;    j_3a_size_item-stype      = '3'.&lt;/P&gt;&lt;P&gt;    j_3a_size_item-j_3apgnr   = it_zpackcode-matgrid.&lt;/P&gt;&lt;P&gt;    j_3a_size_item-j_3akordx  = it_zpackcode-gridsize.&lt;/P&gt;&lt;P&gt;    j_3a_size_item-j_3akordxl = it_zpackcode-packcode.&lt;/P&gt;&lt;P&gt;    j_3a_size_item-menge      = it_zpackcode-quantity.&lt;/P&gt;&lt;P&gt;    j_3a_size_item-xline      = '1'.&lt;/P&gt;&lt;P&gt;    APPEND j_3a_size_item.&lt;/P&gt;&lt;P&gt;    clear j_3a_size_item.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create BOM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'CS_BI_BOM_CREATE_BATCH_INPUT1'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      bom_header     = bom_header&lt;/P&gt;&lt;P&gt;      group_data     = x_bgr00&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     commit_work    = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      tcode_mode     = 'A'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      msgid          = x_msgid&lt;/P&gt;&lt;P&gt;      msgno          = x_msgno&lt;/P&gt;&lt;P&gt;      msgty          = x_msgty&lt;/P&gt;&lt;P&gt;      msgv1          = x_msgv1&lt;/P&gt;&lt;P&gt;      msgv2          = x_msgv2&lt;/P&gt;&lt;P&gt;      msgv3          = x_msgv3&lt;/P&gt;&lt;P&gt;      msgv4          = x_msgv4&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      bom_item       = bom_items&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- added by karthik&lt;/P&gt;&lt;P&gt;      BOM_SUB_ITEM   = BOM_SUBITEMS&lt;/P&gt;&lt;P&gt;*--- end of addition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      j_3a_size_item = j_3a_size_item&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS         = 1.&lt;/P&gt;&lt;P&gt;  IF x_msgty = 'E' OR sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID x_msgid TYPE 'I' NUMBER x_msgno&lt;/P&gt;&lt;P&gt;               DISPLAY LIKE 'E'&lt;/P&gt;&lt;P&gt;               WITH x_msgv1 x_msgv2 x_msgv3 x_msgv4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- to format error data if BOM creation is unsuccessful&lt;/P&gt;&lt;P&gt;    PERFORM format_error_data2.&lt;/P&gt;&lt;P&gt;*--- Perform to process errors&lt;/P&gt;&lt;P&gt;    PERFORM error_processing2.&lt;/P&gt;&lt;P&gt;  elseif sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    v_success2 = v_success2 + 1.&lt;/P&gt;&lt;P&gt;*--- to prevent from creating alternative BOMs&lt;/P&gt;&lt;P&gt;    PERFORM check_bom.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      CLEAR v_comment2.&lt;/P&gt;&lt;P&gt;      v_comment2 = 'BOM for Musical successfully created' .&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      CLEAR v_comment2.&lt;/P&gt;&lt;P&gt;      v_comment2 = 'BOM for Musical not created' .&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " create_bom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 06:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-issue/m-p/3023349#M714792</guid>
      <dc:creator>former_member189629</dc:creator>
      <dc:date>2007-11-12T06:25:47Z</dc:date>
    </item>
  </channel>
</rss>

