07-03-2006 2:40 AM
Hello experts,
Please look at my code below. What I want to do is go back to the selection-screen of zdealer_contacts(this is report 1). I made this code in zdealer_contacts_add_edit(this is report 2).
INITIALIZATION.
SET PF-STATUS 'MAIN'.
AT SELECTION-SCREEN.
IF sy-ucomm = 'E'.
SUBMIT zdealer_contacts AND RETURN VIA SELECTION-SCREEN.
ENDIF.
I checked the value of the back button in pf-status main and it has a value of 'E'. Again,
Thank you guys and have a nice day!
07-03-2006 2:58 AM
did u try debugging the code? Does it stop @ the IF condition?
not sure why u would want to call another report at selection screen event.
How did u call the second report from the first report? If you have set SUBMIT & RETURN in the first report u dont have to write that piece of code the control will automatically go back to the first report.
Cheers
VJ
07-03-2006 2:58 AM
did u try debugging the code? Does it stop @ the IF condition?
not sure why u would want to call another report at selection screen event.
How did u call the second report from the first report? If you have set SUBMIT & RETURN in the first report u dont have to write that piece of code the control will automatically go back to the first report.
Cheers
VJ
07-03-2006 3:04 AM
Hi,
Let me explain my problem a bit clearly. I have reports, zreport1 and zreport2. Now, zreport1 has 2 selection-screens. Why? it depends on who uses zreport1. Now, assuming I called selection-screen 500 of zreport1 that lets users add, edit and display records. If he chooses add radioubutton it will do this in zreport1:
SUBMIT zdealer_contacts_add_edit AND RETURN
WITH p_kunnr = v_kunnr
WITH p_name1 = p_name1 "AVH
WITH p_cdseq = space
WITH p_flag = 'A'
WITH p_addr = it_zts0001-zaddress
WITH p_pers = it_zts0001-zcperson
WITH p_numb = it_zts0001-zcnumber
VIA SELECTION-SCREEN.
Now, here lies the problem, for example the user presses back button instead of continuing the adding of records, it must go back to the selection-screen of zreport1.
07-03-2006 3:15 AM
ok understand so in the second report when the user clicks ont he back button does the code stop at the IF condition if u place a break point? The code seems ok to me.
VJ