Application Development 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: 

Report with the command button

Former Member
0 Kudos
134

Hi folks,

i had got a set of selection screen in my report to populate the data to a Transparent Table, before saving the record we need to display the exact record to the user for conformation.

how we archive this one with the normal report.

Reg,

Hariharan

12 REPLIES 12

Former Member
0 Kudos
108

Hi,

Just use function module POPUP_TO_CONFIRM before updating database table.

Reward points if helpful.

Regards,

CS.

Edited by: CSY on Mar 21, 2008 5:01 PM

Former Member
0 Kudos
108

Hi ,

I need a conformation from the user end before updating in the Transparent Table.

Reg,

Hariharan

0 Kudos
108

display the entire records in the list ..

loop at itab.

write 😕 itab-f1 , itab-f2 ...

endloop.

and put a 'SAVE' button .. when the user clicks the push

button , pop up a message (FM POPUP_TO_CONFIRM)

(AT USER COMMAND) and if yes ..save to the table ...

0 Kudos
108

Thanks again

but i am dealing only with simple report not the module pool,

can you just give step by step exc for the Button creation in Standard tool bar.

Former Member
0 Kudos
108

Hi,

Display the output in the list using write statement or using ALV, and have button called a SAVE on the application toolbar, whenever user clicks on that you make the entries into the table.

Thanks,

Sriram Ponna.

0 Kudos
108

Thanks for your replay

can you just send a piece of code reg the same,

how to add save button in the application tool bar.

0 Kudos
108

HI,

Please refer the link below:

http://www.sapdev.co.uk/reporting/alv/alvgrid_pfstatus.htm

Thanks,

Sriram Ponna.

0 Kudos
108

PopUp option.


      CLEAR popup_ans.
      PERFORM check_data_changed.
      IF data_has_changed EQ 'X'.
        PERFORM ask_to_update.
      ENDIF.
      CHECK popup_ans NE 'A'.    " Cancel
      SET PARAMETER ID 'LEAD' FIELD zlmlead-leadid.
      LEAVE TO TRANSACTION 'ZLM03' AND SKIP FIRST SCREEN..
FORM ask_to_update.
  CLEAR popup_ans.
  CALL FUNCTION 'POPUP_TO_CONFIRM'
       EXPORTING
            titlebar      = 'Lead Management'
            text_question = 'Changes not saved, Do you want to Save?'
            text_button_1 = 'Save'
            text_button_2 = 'No'
       IMPORTING
            answer        = popup_ans.

  CASE popup_ans.
    WHEN '1'.              " Save "
          PERFORM update_tables.
  ENDCASE.
ENDFORM.                    " ask_to_update

0 Kudos
108

Thanks

i have a set of record to display in the screen,

pop up FM dosent sound good for me.

Former Member
0 Kudos
108

hi ,

use the function module POPUP_TO_CONFIRM ,to get the first and second fieids to view and you can confirm ..

regards,

venkat

Former Member
0 Kudos
108

if you're trying to confirm one at a time, you can call another screen for confirmation.

call screen 0100.

Define screen 100 with no input fields and PF_STATUS with 2 buttons. SAVE and CANCEL. Use Screen type as MODAL in the screen attributes.

vinod_vemuru2
Active Contributor
0 Kudos
108

Hi Hariharan,

Check the logic below.

Create a PF status with a push button in the tool bar(SAVE).

Just WRITE the below statement and double click on 123 it will ask for GUI status creation.

SET PF-STATUS '123'.

Press yes. Now In Application tool bar option press + sign it will show u like items 1-7 items 8-14... Give ur text in any one. It will create a push button.

Now display ur report out put. When the user press save now it will ask for saving to data base or not? If the user press yes then it will update else it will not. Just copy paste this code in a sample programu will understand.

SET PF-STATUS '123'.

DATA: l_answer TYPE c.

WRITE 'text'.

AT USER-COMMAND.

CHECK sy-ucomm EQ 'SAVE_TO'. "This is the name given in PF status.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

  • TITLEBAR = ' '

  • DIAGNOSE_OBJECT = ' '

text_question = 'Want to save the data to data base?'

  • TEXT_BUTTON_1 = 'Ja'(001)

  • ICON_BUTTON_1 = ' '

  • TEXT_BUTTON_2 = 'Nein'(002)

  • ICON_BUTTON_2 = ' '

  • DEFAULT_BUTTON = '1'

  • DISPLAY_CANCEL_BUTTON = 'X'

  • USERDEFINED_F1_HELP = ' '

  • START_COLUMN = 25

  • START_ROW = 6

  • POPUP_TYPE =

IMPORTING

ANSWER = l_answer

  • TABLES

  • PARAMETER =

EXCEPTIONS

TEXT_NOT_FOUND = 1

OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF l_answer EQ 1.

Update the databse.

ELSE.

Dont update'

ENDIF.

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on Mar 21, 2008 5:19 PM

Edited by: Vinod Kumar Vemuru on Mar 21, 2008 5:22 PM