cancel
Showing results for 
Search instead for 
Did you mean: 

wd_get_api and wddomodify

Former Member
0 Kudos

can some body guide what is the necessity of using wd_get_api method ,where do we use it and in what situations we use WDDOMODIFYVIEW method,in what situations type casting is done.

please give brief description with example.

Accepted Solutions (0)

Answers (2)

Answers (2)

sahai
Contributor
0 Kudos

Hi,

Further to what Khushboo wrote also note that modify view has two autmatically defined paramaters

FIRST_TIME and VIEW

FIRST TIME can be used when you want some of your code lines should execute only once when the modify view runs for the first time.

you can wirte those lines of code in an IF ENDIF loop

IF FIRST_TIME EQ abap_true.

endif.

ALSO VIEW can be set and retrieved any wheer in a program to know which view is being called. ALL you need to do ios to create a global node( Declare it ion component controller) and then set the value of the attribute of this node with VIEW parameter availiable in modify view. This comes handy when working with dynamic layout.

Regards,

Sahai.S

Former Member
0 Kudos

1. WDDOMODIFYVIEW method is mostly used for dynamic coding. Dynamic coding may involve dynamic changes to the context node of the view OR the view UI.

2. Casting is a OOPs concept. It is used when you want to assign a super class's reference object to sub class or sub class's reference object to super class. It has two categories: Narrow Cast and Widening Cast. Type Casting only means conversion of one type to another. Say you have a currency variable but you assign this to a string variable. Here a currency variable is type casted to  string variable.

3. For WD_GET_API, you can read the following article:

http://help.sap.com/saphelp_nw04s/helpdata/en/21/957f41964c050de10000000a1550b0/content.htm