<?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: calling smartform by user command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277236#M1988412</link>
    <description>&lt;P&gt;Did you just handled the &amp;amp;IC1 function code for detail display/double click ?&lt;/P&gt;&lt;P&gt;You should also handle the function code associated to your execute icon, loop in the internal table for selected records (select field not initial) and call the martforms FM in the loop. When  no record currently selected, but the cursor is on a valid line, rs_selfield-tabindex not initial, consider execution of the smartforms for this line else raise an error 'no line selected'.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Also check your layout, seems you have two select fields displayed (did you fill IS_LAYOUT-BOX_FIELDNAME =' CK')&lt;/LI&gt;&lt;LI&gt;If you don't change the form parameters any longer, replace the generated FM name with the variable returned by SSF_FUNCTION_MODULE_NAME.&lt;/LI&gt;&lt;LI&gt;Use classes for new ALV development (cl_salv_table, cl_gui_alv_grid) and not obsolete FM&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Wed, 02 Sep 2020 07:31:52 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2020-09-02T07:31:52Z</dc:date>
    <item>
      <title>calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277232#M1988408</link>
      <description>&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1838678-captureq.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I created alv report and also smartform now i need to call that smartform by alv report . When user mark checkbox for any doucument number and then execute in the alv output . it should call the smartform for that same document number . but my issue is that when i am selecting and then trying to execute nothing is happening . i think it is not calling smartform.&lt;/P&gt;
  &lt;P&gt;FORM USER_COMMAND USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.&lt;BR /&gt; CASE r_ucomm.&lt;BR /&gt; data: name1 type lfa1-NAME1 ,&lt;BR /&gt; wrbtr type bseg-WRBTR,&lt;BR /&gt; h_budat type bseg-H_BUDAT.&lt;BR /&gt; &lt;BR /&gt; WHEN '&amp;amp;IC1'.&lt;BR /&gt; IF rs_selfield-fieldname = 'Belnr'.&lt;BR /&gt; READ TABLE GI_final ASSIGNING &amp;lt;GWA_FINAL&amp;gt; INDEX rs_selfield-tabindex.&lt;BR /&gt; &amp;lt;GWA_FINAL&amp;gt;-CK = 'X'.&lt;BR /&gt; MODIFY table GI_FINAL FROM &amp;lt;GWA_FINAL&amp;gt; TRANSPORTING CK .&lt;BR /&gt; RS_SELFIELD-REFRESH = 'X'.&lt;BR /&gt; IF GI_FINAL IS INITIAL.&lt;BR /&gt; CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;BR /&gt; EXPORTING&lt;BR /&gt; formname = 'ZTEST_SB_SMARTFORM'&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; * Implement suitable error handling here&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; IF FM_NAME IS NOT INITIAL.&lt;BR /&gt; &lt;BR /&gt; CONTROL_PARAMETERS-preview = 'X'.&lt;BR /&gt; CONTROL_PARAMETERS-no_dialog = 'X'.&lt;BR /&gt; OUTPUT_OPTIONS-TDDEST = 'LP01'.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION FM_NAME "'/1BCDWB/SF00000009'&lt;BR /&gt; EXPORTING&lt;BR /&gt; * ARCHIVE_INDEX =&lt;BR /&gt; * ARCHIVE_INDEX_TAB =&lt;BR /&gt; * ARCHIVE_PARAMETERS =&lt;BR /&gt; CONTROL_PARAMETERS = CONTROL_PARAMETERS&lt;BR /&gt; * MAIL_APPL_OBJ =&lt;BR /&gt; * MAIL_RECIPIENT =&lt;BR /&gt; * MAIL_SENDER =&lt;BR /&gt; OUTPUT_OPTIONS = OUTPUT_OPTIONS&lt;BR /&gt; USER_SETTINGS = 'X'&lt;BR /&gt; name1 = NAME1&lt;BR /&gt; h_budat = H_BUDAT&lt;BR /&gt; wrbtr = WRBTR&lt;BR /&gt; * IMPORTING&lt;BR /&gt; * DOCUMENT_OUTPUT_INFO =&lt;BR /&gt; * JOB_OUTPUT_INFO =&lt;BR /&gt; * JOB_OUTPUT_OPTIONS =&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; * Implement suitable error handling here&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; *&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; ENDCASE.&lt;BR /&gt; &lt;BR /&gt; ENDFORM.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 20:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277232#M1988408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-09-01T20:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277233#M1988409</link>
      <description>&lt;P&gt;did you try to debut it to check, itf your FM have been called ?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 06:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277233#M1988409</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-09-02T06:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277234#M1988410</link>
      <description>&lt;P&gt;May be check with your code line "&lt;STRONG&gt;CALL FUNCTION FM_NAME "'/1BCDWB/SF00000009'&lt;/STRONG&gt;" is correctly working or not.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 06:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277234#M1988410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-09-02T06:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277235#M1988411</link>
      <description>&lt;P&gt;call function fm_name&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;user_settings = 'X'&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;first, check your user_settings/spool-settings with TC su01d tab Defaults or menu: System-User Profile-Own Data-Defaults&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 07:04:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277235#M1988411</guid>
      <dc:creator>former_member288810</dc:creator>
      <dc:date>2020-09-02T07:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277236#M1988412</link>
      <description>&lt;P&gt;Did you just handled the &amp;amp;IC1 function code for detail display/double click ?&lt;/P&gt;&lt;P&gt;You should also handle the function code associated to your execute icon, loop in the internal table for selected records (select field not initial) and call the martforms FM in the loop. When  no record currently selected, but the cursor is on a valid line, rs_selfield-tabindex not initial, consider execution of the smartforms for this line else raise an error 'no line selected'.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Also check your layout, seems you have two select fields displayed (did you fill IS_LAYOUT-BOX_FIELDNAME =' CK')&lt;/LI&gt;&lt;LI&gt;If you don't change the form parameters any longer, replace the generated FM name with the variable returned by SSF_FUNCTION_MODULE_NAME.&lt;/LI&gt;&lt;LI&gt;Use classes for new ALV development (cl_salv_table, cl_gui_alv_grid) and not obsolete FM&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 02 Sep 2020 07:31:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277236#M1988412</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2020-09-02T07:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277237#M1988413</link>
      <description>&lt;P&gt;&lt;STRONG&gt;CALL FUNCTION FM_NAME "'/1BCDWB/SF00000009' this is working fine in smartform tcode but not calling in alv report&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 09:36:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277237#M1988413</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-09-02T09:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277238#M1988414</link>
      <description>&lt;P&gt;Please use the CODE button to format your code so that it's shown in a more user-friendly format (colorized).&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM USER_COMMAND &lt;BR /&gt;  USING &lt;BR /&gt;    r_ucomm     LIKE sy-ucomm &lt;BR /&gt;    rs_selfield TYPE slis_selfield.&lt;BR /&gt;&lt;BR /&gt;  CASE r_ucomm.&lt;BR /&gt;&lt;BR /&gt;    data: name1   type lfa1-NAME1 ,&lt;BR /&gt;          wrbtr   type bseg-WRBTR,&lt;BR /&gt;          h_budat type bseg-H_BUDAT.&lt;BR /&gt;
    WHEN '&amp;amp;IC1'.
      ....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;(PS: don't put code between CASE and the first WHEN)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 10:07:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277238#M1988414</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-09-02T10:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277239#M1988415</link>
      <description>&lt;P&gt;User setting is fine i checked &lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:53:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277239#M1988415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-09-02T18:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: calling smartform by user command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277240#M1988416</link>
      <description>&lt;P&gt;Add a breakpoint at the beginning of USER_COMMAND and tell us if it's called. If yes, then debug step by step and tell us what happens... &lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 19:39:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calling-smartform-by-user-command/m-p/12277240#M1988416</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-09-02T19:39:51Z</dc:date>
    </item>
  </channel>
</rss>

