<?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: PF status different behavior in function call and factory method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522285#M18799</link>
    <description>&lt;P&gt;Try below code&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;
go_salv-&amp;gt;get_functions( )-&amp;gt;set_all( ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Sep 2017 02:01:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-09-11T02:01:13Z</dc:date>
    <item>
      <title>PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522284#M18798</link>
      <description>&lt;P&gt;i copied one standard pf status when i am using that pf status bu function call alv the send to option of menu working fine and i am also getting all function keys , but when i am using the samr pf status ion alv factory method its only showing some function keys and send to option from menu bar is also grayed out. pls provide the solution&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 09:33:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522284#M18798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-10T09:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522285#M18799</link>
      <description>&lt;P&gt;Try below code&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;
go_salv-&amp;gt;get_functions( )-&amp;gt;set_all( ).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2017 02:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522285#M18799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-11T02:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522286#M18800</link>
      <description>&lt;P&gt;i tryed this but it is not working&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 12:39:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522286#M18800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-11T12:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522287#M18801</link>
      <description>&lt;P&gt; METHOD display_data.&lt;BR /&gt; "object reference for cl_salv_table&lt;BR /&gt; DATA : lr_alv TYPE REF TO cl_salv_table,&lt;BR /&gt; lv_repid TYPE sy-repid,&lt;BR /&gt; gr_functions TYPE REF TO cl_salv_functions,&lt;BR /&gt; "object reference for columns and column&lt;BR /&gt; l_cols_tab TYPE REF TO cl_salv_columns_table,&lt;BR /&gt; l_col_tab TYPE REF TO cl_salv_column_table.&lt;BR /&gt; CONSTANTS: lc_pf_status TYPE sypfkey VALUE 'STANDARD_PF1'.&lt;BR /&gt; &lt;BR /&gt; lv_repid = sy-repid.&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; "alv grid fm, pass your internal table&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 = lr_alv&lt;BR /&gt; CHANGING&lt;BR /&gt; t_table = gt_final.&lt;BR /&gt; CATCH cx_salv_msg .&lt;BR /&gt; ENDTRY.&lt;BR /&gt;&lt;BR /&gt; lr_alv-&amp;gt;get_functions( )-&amp;gt;set_all( ).&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; TRY.&lt;BR /&gt; CALL METHOD lr_alv-&amp;gt;set_screen_status&lt;BR /&gt; EXPORTING&lt;BR /&gt; report = sy-repid&lt;BR /&gt; pfstatus = 'PF_STATUS'&lt;BR /&gt; set_functions = lr_alv-&amp;gt;c_functions_all.&lt;BR /&gt; ENDTRY.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; "field catalog of table&lt;BR /&gt; CALL METHOD lr_alv-&amp;gt;get_columns&lt;BR /&gt; RECEIVING&lt;BR /&gt; value = l_cols_tab.&lt;BR /&gt; &lt;BR /&gt; TRY.&lt;BR /&gt; l_col_tab ?= l_cols_tab-&amp;gt;get_column( 'VBELN' ).&lt;BR /&gt; CALL METHOD l_col_tab-&amp;gt;set_short_text&lt;BR /&gt; EXPORTING&lt;BR /&gt; value = gc_vblen_s.&lt;BR /&gt; CALL METHOD l_col_tab-&amp;gt;set_long_text&lt;BR /&gt; EXPORTING&lt;BR /&gt; value = gc_vblen_l.&lt;BR /&gt; CALL METHOD l_col_tab-&amp;gt;set_output_length&lt;BR /&gt; EXPORTING&lt;BR /&gt; value = 30.&lt;BR /&gt; &lt;BR /&gt; CATCH cx_salv_not_found .&lt;BR /&gt; ENDTRY.&lt;BR /&gt; &lt;BR /&gt; "call display method of lr_alv&lt;BR /&gt; lr_alv-&amp;gt;display( ).&lt;BR /&gt; &lt;BR /&gt; ENDMETHOD.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 12:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522287#M18801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-11T12:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522288#M18802</link>
      <description>&lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Technically speaking, the standard GUI status for REUSE_ALV_GRID_DISPLAY and for SALV look the same but are technically distinct (respectively one is from program SAPLKKBL and the other is from SAPLSLVC_FULLSCREEN), so you should better copy the one from SALV and add your own custom buttons, instead of using the one you copied from SAPLKKBL.&lt;/P&gt;
  &lt;P&gt;But please, which standard GUI status did you originally copy (STANDARD, STANDARD_FULLSCREEN, ...), and which keys/menus are enabled using REUSE_ALV_GRID_DISPLAY, and are disabled/grayed out with SALV?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 08:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522288#M18802</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-09-12T08:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522289#M18803</link>
      <description>&lt;P&gt;I have used STANDARD pf-status. and 'SEND to' option of list menu is grayed out. when i am using salv&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 03:51:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522289#M18803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-13T03:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522290#M18804</link>
      <description>&lt;P&gt;It should work (tested on 7.31 system). Make sure you have activated everything. Make sure there's no corrective SAP note for such symptom.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 09:01:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522290#M18804</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-09-13T09:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522291#M18805</link>
      <description>&lt;P&gt;I did a test, based on SALV_TEST_TABLE_FUNCTIONS program. No issue (tested on 7.31 system). Make sure you have activated everything. Make sure there's no corrective SAP note for such symptom.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 09:02:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522291#M18805</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-09-13T09:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: PF status different behavior in function call and factory method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522292#M18806</link>
      <description>It works for me:
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/71538-vaqvo.png" /&gt;&lt;/P&gt;
  &lt;P&gt;with PF_STATUS copied from GUI status STANDARD of SAPLKKBL, and this complete executable code:&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;REPORT.
DATA gt_final TYPE TABLE OF sflight.
CLASS lcl_app DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS display_data.
ENDCLASS.
CLASS lcl_app IMPLEMENTATION.
  METHOD display_data.
    "object reference for cl_salv_table
    DATA : lr_alv TYPE REF TO cl_salv_table,
    lv_repid TYPE sy-repid,
    gr_functions TYPE REF TO cl_salv_functions,
    "object reference for columns and column
    l_cols_tab TYPE REF TO cl_salv_columns_table,
    l_col_tab TYPE REF TO cl_salv_column_table.
    CONSTANTS: lc_pf_status TYPE sypfkey VALUE 'STANDARD_PF1'.
    lv_repid = sy-repid.

    "alv grid fm, pass your internal table
    TRY.
        CALL METHOD cl_salv_table=&amp;gt;factory
          IMPORTING
            r_salv_table = lr_alv
          CHANGING
            t_table      = gt_final.
      CATCH cx_salv_msg .
    ENDTRY.
    lr_alv-&amp;gt;get_functions( )-&amp;gt;set_all( ).

    TRY.
      CALL METHOD lr_alv-&amp;gt;set_screen_status
        EXPORTING
          report        = sy-repid
          pfstatus      = 'PF_STATUS'
          set_functions = lr_alv-&amp;gt;c_functions_all.
    ENDTRY.

    "field catalog of table
    CALL METHOD lr_alv-&amp;gt;get_columns
      RECEIVING
        value = l_cols_tab.
    TRY.
        l_col_tab ?= l_cols_tab-&amp;gt;get_column( 'CARRID' ).
        CALL METHOD l_col_tab-&amp;gt;set_short_text
          EXPORTING
            value = 'gc_vblen_s'.
        CALL METHOD l_col_tab-&amp;gt;set_long_text
          EXPORTING
            value = 'gc_vblen_l'.
        CALL METHOD l_col_tab-&amp;gt;set_output_length
          EXPORTING
            value = 30.
      CATCH cx_salv_not_found .
    ENDTRY.
    "call display method of lr_alv
    lr_alv-&amp;gt;display( ).
  ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
  PERFORM main.
FORM main.
  SELECT * FROM sflight INTO TABLE gt_final.
  lcl_app=&amp;gt;display_data( ).
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Sep 2017 07:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-different-behavior-in-function-call-and-factory-method/m-p/522292#M18806</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-09-25T07:55:34Z</dc:date>
    </item>
  </channel>
</rss>

