cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with saving selection-screen variant

Former Member
0 Kudos

Hi all!

I had an attractive idea to encapsulate some frequently used selection-fields (parameters and select-options) into function group as subscreens. Then I wanted to call these fields from selection-screens of various program.


SELECTION-SCREEN BEGIN OF TABBED BLOCK sub_date FOR 2 LINES. 
SELECTION-SCREEN END OF BLOCK sub_date. 

... 

INITIALIZATION. 
  sub_date-prog = 'SAPLZEF_GET_FULL_DATA'. 
  sub_date-dynnr = 1300.

Thus I had obtained compact and reusable code. But unfortunately I had discovered that when I saved the variant of selection-screen containing fields from function group, values of these fields didn’t save! The fields appear in selection-screen, but don’t appear in variant of selection-screen!

Does anybody know what happens?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

ChristianFi
Active Participant
0 Kudos

Since you got no answer, here is my guess:

In my opionion there are 2 possible reasons:

1. When saving the variant there is the possibility to assign screens. Maybe for one reason you have to tick dynpro 1300 to get the values saved.

2. Variants are saved dependant to their reports. Maybe subscreens are saved under the programname SAPLZF_GET_FULL_DATA. (1300 is a selection screen is it?)

To check that out I recommend some debugging in function group svar.

Christian

Former Member
0 Kudos

Thank you, Christian. I try to debag... However this is very time-expensive decision.

ChristianFi
Active Participant
0 Kudos

One additional thing...

I would assume that the values are only saved if they are declated via paraemters or select-options.

Does your subscreen include standard-dynpro fields or is it a selection-screen (with parameters or select-options)

Christian

Former Member
0 Kudos

To clarify my situation I'm listing full code


REPORT   zef_req_ltext.
...
SELECTION-SCREEN BEGIN OF TABBED BLOCK s1 FOR 2 LINES.
SELECTION-SCREEN END OF BLOCK s1.
...
INITIALIZATION.
  s1-prog = 'SAPLZEF_GET_FULL_DATA'.
  s1-dynnr = 1300.
...


FUNCTION-POOL zef_get_full_data.
...
SELECTION-SCREEN BEGIN OF SCREEN 1300 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b3.
SELECT-OPTIONS:
  go_badat FOR eban-badat NO-EXTENSION,
  go_lfdat FOR eban-lfdat NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 1300.
...

If I'm moving subrscreen to program ZEF_REQ_LTEXT all works pretty nice.

ChristianFi
Active Participant
0 Kudos

well I think this confirms my assumption that the variant is stored in reference to the report and got lost that way.

I wonder if there are any oss notes..

Christian

Former Member
0 Kudos

Thanks, Christian for your attention paid to my problem.

While debagging I found that main report name is referenced to variant in code :((. I think placing subscreens in another program isn't possible without problems with variants.

I searched for oss notes described this but it was unsuccessful.

Thank you a lot.

Answers (1)

Answers (1)

Former Member
0 Kudos

Is my description not clear or nobody has any idea how to solve this problem?