on 11-17-2015 6:11 AM
Hi experts,
I have created a simple display button using feeder class . When i click on it i want to display a text anywhere in the screen . Can you please suggest me the steps how to acheive this and which event i have to write the code and what code should be impelemented?
Warm Regards,
Ramesh Moka
Hi Ramesh,
Assuming you have created Feeder class based on the structure or Fields you want to display data in.
Suppose you have structure with name ls_userinfo contain one field "FirstName".
To display this Information on form you need to perform below steps:
*--> Bind Field Catalog
eo_field_catalog ?= cl_abap_structdescr=>describe_by_data( ls_userinfo ).
APPEND INITIAL LINE TO et_field_description ASSIGNING <fs_field_description>.
<fs_field_description>-name = 'FIRST_NAME'.
by doing above code you will be able to get this structure in FPM UIBB Configuration (How to access this UIBB Configuration see my below mentioned post)
Now Once you done with above things... you need to put fields in UIBB FORM
Go to Component Configuration >> UIBB Configuration and add fields as shown below:
Click on Element Button
You will only get this Poup with fields once you set eo_field_catalog in GET_DEFINATION method of FORM Feeder class.
This is how your fields will be available on Form.
Now to display the text in this field, since this field is already attached to your structure through EO_FIELD_CATALOG in GET_DEFINATION method nothing much is remained.
Just go to GET_DATA or PROCESS_EVENT method of your Feeder class and write below code :
Assuming you have created one Button and attached an Event to it in Configuration:
Event Attached on Button in Configuration: ZZ_DISPLAY_FNM
* --> Handle Inbound event from inventory search page.
CASE io_event->mv_event_id.
WHEN 'ZZ_DISPLAY_FNM'.
ls_userinfo-FIRST_NAME = 'Ramesh'.
cs_data = ls_userinfo.
*--> Below line is most important line if you not set this parameter nothing will be displayed.
ev_data_changed = abap_true.
ENDCASE.
Please have a look to my post for more understanding.
Thanks-
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.