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: 

My submit statement does not work...

aris_hidalgo
Contributor
0 Kudos

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!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

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