<?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: Passing Material text to BAPI BAPI_SALESORDER_CREATEFROMDATE2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110757#M1362164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Termi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just found this 5-year+ old snippet, might help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form prepare_item_text
   using    pv_text1      type xxxxxxxxxxxx_order_item-text1
            pv_text2      type xxxxxxxxxxorder_item-text2
            pv_kschl      type kschl
            pv_material   type matnr
            pv_itm_number type posnr
            ps_bapisdhd1  type bapisdhd1
   changing pt_order_text type ty_t_bapisdtext.

  data:
    lv_langu      type sylangu,
    ls_bapisdtext type line of ty_t_bapisdtext.
  perform get_order_text_language
    changing lv_langu.
  perform get_1st_item_text_id_4_item
    using    ps_bapisdhd1 pv_material
    changing ls_bapisdtext-text_id.
  check not ls_bapisdtext-text_id is initial.
  ls_bapisdtext-langu      = lv_langu.
  ls_bapisdtext-format_col = '*'.
  ls_bapisdtext-itm_number = pv_itm_number.
*** Top: Material short text
**  PERFORM get_maktx
**    USING    pv_material lv_langu
**    CHANGING ls_bapisdtext-text_line.
**  APPEND ls_bapisdtext TO pt_order_text.
*** Space line
**  CLEAR: ls_bapisdtext-text_line.
**  APPEND ls_bapisdtext TO pt_order_text.
  if not pv_kschl is initial.
* In case of 'misc surcharge' item: Add condition text
    perform get_vtext_4_kschl using pv_kschl lv_langu
      changing ls_bapisdtext-text_line.
    append ls_bapisdtext to pt_order_text.
  else.
* In case of normal item: Add IDOC item text
    ls_bapisdtext-text_line  = pv_text1.
    if not pv_text1 is initial.
      append ls_bapisdtext to pt_order_text.
      ls_bapisdtext-format_col = '='.
    endif." not pv_text1 is initial.
    ls_bapisdtext-text_line = pv_text2.
    if not pv_text2 is initial.
      append ls_bapisdtext to pt_order_text.
    endif." not pv_text2 is initial.
  endif.
endform.                    " prepare_item_text&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xxxx had customer-related information...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2009 22:18:49 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2009-09-01T22:18:49Z</dc:date>
    <item>
      <title>Passing Material text to BAPI BAPI_SALESORDER_CREATEFROMDATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110754#M1362161</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 making use of BAPI_SALESORDERCREATE_FROMDAT2 for creating a sales order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for some orders i need to pass even the material text.&lt;/P&gt;&lt;P&gt;I am not able to find the field in the BAPI structures to pass the material text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease help me solving this issue.&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;Regards,&lt;/P&gt;&lt;P&gt;Sunny.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 21:11:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110754#M1362161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-01T21:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Material text to BAPI BAPI_SALESORDER_CREATEFROMDATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110755#M1362162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe you can try SHORT_TEXT field in BAPISDITM structure.&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;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 21:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110755#M1362162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-01T21:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Material text to BAPI BAPI_SALESORDER_CREATEFROMDATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110756#M1362163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subrmanian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using SHORT_TEXT but its not fruitful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please tell me if you have used it earlier...and if it had worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 21:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110756#M1362163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-01T21:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Material text to BAPI BAPI_SALESORDER_CREATEFROMDATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110757#M1362164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Termi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just found this 5-year+ old snippet, might help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form prepare_item_text
   using    pv_text1      type xxxxxxxxxxxx_order_item-text1
            pv_text2      type xxxxxxxxxxorder_item-text2
            pv_kschl      type kschl
            pv_material   type matnr
            pv_itm_number type posnr
            ps_bapisdhd1  type bapisdhd1
   changing pt_order_text type ty_t_bapisdtext.

  data:
    lv_langu      type sylangu,
    ls_bapisdtext type line of ty_t_bapisdtext.
  perform get_order_text_language
    changing lv_langu.
  perform get_1st_item_text_id_4_item
    using    ps_bapisdhd1 pv_material
    changing ls_bapisdtext-text_id.
  check not ls_bapisdtext-text_id is initial.
  ls_bapisdtext-langu      = lv_langu.
  ls_bapisdtext-format_col = '*'.
  ls_bapisdtext-itm_number = pv_itm_number.
*** Top: Material short text
**  PERFORM get_maktx
**    USING    pv_material lv_langu
**    CHANGING ls_bapisdtext-text_line.
**  APPEND ls_bapisdtext TO pt_order_text.
*** Space line
**  CLEAR: ls_bapisdtext-text_line.
**  APPEND ls_bapisdtext TO pt_order_text.
  if not pv_kschl is initial.
* In case of 'misc surcharge' item: Add condition text
    perform get_vtext_4_kschl using pv_kschl lv_langu
      changing ls_bapisdtext-text_line.
    append ls_bapisdtext to pt_order_text.
  else.
* In case of normal item: Add IDOC item text
    ls_bapisdtext-text_line  = pv_text1.
    if not pv_text1 is initial.
      append ls_bapisdtext to pt_order_text.
      ls_bapisdtext-format_col = '='.
    endif." not pv_text1 is initial.
    ls_bapisdtext-text_line = pv_text2.
    if not pv_text2 is initial.
      append ls_bapisdtext to pt_order_text.
    endif." not pv_text2 is initial.
  endif.
endform.                    " prepare_item_text&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xxxx had customer-related information...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 22:18:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110757#M1362164</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-09-01T22:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Material text to BAPI BAPI_SALESORDER_CREATEFROMDATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110758#M1362165</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;Thanks for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRoblem solved using SHORT_TEXT itself, there was some problem before in data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunny.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 07:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-material-text-to-bapi-bapi-salesorder-createfromdate2/m-p/6110758#M1362165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T07:41:23Z</dc:date>
    </item>
  </channel>
</rss>

