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

regarding function module in module pool

Former Member
0 Likes
781

hi,

i have developed a report for deleting data from database. using dialogue programming ,what i want that after selecting any data from o/p screen a pop up window will come on which a message will be appearing 'do u want to delete the data' if yes then it will delete otherwise it will be back...so for this scenario i need function module(actually i forgot the name) ,,,so plz help me ,if possible send to me with the necessary codes.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
578
chk this


data : WF_RES type c.

CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
DEFAULTOPTION = 'N'
TEXTLINE1 = 'Do you want to delete the record?'
* TEXTLINE2 = ' '
TITEL = 'Delete Zone'
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
IMPORTING
ANSWER = WF_RES.

if wf_res = 'J'.

user selected 'YES'.

else.

user selected 'NO'.

endif.
4 REPLIES 4
Read only

Former Member
0 Likes
578

Hi,

The FM is POPUP_TO_CONFIRM.

pass it as follows

data : w-ans.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

  • TITLEBAR = ' '

  • DIAGNOSE_OBJECT = ' '

TEXT_QUESTION = 'Do u want to delete the data'

TEXT_BUTTON_1 = 'Yes'

  • ICON_BUTTON_1 = ' '

TEXT_BUTTON_2 = 'No'

  • ICON_BUTTON_2 = ' '

  • DEFAULT_BUTTON = '1'

  • DISPLAY_CANCEL_BUTTON = 'X'

  • USERDEFINED_F1_HELP = ' '

  • START_COLUMN = 25

  • START_ROW = 6

  • POPUP_TYPE =

  • IV_QUICKINFO_BUTTON_1 = ' '

  • IV_QUICKINFO_BUTTON_2 = ' '

IMPORTING

ANSWER = w-ans

  • 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.

Regards,

Himanshu

Message was edited by:

Himanshu Aggarwal

Read only

Former Member
0 Likes
579
chk this


data : WF_RES type c.

CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
DEFAULTOPTION = 'N'
TEXTLINE1 = 'Do you want to delete the record?'
* TEXTLINE2 = ' '
TITEL = 'Delete Zone'
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
IMPORTING
ANSWER = WF_RES.

if wf_res = 'J'.

user selected 'YES'.

else.

user selected 'NO'.

endif.
Read only

Former Member
0 Likes
578

Hi ravi,

here is the function module..

CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_MESSAGE'

EXPORTING

defaultoption = 'Y'

diagnosetext1 = p_text1

textline1 = p_text2

titel = p_title

IMPORTING

answer = p_answer.

please reward if usefull..

Regards,

Srini

Read only

Former Member
0 Likes
578

Hi Ravi,

Use the FM : POPUP_TO_CONFIRM

call function 'POPUP_TO_CONFIRM'

exporting

TITLEBAR = 'CONFIRM DELETION'

TEXT_QUESTION = 'Do you want to delete the data ?'

TEXT_BUTTON_1 = 'Yes'

TEXT_BUTTON_2 = 'No'

DEFAULT_BUTTON = '1'

DISPLAY_CANCEL_BUTTON = 'X'

START_COLUMN = 25

START_ROW = 6

importing

ANSWER = ANS

exceptions

TEXT_NOT_FOUND = 1

others = 2.

if ANS = '1'.

perform DELETE "Here write the code for deletion or delete statement"

leave program.

elseif ANS = '2'.

leave program. " Else it leaves the prog with out deleting.

endif.

Hope it helps!

Bhanu.