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

Rare 'bug' with SUBMIT

former_member591546
Participant
0 Likes
872

Hi all, i've an issue, but first of all, I want to clarify that this issue is resolved. But I'm intrigued... and want to share.

I've created an report (main). This report call another in START-OF SELECTION event, using SUBMIT. Very simply:

REPORT z_main_rep LINE-SIZE 132 LINE-COUNT 65 NO STANDARD PAGE HEADING.

PARAMETERS: rb_1 TYPE c RADIOBUTTON GROUP gr1,
            rb_2 TYPE c RADIOBUTTON GROUP gr1,
            rb_3 TYPE c RADIOBUTTON GROUP gr1.

START-OF-SELECTION.

  IF rb_1 IS NOT INITIAL.
    SUBMIT z_subrep1 AND RETURN.
  ELSEIF rb_2 IS NOT INITIAL.
    SUBMIT z_subrep2 AND RETURN.
  ELSE.
    SUBMIT z_subrep3 AND RETURN.
  ENDIF.

END-OF-SELECTION.

This's all.

Then, I run the report, and press F8 to excecute (rb_1 marked). Selection-screen of Z_SUBREP1 appears. I fill parameters, and the I save the variant. Now begins the issue. If I press "SAVE VARIANT" again, report is executed....

I've solved it changing SUBMITs by CALL TRANSACTIONs in main program ("Report transaction"):

IF rb_1 IS NOT INITIAL.
    CALL TRANSACTION 'Z_TR_SUBREP1'.
  ELSEIF rb_2 IS NOT INITIAL.
    CALL TRANSACTION 'Z_TR_SUBREP2'.
  ELSE.
    CALL TRANSACTION 'Z_TR_SUBREP3'.
  ENDIF.

Rare, no? Why does this happen? I've debugged, but UCOMM from SAVE VARIANT (fcode SPOS) is handled by standard code...

4 REPLIES 4
Read only

naimesh_patel
Active Contributor
0 Likes
825

Then, I run the report, and press F8 to excecute (rb_1 marked). Selection-screen of Z_SUBREP1 appears.

Based on your code snippet, it won't display the selection screen of the Z_SUBREP1. You need to have VIA SELECTION-SCREEN addition in the SUBMIT.

Moreover, I tried the same steps on ECC 6 and it works just fine. I didn't find the same behavior, what you had noticed.

Regards,

Naimesh Patel

Read only

0 Likes
825

> Then, I run the report, and press F8 to excecute (rb_1 marked). Selection-screen of Z_SUBREP1 appears.

>

> Based on your code snippet, it won't display the selection screen of the Z_SUBREP1. You need to have VIA SELECTION-SCREEN addition in the SUBMIT.

>

> Moreover, I tried the same steps on ECC 6 and it works just fine. I didn't find the same behavior, what you had noticed.

>

> Regards,

> Naimesh Patel

Hi Naimesh:

In my case, I use SUBMIT only without VIA SELECTION-SCREEN, and selection screen of the Z_SUBREP1 appears... I gonna try with VIA SELECTION-SCREEN, if bug continues.

Read only

0 Likes
825

Well, I find the cause! Naimesh, your answer helps me too much. In my case, without VIA SELECTION SCREEN, SUBMIT stops in selection creen because some parameters are obligatories! Then, excecute command is triggered. With VIA SELECTION SCREEN, it works correctly!

There's no bug! haha

Thanks Naimesh.

Read only

Former Member
0 Likes
825

Interesting, thanks for sharing.