<?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: SALV to Smartforms programm call in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781498#M39289</link>
    <description>&lt;P&gt;Well 'I am trying to create a smartforms which is already created' so you are done already? &lt;/P&gt;&lt;P&gt;What's the exact problem&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;creation of a &lt;A href="https://help.sap.com/viewer/search?q=Smart%20Forms"&gt;smartforms&lt;/A&gt; (which already exist)&lt;/LI&gt;&lt;LI&gt;calling a smartforms&lt;/LI&gt;&lt;LI&gt;handling the print request in ALV&lt;/LI&gt;&lt;LI&gt;something else we have to guess&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 15 Jan 2019 08:08:39 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2019-01-15T08:08:39Z</dc:date>
    <item>
      <title>SALV to Smartforms programm call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781496#M39287</link>
      <description>&lt;P&gt;Hello everyone,I need a help.I am trying to create a smartforms which is already created in SALV reports.Now,I want to create a smartforms where previous SALV report will be called,it means want to convert salv report to smartforms.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 06:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781496#M39287</guid>
      <dc:creator>hossain_rajib55</dc:creator>
      <dc:date>2019-01-10T06:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: SALV to Smartforms programm call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781497#M39288</link>
      <description>&lt;P&gt;Take the itab from the salv.. &lt;/P&gt;&lt;P&gt;pass it to the smartforms.. &lt;/P&gt;&lt;P&gt;create table inside the form which look whatever you want to have it like.. &lt;/P&gt;&lt;P&gt;Done.&lt;/P&gt;&lt;P&gt;That's it... and yes, you have to do it that way. No "Auto"-Convert is there, if it should be a smartform.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 07:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781497#M39288</guid>
      <dc:creator>Florian</dc:creator>
      <dc:date>2019-01-10T07:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: SALV to Smartforms programm call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781498#M39289</link>
      <description>&lt;P&gt;Well 'I am trying to create a smartforms which is already created' so you are done already? &lt;/P&gt;&lt;P&gt;What's the exact problem&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;creation of a &lt;A href="https://help.sap.com/viewer/search?q=Smart%20Forms"&gt;smartforms&lt;/A&gt; (which already exist)&lt;/LI&gt;&lt;LI&gt;calling a smartforms&lt;/LI&gt;&lt;LI&gt;handling the print request in ALV&lt;/LI&gt;&lt;LI&gt;something else we have to guess&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 15 Jan 2019 08:08:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781498#M39289</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2019-01-15T08:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: SALV to Smartforms programm call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781499#M39290</link>
      <description>&lt;P&gt;Handle the print request in ALV.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 08:53:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781499#M39290</guid>
      <dc:creator>hossain_rajib55</dc:creator>
      <dc:date>2019-01-15T08:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: SALV to Smartforms programm call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781500#M39291</link>
      <description>&lt;P&gt;  Hello &lt;A href="https://answers.sap.com/users/1270/raymondgiuseppi.html"&gt;Raymond !&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I create a smartforms name 'xyz'. now i want to call the smartform when print button is pressed.&lt;/P&gt;&lt;P&gt;REPORT Y_TEST_SMARTFORMS_9515.&lt;BR /&gt;
Tables: makt.&lt;BR /&gt;
&lt;BR /&gt;
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.&lt;BR /&gt;
SELECT-OPTIONS: s_matnr FOR makt-matnr.&lt;BR /&gt;
SELECTION-SCREEN END OF BLOCK b1.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
types: BEGIN OF itab,&lt;BR /&gt;
 matnr TYPE makt-matnr,&lt;BR /&gt;
 MAKTX TYPE makt-MAKTX,&lt;BR /&gt;
 END OF itab.&lt;BR /&gt;
&lt;BR /&gt;
data: dDesc TYPE makt-maktx.&lt;BR /&gt;
data: itab TYPE TABLE OF itab,&lt;BR /&gt;
 itab1 TYPE itab,&lt;BR /&gt;
 fm_name TYPE rs38l_fnam,&lt;BR /&gt;
 wa TYPE itab.&lt;BR /&gt;
