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

How to generate screen dynamically ?

Former Member
0 Likes
1,149

My requirement is to get the customers informations but the case is according to the number of the customers to generate the tab screen automatically (ex: 5 customers should be 5 tabs )and each tab screen to layout the information of the customer.

the title of the tab should be the customer name.

any suggestion?

many thanks~

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
994

hi ,

check the below link may be useful for you

/people/wenceslaus.gnana/blog/2006/11/25/creating-selection-screens-dynamically

mark the helpful answers

Regards,

GNK.

hi ,

check the below link may be useful for you

/people/wenceslaus.gnana/blog/2006/11/25/creating-selection-screens-dynamically

mark the helpful answers

Regards,

GNK.

7 REPLIES 7
Read only

Former Member
0 Likes
995

hi ,

check the below link may be useful for you

/people/wenceslaus.gnana/blog/2006/11/25/creating-selection-screens-dynamically

mark the helpful answers

Regards,

GNK.

Read only

0 Likes
994

thanks~I will try

Read only

0 Likes
994

any suggestion?

Read only

0 Likes
994

Hi

I don't know if you can create the tabs automatically, but u could create a streep with very large number of tabs, if the user decide to show a number of customer greater than mex number of tabs available you raise an error: Max number is XXX.

In this way you deactive all tabs don't need in according to the number of customer to be shown.

Max

Read only

Former Member
0 Likes
994

hi

good

try this code

FUNCTION z_change_screen_field_position.

  • Code Devlioped in version 4.5B

*"----


""Local interface:

*" IMPORTING

*" VALUE(PROG) LIKE D020S-PROG DEFAULT SY-REPID

*" VALUE(DNUM) LIKE D020S-DNUM DEFAULT SY-DYNNR

*" VALUE(FNAM) LIKE D021S-FNAM

*" VALUE(LINE_NUM)

*" VALUE(COLN_NUM)

*"----


DATA: h LIKE d020s,

f LIKE d021s OCCURS 0 WITH HEADER LINE,

e LIKE d022s OCCURS 0 WITH HEADER LINE,

m LIKE d023s OCCURS 0 WITH HEADER LINE,

f1(100), f2(100), f3(100), dynpro_id(44).

  • Format Screen ID

dynpro_id = prog.

dynpro_id+40(4) = dnum.

  • Import Screen data in tables

IMPORT DYNPRO h f e m ID dynpro_id.

CHECK sy-subrc EQ 0.

  • Modify Screen Data

LOOP AT f WHERE fnam EQ fnam.

f-line = line_num.

f-coln = coln_num.

MODIFY f.

ENDLOOP.

CHECK sy-subrc EQ 0.

  • Export Screen Data

EXPORT DYNPRO h f e m ID dynpro_id.

CHECK sy-subrc EQ 0.

  • Generate Screen for changes to take effect

GENERATE DYNPRO h f e m ID dynpro_id MESSAGE f1 LINE f2 WORD f3.

ENDFUNCTION.

thanks

mrutyun^

Read only

0 Likes
994

Hi Mrutyunjaya

I have ever heard the method as below.

GENERATE DYNPRO h f e m ID g.

...MESSAGE F1 ...LINE F2 ...WORD F3.

but I don't know how to generate the tables h f e m....can you show me the full source?

thank you very much

Read only

0 Likes
994

That statament shouldn't to be used, because it's for internal use only.

Anyway It's not easy to use it, because your screen is not easy, it has to have several tabs.

I believe you should only to decide which is the max number of customer to be shown.

Max