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: 

screen painter: cannot add fields to subscreen

Former Member
0 Kudos

Hello,

I use screen painter to create a screen. Only when a checkbox is ticked, will a subscreen pop up including text fields and input/output fields. But fields cannot be added to the Subscreen Area. The message wites 'Collision at target location (element not placed)'. Do I have to hard code to control the visibility of the subscreen under the condition I mentioned above? Where can I write code to check the condition for the subscreen to diaplay?

Thanx.

12 REPLIES 12

raymond_giuseppi
Active Contributor
0 Kudos

You cannot add any element in a subscreen area, you have to display a subscreen in this area, so create another dynpro, type subscreen and display it in the area with a CALL SUBSCREEN statement in PBO and PAI of main screen.

Regards,

Raymond

Former Member
0 Kudos

raymond already says that you cant create any element in subscreen area. for this, you have to create another screen(type: subscreen). after creating this screen you click on attributes tab. here you have to check radiobutton 'SUBSCREEN' in screen type. go to layout. you can add any element (input/outputfields) here. next go to screen where you define  subscreen area. in pbo you have to write:

  call subscreen <subscreen area name> including sy-repid  '<subscreen dynpro number>'.

in pai you have to write:

call subscreen <subscreen area name>.

hope you understand

Regards

Sabyasachi

Former Member
0 Kudos

"a subscreen pop up"?

If you want a pop up, you need a screen with type "Modal Dialog Box".

former_member196213
Active Participant
0 Kudos

Hi,

Subscreen and pop up are two completly different things.

     As you said, you need a pop up with certain screen elements, then you shoud design a new screen(not subscreen) of type "Modal Dialog Box" which is already told by Chinmay.

     Now if you want to display some elements within the screen in which the check box is present then you can do it through subscreen, which is again defined by Sabyasachi as well as Raymond.

HAPPY ABAPing

Vishal

0 Kudos

Hello Vishal Yadav,

Thanks for your reply. I am also wondering where can I supplement the code to show the pop up screen when a checkbox is ticked.

Many thanks!

0 Kudos

Hi,

     What you can do is. Assign a function code to check box. For that...

          Goto screen painter.

          double click check box

          in the popup opened assign a unique FCODE(can be any unique string)[lets call it CHK]

     Now in PAI

          There must be sum module within which you will be checking FCODE or say SY-UCOMM to identify what user just did. There you can place a code to call your screen. All you need to do is 

     case sy-ucomm.

          when 'SAVE'.

               "save things

          when 'CANC'

               "dont save and return back

          when 'CHK'

               "call your screen

     endcase.

HAPPY ABAPing

0 Kudos

0 Kudos

Hello Vishal Yadav,

I followed your instructions and created a PAI Module and coded as follows:

MODULE ZPOPUP_SCREEN INPUT.
  
CASE SY-UCOMM.
    
WHEN 'CHK'.
      
CALL SCREEN 8001.
  
ENDCASE.
ENDMODULE

But it didn't work.

Best regards

0 Kudos

Hi,

Try this out

MODULE ZPOPUP_SCREEN INPUT.
  
CASE SY-UCOMM.
    
WHEN 'CHK'.
      
CALL SCREEN 8001 STARTING AT 4    10  "Top left of dialog to be placed

                                      ENDING     AT 20   10. "Bottom right corner             
  
ENDCASE.
ENDMODULE.

0 Kudos

Hello,

The driven program for the screen and modal dialog box is not created by myself. I actually use it for custom tabs in VL01N. By far, I have added a custom tab to VL01N including fields on the tab page. I wanna show the modal dialog box when a checkbox on the tab is ticked. Would you mind provide detailed  instructions?

I really appreciate it. 

0 Kudos

Hi,

     Presently I dont have access to R3(I dont have idea about VL01N), so I will try to wrap up everything in story kind of thing. As you have mentioned custom tab, so definatly for that custom tab you would have defined some subscreen.

     1. Goto the subscreen for your custom tab.

     2. Add check box in screen of that custom tab

     3. Now after adding the checkbox you need to declare a function code in screen painter that you can do as mentioned above.

     4. Now rather than writing the code for calling modal dialog in main screen PAI, you should write it subscreens PAI.

     5. Once you are done with it, this is all done for calling modal dialog from subscreen.

Reply for sure if it dont work.

0 Kudos

Hello,

It doesn't work.