<?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: Problem in BAPI_HU_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283782#M1021981</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 handled the error using your suggestions and i found the following error message in the IT_RET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE	                                   	E&lt;/P&gt;&lt;P&gt;ID	                                   	MM&lt;/P&gt;&lt;P&gt;NUMBER	                                   	328&lt;/P&gt;&lt;P&gt;MESSAGE	                                   	Quantities cannot be converted for the material BP6007_NVY&lt;/P&gt;&lt;P&gt;LOG_NO	                                   &lt;/P&gt;&lt;P&gt;LOG_MSG_NO	                                   	000000&lt;/P&gt;&lt;P&gt;MESSAGE_V1	                                   	BP6007_NVY&lt;/P&gt;&lt;P&gt;MESSAGE_V2	                                   &lt;/P&gt;&lt;P&gt;MESSAGE_V3	                                   &lt;/P&gt;&lt;P&gt;MESSAGE_V4	                                   &lt;/P&gt;&lt;P&gt;PARAMETER	                                   &lt;/P&gt;&lt;P&gt;ROW	                                   	0&lt;/P&gt;&lt;P&gt;FIELD	                                   &lt;/P&gt;&lt;P&gt;SYSTEM	                                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest me what is wrong with my value passing to the BAPI_HU_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regs,&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Aug 2008 23:35:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-03T23:35:46Z</dc:date>
    <item>
      <title>Problem in BAPI_HU_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283780#M1021979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im using BAPI_HU_CREATE for creating the handling unit, but when i run the program, i m getting a message HU cannot be created and the HU is not getting created,pls find the below coding im using in my program and tell me what could be wrong in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: st_huhdrpr TYPE bapihuhdrproposal,&lt;/P&gt;&lt;P&gt;        st_huhdr   TYPE  bapihuheader,&lt;/P&gt;&lt;P&gt;        st_huhdr_pack   TYPE  bapihuheader,&lt;/P&gt;&lt;P&gt;        it_pr      LIKE TABLE OF bapihuitmproposal WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        it_huitem  LIKE TABLE OF bapihuitem,&lt;/P&gt;&lt;P&gt;        it_huitem_pack TYPE bapihuitem,&lt;/P&gt;&lt;P&gt;        it_hunumber LIKE TABLE OF bapihunumber WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH it_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_huhdrpr-hu_status_init  = 'C'.&lt;/P&gt;&lt;P&gt;  st_huhdrpr-pack_mat        = v_pac_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE * FROM lips WHERE vbeln EQ likp-vbeln&lt;/P&gt;&lt;P&gt;                            AND   lfimg GT 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  st_huhdrpr-plant           = lips-werks.&lt;/P&gt;&lt;P&gt;  st_huhdrpr-stge_loc        = lips-lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_scan ASSIGNING &amp;lt;fs_scan&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_pr-hu_item_type = '1'.&lt;/P&gt;&lt;P&gt;    it_pr-material     = &amp;lt;fs_scan&amp;gt;-matnr.&lt;/P&gt;&lt;P&gt;    it_pr-material_partner = &amp;lt;fs_scan&amp;gt;-j_3akordx.&lt;/P&gt;&lt;P&gt;    it_pr-batch        = &amp;lt;fs_scan&amp;gt;-charg.&lt;/P&gt;&lt;P&gt;    it_pr-pack_qty     = &amp;lt;fs_scan&amp;gt;-count.&lt;/P&gt;&lt;P&gt;    it_pr-base_unit_qty = 'ST'.&lt;/P&gt;&lt;P&gt;    it_pr-plant        = st_huhdrpr-plant.&lt;/P&gt;&lt;P&gt;    it_pr-stge_loc     = st_huhdrpr-stge_loc.&lt;/P&gt;&lt;P&gt;    it_pr-number_pack_mat = &amp;lt;fs_scan&amp;gt;-count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND it_pr.&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;*Call to BAPI&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_HU_CREATE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            headerproposal = st_huhdrpr&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            huheader       = st_huhdr&lt;/P&gt;&lt;P&gt;            hukey          = v_hukey&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            itemsproposal  = it_pr&lt;/P&gt;&lt;P&gt;            return         = it_ret&lt;/P&gt;&lt;P&gt;            huitem         = it_huitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT v_hukey IS INITIAL.&lt;/P&gt;&lt;P&gt;    APPEND v_hukey TO it_hukey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_scan ASSIGNING &amp;lt;fs_scan&amp;gt; .&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING &amp;lt;fs_scan&amp;gt; TO it_hunit.&lt;/P&gt;&lt;P&gt;      MOVE v_hukey TO it_hunit-hukey.&lt;/P&gt;&lt;P&gt;      APPEND it_hunit.&lt;/P&gt;&lt;P&gt;      CLEAR it_hunit.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM packing_print.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE e000(38) WITH&lt;/P&gt;&lt;P&gt;    'HU Creation and Packing failed Click on LOG to see errors'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  REFRESH : it_pr,it_huitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " create_handling_unit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2008 03:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283780#M1021979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-03T03:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in BAPI_HU_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283781#M1021980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Raja&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your "error" handling of the BAPI is somewhat strange. The returned messages (TABLES parameter RETURN) will tell you more about your problem. Therefore check the details of these error messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*Call to BAPI
