How to add record in List Box in Screen Painter(SE51) ?
I am not able to add record in List box in Screen Painter using se51 Transaction code.
Regards,
Nirav Desai
Dear All,
I found the solution.
If you are facing same problem , follow the bellow steps.
1. Declare in report.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
2. IN PBO Event.
clear: list.
NAME = 'TXT_PERIOD'. " your screen field name
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
VALUE-KEY = '3'.
VALUE-TEXT = 'LINE 3'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING ID = NAME VALUES = LIST.
Regards,
Nirav Desai
Similar Messages
-
Hi All,
I have a requirement to use some components called List Box and Tabs in my WebI report for presenting the information by dynamic dimension and measure selection using list box and segregate information by using Tabs as in below image.
Image was prepared in MSPaint not executable webi report.
Is it possible to integrate the list box and tabs into Report Zone in BO Webi? as show in below image?
Thanks in Advance
Muralidhar Reddy NHello Muralidhar Reddy,
The exact tool for your requirement is SAP BO Dashboard or SAP BO Design studio. WebI is a tool for ad-hoc reporting tool and we have limited functionalities to make dashboards using webI. You can have all those chart options in WebI and you can use Input controls or drill filters for restricting data. But you cannot have these selection components in reporting area. Tabs as shown in above post, you can have in bottom of the report.
find below a good example of dashboard using WebI
http://blog.davidg.com.au/2011/04/webi-as-dashboard.html
hope it helps
Regards,
Nikhil Joy -
How to show value in list box on screen.
Hey,
I'm trying to write a little program to select a value from a listbox on a screen...
Filling the listbox, no problem. But showing the value on screen, and using the selected value isn't working...
So when i select a value, directly after the listbox 'closes', the selected value disappears...
I read already different threads regarding this topic, but i don't see a solution :(.
Below you find the code. Anyone sees where the problem is?
Screen number = 300.
PROCESS BEFORE OUTPUT.
MODULE status_0300.
Module init_dropdown_box.
PROCESS AFTER INPUT.
MODULE user_command_0300.
REPORT ztesttom2 .
TABLES: zbadgelinks.
TYPE-POOLS vrm.
DATA values TYPE vrm_values WITH HEADER LINE.
data: name type vrm_id.
DATA ok_code LIKE sy-ucomm.
DATA save_ok LIKE sy-ucomm.
DATA init.
DATA it_badgelinks LIKE zbadgelinks OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM zbadgelinks INTO TABLE it_badgelinks.
CALL SCREEN 300.
*& Module status_0300 OUTPUT
* text
module status_0300 output.
SET PF-STATUS 'ST_0300'.
SET TITLEBAR 'TB_0300'.
endmodule. " status_0300 OUTPUT
MODULE init_dropdown_box output.
IF init is initial.
name = 'LB_SEL_PC'.
loop at it_badgelinks.
values-text = it_badgelinks-description.
values-key = it_badgelinks-id.
append values.
endloop.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = values[]
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endif.
init = 'X'.
ENDMODULE.
*& Module user_command_0300 INPUT
* text
module user_command_0300 input.
CASE OK_CODE.
WHEN 'BACK'. LEAVE TO SCREEN 0.
WHEN 'EXIT'. LEAVE TO SCREEN 0.
WHEN 'CANC'. LEAVE TO SCREEN 0.
WHEN 'CB_CANCEL'. leave to screen 0.
WHEN 'CB_OK'.
READ TABLE it_badgelinks WITh KEY ID = it_badgelinks-id.
IF SY-SUBRC = 0.
MESSAGE I398(00) WITH 'ID: ' it_badgelinks-id
'Description: ' it_badgelinks-description.
ENDIF.
WHEN 'SEL_PC'.
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = name
IMPORTING
VALUES = values[]
EXCEPTIONS
ID_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDCASE.
endmodule. " user_command_0300 INPUT
Thanks in advance,
Kind Regards,
TomHi,
Please check the below modified code of yours.
Now the value is retained in the list box.
REPORT ztest_cert.
TABLES: t511t.
TYPE-POOLS vrm.
DATA: lb_sel_pc(80).
DATA values TYPE vrm_values WITH HEADER LINE.
DATA: name TYPE vrm_id.
DATA ok_code LIKE sy-ucomm.
DATA save_ok LIKE sy-ucomm.
DATA init.
DATA it_t511t LIKE t511t OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM t511t INTO TABLE it_t511t WHERE sprsl = 'EN'.
CALL SCREEN 300.
*& Module status_0300 OUTPUT
text
MODULE status_0300 OUTPUT.
SET PF-STATUS 'ST_0300'.
SET TITLEBAR 'TB_0300'.
ENDMODULE. " status_0300 OUTPUT
MODULE init_dropdown_box OUTPUT
MODULE init_dropdown_box OUTPUT.
IF init IS INITIAL.
name = 'LB_SEL_PC'.
LOOP AT it_t511t.
values-text = it_t511t-kotxt.
values-key = it_t511t-konst.
APPEND values.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = values[]
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSEIF init = 'X'.
<b> lb_sel_pc = values-text.</b>
ENDIF.
init = 'X'.
ENDMODULE. "init_dropdown_box OUTPUT
*& Module user_command_0300 INPUT
text
MODULE user_command_0300 INPUT.
data: l_code like values-key.
CASE ok_code.
WHEN 'BACK'. LEAVE TO SCREEN 0.
WHEN 'EXIT'. LEAVE TO SCREEN 0.
WHEN 'CANC'. LEAVE TO SCREEN 0.
WHEN 'CB_CANCEL'. LEAVE TO SCREEN 0.
WHEN 'CB_OK'.
clear: it_t511t.
lb_sel_pc = l_code.
READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
IF sy-subrc = 0.
CLEAR values.
values-key = it_t511t-konst.
values-text = it_t511t-kotxt.
MESSAGE i398(00) WITH 'ID: ' it_t511t-konst
'Description: ' it_t511t-kotxt.
ENDIF.
WHEN 'SEL_PC'.
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = name
IMPORTING
VALUES = values[]
EXCEPTIONS
id_not_found = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
<b> l_code = lb_sel_pc.
READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
CLEAR values.
values-key = it_t511t-konst.
values-text = it_t511t-kotxt</b>.
ENDIF.
ENDCASE.
ENDMODULE. " user_command_0300 INPUT
Thanks & Regards
Praba -
Hi
I have created a screen in menu painter in which there are 3 drop down listbox .
Each list box field has a domain created for it and the domain is assigned a value table.
the value table contains data that data should be populated to list box.
Now when i excecute the screen i am not able to select any data.
any idea how can i achieve thisHi,
I believe you have to manually fill up the list box using the function module VRM_SET_VALUES..
Check this example...
TYPE-POOLS: vrm.
PARAMETERS: p_test TYPE char4 AS LISTBOX VISIBLE LENGTH 10.
DATA: t_data TYPE vrm_values.
INITIALIZATION.
DATA: s_data TYPE vrm_value.
s_data-key = 'ABCD'.
s_data-text = 'First four'.
APPEND s_data TO t_data.
s_data-key = 'EFGHI'.
s_data-text = 'Second four'.
APPEND s_data TO t_data.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_TEST'
values = t_data
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
START-OF-SELECTION.
WRITE: / p_test.
Thanks,
Naren -
How to add records or how to maintain list in stored Procedure
Hi,
I am facing an issue in the addition of record in the type
create or replace
TYPE "PROD_SEARCH_COUNT_TBL" AS TABLE OF PROD_SEARCH_COUNT_OBJ;
create or replace
TYPE "PROD_SEARCH_COUNT_OBJ" AS OBJECT
( /* TODO enter attribute and method declarations here */
V_Name Varchar2(500 Byte),
v_Value Varchar2(500 Byte),
v_count Number
I want to add records to the type I tried following way
prod_wcf_rec PROD_SEARCH_COUNT_TBL;
SELECT PROD_SEARCH_COUNT_OBJ('Name1','Value1',1) BULK COLLECT INTO prod_wcf_rec FROM DUAL;
SELECT PROD_SEARCH_COUNT_OBJ('Name2','Value2',2) BULK COLLECT INTO prod_wcf_rec FROM DUAL;
SELECT PROD_SEARCH_COUNT_OBJ('Name3','Value3',3) BULK COLLECT INTO prod_wcf_rec FROM DUAL;
SELECT PROD_SEARCH_COUNT_OBJ('Name4','Value4',4) BULK COLLECT INTO PROD_WCF_REC FROM DUAL;
DBMS_OUTPUT.PUT_LINE ('-----------------------------Looping----------------------------');
FOR i in 1 .. prod_wcf_rec.COUNT
LOOP
DBMS_OUTPUT.PUT_LINE (prod_wcf_rec(i).V_Name||' - '||prod_wcf_rec(i).v_Value||' - '||prod_wcf_rec(i).v_count);
END LOOP;
DBMS_OUTPUT.PUT_LINE ('-----------------------------Looping----------------------------');
In printing I am getting last records only .So is there any way to add records to PROD_SEARCH_COUNT_TBL
How to add records or how to maintain list in stored ProcedureEvery time you BULK COLLECT into a collection type the value is overwirtten. So you need to try something like this.
SQL> create or replace type prod_search_count_obj as object(v_name varchar2(500 byte), v_value varchar2(500 byte), v_count number)
2 /
Type created.
SQL> create or replace type prod_search_count_tbl as table of prod_search_count_obj
2 /
Type created.
SQL> declare
2 prod_wcf_rec prod_search_count_tbl;
3 begin
4 select obj_val
5 bulk collect into prod_wcf_rec
6 from (
7 select prod_search_count_obj('name1','value1',1) obj_val from dual
8 union all
9 select prod_search_count_obj('name2','value2',2) from dual
10 union all
11 select prod_search_count_obj('name3','value3',3) from dual
12 union all
13 select prod_search_count_obj('name4','value4',4) from dual
14 );
15
16 dbms_output.put_line ('-----------------------------looping----------------------------');
17 for i in 1 .. prod_wcf_rec.count
18 loop
19 dbms_output.put_line (prod_wcf_rec(i).v_name||' - '||prod_wcf_rec(i).v_value||' - '||prod_wcf_rec(i).v_count);
20 end loop;
21 dbms_output.put_line ('-----------------------------looping----------------------------');
22 end;
23 /
-----------------------------looping----------------------------
name1 - value1 - 1
name2 - value2 - 2
name3 - value3 - 3
name4 - value4 - 4
-----------------------------looping----------------------------
PL/SQL procedure successfully completed.
SQL> -
How to populate values in List Box in Adobe form
Hi,
How to populate values in List box in adobe forms?
Thanks
RBif you want to display a fixed values in the dropdown you can use list box ui and can specify values there
or if u want to display values from the context node of the webdynpro
1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
with regards
shanto aloor -
How to add "Search this site" box to subsites
Hello!
We have SP 2013 Enterprise installed.
There is a search box on the main site. How to add the same search box to subsites also (with possibility to search on the subsite)?
Thanks!Hi ,
please add search webpart and configure the same
http://msdn.microsoft.com/en-us/library/dd452356.aspx
http://msdn.microsoft.com/en-us/library/office/ff512796(v=office.14).aspx
http://social.technet.microsoft.com/Forums/sharepoint/en-US/a967edda-fe7f-429a-97fb-da6405072ea5/search-on-a-subsite-webpart?forum=sharepointgeneralprevious
Please remember to click 'Mark as Answer' on the answer if it helps you -
How to add checkbox in dropdown box
hi to all
please help me urgent
can we add check box in to the drop down box in screen painter..?
if yes then please tell me in detail.
thank you...Hi,
In drop down ( combo box) u can select only one item at a time. so why do u need check box ? -
How to create a drop down box and text box in screen painter?
Hi i am totally new to this concept of screen painter..please can any tell me
how to create drop down box in screen painter?
How to create or display default date and time values?
How to create text box for giving comments?
How to store the records that we are entering in a table?
Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.Hi,
Check all these.
1.how to create drop down box in screen painter?
To get Drop Drown Box on screen .
Follow these steps.
1.
Go to T.Code SE51 and Select Laypout for the Screen.
2.
Double click on the field for which u want Dropdown box.
3.
Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
4.
Save and Activate ur screen .
5.
Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
6.
The following code should be written under PROCESS BEFORE EVENT in the MODULE.
TYPE-POOLS :vrm.
DATA:
i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
w_natio LIKE LINE OF i_natio.
DATA:
BEGIN OF i_t005t OCCURS 0,
land1 TYPE t005t-land1,
natio TYPE t005t-natio,
END OF i_t005t.
IF i_t005t[] IS INITIAL.
SELECT land1 natio
FROM t005t
INTO TABLE i_t005t
WHERE spras = sy-langu.
IF sy-subrc = 0.
LOOP AT i_t005t .
w_natio-key = i_t005t-land1.
w_natio-text = i_t005t-natio.
APPEND w_natio TO i_natio.
CLEAR w_natio.
ENDLOOP.
ENDIF.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
values = i_natio
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2.1.How to create or display default date and time values?
1.
create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
2.
Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
3.How to create text box for giving comments?
1.
Define one variable in the TOP include with type STRING means Global variable.
2.
Create one input field by giving screen field name which u have defined in the above step.
4.How to store the records that we are entering in a table?
For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
Check the following steps to handle Table control.
1).
U should take one variable in your internal table or in structure which
is used for table control fields
ex :
data :
begin of itab occurs 0 ,
mark type c , "This is to select the record.
matnr like mara-matnr ,
matkl like mara-matkl,
maktx like makt-maktx,
end of itab .
Controls: TABC types TABLEVIEW using screen 100.
2).
This mark variable should be given in Table control properties.
follow the path
double click on the table control-->attributes .->select
w/SelColumn and in that itab-mark. Check in the figure.
[Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
3).
After that. Take this example.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT ITAB WITH CONTROL tabc
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP AT ITAB.
Module read_table_control.
ENDLOOP.
module user_command_0100.
In this Module read_table_control, You should write the following code
MODULE read_table_control INPUT.
MODIFY itab INDEX tabc-current_line."( This will update the
"ITAB table MARK field with 'X ' whatever we have selected
"on table control.)
ENDMODULE.
4)
If you want to Delete some of the records from Table control
follow this code Create one pushbutton and give Fucnction code to that
and write below code
CASE OKCODE.
WHEN 'CREATE'.
LOOP AT itab WHERE mark = 'X'.
"Use UPDATE statement to create new record.
ENDLOOP.
ENDCASE.
I hope that you will get something.
Regards,
Venkat.O -
How to add profit center in fbl5n selection screen
how to add profit center in fbl5n selection screen
and
it is save to copy ddf from sap to cus
wll it affect anything elseWhen you are on selection screen of FBL5N, press (Shift + F4) DYNAMIC SELECTIONS, there you will see a Dynamic selection screen along with your normal FBL5N selection screen, you will find Profit Centre ther, if you don't find Profit Centre in Dynamic Selection Screen you can add the same from the list on the left, search for profit centre, place your cursor on Profit centre and press the Arrow Button(Copy Selected) on top of the list. Now you will find Prfit Centre in Dynamic selection screen, fill the field with values and press save, that's it.....
Reward points if useful, get back in case of query...
Cheers!!! -
How to add push buttons in out put screen of ALV
Hai,
How to add push buttons in out put screen of ALV (tool bar) with out using classes or methods .I want to know using normal ALV .
Thanks in advance .
kiranHi Kiran,
Here is the sample code.If you are using reuse_alv_grid_display, no need to write code in PBO.
Just double click the 'TEST' which is written in code.Then create a GUI Status.In Application toolbar,type the name of the button you want(say BUTTON).Then double click that name.Then enter the ICON name and function text.Activate it.This itself will work.If you want all the functionalities,then try to do as Vinod told.
TYPE-POOLS: slis.
DATA: i_qmel LIKE qmel OCCURS 0.
data v_repid type repid.
SELECT * FROM qmel INTO TABLE i_qmel.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
i_structure_name = 'QMEL'
TABLES
t_outtab = i_qmel
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
form set_pf_status using rt_extab type slis_t_extab.
set pf-status '<b>TEST</b>'.
endform.
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
data lv_ucomm type sy-ucomm.
lv_ucomm
= sy-ucomm.
CASE lv_ucomm.
WHEN 'BUTTON'. "Double Click line Item
call transaction 'MM01'.
endcase.
endform. -
How to add program documentation icon on selection screen
Hi All,
Please let me know how to add program documentation icon on selection screen.
Thanks
JogTHis is pretty straight forward, in se38, enter program name, click change. Now click Go To, Documentation. Enter the documentation on this screen, save and activate, now run the program, the icon will be there.
REgards,
Rich Heilman -
ON IOS8 UPDATE FOR IPHONE 5C, HOW DO YOU REMOVE RECENTS LIST FROM HOME SCREEN
HOW DO YOU REMOVE RECENTS LIST FROM HOME SCREEN ON IOS8 UPDATE FOR IPHONE 5C
SSettings/mail etc/show in app switcher turn that off
-
Can any share me the procedure to create a text box in screen painter?
Hi Friends,
Can anyone share me the procedure to create a text box in screen painter and browser for attaching files ....please its urgent....
Points will be definetly rewarded.
ThanksRefer to
How to create a text box in ascreen painter?
where another user (venkateshwar reddy) has asked a very similar question... is this an exam question?
Jonathan -
Adding input box to screen painter
Hi abapers,
my question is...... is it possible to add input box to screen painter though code,
NOT by drag and drop?Well it would probably be technically possible to create a complete dynpro "on the fly" in memory and then save and generate it (i.e. replicate everything SAP does in SE80) and then display it to the user... however the risks are high, and the user might not like the delay while your program does this. The usual practice is to define the field on the screen, and then hide it if it is not required under some circumstances, using the usual "loop at screen. screen-active = '0'. endloop." technique.
Maybe you are looking for
-
Creation of Service Notification No for SO.
Hi everyone, I am working on the User Exit for the first time. Kindly help me out with the following requirement. When a sales order is saved, create a service notification and link to the sales order header. To fulfill this requirement we need to us
-
How do I move bookmarks from my list or in a folder to the Favorites connection in my Start menu
I have a folder in my start menu named Favorites. When I click on it, it takes me to the list of bookmarked folders. When I open the folder I want, it shows some, but not all of the bookmarked sites in the folders. How do I add bookmarked sites to th
-
I am a new apple user. We have been used Pages successfully once but now suddenly it will not open anything - not a template, not a new document, not an existing document. The bar at the top opens when the pages icon is clicked but nothing else happe
-
Cannot connect OSX 10.4 Tiger to wifi WEP personal
I have two old G3's or G4's that can only run OSX 10.4 Tiger. They connect to unsecured routers just fine. But the problem is they cannot connect to my Q1000 Centurylink wifi router when i put a password on it. I have tried WEP and WPA-personal and u
-
Customer open entry clearing - F-32
Dear Experts, While clearing the open items for a particular customer while testing in development server, I am getting an error "Net document types are not allowed when clearing". Please help. Uttam