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

Dynamic Screens

Former Member
0 Likes
396

Hi All,

Is it possible to Create Screens Dynamically.

E:G If i have Ten 10 Fields that i would display at Max.

But at runtime i Decide that I want to display only 4 fields and so on.

I understand that we can do similar kind of thing using "Loop at screen and so on" but even if we do that is there a facility to re-size the Screen. To Fit only the required Fields.

Thanks in Advance

Regards,

Kishore Yerra.

2 REPLIES 2
Read only

Former Member
0 Likes
353

Plz go through the link

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

and the program....

ERPGenie.COM -> SAP Technical -> ABAP -> Tips and Tricks -> Selection Screens

Quicklinks

Who needs ABAPers???

The functional person's tool for stress testing and data conversions..

Siamease is an easy to use tool that allows you to migrate data, upload data, stress test, and much more and you don't need to know any ABAP

BDC and IDoc Status

File Processing

Report Checkboxes

Restricting values on Selection Screen

This example shows how different transactions codes can be used to produce different selection options for the same program. The example allows for lookups on Sales Order number, Purchase Order Number, Delivery Number or Invoice number.

*--- SELECTION OPTIONS -


SELECTION-SCREEN BEGIN OF BLOCK SO WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,"Sales order number

S_VBELND FOR LIKP-VBELN,"Delivery number

S_VBELNI FOR VBRK-VBELN,"Invoice number

S_VBELNP FOR VBKD-BSTKD."PO number

SELECTION-SCREEN END OF BLOCK SO.

*--- EVENT AT SCREEN OUTPUT -


AT SELECTION-SCREEN OUTPUT.

CASE SY-TCODE.

WHEN 'ZEDI6'.

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

WHEN 'ZEDI6D'. "Delivery select

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

WHEN 'ZEDI6I'. "Invoice select

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

WHEN 'ZEDI6P'. "PO select

LOOP AT SCREEN.

CASE SCREEN-GROUP4.

WHEN '001'. "Sales order select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '002'. "Delivery select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '003'. "Invoice select

SCREEN-ACTIVE = '0'. "1=Active, 0=Don't display

MODIFY SCREEN.

WHEN '004'. "PO Select

SCREEN-ACTIVE = '1'. "1=Active, 0=Don't display

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

ENDCASE.

hope this helps...

<b>do reward if useful....</b>

regards

dinesh

Read only

Former Member
0 Likes
353

Hi Kishore,

I found certain links which might be answering your question. I couldn't find any documents which supports creation of screen elements dynamically. But using the container control of the screen painter, it is possible to display dynamically created controls of the screen into the container area using the HTML. This is called Dynamic documents.

Dynamic documents allow you to create an area on a screen containing various graphical elements. You create them in your program using ABAP statements ( so it is possible to make decisions on what to display dynamically ), from which the system generates the required HTML code. The finished HTML document is then displayed at runtime.

Dynamic documents are displayed using SAP container control.

A dynamic document can contain the following:

• Text

• Links

• Pushbuttons

• Input fields

• Dropdown list boxes

• Icons

• Pictures

• Tables

For further information refer the following link:

http://help.sap.com/saphelp_webas620/helpdata/en/f5/edd938d8dbe93de10000000a11405a/frameset.htm

Hope i have done my best which might be of some use to you.

regards,

Naveenan.

This text is already posted in the forum link

refer.

Reward if useful !!