CALL FUNCTION 'BAPI_HU_CREATE'
EXPORTING
headerproposal = st_huhdrpr
IMPORTING
huheader = st_huhdr
hukey = v_hukey
TABLES
itemsproposal = it_pr
return = it_ret
huitem = it_huitem.

" Error handling
LOOP AT it_ret TRANSPORTING NO FIELDS
               WHERE ( type CA 'AEX' ). " Abort, Error, or Dump message
  EXIT.
ENDLOOP.
IF ( syst-subrc = 0 ).
  CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2008 20:02:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283781#M1021980</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-08-03T20:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in BAPI_HU_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283782#M1021981</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 handled the error using your suggestions and i found the following error message in the IT_RET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE	                                   	E&lt;/P&gt;&lt;P&gt;ID	                                   	MM&lt;/P&gt;&lt;P&gt;NUMBER	                                   	328&lt;/P&gt;&lt;P&gt;MESSAGE	                                   	Quantities cannot be converted for the material BP6007_NVY&lt;/P&gt;&lt;P&gt;LOG_NO	                                   &lt;/P&gt;&lt;P&gt;LOG_MSG_NO	                                   	000000&lt;/P&gt;&lt;P&gt;MESSAGE_V1	                                   	BP6007_NVY&lt;/P&gt;&lt;P&gt;MESSAGE_V2	                                   &lt;/P&gt;&lt;P&gt;MESSAGE_V3	                                   &lt;/P&gt;&lt;P&gt;MESSAGE_V4	                                   &lt;/P&gt;&lt;P&gt;PARAMETER	                                   &lt;/P&gt;&lt;P&gt;ROW	                                   	0&lt;/P&gt;&lt;P&gt;FIELD	                                   &lt;/P&gt;&lt;P&gt;SYSTEM	                                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest me what is wrong with my value passing to the BAPI_HU_CREATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regs,&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2008 23:35:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283782#M1021981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-03T23:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in BAPI_HU_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283783#M1021982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try removing any comma or points from the field&lt;/P&gt;&lt;P&gt;it_pr-pack_qty = &amp;lt;fs_scan&amp;gt;-count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 01:51:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283783#M1021982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T01:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in BAPI_HU_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283784#M1021983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please have a look at the below mentioned code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_final1 INTO gs_final1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item proposal &lt;/P&gt;&lt;P&gt;gs_itemsproposal-hu_item_type = c_1. " material item&lt;/P&gt;&lt;P&gt;gs_itemsproposal-pack_qty = gs_final1-erfmg. " quantity&lt;/P&gt;&lt;P&gt;gs_itemsproposal-base_unit_qty = 'EA'. " unit of measure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT gs_final1-matnr IS INITIAL.&lt;/P&gt;&lt;P&gt;gs_itemsproposal-material = gs_final1-matnr. " zlpm material&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;gs_itemsproposal-material = gs_final1-matnr1. " material(component)&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gs_itemsproposal-plant = gs_final1-werks. " plant&lt;/P&gt;&lt;P&gt;gs_itemsproposal-stge_loc = gs_final1-lgort. " storage location&lt;/P&gt;&lt;P&gt;gs_itemsproposal-batch = gs_final1-charg. " batch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;passing values into variables before AT NEW &lt;/P&gt;&lt;P&gt;gv_matnr = gs_final1-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT NEW sernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;populate no of sernr &lt;/P&gt;&lt;P&gt;gs_itemsproposal-no_of_serial_numbers = c_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table to check if the 1st matnr of new &lt;/P&gt;&lt;P&gt;sernr is of type ZLPM or not &lt;/P&gt;&lt;P&gt;also populate pack_mat and pack inst &lt;/P&gt;&lt;P&gt;READ TABLE gt_mara INTO gs_mara WITH KEY matnr = gv_matnr&lt;/P&gt;&lt;P&gt;mtart = c_zlpm BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = c_0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;populate pack_mat &lt;/P&gt;&lt;P&gt;IF gs_mara-magrv+0(2) = c_im.&lt;/P&gt;&lt;P&gt;gv_pack_mat = text-032. " IMPLANT_SET&lt;/P&gt;&lt;P&gt;ELSEIF gs_mara-magrv+0(2) = c_in.&lt;/P&gt;&lt;P&gt;gv_pack_mat = text-035. " INSTRUMENT_KIT&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;pack inst &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_pobjid = gv_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'VHUPODB_PACKOBJ_CONV_ID2GUID'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;pobjid_imp = lv_pobjid&lt;/P&gt;&lt;P&gt;packtyp_imp = c_p&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;packnr_exp = gv_packg_instruct&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;prog_error = 1&lt;/P&gt;&lt;P&gt;pobjid_not_found = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;IF sy-subrc 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;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;populate msg if 1st material of new sernr is &lt;/P&gt;&lt;P&gt;not of type ZLPM &lt;/P&gt;&lt;P&gt;gv_tabix = gv_tabix + c_1.&lt;/P&gt;&lt;P&gt;gs_error1-sno = gv_tabix.&lt;/P&gt;&lt;P&gt;gs_error1-matnr = gv_matnr.&lt;/P&gt;&lt;P&gt;gs_error1-sernr = gs_final1-sernr.&lt;/P&gt;&lt;P&gt;gs_error1-msg = text-037. " First material of this serial number is not of type ZLPM&lt;/P&gt;&lt;P&gt;APPEND gs_error1 TO gt_error1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE gt_final1 WHERE sernr = gs_final1-sernr.&lt;/P&gt;&lt;P&gt;CONTINUE.&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;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND gs_itemsproposal TO gt_itemsproposal.&lt;/P&gt;&lt;P&gt;CLEAR gs_itemsproposal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gv_werks = gs_final1-werks.&lt;/P&gt;&lt;P&gt;gv_lgort = gs_final1-lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bapi will be called only on the change of sernr &lt;/P&gt;&lt;P&gt;AT END OF sernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;used for setting the local pack status &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;calculate no of items in itemsproposal table &lt;/P&gt;&lt;P&gt;DESCRIBE TABLE gt_itemsproposal LINES lv_no_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read total materials available in this pack inst &lt;/P&gt;&lt;P&gt;here lv_pobjid contains the name of ZLPM material &lt;/P&gt;&lt;P&gt;READ TABLE gt_packkp INTO gs_packkp WITH KEY matnr = lv_pobjid.&lt;/P&gt;&lt;P&gt;IF sy-subrc = c_0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if all material in pack inst are included in HU &lt;/P&gt;&lt;P&gt;IF gs_packkp-number = lv_no_lines.&lt;/P&gt;&lt;P&gt;gs_bapihuhdrproposal-l_packg_status_hu = c_3. " Local packing status of HU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if all material in pack inst are not included in HU &lt;/P&gt;&lt;P&gt;ELSEIF gs_packkp-number lv_no_lines.&lt;/P&gt;&lt;P&gt;gs_bapihuhdrproposal-l_packg_status_hu = c_2. " Local packing status of HU&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;&lt;/P&gt;&lt;P&gt;header proposal &lt;/P&gt;&lt;P&gt;gv_sernr = gs_final1-sernr.&lt;/P&gt;&lt;P&gt;gs_bapihuhdrproposal-pack_mat = gv_pack_mat. " packaging material&lt;/P&gt;&lt;P&gt;gs_bapihuhdrproposal-plant = gv_werks. " plant&lt;/P&gt;&lt;P&gt;gs_bapihuhdrproposal-stge_loc = gv_lgort. " storage location&lt;/P&gt;&lt;P&gt;gs_bapihuhdrproposal-packg_instruct = gv_packg_instruct. " packaging instruction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;serial number &lt;/P&gt;&lt;P&gt;gs_itemsserialno-row_index = c_1. " row index&lt;/P&gt;&lt;P&gt;gs_itemsserialno-serialno = gs_final1-sernr. " serial number&lt;/P&gt;&lt;P&gt;APPEND gs_itemsserialno TO gt_itemsserialno.&lt;/P&gt;&lt;P&gt;CLEAR gs_itemsserialno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bapi for hu creation &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;CALL FUNCTION 'BAPI_HU_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;headerproposal = gs_bapihuhdrproposal&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;huheader = gs_huheader&lt;/P&gt;&lt;P&gt;hukey = gv_hukey&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;itemsproposal = gt_itemsproposal&lt;/P&gt;&lt;P&gt;itemsserialno = gt_itemsserialno&lt;/P&gt;&lt;P&gt;return = gt_return&lt;/P&gt;&lt;P&gt;huitem = gt_huitem.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gv_tabix = gv_tabix + c_1.&lt;/P&gt;&lt;P&gt;gs_summary1-sno = gv_tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here lv_pobjid contains the name of ZLPM material &lt;/P&gt;&lt;P&gt;gs_summary1-matnr = lv_pobjid.&lt;/P&gt;&lt;P&gt;gs_summary1-sernr = gs_final1-sernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT gs_summary1-sno LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF gt_return IS INITIAL. " HU created successfully&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;transaction commit &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;wait = c_x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2008 13:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-bapi-hu-create/m-p/4283784#M1021983</guid>
      <dc:creator>former_member4489</dc:creator>
      <dc:date>2008-08-11T13:51:53Z</dc:date>
    </item>
  </channel>
</rss>

