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

Error generating the selection screen

former_member699182
Participant
0 Likes
1,737

Hello All,

I get an error when activating the report pgm with below code. (Edited: It remains inactive even after I come out of the message)

"Error when generating the selection screen'

I am assuming the problem is with the value provided in the Selection-screen comment. Tried changing it many times and gave up.

It works allright when I comment out those two lines (Selection-screen comment).

What is wrong in this code?  Any ideas?

Thanks.

****************************************************************

SELECTION-SCREEN BEGIN OF BLOCK param WITH FRAME TITLE frame.
  SELECTION-SCREEN BEGIN OF LINE.
  SELECTION-SCREEN COMMENT 10(10) scr_pnam FOR FIELD lv_name.
  PARAMETERS: lv_name TYPE SPFPFLPAR-PARNAME DEFAULT 'rdisp/btctime'.
  SELECTION-SCREEN COMMENT 50(10) scr_pval FOR FIELD lv_value.
  PARAMETERS: lv_value TYPE spfpflpar-pvalue VALUE CHECK OBLIGATORY.
  SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK param.

INITIALIZATION.

  frame = 'プロファイルパラメータ更新'.
  scr_pnam = 'パラメータ名'.
  scr_pval = 'パラメータ値'.

*****************************************************************

1 ACCEPTED SOLUTION
Read only

former_member699182
Participant
0 Likes
1,536

Though there are posts mentioning similar error, none of the anwers in that seem to work out for this.

Thanks.

11 REPLIES 11
Read only

former_member699182
Participant
0 Likes
1,537

Though there are posts mentioning similar error, none of the anwers in that seem to work out for this.

Thanks.

Read only

0 Likes
1,536

Any ideas please?

Thanks.

Read only

0 Likes
1,536

When you use comment you have to manually set the position of the comment and the fields, that error means that you have in some place an overlapping of two element.

And also you have to declare the text in the event AT SELECTION-SCREEN OUTPUT.

This is the source code working.

SELECTION-SCREEN BEGIN OF BLOCK param WITH FRAME TITLE frame.
   SELECTION-SCREEN BEGIN OF LINE.
   SELECTION-SCREEN COMMENT 1(10) scr_pnam FOR FIELD lv_name.
   PARAMETERS: lv_name TYPE SPFPFLPAR-PARNAME DEFAULT 'rdisp/btctime'.
   SELECTION-SCREEN COMMENT 60(10) scr_pval FOR FIELD lv_value.
   PARAMETERS: lv_value TYPE spfpflpar-pvalue VALUE CHECK OBLIGATORY.
   SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK param.

AT SELECTION-SCREEN OUTPUT.
   frame = 'プロファイルパラメータ更新'.
   scr_pnam = 'パラメータ名'.
   scr_pval = 'パラメータ値'.



Regards

Read only

0 Likes
1,536

Hi Gita,

Change your code to this:

SELECTION-SCREEN BEGIN OF BLOCK param WITH FRAME TITLE frame.

   SELECTION-SCREEN BEGIN OF LINE.

   SELECTION-SCREEN COMMENT (10) scr_pnam FOR FIELD lv_name.

   PARAMETERS: lv_name TYPE SPFPFLPAR-PARNAME DEFAULT 'rdisp/btctime'.

   SELECTION-SCREEN COMMENT 70(10) scr_pval FOR FIELD lv_value.

   PARAMETERS: lv_value TYPE spfpflpar-pvalue VALUE CHECK OBLIGATORY.

   SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK param.


The length of 'LV_NAME' is 60, then you want the second comment locate at 50, then will occurs this error.


regards,

Archer


Read only

0 Likes
1,536

Hi Gita,

Its your selection screen length that is causing the problem. I have modified your code. Please try the code below:

SELECTION-SCREEN BEGIN OF BLOCK param WITH FRAME TITLE frame.

   SELECTION-SCREEN BEGIN OF LINE.

   SELECTION-SCREEN COMMENT 1(10) scr_pnam FOR FIELD lv_name.

   PARAMETERS: lv_name TYPE SPFPFLPAR-PARNAME DEFAULT 'rdisp/btctime'.

   SELECTION-SCREEN COMMENT 60(10) scr_pval FOR FIELD lv_value.

   PARAMETERS: lv_value TYPE spfpflpar-pvalue VALUE CHECK OBLIGATORY.

   SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK param.

INITIALIZATION.

   frame = 'プロファイルパラメータ更新'.

   scr_pnam = 'パラメータ名'.

   scr_pval = 'パラメータ値'.



Thanks,

Naveen

Read only

Former Member
0 Likes
1,536

Hi gita,

Replace

   SELECTION-SCREEN COMMENT 50(10) scr_pval FOR FIELD lv_value.

with

   SELECTION-SCREEN COMMENT 79(10) scr_pval FOR FIELD lv_value.

The specified offset 79 is maximum large.

Regards.

Read only

aarif_baig
Active Participant
0 Likes
1,536

Hi Gita

There is problem with your code , below is your code

SELECTION-SCREEN BEGIN OF BLOCK param WITH FRAME TITLE frame.

   SELECTION-SCREEN BEGIN OF LINE.

   SELECTION-SCREEN COMMENT 10(10) scr_pnam FOR FIELD lv_name.

   PARAMETERS: lv_name TYPE char20  DEFAULT 'rdisp/btctime'"SPFPFLPAR-PARNAME

   SELECTION-SCREEN COMMENT 50(10) scr_pval FOR FIELD lv_value.

   PARAMETERS: lv_value TYPE spfpflpar-pvalue VALUE CHECK OBLIGATORY.

   SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK param.


i just removed  SPFPFLPAR-PARNAME from parameter lv_name and passed type char20 it worked reason is below


SELECTION-SCREEN COMMENT 10(10) scr_pnam FOR FIELD lv_name. 10+ 10 = 20 + lv_name ( which is character 60 makes it 80 and then you are trying to place another parameter at 50, it will not work,


so a bit twist in your code will make it work , hope i have given you reason. there is a problem with the positioning of the parameter.


cheers





Read only

0 Likes
1,536

Hi Gita,

Got the problem.

Correct these two lines and all will be fine.

SELECTION-SCREEN COMMENT 1(10) scr_pnam FOR FIELD lv_name.

SELECTION-SCREEN COMMENT 70(10) scr_pval FOR FIELD lv_value.

See what I have changed and you will understand what you were overlooking.

Best of luck.

Saurabh

Read only

0 Likes
1,536

Thanks a lot for all the help everyone. It works perfectly now.

BR,

Gita

Read only

former_member699182
Participant
0 Likes
1,536

By the way, is it possible to modify the font size and reduce the width of the frame block in the selection-screen in the report program (besides doing it via se51)?

Thanks.

Read only

0 Likes
1,536

Hi Gita,

I think it might not be possible other than you changing the frame width via SE51. And I don't think you will be able to change the font size. I am not sure of it though.

Thanks,

Naveen