Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reg: Pushbutton in interactive report

Former Member
0 Likes
1,431

Hi Friends,

How to create the push button for Interactive reporting , please explain?.

Best Regards,

Narasimha Rao.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
988

Hi,

use PF-STATUS to have the Push Button in the interactive reports.

While using ALV FM use the I_PF_STATUS parameter

Check the demo program for ALV using OOP's BCALV_GRID_08

6 REPLIES 6
Read only

Former Member
0 Likes
989

Hi,

use PF-STATUS to have the Push Button in the interactive reports.

While using ALV FM use the I_PF_STATUS parameter

Check the demo program for ALV using OOP's BCALV_GRID_08

Read only

Former Member
0 Likes
988

create button in gui status.

make it disablein pbo

Choose user command in grid display .

and write the logic

Read only

faisalatsap
Active Contributor
0 Likes
988

Hi,

Test Bellow Sample Code Hope will Solve out your problem,

PARAMETERS pmy TYPE spmon.

SELECTION-SCREEN PUSHBUTTON 47(10) nbutton USER-COMMAND next VISIBLE LENGTH 3.
SELECTION-SCREEN PUSHBUTTON 44(15) pbutton USER-COMMAND previous VISIBLE LENGTH 3.

AT SELECTION-SCREEN.

  IF pmy+4(2) > 12 OR pmy+4(2) < 1.
    MESSAGE 'DATE is not Valid' TYPE 'E'.
  ENDIF.

  CASE sy-ucomm.
    WHEN 'NEXT'.
      ADD: 1 TO pmy+4(2).
      IF pmy+4(2) > 12.
        ADD: 1 TO pmy+0(4).
        pmy+4(2) = 1.
      ENDIF.
    WHEN 'PREVIOUS'.
      SUBTRACT: 1 FROM pmy+4(2).
      IF pmy+4(2) < 1.
        SUBTRACT: 1 FROM pmy+0(4).
        pmy+4(2) = 12.
      ENDIF.
  ENDCASE.

  CASE sy-ucomm.
    WHEN 'NEXT'.
      LOOP AT SCREEN.
        IF screen-name = 'NBUTTON'.
          screen-active = '0'.
          screen-invisible = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    WHEN 'PREVIOUS'.
      LOOP AT SCREEN.
        IF screen-name = 'PBUTTON'.
          screen-active = '0'.
          screen-invisible = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    WHEN OTHERS.
  ENDCASE.

START-OF-SELECTION.

INITIALIZATION.

*  pmy = sy-datum+0(6) - 1.
  pmy = sy-datum.
  IF pmy+4(2) < 1.
    SUBTRACT: 1 FROM pmy+0(4).
    pmy+4(2) = 12.
  ELSEIF pmy+4(2) > 12.
    ADD: 1 TO pmy+0(4).
    pmy+4(2) = 1.
  ENDIF.

  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
     name                        = 'ICON_NEXT_VALUE'
*   TEXT                        = ' '
     info                        = 'Next'
     add_stdinf                  = 'X'
    IMPORTING
     RESULT                      = nbutton
* EXCEPTIONS
*   ICON_NOT_FOUND              = 1
*   OUTPUTFIELD_TOO_SHORT       = 2
*   OTHERS                      = 3
            .
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
     name                        = 'ICON_PREVIOUS_VALUE'
*   TEXT                        = ' '
     info                        = 'Previous'
     add_stdinf                  = 'X'
    IMPORTING
     RESULT                      = pbutton
* EXCEPTIONS
*   ICON_NOT_FOUND              = 1
*   OUTPUTFIELD_TOO_SHORT       = 2
*   OTHERS                      = 3
            .
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Please Reply if any Issue,

Kind Regards,

Faisal

Read only

Former Member
0 Likes
988

Hi,

use SET PF-STATUS <Status name> should be in capital letters

command to create a push button on the application toolbar

Regards

Ramakrishna Pathi

Read only

Former Member
0 Likes
988

check the code here

[pushbuttons in selection screen|http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/frameset.htm]

navigate on tree in left side in the link to get pushbutton on application toolbar also

кu03B1ятu03B9к

Read only

Former Member
0 Likes
988

As answered above you need to use PF-STATUS to create customized GUI status. Please check [this link|http://help.sap.com/saphelp_nw04/helpdata/en/d1/801ce8454211d189710000e8322d00/frameset.htm] to play with menu painter.

Regards,

~Satya