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

creating subtype for infotype with condition

Former Member
0 Likes
989

hello ,

I have created infotype 9900 and also subtype 01 for the same,now my requirement is i have to keep main screen of 9900 as empty screen.

and whatever i am having on screen 9900 right now should get assign to subtype 01.(replace subtype 01 screen with 9900 screen)

so basically my 9900 infotype screen should be empty unless and until i specify subtype 01 to it.

Thanks.

Amod.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
893

Hi,

Keep all the screen elements in a sub screen and display the subscreen inside main screen only if subtype is '01'.

OR

Make screen elements invisible if subtype <> '01'

Add the above logic in the PBO of screen 2000 of program MP990000

Hi,

Keep all the screen elements in a sub screen and display the subscreen inside main screen only if subtype is '01'.

OR

Make screen elements invisible if subtype <> '01'

Add the above logic in the PBO of screen 2000 of program MP990000

3 REPLIES 3
Read only

Former Member
0 Likes
894

Hi,

Keep all the screen elements in a sub screen and display the subscreen inside main screen only if subtype is '01'.

OR

Make screen elements invisible if subtype <> '01'

Add the above logic in the PBO of screen 2000 of program MP990000

Read only

0 Likes
893

Hi Ashish,

I have tried doing both approaches but its not working . . . .

it will be helpful if you can elaborate . .

i want my sub type screen look like main info type screen. .

and main info type screen should be null later..

Read only

0 Likes
893

Hi,

1.Add a subscreen container to the screen 2000 ( with name suppose SUBSCR ).

2. Add 2 subscreens to the program. ( suppose 9001,9002 )

3. Move all the elements from screen 2000 to one of the subscreen ( suppose 9001 ).

4. Keep the other subscreen ( 9002 ) empty.

5. In the PBO of screen 2000, check if subtype is '01'.

     If yes, then call subscreen 9001 in the subscreen container and if subtype is not '01' then      call subscreen 9002 in the subscreen container.

To call subscreen write the following code in screen 2000 :

In PBO :

CALL SUBSCREEN SUBSCR INCLUDING SY-REPID GV_DYNNR.     "GV_DYNNR will have the screen number either 9001 or 9002 according to the subtype.

In PAI :

CALL SUBSCREEN SUBSCR.

Simple as it is.

Regards,

Ashish