data: in type p.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
select makt~matnr makt~maktx&lt;BR /&gt;
 INTO CORRESPONDING FIELDS OF TABLE itab FROM mara&lt;BR /&gt;
 inner join makt on mara~matnr = makt~matnr&lt;BR /&gt;
 WHERE mara~matnr in s_matnr.&lt;BR /&gt;
 sort itab by matnr.&lt;BR /&gt;
 delete ADJACENT DUPLICATES FROM itab.&lt;BR /&gt;
&lt;BR /&gt;
 LOOP AT itab INTO wa.&lt;BR /&gt;
 IF sy-subrc &amp;lt;&amp;gt; 0.&lt;BR /&gt;
 SELECT SINGLE maktx INTO dDesc FROM makt where matnr = wa-matnr.&lt;BR /&gt;
 wa-maktx = dDesc.&lt;BR /&gt;
 clear dDesc.&lt;BR /&gt;
 ENDIF.&lt;BR /&gt;
 ENDLOOP.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 DATA: gr_table TYPE REF TO cl_salv_table,&lt;BR /&gt;
 gr_funct TYPE REF TO cl_salv_functions,&lt;BR /&gt;
 gr_columns TYPE REF TO cl_salv_columns_table,&lt;BR /&gt;
 gr_column TYPE REF TO cl_salv_column_table,&lt;BR /&gt;
 gr_sorts TYPE REF TO cl_salv_sorts,&lt;BR /&gt;
 gr_sort TYPE REF TO cl_salv_sort,&lt;BR /&gt;
 gr_aggrs TYPE REF TO cl_salv_aggregations,&lt;BR /&gt;
 layout_settings TYPE REF TO cl_salv_layout,&lt;BR /&gt;
 layout_key TYPE salv_s_layout_key,&lt;BR /&gt;
 gr_grid TYPE REF TO cl_salv_form_layout_grid,&lt;BR /&gt;
 gr_header TYPE REF TO cl_salv_form_element,&lt;BR /&gt;
 lv_date_from TYPE char20,&lt;BR /&gt;
 lv_date_to TYPE char20,&lt;BR /&gt;
 lv_count TYPE sy-index,&lt;BR /&gt;
 lv_text TYPE string,&lt;BR /&gt;
 lv_text1 TYPE string.&lt;BR /&gt;
&lt;BR /&gt;
 DATA: lt_binding TYPE salv_t_hierseq_binding.&lt;BR /&gt;
 DATA: ls_binding TYPE salv_s_hierseq_binding.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 TRY.&lt;BR /&gt;
 CALL METHOD cl_salv_table=&amp;gt;factory&lt;BR /&gt;
 IMPORTING&lt;BR /&gt;
 r_salv_table = gr_table&lt;BR /&gt;
 CHANGING&lt;BR /&gt;
 t_table = itab.&lt;BR /&gt;
 CATCH cx_salv_msg.&lt;BR /&gt;
 ENDTRY.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 formname = 'ZMM_GENERIC_NAME'&lt;BR /&gt;
* VARIANT = ' '&lt;BR /&gt;
* DIRECT_CALL = ' '&lt;BR /&gt;
 IMPORTING&lt;BR /&gt;
 FM_NAME = fm_name&lt;BR /&gt;
 EXCEPTIONS&lt;BR /&gt;
 NO_FORM = 1&lt;BR /&gt;
 NO_FUNCTION_MODULE = 2&lt;BR /&gt;
 OTHERS = 3&lt;BR /&gt;
 .&lt;BR /&gt;
IF sy-subrc &amp;lt;&amp;gt; 0.&lt;BR /&gt;
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;BR /&gt;
 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;BR /&gt;
