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

Check whether selection screen can be generated or not without generating a short dump

ec1
Active Participant
0 Likes
981

Hi all,

I found function module 'REPS_OBJECT_GENERATE' to check whether selection screen can be generated for a given program or not.

If O_GEN_SUBRC value returned from the FM is not 0, it means that there is a problem with the program.

However, if the FM is called with passing program name with selection screen error, a short dump is logged in ST22. If I debug the FM, the short dump is logged by "GENERATE REPORT" command.

Is there any other way to check whether a program has a valid selection screen without logging a short dump?

We're using ECC 600 Netweaver 701.

Thank you in advance.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
831

Try to add the SHORTDUMP-ID option to the GENERATE REPORT statement.

Regards,

Raymond


Hi all,

I found function module 'REPS_OBJECT_GENERATE' to check whether selection screen can be generated for a given program or not.

If O_GEN_SUBRC value returned from the FM is not 0, it means that there is a problem with the program.

However, if the FM is called with passing program name with selection screen error, a short dump is logged in ST22. If I debug the FM, the short dump is logged by "GENERATE REPORT" command.

Is there any other way to check whether a program has a valid selection screen without logging a short dump?

We're using ECC 600 Netweaver 701.

Thank you in advance.

4 REPLIES 4
Read only

former_member189779
Active Contributor
0 Likes
831

Are you not catching excepetion returned from FM?

   *"  EXCEPTIONS
*"      SYNTAX_ERROR
*"      GENERATION_ERROR

Read only

0 Likes
831

There was no exception thrown by GENERATE REPORT but SY-SUBRC contains 16.

  

DATA: L_MESSAGE_GEN(40), L_WORD(10), L_LINE TYPE I.
DATA: P_REPORT LIKE RSVAR-REPORT.
data OREF type ref to CX_ROOT.
data TEXT type STRING.


P_REPORT = 'ZHR00007'. "Report with GEN_SELECTION_SCREEN_ERROR error

*CATCH SYSTEM-EXCEPTIONS OTHERS = 8.

TRY.

    GENERATE REPORT P_REPORT MESSAGE L_MESSAGE_GEN
                                 LINE L_LINE WORD L_WORD.
  CATCH CX_ROOT INTO OREF.
    TEXT = OREF->GET_TEXT( ).
ENDTRY.
IF SY-SUBRC = 0.
  WRITE:/ 'TEST.'.
ELSE.
  WRITE:/ 'Error'.
ENDIF.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
832

Try to add the SHORTDUMP-ID option to the GENERATE REPORT statement.

Regards,

Raymond


Read only

ec1
Active Participant
0 Likes
831

I think the best approach is to let short dump logged in ST22 and get the shortdump id by using the option and let the user know about the short dump