Application Development 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: 

get a syntax error when call subscreen

former_member379728
Participant
0 Kudos

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

former_member379728
Participant
0 Kudos

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

sathyags
Active Participant

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

raymond_giuseppi
Active Contributor

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.

0 Kudos

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

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

0 Kudos

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

0 Kudos

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

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

0 Kudos

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

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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

former_member379728
Participant
0 Kudos

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

raymond_giuseppi
Active Contributor

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

former_member379728
Participant
0 Kudos

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

former_member536919
Discoverer
0 Kudos

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> .

0 Kudos

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.

raymond_giuseppi
Active Contributor
0 Kudos

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

former_member379728
Participant
0 Kudos

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

former_member379728
Participant
0 Kudos

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 .