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

Object Dynamic Creation in Dynpros

fabian_fonseca
Explorer
0 Likes
1,120

Hi everyone,

Does anybody knows how to create objects at runtime in a dynpro(screen)?? My requirement is that I have to create a list of objects stored in a Z table.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,021

The dynpro itself doesn't have code but the Process Before Output (PBO) and Process After Input (PAI) modules can contain code or call code and this can just instantiate objects like any other ABAP code can - or is there more to the question than I'm understanding?

Jonathan

Hi everyone,

Does anybody knows how to create objects at runtime in a dynpro(screen)?? My requirement is that I have to create a list of objects stored in a Z table.

Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
1,022

The dynpro itself doesn't have code but the Process Before Output (PBO) and Process After Input (PAI) modules can contain code or call code and this can just instantiate objects like any other ABAP code can - or is there more to the question than I'm understanding?

Jonathan

Read only

0 Likes
1,021

Hi Jonathan,

You are right, the question should be Object(Radiobuttons, Checkboxes, Pushbuttons, etc) Dynamic Creation in Dynpros, I need to create this type of object at runtime.

Thank you

Edited by: Fabian Fonseca on May 10, 2008 4:48 PM

Read only

0 Likes
1,021

Typically I've built "dynamic" screens with multiple field that get hidden / adjusted at run time based on config settings, similar to standard SAP screen processing... to work the other way around you'd probably have to generate the Dynpro at runtime which should be technically possible but careful coding will be required. How much variety of options will be offered in the "Z" table... could you use multiple sub-screens instead with the various options on?

Jonathan

Read only

0 Likes
1,021

The maximum number of rows in the screen will be 20 (max number of rows in the Z table) and probably could work with sub-screens, but I'll try to do it dynamically, if you have any idea of how could this work it will be very helpfully to me?.

Thanks

Read only

0 Likes
1,021

Well if someone asked me to do something fun like this, I think my first approach would be to check out how SE80 supports the same functionality - for example, go into a screen in a module pool in SE80 then look at the PF-STATUS and if you follow the menu paths you can see:


Goto    
   More Utilities 
      Upload/Download     >UTUL       Upload...    

and then you can investigate how the UTUL function code upload works... a brief glance at the code shows it runs form dynpro_upload in include LWBSCREENF50 which calls function RS_DYNPRO_UPLOAD and then runs some more logic in form after_import_dynpro such as function RS_SCRP_DYNPRO_CHECK... if you hunt around SE37 further you can find RS_DYNPRO_CREATE_INITIAL and other interesting code in FG SCR2... but you are getting very much into SAP internals here, which makes me nervous!!

Jonathan

Read only

0 Likes
1,021

Thank you again, the way I solved was to talk to the functional consultant and redesign the specification and I used a table control, but the you r last advise it'll very helpful in the future.