Need code example for StringTokenizer to hashmap...
I am creating a rolodex with name, phone, address, city, state. The data will be saved to a delimited file. When the app begins I have to read the file to get the records into memory. My GUI will list the names. The user should be able to click on one of the names to open a dialog box in which all the fields will appear and wil be editable.
I need some assistance with design...
I think I should use BufferedReader and StringTokenizer for reading the file in. Then perhaps store the records in a hashmap(need help with that - Is hashmap the thing to use? Maybe arraylist instead? How do i do it?) The records should be stored sorted by name in memory and in the file. Next, I figure I can show the names using a table and hide the other columns, when a cell is clicked I can pop up the dialog box with all the goodies in it. When I save it should be to memory, how do I do that? Then when the app closes I will write out using PrintWriter.
There are other things going on, buttons, listeners, etc. but the basic design is what I need advice on. Any ideas are welcome and appreciated!
From the name to get the record, clearly you need a effecient lookup mechnism.
HashMap does hash lookup, that is right, but HashMap does NOT do ordering.
TreeMap does binary lookup, TreeMap also does ordering.
There you go the basic design.
--lichu
Similar Messages
-
I need code example for server act as client and vice versa
Hi all,
I want code example for performing both server and clients using RMI. I mean Server will act as client and client will act as server. So a single program will act as both client and server .
Please give example, it will helpful to complete my project. I am struggling in this stage. Its like peer to peer action.
Thanks & Regards
R.Ragupathi1. The tutorial shows you how to do cleint/server.
2. Search on the topic "callback" to see how cleint and server roles can be reversed. -
Need code example for dynamicly changing UI Propertey
Hello,
Can someone show me a simple code example that does the following:
A view which contains a button and a label.
Each press on the button changes the color (or other visible property) of the label.
But note: Don't bind the property to the Context for that, I want to do it through the doModifyView method.hi Roy Cohen,
I think u r not looking for the visibility property they have mentioned.
I think u r looking for a procedure to change the way the element looks..is it..
The problem is if u want any change to be visible when the button is pressed u can only change the length or the width.There is no option to change the semantic color or whatever.
To change the size u can try this code
IWDInputField in = (IWDInputField)view.getElement("<element name>");
in.setWidth(some value which is set when the button is pressed);
Is this wat u r looking for?
Jus mention it if there is something else.
Regards
Bharathwaj -
Need code example for LDAP update
Hello,
I know how to preform an LDAP search using the package javax.naming.directory.DirContext.
Can someone show me how do I do an update to a certain record at the LDAP ?
Can this update be with the search already (such as in SQL) or should I search the relevant item first and than update it? In any case, a code example will be very helpful here...Roy
Personally I would use the UME APIs to update the user instead of connecting to the LDAP directly. There are many reason for this
1) The UME will work if you decide to change your user store
2) Connection pooling is already taken care of
3) Its using standard product functionality instead
I hope this helps (and sways) your decision
Darrell -
Need code example for setting a label text
Hello,
Lets say I have a label called testLabel and I would like to put it's text at the doInit() method of my view.
How do I do that?Hi Roy,
if you want to set the label directly without setting it thru context variable then its part of the dynamic programming of WD. So u can do that only in wdDoModifyView method. Obtain the reference of the label object from the view object and set the text property of it with the desired value.. like below
public static void wdDoModifyView(IPrivateImageAppView wdThis, IPrivateImageAppView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
//@@begin wdDoModifyView
IWDLabel myLabel = (IWDLabel)view.getElement("testLabel");
myLabel.setText("Hello this is a Label");
//@@end
this should solve ur problem...
regards,
Shubhadip -
i need a code example for user exit. EXIT_SAPLAFAR_002.
*data: con_afameth_za like t090-afamet value 'ZA',
con_afameth_zb like t090-afamet value 'ZB',
con_afameth_zc like t090-afamet value 'ZC',
con_afameth_zd like t090-afamet value 'ZD',
DATA: CON_AFAMETH_ZA(2) VALUE 'ZA',
CON_AFAMETH_ZB(2) VALUE 'ZB',
CON_AFAMETH_ZC(2) VALUE 'ZC',
CON_AFAMETH_ZD(2) VALUE 'ZD',
L_AFABTR TYPE F.
E_AKTIV = 'X'.
E_AFABTR = 0.
DATA: STRDATE(10) TYPE C ,
START_PERIOD TYPE I .
DATA: SUMDEPRE_PERIOD TYPE I ,
BALDEPRE_PERIOD TYPE I .
DATA: FYPLANDEPOD LIKE ANLC-NAFAP ,
TRUEPLANDEPOD LIKE ANLC-NAFAP ,
NETBOOKVALUE LIKE ANLC-KANSW ,
APCVALUE LIKE ANLC-KANSW ,
ACCMDEPR LIKE ANLC-KNAFA ,
DEPMONTH LIKE ANLC-PSTBEG .
TABLES: ANLC ,
ANLA ,
ANLB .
DATA: FIRSTYEAR(4) TYPE C ,
CURRENTYEAR(4) TYPE C .
DATA: ACQYEAR(4) TYPE C ,
ACQMONTH LIKE ANLA-ZUPER .
CURRENTYEAR = SY-DATUM+0(4) .
LOOP AT T_ANLC WHERE AFABE = I_AFABE .
**Deprecation amont is : apc * n / (n+1) / all period .
**At first phase of changeover .
CLEAR: STRDATE , START_PERIOD , CURRENTYEAR ,
FYPLANDEPOD , TRUEPLANDEPOD , NETBOOKVALUE .
CLEAR: ANLC , APCVALUE .
STRDATE = I_ANLB-AFABG .
START_PERIOD = STRDATE+4(2) .
FIRSTYEAR = STRDATE+0(4) .
CURRENTYEAR = SY-DATUM+0(4) .
SELECT SINGLE * FROM ANLC WHERE BUKRS = T_ANLC-BUKRS
AND ANLN1 = T_ANLC-ANLN1
AND ANLN2 = T_ANLC-ANLN2 .
IF SY-SUBRC = 0 .
APCVALUE = ANLC-KANSW + ANLC-ANSWL .
ACCMDEPR = ANLC-KNAFA + ANLC-NAFAG .
IF FIRSTYEAR = CURRENTYEAR .
DEPMONTH = ANLC-PSTEND - ANLC-PSTBEG .
ELSE .
DEPMONTH = ANLC-PSTEND - ANLC-PSTBEG + 1 .
ENDIF.
ENDIF .
IF APCVALUE GT 0 .
FYPLANDEPOD = ( APCVALUE - I_ANLB-SCHRW ) /
( I_ANLB-NDJAR * 12 + I_ANLB-NDPER ) * DEPMONTH .
E_AFABTR = FYPLANDEPOD .
ENDIF.
EXIT.
ENDLOOP. -
Need an example for work flow based on multistep activity
hi,
i need an example for work flow based on multistep activity for practicing.please do the need.
thanksHi,
Workflow document information:
Check these links.
http://www.sapgenie.com/workflow/index.htm
/people/ginger.gatling/blog/2005/12/01/link-workflow-business-objects-to-your-collaboration-tasks
http://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw33/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw31/helpdata/en/8d/25f94b454311d189430000e829fbbd/content.htm
http://www.sap-press.com/product.cfm?account=&product=H950
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
&**********Reward points if helpful**************& -
C# Code Example for Configuring SQL 2005 Reporting Services?
I have found the MSDN articles describing the classes, public methods, etc. for configuring SQL Server 2005 Reporting Services via WMI. I need to initially configure them and just do this:
- Report Server Virtual Directory
- Windows Service Identity
- Web Service Identity
- Database Setup
- Email Settings
- Execution Account
Is there a C# code example that already exists putting together all of this? I didn't want to reinvent the wheel if I didn't need to.
-EdJin,
Thanks so much! This is great! Your work is awesome!
I have a couple of issues that came up...
1) CreateVirtualDirectory.vbs creates the virtual directory for the Report Server just fine. Now how do I distinguish a script to create the virtual directory for the Report Manager?
2) I decided to go ahead and use what you did for scripting CreateApplicationPool (using http://msdn.microsoft.com/en-us/library/ms155349(SQL.90).aspx). I found the syntax is wrong here when I kept getting an error, so I put PowerShell on the server and pulled the following info:
Name : CreateApplicationPool
MemberType : Method
Definition : System.Management.ManagementBaseObject CreateApplicationPool(System.String Name, System.Boolean UseBuiltIn
Account, System.String Account, System.String Password)
However, I'd like to use "NT Authority\NetworkService" or "Network Service" as the account (which is an option for the Builtin accounts when I us RSConfigTool.exe). This is the syntax I used:
objInParam.Properties_.Item(
"Name") = "ReportServer"
objInParam.Properties_.Item("UseBuiltInAccount") = true
objInParam.Properties_.Item("Account") = "NT Authority\NetworkService"
objInParam.Properties_.Item("Password") = ""
But I always get an error with a negative number for the HRESULT.
Any ideas?-Ed -
I need simple example for alv grid
hi
i need code for simple example for alv grid.
thanks.hi bharat,
this is report with most of the functionality.
report zus_alv_demo_grid .
tables: ekko.
type-pools: slis.
types: begin of t_ekko,
ebeln type ekpo-ebeln,
ebelp type ekpo-ebelp,
statu type ekpo-statu,
aedat type ekpo-aedat,
matnr type ekpo-matnr,
menge type ekpo-menge,
meins type ekpo-meins,
netpr type ekpo-netpr,
peinh type ekpo-peinh,
line_color(4) type c, "Used to store row color
end of t_ekko.
data: it_ekko type standard table of t_ekko initial size 0,
wa_ekko type t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid.
Data declaration for EVENT and PRINT PARAMETER.
data: gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
data declaration for sorting.
data : it_sortcat type slis_sortinfo_alv occurs 1,
wa_sort like line of it_sortcat.
data : i_list_comments type slis_t_listheader.
start-of-selection.
perform data_retrieval.
perform user_command.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform build_sortcat.
perform display_alv_report.
end-of-selection.
*TOP-OF-PAGE.
PERFORM top-of-page.
end-of-page.
*& Form build_fieldcatalog
text
--> p1 text
<-- p2 text
form build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
fieldcatalog-do_sum = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " build_fieldcatalog
*& Form build_layout
text
--> p1 text
<-- p2 text
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
Set layout field for row attributes(i.e. color)
gd_layout-info_fieldname = 'LINE_COLOR'.
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for
*when double
"click(press f2)*
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " build_layout
*& Form data_retrieval
text
--> p1 text
<-- p2 text
form data_retrieval.
data: ld_color(1) type c.
select ebeln ebelp statu aedat matnr menge meins netpr
peinh from ekpo into table it_ekko.
*Populate field with color attributes
loop at it_ekko into wa_ekko.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
if ld_color = 8.
ld_color = 1.
endif.
concatenate 'C' ld_color '10' into wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
modify it_ekko from wa_ekko.
endloop.
endform. " data_retrieval
*& Form display_alv_report
text
--> p1 text
<-- p2 text
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
is_layout = gd_layout
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
it_event = gt_events
is_print = gd_prntparams
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat
i_save = 'X'
tables
t_outtab = it_ekko
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.
endform. " DISPLAY_ALV_REPORT
*& Form user_command
text
--> p1 text
<-- p2 text
*& Form top-of-page
text
--> p1 text
<-- p2 text
form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
concatenate sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) into wa_header-info."todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header
i_logo = 'GANESH_LOGO'.
endform. " top-of-page
FORM user_command *
--> R_UCOMM *
--> RS_SELFIELD *
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&IC1'.
if rs_selfield-fieldname = 'EBELN'.
read table it_ekko into wa_ekko index rs_selfield-tabindex.
set parameter id 'BES' field wa_ekko-ebeln.
call transaction 'ME23N' and skip first screen.
endif.
when 'ULHAS'.
if rs_selfield-fieldname = 'EBELN'.
read table it_ekko into wa_ekko index rs_selfield-tabindex.
set parameter id 'BES' field wa_ekko-ebeln.
call transaction 'ME23N' and skip first screen.
endif.
endcase.
endform.
FORM set_pf_status *
--> RT_EXTAB *
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'ZNEWSTATUS'.
endform.
*& Form build_events
text
--> p1 text
<-- p2 text
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[]
EXCEPTIONS
LIST_TYPE_WRONG = 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.
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " build_events
*& Form build_print_params
text
--> p1 text
<-- p2 text
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " build_print_params
FORM END_OF_PAGE *
form end_of_page.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip. write:/40 'Page:', sy-pagno .
endform.
FORM END_OF_LIST *
form end_of_list.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip. write:/40 'Page:', sy-pagno .
endform.
*& Form build_sortcat
text
--> p1 text
<-- p2 text
form build_sortcat.
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
append wa_sort to it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'EBELP'.
append wa_sort to it_sortcat.
endform. " build_sortcat
Rewards if helpfull
regards
vijay dwivedi -
Code example for "chain locking" ?
Guys, could anyone give a code example of chain locking with reasoning why we could need this technique?
"Chain locking" mentioned here .
Thanks.I suggest you search for examples using google, the examples should make it clear why you would use it.
-
Are there any good code examples for displaying preview images in the storefront?
I can gather other info using folio.xxx, but can not find any good examples to use for preview images. Tried folio.getPreviewImage() with no success. Oh, I should mention it is version 2. Plenty of examples for version 1.
Perhaps if I get a little more specific.
I am calling up the folios via:
adobeDPS.libraryService.folioMap.addedSignal.add(function(folios) {
for (var i = 0; i < folios.length; i++) {
addFolio(folios[i]);
}, this);
This eventually works into a function where I am gathering and displaying folio data:
var productId = folio.productId;
var html = "<div id='" + productId + "'>";
html += "<a href='#'><img class='shadow' width='120' src='' border=0 /></a>";
html += "<br /><span class='bold'>" + folio.title + "</span>";
html += "</div>";
this.$el = $(html);
folio.title works fine to pull up the title, but I can no longer use folio.getPreviewURL in v2. What code should I be using to set the src to the preview image?
ThanksHave you looked at the default implementations of the library?
In FolioItemView's render function, there is a function(follow the nested functions!):
setTimeout(function(){ scope.loadPreviewImage() }, 100);
It references this function (this doesn't copy well):
loadPreviewImage: function() {
if (this.el.parentElement) {
var transaction = this.folio.getPreviewImage(135, 180, true);
transaction.completedSignal.addOnce(this.getPreviewImageHandler, this);
Going deeper, into the getPreviewImageHandler function is where you see the url value..
if (transaction.state == adobeDPS.transactionManager.transactionStates.FINISHED && transaction.previewImageURL != null) {
this.$el.find(".folio-thumb").attr("src", transaction.previewImageURL);
Within the example is also code for supplying a preview when the Adobe API is not available:
(Within the render function)
var json = this.model.toJSON();
$folioThumb.attr("src", json.libraryPreviewUrl);
If you're making any changes to where the preview is displayed, you can just swap out the class ".folio-thumb" to whatever the class (or id) is of the element you're wanting to render the preview in. -
Can someone please show me a code example of how to use RS_EXTERNAL_SELSCREEN_STATUS function.
I want to delete "Create delivery in background" pushbutton from report vl10h.This is the example given in the FM documentation.
Example
Example for calling RS_EXTERNAL_SELSCREEN_STATUS:
PROGRAM SAPDBxyz DEFINING DATABASE xyz.
FORM INIT.
CALL FUNCTION 'RS_EXTERNAL_SELSCREEN_STATUS'
EXPORTING P_FB = 'TEST_EXTERNAL_STATUS'.
ENDFORM.
Example for function module that sets the status:
FUNCTION TEST_EXTERNAL_STATUS.
""Local interface:
*" IMPORTING
*" P_SUBMIT_MODE
*" TABLES
*" P_EXCLUDE STRUCTURE RSEXFCODE
*" EXCEPTIONS
*" NO_ACTION
IF P_SUBMIT_MODE NE SPACE.
RAISE NO_ACTION.
ENDIF.
SET PF-STATUS 'TEST' EXCLUDING P_EXCLUDE.
SET TITLEBAR 'TST'.
ENDFUNCTION.
INITIALIZATION.
CUA *
IMPORT T185V FROM MEMORY
ID SD_COND_MEM_01. "JAY
RV13B-KVEWE = 'B'.
RV13B-KOTABNR = '001'.
CALL FUNCTION 'RS_SUBMIT_INFO'
IMPORTING
P_SUBMIT_INFO = RSSUBINFO.
IF NOT RSSUBINFO-MODE_NORML IS INITIAL.
TITEL = T185V-CTITEL.
CALL FUNCTION 'RV_CONDITION_GET_CUA_REPO'
EXPORTING
PFKEY_I = 'BSELE'
TITLE_I = TITEL
PAR1_I = T185V-PARA1
PAR2_I = T185V-PARA2
PAR3_I = T185V-PARA3
PAR4_I = T185V-PARA4
TABLES
EXCL_I = AUSSCHLUSS.
CALL FUNCTION 'RS_EXTERNAL_SELSCREEN_STATUS'
EXPORTING
P_FB = 'RV_CONDITION_SET_CUA_REPO'.
ENDIF. -
Code example for virtual list view control
I'm writing a client (C++) application to access an LDAP directory (that supports virtual lists), and I'm trying to make use of the virtual list view control to "page" my results. However, I'm having trouble getting the code to work correctly. Can anyone provide a C++ code example?
Thanks in advance.I think I've found my problem with writing this code.
Unless I'm mistaken, the Netscape SDK for C appears to be incomplete. After an LDAP search operation, I believe there should be a way to parse the virtual list response control for a context id. Then, I would return this context id to the directory server in subsequent Virtual List View controls (which I'd send via LDAP search calls). However, the concept of context id in VLV search controls doesn't appear to exist in the Netscape SDK for C. -
Need JNDI example for THIN CLIENT
I ned a JNDI example for a thin client (as opposed to a java program connecting on the same machine as the server).
1> Specifically, I need an example of a JNDI Provider URL
Would it be <b>corbaloc.iiop:<host>:5004 ???</b>
2> Also, how do I create a Queue Connection factory from within the GUI (Visual Administrator), so I can find out what to use on the THIN CLIENT Program?
ThanksHi,
Please find the answers below.
> I ned a JNDI example for a thin client (as opposed to
> a java program connecting on the same machine as the
> server).
>
> 1> Specifically, I need an example of a JNDI Provider
> URL
>
> Would it be <b>corbaloc.iiop:<host>:5004 ???</b>
Have a look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/08/8f633e0084e946e10000000a114084/frameset.htm">this</a> link.
> 2> Also, how do I create a Queue Connection factory
> from within the GUI (Visual Administrator), so I can
> find out what to use on the THIN CLIENT Program?
Have a look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/26/9b569f525445b0b3d66474b7569d39/frameset.htm">this</a> link.
> Thanks
Hope that helps,
Vladimir -
Need some examples for smartforms and scripts
hi
now i am working in scripts and smartforms. so i need some examples and some information for scripts and smartforms. where i can find that information.hi jyothsna,
i have given below a simple example
this is the report program,
*& Report ZSCRIPT1 *
REPORT ZSCRIPT1 .
TABLES : EKKO,
EKPO,
KNA1,
USR01,
MARA,
MAKT.
DATA : BEGIN OF ZOPTION.
INCLUDE STRUCTURE ITCPO.
DATA : END OF ZOPTION.
PARAMETERS: P_EBELN LIKE EKKO-EBELN,
P_EBELP LIKE EKPO-EBELP.
CLEAR EKPO.
SELECT SINGLE * FROM EKPO
WHERE EBELN = P_EBELN AND
EBELP = P_EBELP.
CLEAR KNA1.
SELECT SINGLE NAME1 FROM KNA1
INTO KNA1-NAME1
WHERE KUNNR = EKPO-KUNNR.
CLEAR MAKT.
SELECT SINGLE MAKTX FROM MAKT
INTO MAKT-MAKTX
WHERE MATNR = EKPO-MATNR AND
SPRAS = SY-LANGU.
CLEAR USR01.
SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.
ZOPTION-TDDEST = USR01-SPLD. "Output device (printer)
ZOPTION-TDIMMED = 'X'. "Print immediately
ZOPTION-TDDELETE = 'X'. "Delete after printing
ZOPTION-TDPROGRAM = 'ZPQRPRNT'. "Program Name
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = ' '
ARCHIVE_PARAMS = ' '
DEVICE = 'PRINTER'
DIALOG = ' '
FORM = 'ZFORM1'
LANGUAGE = SY-LANGU
OPTIONS = ZOPTION
IMPORTING
LANGUAGE = SY-LANGU
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADER'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'HEADER'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'MAIN'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'FOOTER'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'FOOTER'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
UNOPENED = 1
OTHERS = 2.
This is the layout Set
Layout set Z_TESTSCRIPT
Description Test SAP script
Standard attributes
First page FIRST
Default paragraph P1
Tab-stop 1.00 CH
Page format DINA4
Orientation Landscape
Lines/inch 6.00
Characters/inch 10.00
Font attributes
Font family COURIER
Font size 12.0 Point
Bold No
Italic No
Underlined No
Characters Attributes
B Character String Bold
Standard attributes
Marker No
Font attributes
Bold Yes
Paragraphs Attributes
P1 Default Paragraph
Standard attributes
Line spacing 1.00 LN
Left margin 1.00 CM
Alignment Left-aligned
Font attributes
Font family TIMES
Font size 12.0 Point
P2 Header Paragraph
Standard attributes
Line spacing 1.00 LN
Left margin 4.50 CM
Alignment Left-aligned
Font attributes
Font family TIMES
Font size 18.0 Point
Bold Yes
P3 Undelined paragraph
Standard attributes
Line spacing 1.00 LN
Alignment Left-aligned
Font attributes
Font family TIMES
Font size 12.0 Point
Underlined Yes
Windows Attributes
MAIN Main window
Window type MAIN
HEADER Main window
Window type CONSTANT
FOOTER Main window
Window type CONSTANT
Pages Attributes
FIRST First Page
Standard attributes
Next page FIRST
Page counter
Mode START
Numbering type Arabic numerals
Page window
HEADER Left margin 00.00 CM
Upper margin 00.00 CM
Window width 20.00 CM
Window height 04.00 CM
MAIN Left margin 00.00 CM
Upper margin 05.00 CM
Window width 20.00 CM
Window height 20.00 CM
FOOTER Left margin 00.00 CM
Upper margin 25.00 CM
Window width 20.00 CM
Window height 04.00 CM
Text elements for following windows:
HEADER
Element HEADER
/: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
/: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
P2 ,,<B>TEST PURCHASE ORDER</>
MAIN
Element MAIN
P1 <B>Customer/Supplier:</>,,&KNA1-NAME1&
P1 <B>PO No:</>,,&EKPO-EBELN&
P1 <B>Part No:</>,,&MAKT-MATNR&
P1 <B>Description:</>,,&MAKT-MAKTX&
P1 <B>Quantity:,,</>&EKPO-MENGE&
P1 <B>Sign:</>&uline(81)&
P1 <B>Date:</>&EKKO-AEDAT&
FOOTER
Element FOOTER
/: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
/: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
P2 ,,<B>PLEASE SIGN THE PO BEFORE DISPATCH</>
<b>reward if useful :)</b>
Maybe you are looking for
-
Hi, I need to save only changed data in my ALV. I created a button SAVE and have an event handler for this data. SAVE action should only be triggered when user presses this button. ON_DATA_CHECK method is what I need since I can pull out changed con
-
Inserting data using stored procedure
Using SQL Server Express 2014, I'm creating a stored procedure to accept parameters and convert data from a staging table to a production table. The parameters specify the table names and a field to lookup in another table. This is the first stored p
-
Own report type (RRI) is not visible in Ta. RSBBS
Hallo all, when I try to implement the BAdI RS_BBS_BADI in the ERP target system according to help http://help.sap.com/saphelp_nw70/helpdata/en/45/e6caeadaf96976e10000000a1553f6/frameset.htm , the then created "Own report type" isn't shown in the app
-
Would like to make the entire ALV Grid invisible.
Hello everyone, I have a screen with 2 alv grids on a custom control. Now when required I would like to hide one or both the alv grid. How can I do this? Custom controls cannot be made invisible. Is there a method in alv which would make the entire
-
Why it is wrong when the number is 121
This are the codes to show it is a prime number or not.i don't know if i enter 121,it get wrong result. //Java core packages import java.awt.*; //Java extension packages import javax.swing.*; public class P3 extends JApplet { //initialize the mod res