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

calling subscreen

Former Member
0 Likes
930

Hi,

I have to call a subscreen from the PBO of main screen based on certain conditions.

I am unable to use "CALL SUBSCREEN ... INCLUDING ... statement inside an if condition.

Is there any way to do this?

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
629

I think you are writing code directly in PBO I mean first screen and not in a module in PBO.. is it?

Create a module in PBO and then inside that module you can call subscreens withing IF condition.

Is this you are looking for?

thnx,

ags.

Read only

0 Likes
629

hi,

thanks for the reply.

i tried it that way too.

it gives an error

"." or "ID ... FIELD ..." expected after "SUBSCREEN".

Below is the code inside a PBO module.

MODULE CHECK_DIV OUTPUT.

data: gv_abboe(1) type c.

SELECT SINGLE ZZPARAMETER1 ZZPARAMETER2 ZZPARAMETER3

FROM ZSD_OSA_PARAM INTO (wa_abboe-ZZPARAMETER1,

wa_abboe-ZZPARAMETER2, wa_abboe-ZZPARAMETER3 )

WHERE ZZPROGNAME = 'MV45AFZZ'

AND ZZPARANAME = 'SALITMADDBSCR'

AND ZZSEQNUM = '00'.

if sy-subrc eq 0.

if vbak-vkorg = wa_abboe-ZZPARAMETER1 and

vbak-VTWEG = wa_abboe-ZZPARAMETER2 and

vbak-spart = wa_abboe-ZZPARAMETER3.

gv_abboe = 'X'.

endif.

endif.

if gv_abboe = 'X'.

CALL SUBSCREEN ZABBOEHDR INCLUDING 'SAPMV45A' '9001'.

endif.

endmodule.

Regards.

Read only

0 Likes
629

Hi there

CALL SUBSCREEN subscreen_area INCLUDING program screen_number.

A similar call should also exist in PAI of screen.It will also call the PAI modules of the subscreen and will transfer data from subscreen to ABAP program.

CALL SUBSCREEN subscreen_area.

check this [link|http://sap.niraj.tripod.com/id40.html]

Read only

Former Member
0 Likes
629

hi for subscreens ,

in pbo : use call sub_screen_area using sy-repid.

n in pai also use:

call subcreen_area.

revert back for clarifications