ENDIF.&lt;BR /&gt;
&lt;BR /&gt;
call function fm_name&lt;BR /&gt;
 Exporting&lt;BR /&gt;
 Mat_Desc = dDesc&lt;BR /&gt;
 TABLES&lt;BR /&gt;
 itab = itab&lt;BR /&gt;
 EXCEPTIONS&lt;BR /&gt;
 FORMATTING_ERROR = 1&lt;BR /&gt;
 INTERNAL_ERROR = 2&lt;BR /&gt;
 SEND_ERROR = 3&lt;BR /&gt;
 USER_CANCELED = 4&lt;BR /&gt;
 OTHERS = 5 .&lt;BR /&gt;
&lt;BR /&gt;
 IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;BR /&gt;
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;BR /&gt;
 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;BR /&gt;
 ENDIF.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
*****Add Report Header&lt;BR /&gt;
&lt;BR /&gt;
 gr_table-&amp;gt;set_top_of_list( gr_header ).&lt;BR /&gt;
&lt;BR /&gt;
 layout_settings = gr_table-&amp;gt;get_layout( ).&lt;BR /&gt;
 layout_key-report = sy-repid.&lt;BR /&gt;
 gr_funct = gr_table-&amp;gt;get_functions( ).&lt;BR /&gt;
 gr_funct-&amp;gt;set_all( abap_true ).&lt;BR /&gt;
&lt;BR /&gt;
 layout_settings-&amp;gt;set_default( abap_true ).&lt;BR /&gt;
&lt;BR /&gt;
 layout_settings-&amp;gt;set_key( layout_key ).&lt;BR /&gt;
 layout_settings-&amp;gt;set_save_restriction( if_salv_c_layout=&amp;gt;restrict_none ).&lt;BR /&gt;
&lt;BR /&gt;
 gr_columns = gr_table-&amp;gt;get_columns( ).&lt;BR /&gt;
 gr_columns-&amp;gt;set_optimize( ).&lt;BR /&gt;
&lt;BR /&gt;
 gr_column ?= gr_columns-&amp;gt;get_column( 'MATNR' ).&lt;BR /&gt;
 gr_column-&amp;gt;set_short_text( 'Matnr' ).&lt;BR /&gt;
 gr_column-&amp;gt;set_medium_text( 'Material Numb.' ).&lt;BR /&gt;
 gr_column-&amp;gt;set_long_text( 'Material Number' ).&lt;BR /&gt;
**&lt;BR /&gt;
&lt;BR /&gt;
 gr_column ?= gr_columns-&amp;gt;get_column( 'MAKTX' ).&lt;BR /&gt;
 gr_column-&amp;gt;set_short_text( 'Mat.Desc' ).&lt;BR /&gt;
 gr_column-&amp;gt;set_medium_text( 'Mat.Desc' ).&lt;BR /&gt;
 gr_column-&amp;gt;set_long_text( 'Material Description' ).&lt;BR /&gt;
 gr_table-&amp;gt;display( ).&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 10:15:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781500#M39291</guid>
      <dc:creator>hossain_rajib55</dc:creator>
      <dc:date>2019-01-15T10:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: SALV to Smartforms programm call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781501#M39292</link>
      <description>&lt;P&gt;You could handle events BEFORE/AFTER_SALV_FUNCTION of CL_SALV_EVENTS (GET_EVENT) to call your SmartForms during standard print function or add your own function and handle event ADDED_FUNCTION.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 12:08:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781501#M39292</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2019-01-15T12:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: SALV to Smartforms programm call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781502#M39293</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There are some demo programs in SE38 start with SALV*&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;SALV_DEMO_TABLE_FUNCTIONS&lt;/P&gt;&lt;P&gt;Hope it help,&lt;/P&gt;&lt;P&gt;Nam&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 02:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-to-smartforms-programm-call/m-p/781502#M39293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-01-16T02:13:58Z</dc:date>
    </item>
  </channel>
</rss>

