<?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 purchase order smart forms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/purchase-order-smart-forms/m-p/3184828#M758330</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have copied the purchase order smart form and activated it and know i have the function moudule which need to be used in program but i am not shure how to do that can any one tell me how i need to write the coding for simple purchae order and then pass on the data to the smart form so that it displays the output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Dec 2007 07:52:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-07T07:52:43Z</dc:date>
    <item>
      <title>purchase order smart forms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/purchase-order-smart-forms/m-p/3184828#M758330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have copied the purchase order smart form and activated it and know i have the function moudule which need to be used in program but i am not shure how to do that can any one tell me how i need to write the coding for simple purchae order and then pass on the data to the smart form so that it displays the output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 07:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/purchase-order-smart-forms/m-p/3184828#M758330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-07T07:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: purchase order smart forms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/purchase-order-smart-forms/m-p/3184829#M758331</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;Smartforms are function modules, generated by SAP. To determine their names, you have to use the following FM in the printer program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;formname = 'ZMYSMARTFORM'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;fm_name = lw_fm_name (Function Module Name)&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;no_form = 1&lt;/P&gt;&lt;P&gt;no_function_module = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; c_0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION lw_fm_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;control_parameters = l_cntrl_param&lt;/P&gt;&lt;P&gt;output_options = l_outpt_param&lt;/P&gt;&lt;P&gt;user_settings = space&lt;/P&gt;&lt;P&gt;fiw_wapinr = p_wapinr&lt;/P&gt;&lt;P&gt;fiw_desc = w_stxt&lt;/P&gt;&lt;P&gt;fiw_langu = w_spras&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;fti_lines = i_long_text&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;formatting_error = 1&lt;/P&gt;&lt;P&gt;internal_error = 2&lt;/P&gt;&lt;P&gt;send_error = 3&lt;/P&gt;&lt;P&gt;user_canceled = 4&lt;/P&gt;&lt;P&gt;OTHERS = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to define printer program and smartform name in the NACE transaction for purchasing output type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 07:58:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/purchase-order-smart-forms/m-p/3184829#M758331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-07T07:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: purchase order smart forms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/purchase-order-smart-forms/m-p/3184830#M758332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you do for inserting lines is to select line one of the screen table and then click the insert button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do this for each line in your BDC and then you only have to worry about line one of the table: &lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;Form Add_Item_Line Tables t_Item_Data &lt;/P&gt;&lt;P&gt;                    using pu_program     type Program_Name &lt;/P&gt;&lt;P&gt;                          pu_screen      like sy-dynnr &lt;/P&gt;&lt;P&gt;                          pu_insert_line like sy-ucomm &lt;/P&gt;&lt;P&gt;                          pu_insert_at   like sy-tabix &lt;/P&gt;&lt;P&gt;                          pu_werks       like Zorder_Header-Dwerk. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     Data: t_characteristics type Order_Lines, &lt;/P&gt;&lt;P&gt;           w_Characteristic like Zorder_Line. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     Perform Zbdc_Screen using pu_Program pu_Screen. &lt;/P&gt;&lt;P&gt;     Perform Zbdc_Field  using c_OkCode pu_insert_line.           &amp;lt;----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;     Perform Zbdc_Screen using pu_Program pu_Screen. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     Loop at t_Item_Data into w_Characteristic. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        Is this actually part of the item line or is it a &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        Characteristic ? &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          Translate w_Characteristic-AtNam to Upper Case. &lt;/P&gt;&lt;P&gt;          Case w_Characteristic-AtNam. &lt;/P&gt;&lt;P&gt;               When 'MATNR'.              " Material &lt;/P&gt;&lt;P&gt;                    Perform Zbdc_Subscript using 'VBAP-MATNR' &lt;/P&gt;&lt;P&gt;                                                 pu_insert_at &lt;/P&gt;&lt;P&gt;                                                 W_Characteristic-AtWrt. &lt;/P&gt;&lt;P&gt;                    Perform Zbdc_Subscript using 'VBAP-WERKS' &lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at it from a modification point of view, the aim will be always to bring the line of the table that you're interested in to line one of the table &lt;/P&gt;&lt;P&gt;so again you only need to handle line one of the screen table. Some of the codes for this are 'POPO' in Purchase order processing, and 'SORT' in CO02: &lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Now loop round the P/O and delete all of those that we don't want &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   Loop at t_ekpo. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Keep this P/O Line item ? &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        MOVE SY-TABIX TO W_POPO. &lt;/P&gt;&lt;P&gt;        PERFORM ZBDC_SCREEN USING 'SAPMV50A'   '0270'. &lt;/P&gt;&lt;P&gt;        PERFORM ZBDC_FIELD  USING 'BDC_OKCODE' '=POPO'. &lt;/P&gt;&lt;P&gt;        PERFORM ZBDC_SCREEN USING 'SAPMV50A'   '0111'. &lt;/P&gt;&lt;P&gt;        PERFORM ZBDC_FIELD  USING 'RV50A-POSNR' W_POPO. &lt;/P&gt;&lt;P&gt;        PERFORM ZBDC_FIELD  USING 'BDC_OKCODE' '/00'. &lt;/P&gt;&lt;P&gt;        Read Table t_vl31_asn with key ebeln = t_ekpo-ebeln &lt;/P&gt;&lt;P&gt;                                       ebelp = t_ekpo-ebelp. &lt;/P&gt;&lt;P&gt;        If sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         Not found - discard this one. &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           PERFORM ZBDC_SCREEN USING 'SAPMV50A'   '0270'. &lt;/P&gt;&lt;P&gt;           PERFORM ZBDC_FIELD  USING 'RV50A-LIPS_SELKZ(01)' 'X'. &lt;/P&gt;&lt;P&gt;        ELSE. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         Change the quantity.... &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           WRITE T_VL31_ASN-MENGE TO W_MENGE UNIT T_VL31_ASN-LMEIN. &lt;/P&gt;&lt;P&gt;           CONDENSE W_MENGE NO-GAPS. &lt;/P&gt;&lt;P&gt;           PERFORM ZBDC_SCREEN USING 'SAPMV50A' '0270'. &lt;/P&gt;&lt;P&gt;           PERFORM ZBDC_FIELD  USING 'LIPS-LFIMG(01)' W_MENGE. &lt;/P&gt;&lt;P&gt;        EndIf. &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;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if found usefull.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chandra Sekhar.&lt;/P&gt;&lt;P&gt;_________________&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 08:04:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/purchase-order-smart-forms/m-p/3184830#M758332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-07T08:04:32Z</dc:date>
    </item>
  </channel>
</rss>

