Selection parmeters in the selection screen to upload a file to applserver
what are the selection parmeters in the selection screen to upload a file to applserver
hai bharat,
There are two steps in the solution of this problem.
1. Create an internal table to get the required data based on the given selection parameters.
2. Download the data from internal table to file on the application server.
In the first step,
you should create the internal table with the required structure.
(ii) Use select statement if you want to retrieve data from database with required logic.
In the second step,
Create a string with max. length you required in the report program with some intial value
(ii) Open a dataset by using
OPEN DATASET filename for output in text mode encoding default
to open a file on application server.
(iii) Transfer data from internal table to file opened in first step on application server.To do that
a) Use
Loop at itab1 into w_itab(workarea).
transfer w_itab to filename.
endloop.
(iv) close the data set by using
CLOSE DATASET filename.
After this step, the file with filename was created on the application server with selected data based on the selectionj parameters.
If you feel, this is useful , reward points.
by
prasad g.v.k
Similar Messages
-
Since yesterday my Apple TV will not load the movies or tv at all. I select it from the home screen, it goes black, tries to load then goes back to the home screen. YouTube and Netflix works though. I've reset the Apple TV and the modem. No change. Any ideas what the problem is?
Apple TV: Unable to access Movies, TV Shows, or other iTunes features after updating
http://support.apple.com/kb/TS4526 -
Sub Select list within the Select List!!
Hi All,
I want one solution, i want to have a sub select list within the select list, i mean i want to have a dropdown shown when we point a cursor on any of the Value of
the select list. Sub select list for that value of the select list.
Hope you all got it,Please Reply me if anybody has the solution, I am using APEX version 3.0.1.00.07
ThanksHm,
Service Unavailable
The proxy is currently unable to handle the request due to a (possibly) temporary error. Extended error information is:
* Failed to forward the request to the web server at apps.oraclecorp.com:80. This may be due to a firewall configuration error or a DNS failure.
If this situation persists, please contact your security gateway administrator.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------ -
Windows migration assistant won't go passed the first screen. Connecting hp files to new Mac mini with Ethernet cable. Also tried USB
Are you following these instructions?
http://support.apple.com/kb/ht4796
Have yo tired by connecting both to same network vice direct ethernet connection?
There is no direct USB connection -
Error - The file must match the template type. Upload one file per language
hi,
Error - The file must match the template type. Upload one file per language and territory combination.
i am getting above error while registering RTF template in oracle application e -business suite using XML publisher admistrator responsibility.
My work :
i generated xml output using concurrent program.
for this i used standard PO report,
the executable name: POXPRPOP.
i designed the template using MS Office word (for RTF template)
for this :
<?start: body?>
<? for-each: G_Headers?>
VENDOR:
<?POH_VENDOR_NAME?>
<?POH_VENDOR_COUNTRY?>
PURCHASEORDER NO.
<?POH_PO_NUM?>
SHIP TO:
<?C_COMPANY?>
<?POH_SHIP_ADDRESS_LINE1?>
<?POH_SHIP_COUNTRY?>
BILL TO:
<?C_COMPANY?>
<?POH_BILL_ADDRESS_LINE1?>
<?POH_BILL_COUNTRY?>
<?end for-each?>
<?end body?>
saved this file as "Purchasing.rtf" on desk top
i registered data definition
name:purchase order data definition.
code : short name of concurrent program.
i try to create template Or register the template in oracle e-business suite.
name: purchasing template
code: concurrent program short name
type : RTF.
file : browse from desk top (purchasing.rtf)
language:english
territory: US.
but i am getting above error
could any one help to come out of this problem.
thank you
regarding,
sai krishna@cavayaHi,
I am getting the error as
The file must match the template type. Upload one file per language and territory combination.
I have checked the template name. It doesn't exist already. Please help me.
Thanks in Advance,
Jeganathan -
Is there anyone having an issue with the apple tv when selecting music from the home screen?
Is there anyone in the community having an issue playing music from the home screen of the apple tv? When selecting the music app my apple tv restarts. If anyone else is having the same issue and has corrected the problem please share the solution.
Working fine here, and have not seen any other reports. I would restore your unit
Apple TV (2nd and 3rd generation): Restoring your Apple TV - Apple Support -
Text for block and select option on the selection screen of Logical Databas
Hi,
I have copied a standard program (RFBELJ10) which is making use of LDB (BRF) and created a custom program. Now, the requirement is to add a selection screen option to the custom report and do some validation on the data extracted. I have added the select option and provided a text (lets say "Segment") to it using menu path Goto --> Text Elements --> Selection Texts and activated. But this text is not displayed on the screen when i execute the report. It is showing the string which i used while defining the select option.
Also i need to provide a frame and title to it. but its not displayed.
i have written the following code for that:
SELECTION-SCREEN: BEGIN OF BLOCK seg WITH FRAME TITLE text-h01. " Segment
SELECT-OPTIONS: s_segmnt FOR faglflexa-segment. " Segment
SELECTION-SCREEN: END OF BLOCK seg.
Could you please help me in getting the texts displayed for fram and the select option?
Thanks,
PhaniSolved the problem. I have maintained the text in German. So, when I execute the report in english, it is not displaying the text. I have translated the texts to English and is working fine now.
-
Dynamic Selection option in the selection screen
Hi ,
I have a requirement like this ....
The user wants some fields to be default available in the selection screen. But they also want to be able to select the data based on additional fields (all the remaining fields ) which they want to see in the dynamic selection .
The basic list for selections should be limited to the fields listed in the specifications provided to me and the remaining fields should be made available through the dynamic selection option.
In the transaction FBL3N , this facility is provided.
Kindly help me with this..
thanks,
Sumit .Hi Sumit,
To include dynamic selection check this sample code.
TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
TYPE-POOLS : vrm,
icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.*GLOBAL DECLARATIONS
DATA : flag TYPE c,
tablename(10),
mmtable LIKE dd02l-tabname,
sdtable LIKE dd02l-tabname,
hrtable LIKE dd02l-tabname.*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.***********SELECTION-SCREENS**********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS : pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
pb RADIOBUTTON GROUP rad MODIF ID rad,
pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20 MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20 MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.SELECTION-SCREEN END OF BLOCK blk1.*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.*CLICK OF FIRST RADIO BUTTON
IF pa = 'X'.
sscrfields-functxt_01 = 'Materials Management'.
WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CLICK OF SECOND RADIO
IF pb = 'X'.
sscrfields-functxt_02 = 'Sales And Distribution'.
WRITE icon_ws_ship AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CLICK OF THIRD RADIO
IF pc = 'X'.
sscrfields-functxt_03 = 'Human Resources'.
WRITE icon_new_employee AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
*WITH F8 BUTTON DISABLED APPEND : 'PRIN' TO it_ucomm,
'SPOS' TO it_ucomm,
'ONLI' TO it_ucomm. CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = it_ucomm.
**EVENT ON THE SELECTION
AT SELECTION-SCREEN.* LIST BOX ONE VALUES
CASE one.
WHEN '1'.
mmtable = 'MARC'.
WHEN '2'.
mmtable = 'MARA'.
WHEN '3'.
mmtable = 'MARD'.
WHEN '4'.
mmtable = 'MARM'.
ENDCASE.* LIST BOX TWO VALUES
CASE two.
WHEN '1'.
sdtable = 'VBAK'.
WHEN '2'.
sdtable = 'VBAP'.
WHEN '3'.
sdtable = 'VBUK'.
WHEN '4'.
sdtable = 'VBUP'.
ENDCASE.* LIST BOX THREE VALUES
CASE three.
WHEN '1'.
hrtable = 'PA0001'.
WHEN '2'.
hrtable = 'PA0006'.
WHEN '3'.
hrtable = 'PA0022'.
WHEN '4'.
hrtable = 'PA0008'.
ENDCASE.*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
*AND ENABLING THE BUTTONS TO PERFORM F8
CASE sscrfields-ucomm.
WHEN 'FC01'.
tablename = mmtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC02'.
tablename = sdtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC03'.
tablename = hrtable.
sscrfields-ucomm = 'ONLI'.
ENDCASE.*INITIALIZATION EVENT
INITIALIZATION.*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
PERFORM f4_value_request_pa.
PERFORM f4_value_request_pb.
PERFORM f4_value_request_pc.*START OF SELECTION EVENT
START-OF-SELECTION.*SUBROUTINE FOR OUTPUT
PERFORM output.*&----------------------------------------------------------------*
*& Form f4_value_request_PA
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
FORM f4_value_request_pa. DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list. l_value-key = '1'.
l_value-text = 'Plant Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'General Material Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Storage Location Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Units of Measure for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'ONE'. CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
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.ENDFORM. " f4_value_request_tabname*&----------------------------------------------------------------*
*& Form f4_value_request_PB
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2FORM f4_value_request_pb. DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list. l_value-key = '1'.
l_value-text = 'Sales Document: Header Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'Sales Document: Item Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Sales Document:Header Status'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Sales Document: Item Status'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'TWO'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
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.
ENDFORM. " f4_value_request_PB*&----------------------------------------------------------------*
*& Form f4_value_request_PC
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3FORM f4_value_request_pc. DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list. l_value-key = '1'.
l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'Address Infotype 0006'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Education Infotype 0022'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Basic Pay Infotype 0008'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'THREE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
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.
ENDFORM. " f4_value_request_PC
*& Form OUTPUT
* text
* -->P_TABLENAME text
*fINAL OUTPUT
FORM output. DATA p_table(10). p_table = tablename.*popup to display teh selected table and
*Continue button is clicked
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
titel = 'User Selections '
textline1 = p_table
textline2 = 'is the Selected table'
start_column = 25
start_row = 6.*assigning the table value in p_table to the
* Table in SE16 transaction by explicitly calling
SET PARAMETER ID 'DTB' FIELD p_table.
CALL TRANSACTION 'SE16'.
ENDFORM. "OUTPUT
Regards,
Manoj Kumar P -
Adds selection field at the first screen of FBL3N (G/L line item display)
I would like to adds line item selection field at the default first screen of FBL3N.
The field I'd like to add at the default selection screen is :Amount.
This field can be selected at dynamic selection. But I'd like to use the field at the first screen of FBL3N, not in daynamic selection screen.
If anyone knows how to add the fields into FBL3N first screen, please advice me how to do it.
Edited by: Itchy31 on Jul 23, 2009 8:30 AMHi,
You can not add the new fields in the selection criteria thats the reason dynamic options are given for the further selection.
If you still want to add in the selection screen then go for a customisation and coordinate with the ABAPer which is not suggestable as it is readily avilable in dynamic selection. -
My SD card reader has caused my iPhoto screen to be locked with no list of files on the lefthand side and a blank main photo area apart from the rotating download icon operating in the centre of the photo part of the screen.
I have tried to quit iphoto but when I restart it the same locked screen appears.
I believe I caused this problem when I removed my SD device without first ejecting it when the blank screen appeared without downloading my new photos.
Can anyone help a 66 year old computer illiterate fool ?.
RegardsUse Force Quit (under the Apple menu at the top) to close iPhoto. Then try opening it again. If it locks up again force quit and try this: launch iPhoto with the Option key held down and create a new, test library. Import some photos and check to see if the same problem persists.
If the problem does not persist try the following: make a temporary, backup copy (select the library and type Command+D) and apply the two fixes below in order as needed:
Fix #1
Launch iPhoto with the Command+Option keys held down and rebuild the library.
Since only one option can be run at a time start with Option #1, followed by #3 and then #4 as needed.
Fix #2
Using iPhoto Library Manager to Rebuild Your iPhoto Library
Download iPhoto Library Manager and launch.
Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
In the next window name the new library and select the location you want it to be placed.
Click on the Create button.
Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
If the problem persists in the test library do the following: make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
User/Home()/Library/ Preferences folder.
2 - delete iPhoto's cache file, Cache.db, that is located in your
User/Home()/Library/Caches/com.apple.iPhoto folder.
Click to view full size
3 - launch iPhoto and try again.
NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto. You'll also have to reset the iPhoto's various preferences.
OT -
List sql backups in a folder then restore the selected backup to the selected database
Hi
I'm created a script that lists the backups in a folder then allows user input to select a backup.
It then needs to list the sql database on a specific server and accepts user input.
I can list the backups as follows
$Dir = get-childitem $CurDir -recurse
$List = $Dir | where {$_.extension -eq ".bak"}
$List | format-table name
but what I want to know is how to format the list to have a number for the selection next to it?
How can I get a list of the sql databases on the server.
Thanks
WayneHi Wayne,
I’m writing to just check in to see
if the suggestions were helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up.
If you have
any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support -
Value help for select options (pass the selected values to the select opt)
Hi everyone,
I created a custom value help for my select options.
It works fine, when the user clicks on the value help, my own view is displayed, and the user can select the required values:
lt_range_table =
wd_this->m_handler->create_range_table(
i_typename = 'ORGEH' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'ORGEH'
i_value_help_id = 'MYSO'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
it_result = lt_range_table
i_read_only = read_only ).
The problem is, how can I pass the values to the select option? When the user selects the values in my view, I have them in an internal table. But how can i pass these values to the select option? I suppose there is declared method for this... but which one?
Thanks
N.Sorry for the stupid question, but it seems I can't acces my attribute:
I create it in the component controller
NODE: 'APP_DATA'
Attribute: M_HANDLER TYPE IF_WD_SELECT_OPTIONS
Cardinality 1..1
Selection 1..1
Singleton = 'X'
I pass the values int he EDOINIT method of MAIN view:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
ls_app_data-m_handler = wd_this->m_handler.
lo_child->bind_structure( ls_app_data ).
After this code I test it if the binding is correct:
DATA: ls_test TYPE wd_comp_controller->element_app_data.
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_test.
The lstest is correct_. It has the reference for the SelectOption
Now, in the SEL_TREE View:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
*Get the data from the node
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_app_data.
wd_this->m_handler = ls_app_data-m_handler.
The ls_app_data-m_handler is INITIAL. There is no value in it.
What did I do wrongly?
Please help
Thanks
N. -
Select list: Display the selected value using JSP
Hi
I have a select list with a set of values and when I select a value from the list I want the selected text to appear on the screeen. How do I display the selected value?
Please help:
Here is the code for the list:
<select name="arraySelect" size="8" onclick="">
<%for (int i = 0; i < dumpArray.length; i++) {
if( i == 3){
%>
<option value="<%=dumpArray%>" selected><%=dumpArray[i]%></option>
<% i++;} else %>
<option value="<%=i%>"><%=dumpArray[i]%></option><p>
<% } %>
</select>
<% String name;
name = request.getParameter("arraySelect");
out.println(name);
I tried request parameter but it did not help. How can I do it?did you submit your page?
-
I no longer get the hallow boxes when I select something with the selection tool.
I'm really frustrated. I use to be able to select an object with the selection tool and the bounding box would have hollow squares on the corners and in the centers of each side. I could use these to transform the object. Now the bounding box appears but the hollow boxes are missing and i have to use the free transform tool, which when I use to lengthen a text box vertically it stretched the text instead of just enlarging the bounding box. I have tried cntrl + shift + B but that does not solve the problem, What am I doing wrong and how on earth can I fix it. Please help.
Two things I can suggest:
1) Under view make sure that the show bounding box is checked.
2) My Illustrator does that sometimes. The bounding box will not have the corners. I just select the artwork then click on the selection tool again and they show up.....I guess its a glitch. -
Binding textbox to combobox selected value when the selected value is blank
I have a simple form that binds data to a combobox and when one of the values in the combobox is selected it fills a textbox with the corresponding column in that table. However, if that combobox value is empty(meaning that table cell is empty) then
the textbox will not fill with the correct value. I am finding this hard to explain so I will lay it out.
The table[COA] is as follows:
ID
Fund
Fund Description
Bus Unit
Bus Unit Description
Obj
Obj Description
Sub
PEC
1
2789
Account Refund
10000
General Fund
1500
ASC Voucher
10
2
2789
Account Refund
10000
General Fund
1500
Voucher
The following is my code:
private void subComboBox_SelectedIndexChanged(object sender, EventArgs e)
pECTextBox.Clear();
using (SqlConnection connection = new SqlConnection(@"Data Source=MARYANNEBORJA\SQLEXPRESS;Initial Catalog=jdeDatabase;Persist Security Info=True;User ID=Jordan;Password=*****"))
SqlCommand command = new SqlCommand("SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] ='" + subComboBox.Text + "'");
command.Connection = connection;
connection.Open();
SqlDataReader read = command.ExecuteReader();
while (read.Read())
if (!read.IsDBNull(8))
pECTextBox.Text = (read["PEC"].ToString());
else
pECTextBox.Text = "";
obj_DescriptionTextBox.Text = (read["Obj Description"].ToString());
read.Close();
I fill my combobox with Sub values based on the Bus Unit and Obj. Since the Bus Unit and the Obj in both rows are the same the combobox is filled with 10 and "".
Here is where the problem occurs. When I select "10" in the combobox I want a textbox to fill with correct Obj Description field. So selecting "10" would give me 'ASC Voucher' in the textbox and selecting "" should
give me 'Voucher' in the textbox, but this is not the case. I can only get 'ASC Voucher' to fill the textbox. When I select "" it keeps the textbox at 'ASC Voucher'.
My guess us that is has something to do with the value being empty in that table cell because when I am selecting other values it works.
Any guess as to what I should do?Hi objectifyThat,
When Your subComboBox.Text is null, you should use "Sub is null" in your SQL like below.
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
pECTextBox.Clear();
using (SqlConnection connection = new SqlConnection(@"Data Source=MARYANNEBORJA\SQLEXPRESS;Initial Catalog=jdeDatabase;Persist Security Info=True;User ID=Jordan;Password=*****"))
string cmdstring = "SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] ='" + subComboBox.Text + "'";
if (string.IsNullOrEmpty(subComboBox.Text))
cmdstring = "SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] Is Null";
SqlCommand command = new SqlCommand(cmdstring);
command.Connection = connection;
connection.Open();
SqlDataReader read = command.ExecuteReader();
while (read.Read())
if (!read.IsDBNull(8))
pECTextBox.Text = (read["PEC"].ToString());
else
pECTextBox.Text = "";
obj_DescriptionTextBox.Text = (read["Obj Description"].ToString());
read.Close();
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
Problem with HP printer and Network
I recently purchased a MacBook Pro and HP 8600 wireless printer. I'm using an airport extreme base station. I'm having trouble with network connectivity and wondered if the printer is the culprit--many times after printing, I lose my network connect
-
I'm trying to install tiger woods pga tour 2005. Its telling me to free up local disk space
-
WRT610N Woes - strong signal but dropping internet
So I've had a WRT610N since June 2011 - working flawlessly without having to think about it at all, I just plugged it in and it's been on default settings and never gave us any trouble. About a week ago the power went out - and it caused the router t
-
How to install and configure visual composer
hai experts, any one help me to install and configure the visual composer. and also tell me the procedure for installation and configuration.plz help me. regards, puagzh.
-
Maintaining length of originally recorded clips
I was pretty good with iMovie 6 and my miniDV camcorder, but now am working with a Canon HF11 HD camera (flash memory) and iMovie 7.1.4 and it is like starting over again. Sorry to ask what is probably a very basic question, but thanks in advance for