Populate data in dropdown
Hi All,
I am trying to populate values in dropdown by calling
BAPI. I have only one view in my applicaiton.
I created a model in custom controller and bind it to the model.
I defined the context (model node) in view controller same stucuture in custom controller and mapped the context between view controller and custom controller.
Model node
Zemployee2_Input
Output
TEmployee
Empname
Empno
Value attribute
empCode
I created a Template( table) and bind with the view context.
When I deployed the application, the table was displaying 32 records.
I have a problem to populate values in the dropdown.
I created value attribute called empCode in View contr.
I bind the attribute to the value property of dropdown
called dropdownEmployee.
issue#1:
int nodeSize = wdContext.nodeZemployee2_Input().size();
In runtime
nodeSize has 1.
But it supposed to have 32.
issue#2:
((IPublic<controller_name>.I<node_name>Element)(wdContext.node<node_name>().getElementAt(i))).get<attribute_name>());
What is get<attribute_name> ?
As per my model nodes,
I wrote this code like,
((IPublicTestCustom.IZemployee2_InputElement)(wdContext.nodeOutput().getElementAt(i))).?
after this,
Intellisense gives me 3 options to select,
getAttributeAsText();
getAttributeValue();
getClass();
Where do i select get<attribute_name> ?
Please give me a solution for this.
Thanks
Hi,
int nodeSize = wdContext.nodeZemployee2_Input().size();
As Table showing 32 records, dropdownlistbox also show the same records. Have bind the table to same node or different one?
I have pasted code to you, which is working fine with me. try to make use of it.
Create a context Variable in your View with empcode.
empCode - whichever you want to see in the DropDownListByKey.
IContextElement contextElement = wdContext.currentContextElement();
IWDNodeInfo nodeInfo = wdContext.getNodeInfo();
IWDAttributeInfo dateAttributeInfo = nodeInfo.getAttribute(contextElement.empCode);
IModifiableSimpleValueSet dropValueSet = dateAttributeInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
String empCodeTxt=null;
//Gives the Size of the List, which is coming from Model
int nodeLength = wdContext.node<BAPIList>().size();
for (int i = 0; i < nodeLength; i++) {
// Gives the Value, Which you want to show in Drop Down List Box.. Change it according to your need.
empCodeTxt=String.valueOf(((IPrivate<viewname>.I<BAPIList>Element)(wdContext.node<BAPIList>().getElementAt(i))).get<Parameter>());
dropValueSet.put(empCodeTxt, empCodeTxt);
Regards,
Sridhar
Similar Messages
-
How to populate data from dynamic drop down list to the text field
Hi,
I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
Please see the link below.
https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
Thanks for your help
CindyHi Rosalin,
Loop the hidden table, get the values and populate drop down in each iteration.
DropDownList1.addItem("Text","Value");
You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
Hope this helps.
Thanks & Regards,
Sanoosh -
Sample code on how to populate data in DropDownListbox
Hi all
i am new to the webdynpro for java.
i have one UI element called DropDownListBox and i want to populate some desired values to the dropdown list box.
what are the different ways are there to populate data in DropDownList box.
for example i have city as dropdownlist box and i want to populate some values in drop downlistbox like bangalore,hyderabad,chennai and delhi,
can you pls send the sample code on the same?
Regards
Suresh BabuHi,
If you want to retrieve the city names then you can use the standard tables in R/3.
We have countries list in T500T. Like this we have table for the cities also.
Or
You can manually populate a table and bind this table to the list box.
Please check out this link -
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194
http://help.sap.com/saphelp_nw70/helpdata/EN/74/450e8af57065468e88e4b86de47e4b/frameset.htm
Regards
Lekha -
How to populate data in dynamic internal table
Hi Expert,
fyi. My dynamic internal table field is created base on data selected. Eg. select table qpcd has 5 records. These 5 recods will become fieldname to my dynamic internal table. My dynamic internal table will be
...itab
01
02
03
04
05
The 5 records from qpcd is populated in another table call viqmel. I need to find the occurance of each code in viqmel and populate the number of occurance in itab in each of column. The final dynamic itab will be like this
table itab
01 02 03 04 05 -
> field name
2 0 1 0 1 -
> data
my source code like below
Report ZPLYGRND2.
TABLES: mara, makt.
TYPE-POOLS: slis, sydes.
DATA:it_fcat TYPE slis_t_fieldcat_alv,
is_fcat LIKE LINE OF it_fcat,
ls_layout TYPE slis_layout_alv.
DATA: it_fieldcat TYPE lvc_t_fcat,
is_fieldcat LIKE LINE OF it_fieldcat.
DATA: new_table TYPE REF TO data,
new_line TYPE REF TO data,
ob_cont_alv TYPE REF TO cl_gui_custom_container,
ob_alv TYPE REF TO cl_gui_alv_grid,
vg_campos(255) TYPE c,
i_campos LIKE TABLE OF vg_campos,
vg_campo(30) TYPE c,
vg_tables(60) TYPE c.
types : begin of t_qpcd,
codegruppe like qpcd-codegruppe,
code like qpcd-code,
end of t_qpcd.
data:wa_qpcd type t_qpcd,
i_qpcd type standard table of t_qpcd initial size 0.
FIELD-SYMBOLS: <l_table> TYPE table,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
select * into corresponding fields of wa_qpcd from qpcd
where katalogart = 'D'
and codegruppe = 'OOT01'.
append wa_qpcd to i_qpcd.
endselect.
loop at i_qpcd into wa_qpcd.
is_fcat-fieldname = wa_qpcd-code.
APPEND is_fcat TO it_fcat.
endloop.
LOOP AT it_fcat INTO is_fcat.
is_fieldcat-fieldname = is_fcat-fieldname.
is_fieldcat-ref_field = is_fcat-ref_fieldname.
is_fieldcat-ref_table = is_fcat-ref_tabname.
APPEND is_fieldcat TO it_fieldcat.
ENDLOOP.
*... Create the dynamic internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
if sy-subrc = 0.
endif.
*... Create a new line
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
LOOP AT <l_table> INTO <l_line>.
ENDLOOP.hello dear i m giving u a code in this a dynamic table is made on the basis of table in database , and u can download this data correct it , see it, or even change it....and upload in tht table help full if u dont know the table name...in advance.
also the code to populate data in dynamic table is in this code like:
SELECT * FROM (MTABLE_N)
INTO CORRESPONDING FIELDS OF TABLE <FS_ITAB> .
look at the whole program .hope this solve ur problem thanks.
REPORT ZTESTA MESSAGE-ID ZIMM .
TYPES : DATA_OBJECT TYPE REF TO DATA.
DATA : MITAB TYPE REF TO DATA .
TYPE-POOLS : SLIS .
DATA : IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV
WITH HEADER LINE .
DATA : IT_FIELDCATALOG TYPE LVC_T_FCAT .
DATA : WA_FIELDCATALOG TYPE LVC_S_FCAT .
DATA : I_STRUCTURE_NAME LIKE DD02L-TABNAME .
DATA : I_CALLBACK_PROGRAM LIKE SY-REPID .
DATA : DYN_LINE TYPE DATA_OBJECT .
FIELD-SYMBOLS : <FS_ITAB> TYPE STANDARD TABLE .
DATA : TABLE_NAME_IS_VALID TYPE C .
DATA : DYNAMIC_IT_INSTANTIATED TYPE C .
CONSTANTS BUTTONSELECTED TYPE C VALUE 'X' .
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_TABL.
PARAMETERS : MTABLE_N LIKE RSRD1-TBMA_VAL
MATCHCODE OBJECT DD_DBTB_16 OBLIGATORY .
DATA CHECKTABLED.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_FILE.
PARAMETERS : MFILENAM LIKE RLGRAP-FILENAME .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_DOWN.
PARAMETERS : P_DOWNLD RADIOBUTTON GROUP GRP1
USER-COMMAND M_UCOMM .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_CHKF.
PARAMETERS : P_CHKFIL RADIOBUTTON GROUP GRP1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_UPLD.
PARAMETERS : P_UPLOAD RADIOBUTTON GROUP GRP1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) T_SHOW.
PARAMETERS : P_SHOW_T RADIOBUTTON GROUP GRP1 .
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT .
PERFORM CHECK_FILENAME .
AT SELECTION-SCREEN.
IF SY-UCOMM = 'ONLI'.
CHECKTABLED = MTABLE_N+0(1).
IF CHECKTABLED NE 'Z'.
MESSAGE I017.
LEAVE TO SCREEN 1000.
ENDIF.
IF SY-UNAME NE 'KAMESH.K'.
MESSAGE I023 WITH SY-UNAME.
LEAVE TO SCREEN 1000.
ENDIF.
ENDIF.
IF SY-UCOMM = 'PRIN'.
CHECKTABLED = MTABLE_N+0(1).
IF CHECKTABLED NE 'Z'.
MESSAGE I017.
LEAVE TO SCREEN 1000.
ENDIF.
IF SY-UNAME NE 'KAMESH.K'.
MESSAGE I023 WITH SY-UNAME.
LEAVE TO SCREEN 1000.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MFILENAM .
PERFORM F4_FOR_FILENAME .
INITIALIZATION .
T_TABL = 'Table Name' .
T_FILE = 'File Name' .
T_DOWN = 'Download Table' .
T_CHKF = 'Check File to Upload' .
T_UPLD = 'Upload File' .
T_SHOW = 'Show Table Contents' .
START-OF-SELECTION .
PERFORM CHECK_TABLE_NAME_IS_VALID .
END-OF-SELECTION .
IF TABLE_NAME_IS_VALID EQ ' ' .
MESSAGE I398(00) WITH 'INVALID TABLE NAME' .
ELSE .
PERFORM INSTANTIATE_DYNAMIC_INTERNAL_T .
CHECK DYNAMIC_IT_INSTANTIATED = 'X' .
CASE BUTTONSELECTED .
WHEN P_DOWNLD .
PERFORM SELECT_AND_DOWNLOAD .
WHEN P_CHKFIL .
PERFORM CHECK_FILE_TO_UPLOAD .
WHEN P_UPLOAD .
PERFORM UPLOAD_FROM_FILE .
WHEN P_SHOW_T .
PERFORM SHOW_CONTENTS .
ENDCASE .
ENDIF .
FORM CHECK_TABLE_NAME_IS_VALID.
DATA MCOUNT TYPE I .
TABLES DD02L .
CLEAR TABLE_NAME_IS_VALID .
SELECT COUNT(*) INTO MCOUNT FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'TABL'
AND OBJ_NAME = MTABLE_N .
IF MCOUNT EQ 1 .
CLEAR DD02L .
SELECT SINGLE * FROM DD02L WHERE TABNAME = MTABLE_N .
IF SY-SUBRC EQ 0.
IF DD02L-TABCLASS = 'TRANSP' .
TABLE_NAME_IS_VALID = 'X' .
ENDIF .
ENDIF.
ENDIF .
ENDFORM. " CHECK_TABLE_NAME_IS_VALID
FORM SELECT_AND_DOWNLOAD.
CLEAR : <FS_ITAB> .
SELECT * FROM (MTABLE_N)
INTO CORRESPONDING FIELDS OF TABLE <FS_ITAB> .
PERFORM CHECK_FILENAME.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = MFILENAM
FILETYPE = 'DAT'
TABLES
DATA_TAB = <FS_ITAB>
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC EQ 0.
MESSAGE I398(00) WITH 'Table' MTABLE_N
'successfully downloaded to '
MFILENAM .
ENDIF.
ENDFORM. " SELECT_AND_DOWNLOAD
FORM UPLOAD_FROM_FILE.
DATA : ANS TYPE C .
DATA : LINES_OF_ITAB TYPE I .
DATA : MSY_SUBRC TYPE I .
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
TEXTLINE1 = 'Are you sure you wish to upload'
TEXTLINE2 = 'data from ASCII File to DB table '
TITEL = 'Confirmation of Data Upload'
IMPORTING
ANSWER = ANS.
IF ANS = 'J' .
PERFORM CHECK_FILENAME.
CLEAR MSY_SUBRC .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = MFILENAM
FILETYPE = 'DAT'
TABLES
DATA_TAB = <FS_ITAB>
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
MSY_SUBRC = MSY_SUBRC + SY-SUBRC .
IF SY-SUBRC EQ 0.
DESCRIBE TABLE <FS_ITAB> LINES LINES_OF_ITAB .
IF LINES_OF_ITAB GT 0 .
MODIFY (MTABLE_N) FROM TABLE <FS_ITAB> .
MSY_SUBRC = MSY_SUBRC + SY-SUBRC .
ENDIF .
ENDIF.
IF MSY_SUBRC EQ 0 .
MESSAGE I398(00) WITH LINES_OF_ITAB
'Record(s) inserted in table'
MTABLE_N .
ELSE .
MESSAGE I398(00) WITH
'Errors occurred No Records inserted in table'
MTABLE_N .
ENDIF .
ENDIF .
ENDFORM. " UPLOAD_FROM_FILE
FORM F4_FOR_FILENAME.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = 'C:\'
MASK = ',.,..'
MODE = '0'
IMPORTING
FILENAME = MFILENAM
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
ENDFORM. " F4_FOR_FILENAME
FORM CHECK_FILENAME.
IF MFILENAM IS INITIAL
AND NOT ( MTABLE_N IS INITIAL )
AND P_SHOW_T NE BUTTONSELECTED.
CONCATENATE 'C:\'
MTABLE_N '.TXT' INTO MFILENAM.
ENDIF .
ENDFORM. " CHECK_FILENAME
FORM INSTANTIATE_DYNAMIC_INTERNAL_T.
CLEAR DYNAMIC_IT_INSTANTIATED .
I_STRUCTURE_NAME = MTABLE_N .
CLEAR IT_FIELDCAT[] .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = I_STRUCTURE_NAME
CHANGING
CT_FIELDCAT = IT_FIELDCAT[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC EQ 0.
LOOP AT IT_FIELDCAT .
CLEAR WA_FIELDCATALOG .
MOVE-CORRESPONDING IT_FIELDCAT TO WA_FIELDCATALOG .
WA_FIELDCATALOG-REF_FIELD = IT_FIELDCAT-FIELDNAME .
WA_FIELDCATALOG-REF_TABLE = MTABLE_N .
APPEND WA_FIELDCATALOG TO IT_FIELDCATALOG .
ENDLOOP .
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_FIELDCATALOG
IMPORTING
EP_TABLE = MITAB .
ASSIGN MITAB->* TO <FS_ITAB> .
DYNAMIC_IT_INSTANTIATED = 'X' .
ENDIF.
ENDFORM. " INSTANTIATE_DYNAMIC_INTERNAL_T
FORM SHOW_CONTENTS.
CLEAR : <FS_ITAB> .
SELECT * FROM (MTABLE_N)
INTO CORRESPONDING FIELDS OF TABLE <FS_ITAB> .
I_CALLBACK_PROGRAM = SY-REPID .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = I_CALLBACK_PROGRAM
IT_FIELDCAT = IT_FIELDCAT[]
TABLES
T_OUTTAB = <FS_ITAB>
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. " SHOW_CONTENTS
FORM CHECK_FILE_TO_UPLOAD.
PERFORM CHECK_FILENAME.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = MFILENAM
FILETYPE = 'DAT'
TABLES
DATA_TAB = <FS_ITAB>
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC EQ 0.
I_CALLBACK_PROGRAM = SY-REPID .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = I_CALLBACK_PROGRAM
IT_FIELDCAT = IT_FIELDCAT[]
TABLES
T_OUTTAB = <FS_ITAB>
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDIF .
ENDFORM. " CHECK_FILE_TO_UPLOAD
Message was edited by:
SAURABH SINGH
SENIOR EXECUTIVE
SAMSUNG INDIA ELECTRONICS LTD.,NOIDA -
Dear Experts.
I am new to ABAP and hence trying jmy hands on various ways of peforming a task.
I have a requirement. I want to maintain a database tables through MPP : ZLT_Auftrag (Refer Screen Shot 1: Doubt MPP1) and ZLT_Kunde (Refer Screen Shot2: Doubt MPP2)
The fields of ZLT_Kunde are: K1, K2, K3
The fields of ZLT_Auftrag are: A1, A2, A3, A4, P1 P2 and P3 are related as per the key field "A3" (Here A3 = K2)
I want the User to be able to Maintain this table through the Screen that I had created using MPP. (Plz refer the attached Screen Shot3:Doubt MPP3 of the SCREEN in MPP)
When I populate the Kunde name(K1) in the SCREEN (Can be done by F4 Search help), then on hitting the pushbutton "Get Kunde" the kunde Code (K2) appears . Now from here it can be deleted or even a new Kunde name and code can be saved dirctly to the database table : ZLT_Kunde. (Refer Screen Shoot4: Doubt MPP4)
For Example for Kunde (K1)= BASF, Kunde Code (K2) = BSF, the Auftrag should be all those values from ZLT_Auftrag (where A3 = BSF)
When I try to populate the Auftrag value on the SCREEN then on hitting F4 (already created for table ZLT_Auftrag in se11) then I get all the values of Auftrag (A1) from the table ZLT_Auftrag. (Ply refer Screen Shot 5: Doubt MPP5)
MY REQUIREMENT: Here I want that either through F4 help or through drop down ONLY those values of Auftrag-A1 should appear on the SCREEN which satisfies the condition: A3 = K2
I am unbale to get how to do that.
I need your valuable suggstions.
Regards
ChandanAnd the code of the MPP is:
*& Module Pool SAPMZDEMO_MPOOL_03
PROGRAM SAPMZDEMO_MPOOL_03.
TABLES: ZLT_MITA, ZLT_Kunde, ZLT_Auftrag, Zlt_Stdsatz.
DATA: flg_lock TYPE c,
* indx TYPE i,
* indxk TYPE i,
* indxa TYPE i,
* TCNT TYPE sy-tabix,
lv_msgv1 TYPE sy-msgv1.
*DATA: it_mita TYPE TABLE OF ZLT_mita,
* it_kunde TYPE TABLE OF ZLT_KUNDE,
* it_auftrag TYPE TABLE OF ZLT_AUFTRAG.
*& Module STATUS_9000 OUTPUT
* text
module STATUS_9000 output.
SET PF-STATUS 'ZSTATUS01'.
* SET TITLEBAR 'xxx'.
If flg_lock is Not initial.
LOOP at Screen.
If screen-group1 = 'G1'.
Screen-input = 0.
MODIFY SCREEN.
Endif.
ENDLOOP.
MESSAGE s000(8i) WITH 'Mitarbeiter already locked by user' lv_msgv1.
ENDIF.
endmodule. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9000 INPUT
* text
module USER_COMMAND_9000 input.
*To Populate Data into Mitarbeiter through Pushbuttons
CASE sy-ucomm.
When 'OK_GET'.
Clear : flg_lock.
IF ZLT_MITA-M1 is NOT INITIAL.
SELECT SINGLE *
FROM ZLT_MITA
Where M1 = ZLT_MITA-M1.
*To create a Lock Object so that when two or more employees are accessing the same data
* at the same time then for the new user the data gets locked and only can been seen in
*display mode
IF sy-subrc = 0.
CALL FUNCTION 'ENQUEUE_EZLT_MITALOCK'
EXPORTING
MODE_ZLT_MITA = 'E'
MANDT = SY-MANDT
M1 = ZLT_MITA-M1
* X_M1 = ' '
* _SCOPE = '2'
* _WAIT = ' '
* _COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF sy-subrc <> 0.
flg_lock = 'X'.
lv_msgv1 = sy-msgv1.
ENDIF.
ENDIF.
ELSE.
MESSAGE S000(8i) With 'Enter Mitarbeiter Name'.
ENDIF.
When 'OK_SAVE'.
Modify ZLT_MITA.
IF sy-subrc = 0.
MESSAGE s000(8i) With 'Data Saved'.
ENDIF.
When 'OK_DELETE'.
IF ZLT_MITA-M1 is NOT INITIAL.
DELETE
FROM ZLT_MITA
Where M1 = ZLT_MITA-M1.
IF sy-subrc = 0.
MESSAGE S000(8i) With 'Data deleted'.
ENDIF.
ENDIF.
* When 'OK_FIRST'.
* indx = 1.
* When 'OK_NEXT'.
* indx = indx + 1.
* When 'OK_PREV'.
* indx = indx - 1.
* When 'OK_LAST'.
* Describe Table it_mita lines indx.
*To Populate Data into Kunde through Pushbuttons
When 'OK_GETK'.
IF ZLT_Kunde-K1 is NOT INITIAL.
SELECT SINGLE *
FROM ZLT_Kunde
Where K1 = ZLT_KUNDE-K1.
ELSE.
MESSAGE S000(8i) With 'Enter Kunde Name'.
ENDIF.
When 'OK_SAVEK'.
Modify ZLT_Kunde.
IF sy-subrc = 0.
MESSAGE s000(8i) With 'Data Saved'.
ENDIF.
When 'OK_DELETEK'.
IF ZLT_KUNDE-K1 is NOT INITIAL.
DELETE
FROM ZLT_KUNDE
Where K1 = ZLT_KUNDE-K1.
IF sy-subrc = 0.
MESSAGE S000(8i) With 'Data deleted'.
ENDIF.
ENDIF.
*To Populate Data into Auftrag Through Pushbuttons
When 'OK_GETA'.
IF ZLT_KUnde-K2 is NOT INITIAL.
SELECT SINGLE *
FROM ZLT_Auftrag
Where A3 = ZLT_Kunde-K2.
ELSE.
MESSAGE S000(8i) With 'Enter Kunde Name'.
ENDIF.
When 'OK_SAVEA'.
Modify ZLT_Auftrag.
IF sy-subrc = 0.
MESSAGE s000(8i) With 'Data Saved'.
ENDIF.
When 'OK_DELETEA'.
IF ZLT_Auftrag-A1 is NOT INITIAL.
DELETE
FROM ZLT_Auftrag
Where A1 = ZLT_Auftrag-A1.
IF sy-subrc = 0.
MESSAGE S000(8i) With 'Data deleted'.
ENDIF.
ENDIF.
*To Populate Data into Position Thorugh Pushbuttons
When 'OK_GETP'.
IF ZLT_Auftrag-A2 is NOT INITIAL.
SELECT SINGLE *
FROM ZLT_Auftrag
Where A3 = ZLT_Kunde-K2.
ELSE.
MESSAGE S000(8i) With 'Enter Kunde Name'.
ENDIF.
When 'OK_SAVEP'.
Modify ZLT_Auftrag.
IF sy-subrc = 0.
MESSAGE s000(8i) With 'Data Saved'.
ENDIF.
When 'OK_DELETEP'.
IF ZLT_Auftrag-A1 is NOT INITIAL.
DELETE
FROM ZLT_Auftrag
Where A1 = ZLT_Auftrag-A1.
IF sy-subrc = 0.
MESSAGE S000(8i) With 'Data deleted'.
ENDIF.
ENDIF.
When 'OK_EXIT'.
Leave Program.
When 'OK_CLEAR'.
Clear : ZLT_MITA, ZLT_KUNDE, ZLT_AUFTRAG.
* it_mita, it_kunde, it_auftrag,
CALL FUNCTION 'DEQUEUE_EZLT_MITALOCK'
EXPORTING
MODE_ZLT_MITA = 'E'
MANDT = SY-MANDT
M1 = ZLT_MITA-M1
* X_M1 = ' '
* _SCOPE = '3'
* _SYNCHRON = ' '
* _COLLECT = ' '
ENDCASE.
endmodule. " USER_COMMAND_9000 INPUT
*& Module user_cmd_9000 INPUT
* text
module user_cmd_9000 input.
If sy-ucomm = 'OK_CANCEL'.
LEAVE PROGRAM.
ENDIF.
IF sy-ucomm = 'OK_EXIT'.
LEAVE PROGRAM.
ENDIF.
endmodule. " user_cmd_9000 INPUT -
How to populate data in the data table on combo box change event
hi
i am deepak .
i am very new to JSF.
my problem is i want to populate data in the datatable on the combo box change event.
for example ---
combo box has name of the city. when i will select a city
the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
its urgent
reply as soon as possible
thanks in advancei am using Rational Application Developer to develop my application.
i am using a combo box and i am assigning cityName from the SDO.
and i am declaring a variable in the pageCode eg.
private String cityName;
public void setCityName(String cityName){
this.cityName = cityName;
public String getCityName(){
return cityName;
<h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
<f:selectItems
value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
</h:selectOneMenu>
<hx:behavior event="onchange" target="menu1" behaviorAction="get"
targetAction="box1"></hx:behavior>
and also i am declaring a requestParam type variable named city;
and at the onChangeEvent i am writing the code
public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
FacesContext context = FacesContext.getCurrentInstance();
Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
requestScope.put("login",(String)valueChangedEvent.getNewValue());
and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
it is possible that i may not clear at this point.
please send me the way how my problem can be solved.
thanks in advance -
How to populate data in the same table based on different links/buttons
Hi
I'm using jdeveloper 11.1.4. I have a use case in which i need to populate data in the same table based on click of different links.
Can anyone please suggest how can this be achieved.
ThanksI have a use case in which i need to populate data in the same table based on click of different linksDo you mean that you need to edit existing rows ?
What format do you have the date in - table / form ? -
How to populate data in PAY_PEOPLE_GROUPS table (People Group Flexfiled)
Hello
We are migrating the data from one oracle instance to another oracle instance which are in same version of Oralce Applications 11.5.10.2. As a part of migration can anybody let me know how to populate data in "People Group Key Flexfiled" (PAY_PEOPLE_GROUPS table), ideally I will create or update employee records from the source instance to destination instance, so while creating or updating the employee records in can pass people_group_id while calling to the assignment api but my question here is before passing group id to the api i should have the data populated in PAY_PEOPLE_GROUPS TABLE so that i can fetch the group id as per the combination and pass it in to the api.. please suggest...Thanks for your information! by any chance do you have any sample code which will create/update assignments with People Group Flexfield; when i check "hr_assignment_api.update_emp_asg_criteria" it only has parameter to pass people group id and not having segments parameters to pass individual segments.
Also let me know the links if you have any for all HR API guide which will help me to develope the interfaces...
My requirement is we have two instances in which in one instance we are treating as source for HR which will be used to master for all HR related activities and we are planning to develope an interface which will bring master instance in sync with dummy instance. -
Populate data to column frm existing column
Hi,
I need to have 3 more columns and populate data from existing column rows.
For example
I want to have new columns based on int_bckt_1, char-bckt-2 and char_bckt_3
int_bckt_1= raw score
char_bckt_2= Pref
int_bckt_2= Scaled score
Raw score, pref and sacled score columns are new.
The data is populated based on these columns int_bckt_1, char_bckt_2,int_bckt_2
The rule is - i need to populate the data based on sub test id and char-bckt_2. we need to consider sub test id=200
for english
sub test id=200 and char_back_2 =T and subject is english then i need to populate data for all subtestid 500 and subject =english
similar for Perf and Raw score
For Math
sub test id=200 and char_back_2 =T and subject is Math then i need to populate data for all subtestid 500 and subject =Math
i want to do samething for char_bckt_2 =TR too.
I herewith attached my excel sheet for more clear
Raw score, Pref, Scaled score these column is not there in the table i need to have and populate data based on rule
Could you please help me.
Thanks
RamAnother interpretation:
OK, 3 new columns, so they're all null and you want to populate them and your last reply is your desired output.
If that's correct you can use CASE:
SQL> select * from t;
STUD INT_BCKT_1 CHAR_BCK INT_BCKT_2 CHAR_BC SUBJECT SUBTESTID SCALE A_RAW PR
John 38 T 226 NI English 200
John 16 T 218 WF Math 200
John 82 reading 167 poetry English 500
John 82 Language 166 formal English 500
John 83 number 170 compu Math 500
John 83 geometry 172 spatial Math 500
6 rows selected.
SQL>
SQL> update t
2 set scale = case when subject = 'English'
3 then (select int_bckt_2 from t where subject = 'English' and subtestid = 200)
4 when subject = 'Math'
5 then (select int_bckt_2 from t where subject = 'Math' and subtestid = 200)
6 end
7 , a_raw = case when subject = 'English'
8 then (select int_bckt_1 from t where subject = 'English' and subtestid = 200)
9 when subject = 'Math'
10 then (select int_bckt_1 from t where subject = 'Math' and subtestid = 200)
11 end
12 , pref = case when subject = 'English'
13 then (select char_bckt_3 from t where subject = 'English' and subtestid = 200)
14 when subject = 'Math'
15 then (select char_bckt_3 from t where subject = 'Math' and subtestid = 200)
16 end;
6 rows updated.
SQL>
SQL>
SQL> select * from t;
STUD INT_BCKT_1 CHAR_BCK INT_BCKT_2 CHAR_BC SUBJECT SUBTESTID SCALE A_RAW PR
John 38 T 226 NI English 200 226 38 NI
John 16 T 218 WF Math 200 218 16 WF
John 82 reading 167 poetry English 500 226 38 NI
John 82 Language 166 formal English 500 226 38 NI
John 83 number 170 compu Math 500 218 16 WF
John 83 geometry 172 spatial Math 500 218 16 WF
6 rows selected. -
How to populate data in a JTable?????????
hi there
can anyone tell me how to populate data in a JTable? when a table is displayed, the table should have data retrieved from a file. thank you.Hi,
it is correct, that the best way to learn about JTable is to read the online tutorial about JTable. To give you a quick guideline, where to start your implementation, I will add this:
A JTables data is hold in a TableModel. TableModel is an interface, so if a class implements this interface correctly, you can simply populate the data hold by this TableModel by constructing a JTable this way
JTable jt = new JTable(MyTableModel);
where MyTableModel is your class, which implements the TableModel interface.
When JTable has to render a cell, it will call the getValueAt(...) method of the TableModel for example.Your implementation of this method must deliver the requested data - if you prefetch a bunch of data from a file and store it internally in this TableModel or fetch it from the file just in time, is up to you.
greetings Marsian -
To populate data in standard order from internal table
Hi ppl,
I want to populate data from my internal table into stndard order in crm.i.e i also have to create a new order,and display those values in the general tab of crmd_order transaction.
For this purpose which transaction should be used?i have tried using crm_order_maintain,but wht are the mandatory fields for this transaction.
and if any other function module can be used for this purpose.
Pleaseee help....Hi Vaishali,
For existing order : You will have to pass the Header Guid of the line item which you are maintaining.
For new order : For creating a line item, you must create a header in CRM.
PS : Please see the where used list of the BAPI's you will come to know the usage.
<b>Reward points if it helps.</b> -
How to use CrossReference and DVM in ODI &how to populate data into Xref
Can any one tell how to use Domain Value Maps and Cross Referencing in ODI?
DVM or Domain Value Map are created and used in ESB console of SOA suite.
My actual requirement is as follows:
The below steps describe loading data from ERP Application 1 to ERP Application 2.
1. The Source Application ERP APP1, populates the interface table using their native technology.
2. A job scheduler invokes the Source side ODI Package.
3. ODI then extracts the data from Source Interface table and populates the Target Interface table.
4. After populating the Target interface table the ODI populates the X-ref table with App 1 ID and generated common ID.
5. The ODI either deletes or updates the rows that were processed from the Source interface table.
6. On the Target Application ERP APP2, the native application extracts data from target interface table and populates target database there by generating ERP Application 2 ID.
7. A job scheduler on the Target application invokes the ODI package to populate the Application 2 ID onto the Xref table matching on the Common ID.
I just want to know :
1. How to populate data into the Xref table from Source datastore
2. And if data is successfully laoded from target datastore to actual base table of target then how to populate the target id into the cross reference table.can anyone suggest me some answer, then it would be of great help?
-
Hi,
Need help regarding Business rule scenario "How to populate data in "Target Form (plantype2)" from "Source Form(plantype1)" for a particular product/currency dimension combination selected in form1"
Scenario 1) : I have data for Product(Computer)/Currency(USD) dimension combination in Source Form
When i open Target Form and then select a Product(Computer)/Currency(USD) combination and then right click on form to invoke a Business rule to get data for this same product/currency combination from Source Form.
Scenario 2) : If there isnt any data in Source Form for product(Computer)/Currency(USD) combination, then the data for product(computer)/Currency(Default Currency) to be populated into Target Form.
The members in Currency Dimension (Shared Dimension) are USD & Default Currency.
Can anyone please help.
Thanks,
RajkumarAdding to what Celvin Kattookaran has said
You can either write a Business Rule / Calculation script with @XREF function and also you can check condition if there is data in USD then populate USD else "Default currency"
If you want that data in source to be available in target, then you can use @XWRITE in a rule from source cube to push the data to Target.
Amarnath
ORACLE | Essbase -
How to populate data from table into datagrid in form
hi there. may i know how to populate data from a table into a datagrid? i have created a datagrid in a form using OLE's microsoft datagrid. i'm having problem to populate data from table into the grid. can i know how to do that? thanks
Not exactly. I want to enter input from form and the user can have all options to choose i.e. HIGH, MEDIUM or so on.
Suppose, you have option to select HIGH, MEDIUM or LOW and you can see all these options together. You select LOW and when you save, it is saves in the table as a value. So when you view the table again, it will show LOW as active and HIGH and MEDIUM are null. -
Hi,
My aim is to populate data in a standard pdf file and print the same.
How can I do this? I am using struts framework.
What are the APIs that can be used for this?
Would it be better to convert an rtf to pdf?
Please help.
Thanks!
ArchnaThanks for the link.
I tried etymon PJ but there are problems with word alignment and word wrap. The process that I followed is like this:
1. Converted a word document to pdf 1.4 using acrobat 7.0
2. I then use this pdf which contains tags like <Address> <City> etc and have this file as an input
3. Use Etymon PJ to replace text using these tag delimiters
The file is converted but there is no word wrap and alignment issues occur. What could be the cause?
Archna
Maybe you are looking for
-
Safari 2.0.4 Crashes on Powerbook G4
Safari just seems to love to crash on me - it always happens after a period of time of using the program, and the crashes happen on a daily basis. My my initial research of the crash report (seem below) this may have something to do with memory - but
-
What is s.m.a.r.t error
what is s.m.a.r.t error
-
9.2.0.8 rdbms 64-bit on redhat 4 65-bit
Hi all, We are going to migrate to a Redhat 4 64-bit. I would like to install the 64-bit version of the 9.2.0.8 database on that. But I don't have the time to test this properly, so I was wondering or anyone has this setup running. And are there any
-
"Ghost" tracks can not be deleted from iPhone
I recently went on an international trip, and loaded up my iPhone with lots of music using iTunes Match. Once I had the music on the iPhone that I wanted on there, I turned off iTunes Match on the iPhone. Now that I'm back I'm trying to get my iPhone
-
Why I can not see my mail?
I have been cofigurated my mail adrees in my Iphone 4s but I can not see the mail that are coming