Need event example
Hi ,
i learn about event and i want an example how to do it in abap oo,
e.g. trigger event when sales order is created or something else,
maybe someone can help ?
Regards
Hello Ricardo
We can different "flavours" of events in SAP (examples see below):
(1) Workflow Events
You define (or use an existing) workflow for approval of purchase requisitions above a certain threshold (proofreading by a second set of eyes). When a purchase requisition is above this level it automatically triggers a workflow which generated a workitem in the approver's inbox (transaction SO01).
(2) Message Events (transaction NACE)
We have implemented the following event: As soon as the warehouse confirms that a delivery is ready to be shipped to the customer (message received via inbound IDoc) this triggers automatically triggers the ASN (= Advanced Shipping Notification; outbound DESADV IDoc) for the customer.
(3) Change Pointer
You can define for various SAP objects (e.g. material master data) so-called changed pointer meaning that if certain changes occurs in a material master this triggers the generation of an outbound IDoc (e.g. to transmit these changes to another SAP system).
Further readings (not a comprehensive list):
[Event Generation|http://help.sap.com/erp2005_ehp_03/helpdata/EN/04/928c6246f311d189470000e829fbbd/content.htm]
[Using Events|http://help.sap.com/erp2005_ehp_03/helpdata/EN/c5/e4aa8c453d11d189430000e829fbbd/content.htm]
[Important Transaction Codes|http://help.sap.com/erp2005_ehp_03/helpdata/EN/9b/572614f6ca11d1952e0000e82dec10/content.htm]
Please note that this list of event types is likely to be incomplete.
Regards
Uwe
Similar Messages
-
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**************& -
Hello friends,
I need an example of IMAP using Javamail to retieve new mails from an INBOX .Pls send me an example if u have any .Or suggest me the site where i can get an example on it.Hi,
I suggest to look at the demo files in the javamail package.
I think msgshow.java is a good example. -
Need some example of 'SET DATE MASK'.
Hi Gurus,
I need come example of 'SET DATE MASK ' & 'SET TIME MASK'.
Thanking you.
SubashHi Subasha,
/ : SET DATE MASK = 'MMMM DD, YY'
This displays the date as : September 26, 07.
YY Year (2 digits)
YYYY Year (4 Digits)
MM Month (2 Digits)
MMM Month Name (Abbreviated)
MMMM Month Name (Full)
DD Day as two digits
DDD Day name (Abbreviated)
DDDD Day name
Using the SET DATE MASK causes the subsequent date fields to be displayed using the same formatting. To return to the default formatting use the following command:
/: SET DATE MASK = ' '
/: SET TIME MASK = 'HH hrs MM min SS sec'
This displays the time as : 11 hrs 43 min 37 sec'
The following are the codes that can be used in the time mask:
HH Hours
MM Minutes
SS Seconds
The time formatting can be reset to the default setting using:
/: SET TIME MASK = ' ' -
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 -
I need an example of JSR179 implementation for CDC based device
Actually i am trying to develop an LBS(Location based Service) application for Pocket PC that is a CDC based Device,
I searched a lot on internet for any example that could help me but could't found anything usefull information.
I found a lot of stuff for MIDP, i found JSR179 implementation for MIDP but could't found anything for CDC(Connected Device Configuration).
So i need an example of JSR179 implementation for CDC based device. I really need it.
waiting for your help....
thanx
Vivek MishraWhat is it from a business perspective that you are trying to accomplish?
What are you going to do with this data once you get it into the format you're envisioning?
Are you anticipating creating a collection of REC_SET records? Is there a reason that you're not using an associative array keyed on the c2 value (assuming collections are even appropriate to the problem you're trying to solve)?
Justin -
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> -
NWDI Eventing Example using BEx Querys
I have a couple of InfoCubes that have the process chain_id in them. One is details data, the other is summary data.
I'm thinking about displaying the details in an iview and when the user clicks on the chain_id then display other summary data in an iview in a summary form.
I'm guessing this would be an eventing example.
Anyone do this before?
MikeHi,
perhaps, but not for me I believe this is a wrong forum for this question. I still cannot see the relation to NWDI here.
Could you please look for a BEx specific forum and raise the question there?
Thank you and Best Regards,
Ervin -
External/Exec event example needed
I'm using Acrobat 7. I have a form with interactive fields and scripts that loads from a web server. Using the FDF URL extension it also loads some data into the form. For example:
http://192.168.30.106:8080/qforms/pdfs/30799_Appraisal_Form_Template.pdf#FDF=http://192.16 8.30.106:8080/qforms/QFormsServlet?FormID=UJ9538R2WGKXWA3GQMEH&Action=load
I need to run a JavaScript after the FDF is loaded.
The documentation mentions event External/Exec and says:
"This event is the result of an external access, for example, through OLE, AppleScript, or loading an FDF."
Sounds like what I need.
Where should my JavaScript be put so that it can be triggered by that event?
Has anyone got this to work? One example is worth 1000 pages of documentation with no examples.
I have searched the interned for clues but everyone seems to be as clueless as me.
Any help greatly appreciated.
TerryIf the FDF has the associated PDF form file as an internal reference, then you only need to use a URL to open the FDF file and the FDF internal refernce will use that form.
Web Hosting PDFs
How to populate a PDF file's form with data from a web server -
Need Code Example to Call a SAP Remote Function from C#
I'm looking for an example of how to call a SAP RFC from within a C#
program. I've tried numerous searches and have come up empty handed. If I have a function called "MyFunction" and it takes 1 input parameter and returns one output parameter (a table) how would it be coded. I have been able to code the connection and it works so once the connection is established I need to call the funcation. Any pointers are really appreciated. Environment is MS VS Developer 2003, Frameworks 1.1, SAP 4.6C Here is the code so far.
using System;
using SAP.Connector;
using SAP.Connector.Rfc;
using SAP.Connector.Internal;
namespace ConsoleApplication2
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
static void Main(string[] args)
SAP.Connector.Destination dest = new SAP.Connector.Destination();
dest.AppServerHost = "NAFTATEST01.SAP.INTRA";
dest.Client = 300;
dest.SystemNumber = 0;
dest.Username = "myusername";
dest.Password = "mypassword";
SAP.Connector.SAPConnection connSAP = new
SAP.Connector.SAPConnection(dest);
using(connSAP)
try
connSAP.Open();
Console.WriteLine("SAP Connection was opened...");
connSAP.Close();
catch(SAP.Connector.RfcException rfcEx)
Console.WriteLine("SAP Connection was failed...");
Console.WriteLine( rfcEx.Message
+ rfcEx.StackTrace);
Console.WriteLine();hi
Create a Windows Forms application.
Add an empty SAP Connection class with the ABAP functions
RFC_CUSTOMER_GET and RFC_CUSTOMER_UPDATE.
Leave the proxy designer open. Go to the SAP Proxy toolbox and drag the Proxy field icon to the designer.
Rename the new Field1 to Tab. Change the Type property to BRFCKNA1Table. To do this, use the drop down icon.
Note that the ReadOnly property automatically changes to true and the default value changes to new BRFCKNA1Table().
Add a second Proxy Field with the name Filter, the type String and the default value A*.
Select the Rfc_Customer_Get function and click on the button of the Parameters property.
Set the default values of the three parameters with the drop-down icon as follows:
Name1: Filter
Kunnr: Customer_T: _Tab
Save the proxy designer and switch to your Windows form. Add a TextBox, a Button and a DataGrid.
Add an instance of your SAP proxy to your Windows form, add a Destination and set the Connection property as described in A4.
Set the DataSource property of the datagrid to sapProxy11. Set the DataMember property of the datagrid to Tab. Alternatively you can set the DataSource to sapProxy11.Tab and leave the DataMember empty.
For textBox1 use the DataBinding feature to bind the Text property of the textbox to sapProxy11.Filter.
Double-click the button to create an event handler and add a single line:
this.sapProxy11.Rfc_Customer_Get_();
You are using sapProxy11 as a smart DataSet that contains the necessary state. You bind the state to the corresponding controls. The overload method Rfc_Customer_Get_() does not have any parameters, as the required state is already in the bound Proxy Fields.
above statments from standard helpfile,and
in my opinion you need
datagrid1.datasource = yourtable
regards
ajai -
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 -
JTextArea - need event rised on text changed.
I am making an application which contains a JTextArea. when user writes some data on in, some event must be invoked changing the text of the same JtextArea.
Problem is, when i change the text, Java automatically adds to JtextArea typed character, what i don't want.
program works in this way:
user presses "d" on keyboard -> on JTextArea "e" appears.
thanks for help.This is an example of a text area that forces upper case.
You can modify it to your needs.
private static class UpperCaseTextArea extends JTextArea {
protected Document createDefaultModel() {
return new UpperCaseDocument();
static class UpperCaseDocument extends PlainDocument {
public void insertString(int offs, String str, AttributeSet a)
throws BadLocationException {
if (str == null) {
return;
if (str.length() == 1) {
char c = str.charAt(0);
char cUpper = Character.toUpperCase(c);
super.insertString(offs, Character.toString(cUpper), a);
else
super.insertString(offs, str, a);
} -
I need an example for stacking waveforms in onboard memory using MS Visual c for PCI-6115
I would like an example of stacking multiple acquisitions in onboard memory for the PCI-6115 card. This is sometimes referred to as "Multiple Record". It is called "Sequence Waveforms" on Lecroy Scopes. I have done this on other cards before, but not on an NI card.
The example should include a way to accept a trigger, gather x number of samples, and rearm rapidly without transferring any of the just-acquired data. This way I won't miss any trigger events. The onboard memory is sufficient to store all of the waveforms that I need. One the card has acquired n waveforms, I want to DMA them into RAM.
Thanks to anyone that can help!
If you need any more specifics, just le
t me know and I'll post them.I would like an example of stacking multiple acquisitions in onboard memory for the PCI-6115 card. This is sometimes referred to as "Multiple Record". It is called "Sequence Waveforms" on Lecroy Scopes. I have done this on other cards before, but not on an NI card.
The example should include a way to accept a trigger, gather x number of samples, and rearm rapidly without transferring any of the just-acquired data. This way I won't miss any trigger events. The onboard memory is sufficient to store all of the waveforms that I need. One the card has acquired n waveforms, I want to DMA them into RAM.
Thanks to anyone that can help!
If you need any more specifics, just le
t me know and I'll post them. -
Need an example of server / client program with swing interface
Hi!
After a lot of trying i still haven't managed to create a server client program using swing components ...
can someone write a mini application to demonstrate how this can be done?
i would like to have a frame with a button a texField for input and a textAread for the output
What i have in mind is the following ..
say im the server
i write something in the textField and then i press the button
then the information written in the textFiled is passed to the client who shows it in his textArea
The same thing goes on with the client (he can write something in his own textField and when he presses the button the info is passed at the
server who puts it in his textArea) and vice versa.
i have written many classes that trying unsuccessfully to do that ... below i show my last attempt ...
I would appreciate if you could write a small application which it could to this.
The whole idea is to create a turn based game ( i have implemented the game engine and graphics and i try to add the internet function)
Here is the code ...( i would appreciate if you write a new code instead of trying to correct mine ( which i think it's impossible) in order to use it as a general example)
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
@SuppressWarnings("serial")
* In order to have a more gereral program instead of passing strings between the server
* and the client a pass an MyObjext object. The MyObject class has an integer and a String
* (which is always the same) field . At the textField i write an integer number and i
* make a new MyObject which i want to pass to the server or the client and vice versa.
* The textArea shows the integer value of the MyObject which was passed from the server /client
public class MyUserInterface extends JFrame {
MyObject returnObject;
JTextField myTextField;
JTextArea te ;
ClientGame cg;
ServerGame sg;
* used to determine if the current instance is running as a client or host
boolean isHost;
//The constructor of the client
public MyUserInterface(ClientGame cg){
this("Client");
this.cg = cg;
isHost = false;
//The constructor of the server
public MyUserInterface(ServerGame sg){
this("Server");
this.sg = sg;
isHost = true;
//The general constructor used both by client and server ..
// it initializes the GUi components and add an actionListenr to the button
public MyUserInterface(String str) {
super(str);
myTextField = new JTextField(2);
te = new JTextArea();
te.setPreferredSize(new Dimension(100,100));
JButton okButton = new JButton("Ok");
okButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try{
int a = Integer.parseInt(MyUserInterface.this.myTextField.getText());
System.out.println(a); //used to control the flow of the program
MyUserInterface.this.returnObject = new MyObject(a);
//sends the data
sendData();
//waiting for response...
getData();
catch(Exception ex){System.out.println("Error in the UI action command" +
ex.printStackTrace();}
JPanel panel = new JPanel(new FlowLayout());
panel.add(okButton);
panel.add(myTextField);
panel.add(te);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().add(panel);
pack();
setVisible(true);
protected MyObject getReturnObject() {
return returnObject;
public void sendData(){
new Thread(new Runnable() {
@Override
public void run() {
if (!isHost)cg.sentData(returnObject); //using the Servers out and in methods
else sg.sentData(returnObject); //using the Clients out and in methods
System.out.println("data sending");
public MyObject getData(){
MyObject obj;
System.out.println("Retrieveing Data");
if (!isHost)obj = (MyObject)cg.getData();
else obj = (MyObject)sg.getData();
System.out.println(" data retrieved = "+ obj.getInt()); //just to control how the code flows
te.setText(obj.getInt()+"");
return obj;
public static void main(String[] args) {
*Initiating the Server
new Thread(new Runnable() {
@Override
public void run() {
ServerGame sg = new ServerGame();
new MyUserInterface(sg);
}).start();
* Initiating the Client
new Thread(new Runnable() {
@Override
public void run() {
ClientGame cg = new ClientGame("192.168.178.21"); //<----in case you run my code
//..don't forget to change to your
new MyUserInterface(cg); //ip
}).start();
import java.io.*;
import java.net.*;
public class ClientGame {
String ipAddress;
Socket clientSocket = null;
ObjectOutputStream out = null;
ObjectInputStream in = null;
public ClientGame(String ipAddress) {
this.ipAddress = ipAddress;
try {
System.out.println("Connecting To Host");
clientSocket = new Socket(InetAddress.getByName(ipAddress),4444);
System.out.println("Host Found ...Io initializaton");
out = new ObjectOutputStream(clientSocket.getOutputStream());
in = new ObjectInputStream(clientSocket.getInputStream());
} catch (UnknownHostException e) {
System.err.println("Don't know about host: taranis.");
System.exit(1);
} catch (IOException e) {
System.err.println("Couldn't get I/O for the connection to: taranis.");
System.exit(1);
public Object getData(){
Object fromServer = null ;
do{
try {
fromServer = in.readObject();
catch(ClassNotFoundException ex){}
catch(IOException e){}
}while(fromServer==null);
return fromServer;
public void sentData(final Object obj){
new Thread(new Runnable() {
@Override
public void run() {
try{
out.writeObject(obj);
catch(IOException e){}
}).start();
public void terminateConnection(){
try{
out.close();
in.close();
clientSocket.close();
catch (IOException e){}
public class ServerGame {
ServerSocket serverSocket;
Socket clientSocket;
ObjectOutputStream out = null;
ObjectInputStream in = null;
public ServerGame() {
try{
serverSocket = new ServerSocket(4444);
clientSocket = serverSocket.accept();
out = new ObjectOutputStream(clientSocket.getOutputStream());
in = new ObjectInputStream(clientSocket.getInputStream());
catch(IOException e){System.out.println("IOException in ServerGame");}
public Object getData(){
Object fromClient = null ;
do{
try {
fromClient = in.readObject();
catch(ClassNotFoundException ex){}
catch(IOException e){}
}while(fromClient==null);
return fromClient;
public void sentData(final Object obj){
new Thread(new Runnable() {
@Override
public void run() {
try{
out.writeObject(obj);
catch(IOException e){}
}).start();
public void terminateConnection(){
try{
out.close();
in.close();
clientSocket.close();
serverSocket.close();
catch (IOException e){}
public static void main(String[] args) {
new ServerGame();
import java.io.Serializable;
* this is a test object
* it has a String field and a value
* The string is always the same but the integer value is defined in the constructor
public class MyObject implements Serializable{
private static final long serialVersionUID = 1L;
String str;
int myInt;
MyObject(int a){
str = "A String";
myInt = a;
public int getInt(){
return myInt;
}Pitelk wrote:
I believe that a good code example can teach you things ;that you would need many days of searching; in no timeSo lets write one small example.. Ill help a little, but you do most of the work.
jverd approach is deffenetly the way to go.
jverd wrote:
* Write a very small, simple Swing program with an input area, an output area, and a button. When you click the button, what's in the input area gets copied over to the output area.This part is partially done.
* Write a very small, simple client/server program without Swing. It should just send a couple of hardcoded messages back and forth.And this part is for you(Pitelk) to continue on. I cannot say that this is the best way. or that its good in any way. I do however like to write my client/server programs like this. And perhaps, and hopefully, Ill learn something new from this as well.
This is how far I got in about 10-20min..
package client;
* To be added;
* A connect method. That connects the client to the server and
* opens up both the receive and transmit streams. After doing that
* the an instance of the ServerListener class should be made.
* Also an disconnect method could be usable. But thats a later part.
public class TestClass1 {
package utils;
import java.io.ObjectInputStream;
import client.TestClass1;
* This class is meant to be listening to all responses given from
* the server to the client. After a have received data from the
* server. It should be forwarded to the client, in this case
* TestClass1.
public class ServerListener implements Runnable {
public ServerListener(ObjectInputStream in, TestClass1 tc) {
@Override
public void run() {
while(true) {
package server;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
* This class should handle all data sent to the server from the clients.
class Server implements Runnable {
private static List<ObjectOutputStream> outStreams = new ArrayList<ObjectOutputStream>();
private Socket client = null;
public Server(Socket client) {
this.client = client;
@Override
public void run() {
while(true) {
* The meaning of this class is to listen for clients trying to connect
* to the server. Once connection is achieved a new thread for that client
* should be made to listen for data sent by the client to the server.
public class ChatServer implements Runnable {
@Override
public void run() {
while(true) {
package utils;
import java.io.Serializable;
@SuppressWarnings("serial")
public class MyObject implements Serializable {
private String mssg;
private String clientID;
private String clientName;
public MyObject(String mssg, String clientID, String clientName) {
this.mssg = mssg;
this.clientID = clientID;
this.clientName = clientName;
//Generate getters and setters..
}Continue on this, and when you get into problems etc post them. Also show with a small regular basis how far you have gotten with each class or it might be seen as you have lost intresst and then this thread is dead.
EDIT: I should probably also say that Im not more than a java novice, at the verry most. So I cannot guarantee that I alone will be able to solve all the problems that might occure during this. But Im gonna try and help with the future problems that may(most likely will) occure atleast(Trying to reserve my self incase of misserable failiure from me in this attempt).
Edited by: prigas on Jul 7, 2008 1:47 AM -
Need an example of AS3 to duplicate form
I have been trying to solve this problem for 4 days to no avail. The entire site is done with the exception of this one hangup. I need to have 2 email forms on 2 different places in the timeline going to 2 different addresses. I have the PHP for both, but am having problems getting the 2nd form to function.
When I try to reuse the same code for the 2nd email, I get a load of errors regarding duplicate functions.
Can anybody edit, copy and paste an example of the following script (the one that works with the first form). I believe can figure out the instance name changes, etc. if I have something to work with.
I am a total newbie and don't know a thing about AS3 and I have a hard time understanding the explanations. I just need a script that won't conflict with the first form as duplicating functions etc. Thanks (PS: The string in red is for the 1st email form. I also have a PHP file "send_email_02.php" for the 2nd email form.
stop();
contact_name.text = contact_email.text = contact_subject.text =
contact_message.text = message_status.text = "";
send_button.addEventListener(MouseEvent.CLICK, submit);
reset_button.addEventListener(MouseEvent.CLICK, reset);
var timer:Timer;
var var_load:URLLoader = new URLLoader;
var URL_request:URLRequest = new URLRequest( "send_email.php" );
URL_request.method = URLRequestMethod.POST;
function submit(e:MouseEvent):void
if( contact_name.text == "" || contact_email.text == "" ||
contact_subject.text == "" || contact_message.text == "" )
message_status.text = "Please complete all text fields.";
else if( !validate_email(contact_email.text) )
message_status.text = "Please enter a valid email address.";
else
message_status.text = "sending...";
var email_data:String = "name=" + contact_name.text
+ "&email=" + contact_email.text
+ "&subject=" + contact_subject.text
+ "&message=" + contact_message.text;
var URL_vars:URLVariables = new URLVariables(email_data);
URL_vars.dataFormat = URLLoaderDataFormat.TEXT;
URL_request.data = URL_vars;
var_load.load( URL_request );
var_load.addEventListener(Event.COMPLETE, receive_response );
function reset(e:MouseEvent):void
contact_name.text = contact_email.text = contact_subject.text =
contact_message.text = message_status.text = "";
function validate_email(s:String):Boolean
var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
var r:Object = p.exec(s);
if( r == null )
return false;
return true;
function receive_response(e:Event):void
var loader:URLLoader = URLLoader(e.target);
var email_status = new URLVariables(loader.data).success;
if( email_status == "yes" )
message_status.text = "Success! Your message was sent.";
timer = new Timer(500);
timer.addEventListener(TimerEvent.TIMER, on_timer);
timer.start();
else
message_status.text = "Failed! Your message was not sent.";
function on_timer(te:TimerEvent):void
if( timer.currentCount >= 10 )
contact_name.text = contact_email.text = contact_subject.text =
contact_message.text = message_status.text = "";
timer.removeEventListener(TimerEvent.TIMER, on_timer);There are several ways to do this. The way that I like best is using a User Setting.
1) Pick a name for your setting.
2) Enter the name of the setting in the web service configuration for the two (or more) web services that want to share the setting. Any portlet that needs to "see" the setting must have it specified its web service configuration.
3) When a user clicks on a link in one of your portlets, set the setting: IPortletResponse.SetSettingValue(SettingType.User, "settingName", "settingValue")
4) In another portlet, get the setting and display it: IPortetRequest.GetSettingValue(SettingType.User, "settingName")
The nice thing about doing it this way is that even if your portlets are set to be cached "forever," they will change whenever you change the user setting (assuming you followed step 2).
Hope this helps,
Chris Bucchere
[email protected]
Bucchere Development Group
http://www.bucchere.com| 415.516.3941
Maybe you are looking for
-
Problems with flashing MS-6593 (KT3 Ultra2-C)
I wan't to flash my motherbord! I have 2400+ XP procesor (max for the MB) and use win XP! I did exactly as it's written in the manual! Like this... "For WinXP, you can make a DOS boot disk. Go to Your Computer, right click drive A:, select Format, se
-
Send Customer Payment document to external application.
Dear All, I am working on one of our customer requirement to send Customer Payment data from SAP ECC 6.0 to their application using SAP PI 7.0 I have created a customer Invoice (in Transaction Code FB70) without any reference document . Now I want t
-
Motin 5-How can i make a travel animation in a long image file (tiff 31978 x 576)
Hello out there, I am trying to make a travelling camerasequence. But have problem achieving any good result. At the moment I am stuck with a pixelized image on the canvas. Any hint or procedure will be highly welcomed. Thnx in advance Plumum
-
Is there a need for internet on iphone while you wan to locate it when you lost your iphone?
I lost my iphone and I am trying to locate my iphone using the Icloud-Find my iphone, but it shows offline, so I just wanna know if is there a need for internet service on iphone or it works with the location service only?? Cz it shows offline, help
-
Sell apps in Apple and Android uses the same application ID?
Hi, I want to sell folios in Apple and the same folio is free - still - to Android tablets. Then I need produce these app with different application ID, right? So these folios will show alike buy in Android tablets, because I publish as retail and pu