cancel
Showing results for 
Search instead for 
Did you mean: 

Check boxes

Former Member
0 Kudos

Hi all,

Can we add checkboxes to the screen at the runtime?

Thanks & Regards

Santhosh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Santosh.

Yes you can add checkboxes at runtime. This can be done in the method

wddomodifyview:


 method WDDOMODIFYVIEW .

data: LR_CONTAINER         type ref to CL_WD_UIELEMENT_CONTAINER,
        LR_CHECKBOX            type ref to CL_WD_CHECKBOX,
        LR_FLOW_DATA         type ref to CL_WD_FLOW_DATA.

 LR_CHECKBOX           =  CL_WD_CHECKBOX=>NEW_CHECKBOX( ).
 LR_FLOW_DATA        =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_CHECKBOX ).
 LR_CONTAINER ?= view->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).
 LR_CONTAINER->ADD_CHILD( LR_BUTTON ).

endmethod.

For mor info check out the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/11/ba74412cba127de10000000a155106/content.htm">help site</a>.

Generally you should consider that dynamically adding UI elements lower the

maintainability of the application.

Hope this helps,

Cheers

P.S: WDDOMODIFYVIEW has the parameter first_time which

indicates whether the method is called the first time.

Keep in mind that the method is called each roundtrip.

Message was edited by:

Sascha Dingeldey

Former Member
0 Kudos

Hi Sascha,

where will i find this method?. Is it found in any of the standard class or i have to make use of this method in my program directly.

Thanks

Santhosh

Message was edited by:

santhosh ds

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi santhosh ,

Yes Of course you can add Checkboxes dynamically .

Basically It is not just about checkbox , one can add any UI element dynamically .May you can add button or change the layout with Dynamic programming .

another thing you need to write code on OnWDModifyView Because you are adding something dynamically on change of same view .

Former Member
0 Kudos

Hi Parry,

Actually i'm new to ABAP.

I'm not familiar with the Web Dynpros.

Please can u guys explain in any simple approach.

Thanks & Regards

Santhosh

Former Member
0 Kudos

Hi Santosh ,

This is the only way in webDynpro ABAP of doing Dynamic Programming .I will suggest you to see Sap Help .com for this.

Cheers

Parry

Former Member
0 Kudos

Thanks Sascha & Parry for your feedbacks

Thanks & Regards

Santhosh

Message was edited by:

santhosh ds

Former Member
0 Kudos

Check out the following helps sites:

Phase Model

Dynamic Layout manipulation

Former Member
0 Kudos

Hi Karthikeyan.

If you want to copy answers you should do it correctly by copy the links with

assigned URL.

Cheers,

Sascha.

Former Member
0 Kudos

I want to know that more detailed

Former Member
0 Kudos

Hi Santosh.

Go to the view and click the methods tab. Then you see the standard methods like

wddoinit and wddomodifyview.

Check out the following helps sites:

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/content.htm">Phase Model</a>

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/11/ba74412cba127de10000000a155106/content.htm">Dynamic Layout manipulation</a>

Cheers,

Sascha

Former Member
0 Kudos

Hi Sascha,

Can't we do the process in simple approach like using screens or using some code.

Because i'm not familiar with Web Dynpros.

Thanks & Regards

Santhosh

Former Member
0 Kudos

Hi Santosh.

Sorry, but I did not get that. What do you mean?

Cheers,

Sascha