<?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: Error in creating Alternative BOM using IDOC_INPUT_BOMMAT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811986#M1313409</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;First try manually whether it is allowing you to creating the same or not.&lt;/P&gt;&lt;P&gt;Because as I guess, for the alternative bom of 02, there could be some more dependencies or restriction on usage of the main material itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santhosh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jun 2009 07:08:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-23T07:08:45Z</dc:date>
    <item>
      <title>Error in creating Alternative BOM using IDOC_INPUT_BOMMAT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811985#M1313408</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 am trying to create an Alternative BOM using IDoc BOMMAT03.I have checked this IDoc will use FM IDOC_INPUT_BOMMAT inside. &lt;/P&gt;&lt;P&gt;In this function module, it is using FM CSAP_MAT_BOM_CREATE and CSAP_MAT_BOM_MAINTAIN to create and change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This FM is allowing to create an Alterative BOM = '01' but it is not creating for Alt BOM = '02'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone provide inputs on this .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sathibabu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 05:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811985#M1313408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-23T05:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Alternative BOM using IDOC_INPUT_BOMMAT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811986#M1313409</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;First try manually whether it is allowing you to creating the same or not.&lt;/P&gt;&lt;P&gt;Because as I guess, for the alternative bom of 02, there could be some more dependencies or restriction on usage of the main material itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santhosh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 07:08:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811986#M1313409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-23T07:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Alternative BOM using IDOC_INPUT_BOMMAT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811987#M1313410</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;I am able to create the Alternative BOM through CS01 but it doesn't allow me when i use IDOC inbound Function module .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 07:16:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811987#M1313410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-23T07:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Alternative BOM using IDOC_INPUT_BOMMAT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811988#M1313411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sathi Babu, Iam also having the same Issue while creating Alternate BOM by IDOC_INPUT_BOMMAT, able to create manualy.&lt;/P&gt;&lt;P&gt;STALL = '01'. is hard coded by SAP in IDOC_INPUT_BOMMAT, I tried to changed it many time in Debugging Mode still it is taking only '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am keep trying many time but not successfull, let me know if u had a solution for this issue that will be hlpful 4 me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advance Thanks&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 12:52:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811988#M1313411</guid>
      <dc:creator>bhaskar_pasupuleti</dc:creator>
      <dc:date>2011-02-15T12:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Alternative BOM using IDOC_INPUT_BOMMAT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811989#M1313412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sathibabu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing same issue. Kindly help to solve the issue. I am waiting for your valuable reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Durai V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 05:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811989#M1313412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-29T05:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Alternative BOM using IDOC_INPUT_BOMMAT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811990#M1313413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Guy,&lt;/P&gt;&lt;P&gt;use below code for Alternate BOM with sub item . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: bom_header     LIKE cad_bicsk,
      bom_item       type table of  cad_bom_item WITH HEADER LINE,
      bom_sub_item   type table of cssubitem WITH HEADER LINE,
      dms_class_data type table of cls_charac  WITH HEADER LINE,
      sap_field_data type table of rfcdmsdata  WITH HEADER LINE,
      e_return       LIKE cad_return-value,
      e_message      LIKE message-msgtx,
      e_message_len  LIKE cad_return-message_len.
DATA v_ITEM  TYPE I.
TYPES : BEGIN OF ty_data,
        level TYPE i,
        matnr TYPE cad_bicsk-matnr,
        werks TYPE werks_d,
        usage TYPE stlan,
        qty   TYPE cad_bom_item-menge,
        fqty type fmeng, " Quantity is Fixed
        sub_upmng type upmng,
        text type cad_bicsk-ztext,
        END OF ty_data.

DATA : it_data TYPE TABLE OF ty_data ,
       wa_data TYPE ty_data.

*
**---selection screen
PARAMETERS:p_file TYPE ibipparms-path OBLIGATORY.
*
**---f4 help for the file from PC
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
*
  PERFORM get_f4help.
*
*--start-of-selection .
START-OF-SELECTION.
*
PERFORM upload_file_itab.


CLEAR: bom_header, bom_item, bom_sub_item.
REFRESH: bom_item, bom_sub_item.

data : v_lineitem type SPOSN value '0000',
       v_slineitem type SPOSN value '0'.

  LOOP AT it_data INTO wa_data.

  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = wa_data-matnr
    IMPORTING
      output = wa_data-matnr.

  IF wa_data-level = 0.

* fill BOM header
clear  bom_header.
      bom_header-matnr = wa_data-matnr. "'000000000200000016'.
