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

get a syntax error when call subscreen

former_member379728
Participant
0 Likes
7,303

I want to call a subscreen on a main screen, but get a syntax error 'Include block not specified, not defined or spelt incorrectly.'

coding as follow:

PROCESS BEFORE OUTPUT.
MODULE status_0100.
CALL SUBSCREEN subscr INCLUDING sy-repid sid1 .

PROCESS AFTER INPUT.
CALL SUBSCREEN subscr.
MODULE user_command_0100.

1 ACCEPTED SOLUTION
Read only

former_member379728
Participant
0 Likes
6,428

Thanks all of you, my issue had been resolved. The reason may be that the 'subscr' in logical flow is not associated with the element 'subscr' in element list. In fact , thier names are the same. So, I don't know why this happens. But there is a action can resolve this issue, that copy the character 'subscr' from logical flow and overlay paste it to element list .

20 REPLIES 20
Read only

Sathya_Gunasekaran
Contributor
6,428

CALL SUBSCREEN <subscreen name> INCLUDING sy-cprog <subscreen number> is the syntax.

Read only

RaymondGiuseppi
Active Contributor
6,428

The syntax is correct (same code that in online documentation)

  CALL SUBSCREEN sub INCLUDING sy-repid dynnr.

So is there a subscreen area SUBSCR in your dynpro, is there a field sid1, etc.

Read only

0 Likes
6,428

yes, both subscreen area and field sid1 exist , see the image follow:

Read only

6,428

Did you try to activate the whole program, any required subobject could be not yet activated?

Read only

0 Likes
6,428

yeah, I'm sure all of subobject of this program had been activated.

Read only

0 Likes
6,428

Why is the screen "0100" blue (inactive)?

Read only

6,428

'I'm sure' doesn't seem sufficient, activate with context menu on main object (program)

Read only

0 Likes
6,428

yes, I just activated it with context menu on main object(program).

Read only

0 Likes
6,428

Because there is a error when i try to activate the screen "0100", I can forcibly activate it, but the error still exist.

Read only

0 Likes
6,428

So, that's the issue, 0100 not activated!

But I don't see why 0100 couldn't be activated, it clearly states that the "SUBSCR" subscreen area is not found in the layout.

Could there be an issue with your SAP GUI, did you install latest version?

Another solution: delete and recreate it from scratch, just to see if the error persists.

Read only

0 Likes
6,428

Can you post a screenshot of the 'Element list' tab an not the 'Flow logic' tab?

Read only

0 Likes
6,428

On the attributes tab on your subscreens - did you define them as a subscreen? Just a thought.

Read only

former_member379728
Participant
0 Likes
6,427

yes, the name of subscreen area just is "SUBSCR".

Read only

RaymondGiuseppi
Active Contributor
6,427

Try to activate the whole object (from program node context menu)

Read only

former_member379728
Participant
0 Likes
6,427

I have activated the whole program. But the error still.

Read only

Former Member
0 Likes
6,427

Hi,

Syntax : CALLSUBSCREEN sub INCLUDINGsy-repid dynnr.

dynnr refers to the screen number. So, replace 'sid1' by subscreen number enclosed in single quotes (eg. '0200') which you want to call and then try activating.

Use the below statement and try.

CALL SUBSCREEN subscr INCLUDING sy-repid <give subscreen number> .

Read only

0 Likes
6,427

I had tried to replace 'sid1' by subscreen number ,like this syntax

CALL SUBSCREEN subscr INCLUDING sy-repid '0200'.

but it still get same error.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
6,427

Can you redefine the field 'sid1' with type 'sy[st]-dynnr'.

Read only

former_member379728
Participant
0 Likes
6,427

Yes, I had redefined the field 'sid1' with type 'sy-dynnr', but it get a same error.

Read only

former_member379728
Participant
0 Likes
6,429

Thanks all of you, my issue had been resolved. The reason may be that the 'subscr' in logical flow is not associated with the element 'subscr' in element list. In fact , thier names are the same. So, I don't know why this happens. But there is a action can resolve this issue, that copy the character 'subscr' from logical flow and overlay paste it to element list .