*      bom_header-stlal = '1'. " Alternative Bom
      bom_header-werks = wa_data-werks. "'1000'.
      bom_header-stlan = wa_data-usage."'3'.
      bom_header-bmeng = wa_data-qty.
      bom_header-cadkz = 'X'.
      bom_header-stktx = wa_data-text.
*      bom_header-ztext = wa_data-text.
      bom_header-datuv = '01.10.2010'.

ELSEIF wa_data-level = 1.
* fill item
v_lineitem = v_lineitem + 10.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = v_lineitem
    IMPORTING
      output = v_lineitem.

*    bom_item-upskz     = 'X'.     " If We hav the Sub items Enable it.
    bom_item-idnrk     = wa_data-matnr. "'000000000200000017'.
    bom_item-posnr     = v_lineitem.
    bom_item-postp     = 'L'.
    bom_item-menge     = wa_data-qty. "'1'.
    bom_item-fmeng     = wa_data-fqty.
    APPEND bom_item.
    CLEAR: bom_item.

*** fill sub item
CLEAR V_ITEM .
v_slineitem = v_slineitem + 1.
ELSEIF wa_data-level = 2.

*  V_ITEM =  V_ITEM + 1.
*  bom_sub_item-posid = v_slineitem.
*  bom_sub_item-ebort = 'test'.
*  bom_sub_item-upmng = wa_data-sub_upmng.
*  bom_sub_item-uposz =  V_ITEM.
*  bom_sub_item-uptxt = 'test'.
*  append bom_sub_item.
*  clear bom_sub_item.

ENDIF.
if wa_data-level = 0.

 else.
at END OF LEVEL.
* Call function
  CALL FUNCTION 'CAD_CREATE_BOM_WITH_SUB_ITEMS'
       EXPORTING
            i_bom_header   = bom_header
            i_auto_posnr   = ''
       IMPORTING
            e_return       = e_return
            e_message      = e_message
            e_message_len  = e_message_len
            e_bom_header   = bom_header
       TABLES
            bom_item       = bom_item
            bom_sub_item   = bom_sub_item
            dms_class_data = dms_class_data
            sap_field_data = sap_field_data
       EXCEPTIONS
             OTHERS         = 1.
  refresh bom_item.
  write : e_message.
  ENDAT.

ENDIF.
CLEAR wa_data.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 06:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811990#M1313413</guid>
      <dc:creator>KiranJ</dc:creator>
      <dc:date>2011-04-29T06:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Alternative BOM using IDOC_INPUT_BOMMAT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811991#M1313414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Part 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**&amp;amp;---------------------------------------------------------------------*
**&amp;amp;      Form  GET_F4HELP
**&amp;amp;---------------------------------------------------------------------*
FORM get_f4help .

  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
    IMPORTING
      file_name     = p_file.

ENDFORM.                    " GET_F4HELP
**&amp;amp;---------------------------------------------------------------------*
**&amp;amp;      Form  UPLOAD_FILE_ITAB
**&amp;amp;---------------------------------------------------------------------*
FORM upload_file_itab .

  DATA:v_file TYPE string.
  MOVE p_file TO v_file.

  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename            = v_file
      filetype            = 'ASC'
      has_field_separator = 'X'
    TABLES
      data_tab            = it_data
     EXCEPTIONS
     FILE_OPEN_ERROR               = 1
     FILE_READ_ERROR               = 2
     NO_BATCH                      = 3
     GUI_REFUSE_FILETRANSFER       = 4
     INVALID_TYPE                  = 5
     NO_AUTHORITY                  = 6
     UNKNOWN_ERROR                 = 7
     BAD_DATA_FORMAT               = 8
     HEADER_NOT_ALLOWED            = 9
     SEPARATOR_NOT_ALLOWED         = 10
     HEADER_TOO_LONG               = 11
     UNKNOWN_DP_ERROR              = 12
     ACCESS_DENIED                 = 13
     DP_OUT_OF_MEMORY              = 14
     DISK_FULL                     = 15
     DP_TIMEOUT                    = 16
     OTHERS                        = 17
            .
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.


ENDFORM.                    " UPLOAD_FILE_ITAB&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; when u people uploading the filat file use the &lt;/P&gt;&lt;P&gt;HEader Material as   Level 0(zero)&lt;/P&gt;&lt;P&gt;All Components as   level 1 (one).&lt;/P&gt;&lt;P&gt;I hope this code is use full for every one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sree.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 06:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-creating-alternative-bom-using-idoc-input-bommat/m-p/5811991#M1313414</guid>
      <dc:creator>KiranJ</dc:creator>
      <dc:date>2011-04-29T06:59:20Z</dc:date>
    </item>
  </channel>
</rss>

