Embedding assembly in C code using V.S 2008
Hello,
I created a console application prject with V.S 2008 and copied the following code from MSDN:
https://msdn.microsoft.com/en-us/library/5f7adz6y.aspx
// asm_overview.cpp
// processor: x86
void __declspec(naked) main()
// Naked functions must provide their own prolog...
__asm {
push ebp
mov ebp, esp
sub esp, __LOCAL_SIZE
// ... and epilog
__asm {
pop ebp
ret
When I tried to debug it, there is an exception upon the 'ret' line.
What am I doing wrong ?
How can I create an assembly routine that returns a value ?
Best regards,
Z.V
On 2/21/2015 4:28 PM, "Z. V" wrote:
[code]
// asm_overview.cpp
// processor: x86
void __declspec(naked) main()
// Naked functions must provide their own prolog...
__asm {
push ebp
mov ebp, esp
sub esp, __LOCAL_SIZE
// ... and epilog
__asm {
pop ebp
ret
You are missing "mov esp, ebp" in your epilog. You aren't restoring ESP to its original state (which is the whole point of saving the original value in EBP).
Igor Tandetnik
Similar Messages
-
[b]Tutorial:[/b] Simplify Developing OLE Automation Code Using VBA
INTRODUCTION
Automating Office applications from Oracle Forms can be a tedious, frustrating, and time-consuming process. Because the OLE2 and CLIENT_OLE2 built-ins do not validate the automation commands that they relay, code that compiles without errors often dies at runtime with a not-so-helpful error code. This tutorial will demonstrate how to simplify the development of automation code using a tool that ships with all Microsoft Office editions -- the Visual Basic for Applications (VBA) IDE.
The VBA IDE, a core Office component, is a full-fledged development environment featuring code completion, basic syntax highlighting, context-driven help and a runtime debugger. Its Object Browser provides a convenient means of browsing the Word object model, as well as searching by keyword.
For those who may not interested in following this tutorial in detail, I would like to stress the usefulness of the Object Browser as a tool for inspecting the functions supported by OLE server applications and, perhaps more importantly, valid values for function arguments. Whether/not anyone buys the assertion that starting with VBA prototypes is far more productive than pounding out OLE2 code from the very start, they will find the Object Browser invaluable as a reference -- I rely on it exclusively for this sort of documentation.
A BRIEF INTRODUCTION TO THE VBA IDE & THE OBJECT BROWSER UTILITY
Try this:
1. Open Word
2. Launch the VBA IDE by pressing <Alt><F11>
3. Open the Object Browser by pressing <F2>
The Object Browser allows you to visually navigate Word's class hierarchy. Its user interface is a bit crowded, so controls are unlabeled. Hovering the mouse cursor above a control will display a tooltip explaining that control's purpose. The browser's scope can be narrowed by using the Project/Library combo. Typing a keyword or substring in the Search Text combo and clicking on the Search button will cause all classes/members whose name contains the specified search text to be listed in the Search Results pane. Selecting an item from this list will update the two panes below it, showing the selected class, and its members. Beneath the Classes and Members panes is an untitled pane, gray in color, which displays details for the selected class/member, including hyperlinks to relevant information such as arguments, their types and allowable values. If Visual Basic Help is installed, pressing <F1> will display help on a selected class/member. (This feature can be installed from your Office install CD, if necessary.)
NOTE: While it is possible to cut-and-paste the code examples that follow, I highly recommend that they be typed in by hand. Doing so will provide a better understanding of how the IDE's code completion behaves. Use code completion most efficiently by not using the mouse or <Enter> key when selecting from completion lists. Instead, just type enough letters to select the desired list element, then continue along as if you had typed the entire element, typing the next operator in your statement. It really is slick!
HELLO WORLD - VBA-STYLE
1. Open Word
2. Launch the VBA IDE by pressing <Alt><F11>
3. Select Module from the Insert menu.
4. In the blank area that appears, enter the following code:
Public Sub HelloWorld()
Documents.Add
Selection.TypeText ("Hello, world!")
End Sub5. Press <F5> to run the code.
If you switch back to Word by pressing <Alt><F11>, there should appear a newly-created document containing the text Hello, world!.
A MORE AMBITIOUS EXAMPLE
In this example, we will launch Word, type some text, and alter its formatting. For the purposes of this tutorial, consider it the process we wish to automate from within Forms.
1. If Word is running, close it.
2. Open any Office application except Word, such as Excel, Outlook or PowerPoint
3. Launch the VBA IDE by pressing <Alt><F11>.
4. Select References from the Tools menu -- a dialog should pop up.
5. From within this dialog, locate and select Microsoft Word <version> Object Library, then click OK.
6. Select Module from the Insert menu.
7. In the blank area that appears, enter the following code:
Public Sub LaunchWord()
Dim app As Word.Application
Set app = CreateObject("Word.Application")
app.Visible = True '!!! IMPORTANT !!!
app.Documents.Add
With app.Selection
.TypeText "This is paragraph 1."
.TypeParagraph
.TypeText "This is paragraph 2."
.TypeParagraph
.TypeText "This is paragraph 3."
End With
With ActiveDocument
.Paragraphs(1).Range.Words(3).Bold = True
.Paragraphs(2).Range.Words(3).Italic = True
.Paragraphs(3).Range.Words(3).Underline = True
End With
End Sub8. Press <F5> to run the code.
A new Word session should have been launched. Switch to it, to view the results of our handiwork!
TAILORING VBA CODE INTENDED FOR OLE2 CONVERSION
Now, things get a bit uglier. The code listed above gives a good idea of how concise VBA code can be, but With blocks and chained object references do not translate readily into OLE2 code. Here's the same process, rewritten in a more OLE2-friendly style. Note the numerous intermediate object references that have been declared.
Public Sub LaunchWord()
Dim app As Word.Application
Dim doc As Word.Document
Dim docs As Word.Documents
Dim pars As Word.Paragraphs
Dim par As Word.Paragraph
Dim wrds As Word.Words
Dim sel As Word.Selection
Dim rng As Word.Range
Set app = CreateObject("Word.Application")
app.Visible = True '!!! IMPORTANT !!!
Set doc = app.Documents.Add
Set sel = app.Selection
sel.TypeText "This is paragraph 1."
sel.TypeParagraph
sel.TypeText "This is paragraph 2."
sel.TypeParagraph
sel.TypeText "This is paragraph 3."
Set pars = doc.Paragraphs
'select third word of first paragraph and make it bold
Set par = pars.Item(1)
Set rng = par.Range
Set wrds = rng.Words
Set rng = wrds.Item(3)
rng.Bold = True
'select third word of second paragraph and italicize it
Set par = pars.Item(2)
Set rng = par.Range
Set wrds = rng.Words
Set rng = wrds.Item(3)
rng.Italic = True
'select third word of second paragraph and underline it
Set par = pars.Item(3)
Set rng = par.Range
Set wrds = rng.Words
Set rng = wrds.Item(3)
rng.Underline = True
End Sub
TRANSFORMATION: CONVERTING VBA CODE INTO PL/SQL
Here is the PL/SQL counterpart to our previous VBA routine. Compare printouts of the two and note their similarities. Notice the need for argument lists -- this causes the code to fluff up quite a bit, and really interferes with readability.
PROCEDURE LAUNCH_WORD IS
v_app OLE2.OBJ_TYPE; -- Application
v_doc OLE2.OBJ_TYPE; -- Document
v_docs OLE2.OBJ_TYPE; -- Documents collection
v_pars OLE2.OBJ_TYPE; -- Paragraphs collection
v_par OLE2.OBJ_TYPE; -- Paragraph
v_wrds OLE2.OBJ_TYPE; -- Words collection
v_sel OLE2.OBJ_TYPE; -- Selection
v_rng OLE2.OBJ_TYPE; -- Range
v_args OLE2.LIST_TYPE; -- OLE2 argument list
BEGIN
/* launch Word and MAKE IT VISIBLE!!! */
v_app := OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY(v_app, 'Visible', TRUE);
/* initialize key object references */
v_docs := OLE2.GET_OBJ_PROPERTY(v_app, 'Documents');
v_doc := OLE2.INVOKE_OBJ(v_docs, 'Add');
v_sel := OLE2.GET_OBJ_PROPERTY(v_app, 'Selection');
/* type first paragraph */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 'This is paragraph 1.');
OLE2.INVOKE(v_sel, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
OLE2.INVOKE(v_sel, 'TypeParagraph');
/* type second paragraph */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 'This is paragraph 2.');
OLE2.INVOKE(v_sel, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
OLE2.INVOKE(v_sel, 'TypeParagraph');
/* type third paragraph */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 'This is paragraph 3.');
OLE2.INVOKE(v_sel, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
/* set reference to Paragraphs collection */
v_pars := OLE2.GET_OBJ_PROPERTY(v_doc, 'Paragraphs');
/* select third word of first paragraph and make it bold */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 1);
v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
OLE2.DESTROY_ARGLIST(v_args);
v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 3);
v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
OLE2.SET_PROPERTY(v_rng, 'Bold', TRUE);
/* select third word of second paragraph and italicize it */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 2);
v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
OLE2.DESTROY_ARGLIST(v_args);
v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 3);
v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
OLE2.SET_PROPERTY(v_rng, 'Italic', TRUE);
/* select third word of second paragraph and underline it */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 3);
v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
OLE2.DESTROY_ARGLIST(v_args);
v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, 3);
v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
OLE2.SET_PROPERTY(v_rng, 'Underline', TRUE);
END;
REFACTORING FOR REUSABILITY AND READABILITY
While the previous procedure runs without errors, it suffers from poor readability which, in turn, makes it difficult to maintain. Here, we address those issues by moving repetetive low-level operations into separate procedures.
PROCEDURE LAUNCH_WORD IS
v_app OLE2.OBJ_TYPE; -- Application
v_doc OLE2.OBJ_TYPE; -- Document
v_docs OLE2.OBJ_TYPE; -- Documents collection
v_sel OLE2.OBJ_TYPE; -- Selection
v_args OLE2.LIST_TYPE; -- OLE2 argument list
BEGIN
/* launch Word and MAKE IT VISIBLE!!! */
v_app := OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY(v_app, 'Visible', TRUE);
/* create a new Word document */
v_docs := OLE2.GET_OBJ_PROPERTY(v_app, 'Documents');
v_doc := OLE2.INVOKE_OBJ(v_docs, 'Add');
v_sel := OLE2.GET_OBJ_PROPERTY(v_app, 'Selection');
/* add a few paragraphs */
PRINT_PARAGRAPH(v_sel, 'This is paragraph 1.');
PRINT_PARAGRAPH(v_sel, 'This is paragraph 2.');
PRINT_PARAGRAPH(v_sel, 'This is paragraph 3.');
/* apply formatting */
APPLY_FORMATTING(v_doc, 1, 3, 'Bold', TRUE);
APPLY_FORMATTING(v_doc, 2, 3, 'Italic', TRUE);
APPLY_FORMATTING(v_doc, 3, 3, 'Underline', TRUE);
END;
PROCEDURE APPLY_FORMATTING(
v_doc OLE2.OBJ_TYPE,
v_paragraph_num NUMBER,
v_word_num NUMBER,
v_attribute VARCHAR2,
v_value BOOLEAN) IS
v_pars OLE2.OBJ_TYPE; -- Paragraphs collection
v_par OLE2.OBJ_TYPE; -- Paragraph
v_wrds OLE2.OBJ_TYPE; -- Words collection
v_rng OLE2.OBJ_TYPE; -- Range
v_args OLE2.LIST_TYPE; -- OLE2 argument list
BEGIN
/* set reference to Paragraphs collection */
v_pars := OLE2.GET_OBJ_PROPERTY(v_doc, 'Paragraphs');
/* get specified paragraph */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, v_paragraph_num);
v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
OLE2.DESTROY_ARGLIST(v_args);
/* get words for specified paragraph */
v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
/* apply formatting to word found at specified index */
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, v_word_num);
v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
OLE2.SET_PROPERTY(v_rng, v_attribute, v_value);
END;
PROCEDURE PRINT_PARAGRAPH(v_sel OLE2.OBJ_TYPE, v_text VARCHAR2) IS
v_args OLE2.LIST_TYPE;
BEGIN
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, v_text);
OLE2.INVOKE(v_sel, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
OLE2.INVOKE(v_sel, 'TypeParagraph');
END;
CONCLUSION
It is my hope that this tutorial, despite it's introductory nature, has demonstrated the value of the VBA IDE, the ease with which automation processes can be prototyped using VBA, the noticeable similarity between VBA automation routines and their Forms PL/SQL counterparts, and the advantages of testing automation processes within the VBA IDE. Please feel free to follow up with any specific questions or concerns you may have.
Thanks,
Eric Adamson
Lansing, Michigan
FINAL NOTE: These examples use the OLE2 built-in, and will operate correctly when called from forms running in the Form Builder OC4J. Deploying them to an Oracle Application Server will launch Word on the server itself (if available), which is usually not the developer's intent! Automating Word client-side via web forms requires adding WebUtil support. Adapting the code for WebUtil is trivial -- just replace all instances of OLE2 with CLIENT_OLE2. Adapting forms for WebUtil and configuring OLE support into your Oracle Application Server, however, are beyond the scope of this tutorial.
REVISION HISTORY
This promises to be something of a 'living document'. I've snuck changes through without comment in the past, but in the future, I'll try to document significant changes here.
2006-08-21
* Prefaced boring subject line with text: 'Tutorial:' to clarify purpose
* Added emphasis on value of Object Browser as a referenceThanks James, for your kind words. I do hope this information will help folks out. I honestly believe that tinkering around in the VBA IDE will prove highly gratifying for automation developers. It can be assured that learning to make Word jump through hoops is much more straight-forward in this environment. I'm not one for mottos, but if I were pressed for a cheesy motto, I would say: First, make it work. Then, make it work in Oracle!
Once the idea has sunk in, that Visual Basic routines for automating Word are exact analogs to their OLE2 counterparts, we can remove keywords like Oracle and PL/SQL from our Google searches on Word automation which, at least in this context, are the proverbial kiss of death. Suddenly we find ourselves liberated by the possibility of steal-, ahem... borrowing ideas from the Visual Basic* community!
As for links, my link of choice is invariably http://groups.google.com -- if you don't already use it at least ten times a day, you must try it. This is the venerable USENET archive, including the holdings of now-extinct DejaNews. Another possible site of interest is http://word.mvps.org/FAQs/MacrosVBA, which may serve as a good starting point for those who wish to learn how to do fancy tricks with Word using VBA.
If these links don't prove immediately helpful, please feel free to give specifics on the sort of operations you are interested in automating, and I'll see if I can post an example that addresses it.
Regards,
Eric Adamson
Lansing, Michigan
PS: I do hope, as people read my posts, with every other acronym being VBA, that they are not mistakenly hearing a call to learn Visual Basic. I say this, not because I believe learning VB would be a Bad Thing, but because I assume that few of us feel we have the time to learn a new programming language. Despite having come to the Oracle camp already knowing VB/VBA, and having acquired a fair bit of experience with automating Office applications as an Access developer, I remain confident that what I am suggesting people attempt does not rise to the level of learning a language. What I am suggesting is that they learn enough of the language to get by.
*VB vs. VBA
Just a quick word on this, as readers may wonder why I seem to use these terms interchangeably. Visual Basic (VB) can refer to either a development platform or a programming language. Visual Basic for Applications (VBA) is a language -- more precisely, it is a subset of the Visual Basic language. One purchases VB, usually quite intentionally. VBA is included with Microsoft Office, as is VBA's development environment, the VBA IDE. The key distinction between VB and VBA is that VBA cannot be used to create self-contained executables. Rather, VBA relies on VBA-enabled applications, such as Microsoft Office applications, to serve as a container for VBA code, and to provide a runtime environment for that code. For the purposes of discussing OLE Automation, VB and VBA are quite interchangeable. -
Error in linking C++ STL code using CC 5.0 on Solaris 2.6
Hi All,
When building a shared dynamic library from C/C++ code using
STL features, I get an a link error, referring to the STL objects in
use.
I use CC WorkShop C++ Compiler 5.0 running on Solaris 2.6.
For example:
using a vector<int> we get :
Undefined Symbol
__1cDstdGvector4Cin0AJallocator4Ci___M__insert_aux6Mpirki_v_
In File aaa.o
using a multimap<int,int> we get :
Undefined Symbol
__1cH__rwstdJ__rb_tree4CinDstdEpair4CkiCi__n0AL__select1st4n0C_Ci__n0BEless4Ci__n0BJallocator4n0C____U__deallocate_buffers6M_v_
In File aaa.o
etc.
Switching (for testing) from shared lib to an exe does not seem
to solve this issue.
Same goes for toggling libCstd & libCrun's link mode (dyn/stat).
Any suggestions would be appreciated!
Thank you,
GiladHi Gilad,
I have a suggestion concerning the std::vector::__insert_aux error:
http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5069680
Some recommended link options are provided in:
http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5104725
Hope this is useful.
Bye. -
Creation of New company code using EC01
Hi
While creating a new company code using EC01, I am getting several messages relating to Number ranges. All the message relate to number range object type 5 & 6. After all these messages, the final message says that 86 number ranges have not been copied. Can some one throw some light on this?
Regards
RaviHi,
You can ignore these messages; if you use EC01 the system copies all possible tables that are registered as company-dependent. Some of these tables might be not in use at all.
Regards,
Eli -
How can i write the below code using "For all entries"
Hi
How can we write the below code using "for all entries" and need to avoid joins...
Please help
SELECT aaufnr aobjnr aauart atxjcd a~pspel
agstrp awerks carbpl cwerks
INTO TABLE t_caufv
FROM caufv AS a
INNER JOIN afih AS b
ON aaufnr = baufnr
INNER JOIN crhd AS c
ON bgewrk = cobjid
AND c~objty = 'D'
WHERE ( a~pspel = space
OR a~txjcd = space
OR NOT a~objnr IN
( select OBJNR from COBRB AS e
WHERE objnr = a~objnr ) )
AND a~werks IN s_plant
AND a~auart IN s_wtype
AND NOT a~objnr IN
( select OBJNR from JEST AS d
WHERE objnr = a~objnr
AND ( dstat = 'A0081'OR dstat = 'A0018' )
AND d~inact 'X' ).
Reward points for all helpfull answers
Thanks
Ammi.Hi,
SELECT objnr objid aufnr
from afih
into table t_afih.
SELECT objnr
from JEST
into table t_JEST
where stat = 'A0045'
OR stat = 'A0046'
AND inact 'X'.
SELECT objnr
from COBRB
into table t_cobrb.
SELECT arbpl werks objid objty
from crhd
INTO table it_crhd
FOR ALL ENTRIES IN it_afih
WHERE objty eq 'D'
AND gewrk = it_afih-objid.
SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
FROM caufv
INTO table t_caufv
FOR ALL ENTRIES IN it_afih
WHERE aufnr = it_afih-aufnr
And pspel = ' '
AND txjcd = ' '
ANd objnr ne it_crhd-objnr
AND auart in s_wtype
AND werks in s_plant.
AND objnr ne it_jest-objnr.
dont use NE in the select statements, it may effect performance also. Instead use if statements inside
loops.
loop at t_caufv.
read table it_chrd............
if t_caufv-objnr ne it_chrd-objnr.
read table it_jest..........
if if t_caufv-objnr ne it_jest-objnr.
(proceed further).
endif.
endif.
endloop.
hope this helps.
Reward if useful.
Regards,
Anu -
ABAP proxy code using internal table
Hi XI guru's,
Good Afternoon,
My Scenario is ABAP Proxy to file using ztable.
i am getting data from Sap R/3 data base as Ztable. using this Ztable i have to write ABAP Proxy code. I generated ABAP Proxy and mentioned all below.Please send me ABAP Proxy code using this details. This is very urgent. Please help me.
ABAP proxy class: zco_mioa_tata
structure : zmt_tata
structure : zdt_tata
structure : zdt_tata_employee
Table : zdt_tata_employee_tab
Ztable : zcnu_proxy_table
outbound structure:
mt_tata
employee
thanks and regards
saiSai,
I guess this will help you.
1. Proxies can be a server proxy or client proxy. In our scenarios we require proxies to send or upload the data from/into SAP system.
2. One more thing proxies can be used if your WAS ≥ 6.2.
3. Use Tcode SPROXY into R/3 system for proxy use.
4. To send the data from R/3 system we use OUTBOUND PROXY. In Outbound proxy you will simply write an abap code to fetch the data from R/3 tables and then send it to XI. Below is the sample code to send the data from R/3 to XI.
REPORT zblog_abap_proxy.
DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
CREATE OBJECT prxy.
DATA it TYPE zblogemp_profile_msg.
TRY.
it-emp_profile_msg-emp_name = 'Sarvesh'.
it-emp_profile_msg-empno = '01212'.
it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = it.
commit work.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY.
Receiver adapter configurations should be done in the integration directory and the necessary sender/receiver binding should be appropriately configured. We need not do any sender adapter configurations as we are using proxies.
5. To receive data into R/3 system we use INBOUND PROXY. In this case data is picked up by XI and send it to R/3 system via XI adapter into proxy class. Inside the inbound proxy we careate an internal table to take the data from XI and then simply by using the ABAP code we update the data inot R/3 table. BAPI can also be used inside the proxy to update the data into r/3.
I hope this will clear few doubts in proxy.
Just go through these links:
http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
ABAP Server Proxies By Siva Maranani
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
/people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
File to R/3 via ABAP Proxy with good example
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
Generating java proxies..
/people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
/people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
Synchronous Proxies:
Outbound Synchronous Proxy
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-%2bpurchase%2border%2bsend
Inbound Synchronous Proxy
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2binbound%2bprogram%2b-%2bsales%2border%2bcreation
Regards,
Sarvesh -
Transaction Codes used for clearing Open Items
Hi Gurus,
I want to know all the T.Codes used for clearing normal transactions and Open Items. Please tell me when to use which code (viz., while clearing vendors, customers, WH Tax, etc)
Your earliest reply will be of great help. and naturally i will award you
Thank youHi,
F-03 Clear G/L Account
F-04 Post with Clearing
F-30 Post with Clearing
F-32 Clear Customer
F-39 Clear Customer Down Payment
F-44 Clear Vendor
F-51 Post with Clearing
F-54 Clear Vendor Down Payment
F-91 Asset Acquis. Posted w/Clearing Acct
F.13 Automatic Clearing without Currency
F.19 G/L: Goods/Invoice Received Clearing
F13E Automatic Clearing With Currency
F13L Autom. Clearing Spec. to Ledger Grp
Regards,
Eli -
Unit Test code using wrong persistence unit
In the midst of learning Maven, I created a simple application in which I am using JPA (Java Persistence 1.0.2) with EclipseLink implementation (2.0.2).
Note: This is an Application Managed environment. So I manually control EntityManager's life cycle.
The persistence.xml file used by the main source code is different from the one that unit test code uses. Main code uses an Oracle DB and the test code uses an in-memory Derby.
Running unit tests was updating the Oracle DB (!) and I eventually managed to fix that by using two different persistence-units in the XML files.
However, I don't understand why that fixed the problem. I manually create and shut down the entity managers and they are not running concurrently. I'm pretty sure Maven (or the way I set it up) doesn't mess up the resources (XML files). In fact by looking at Maven's debug output I can see it's using the right XML file for unit tests.
Could someone enlighten me, please?Do you have both persistence.xml files on your classpath? If so, and they contain the same name for their respective persistence units, you should be getting a warning or error since they must have unique names. There is no way to tell which one you want to access otherwise.
Best Regards,
Chris -
Simple source codes using JAXM Provider
Hi guys,
I am new to this technology. I looked around the web for simple codes using JAXM Provider but not luck. I will appreciate your help if someone out there have working example using JAXM service Provider.
Thanks in advance...FileDataSource fds=new FileDataSource("abc.txt");
DataHandler xx = new DataHandler(fds);
MimeMultipart mp = new MimeMultipart();
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setDataHandler(xx);
mbp1.setFileName("abc.txt");
mp.addBodyPart(mbp1); -
Which table stores VAT number entered for a company code using T Code oby6?
Hi
Which table stores VAT number entered for a company code using T Code oby6?
please advice.
Thanks,
VaishnaviT001
-
Which t code use before pre sale order
gud morng to all
pls tell me. which t. code use before pre sale order (va21) and why this function use and how
regards,
gaurav pabrejaT.Code: VA11
to create Inquiry
The document flow is
IN > QT > OR > LF > F2
The Inquiry is done in order to get to know the price that the customer is going to get. It can be done over the phone, e-mail or a walk-in.
Regards
AK
reward points if helpful -
S posible publish a t.code using iView URL
Dear Experts.
I have the following question:
Is posible publish a t.code using iView URL?
If this is posible how can do this?
RegardsI have the following :
I have a t.code that call a program ABAP.
I have created a Service IAC using the t.code SICF for this t.code but the problem is that with this the system show error time out.
I created a Iview Transaction in the portal and this workfine. But with this I not can hide buttons.
My idea is create a service and publish this as URL iView calling the service created in the SICF.
How can do this?
Regards -
Can We Two Different Credit Control Area to 1 company code using cross comp
Can We Two Different Credit Control Area to 1 company code using cross company code assignment.Tried but giving error at the time of bill release.Experts Can you help?
Hi,
It is not possible to have more than one credit control are for a single company code. -
How to display the data of CJ2C(T-CODE) using web dynpro abap
Hi all:
How to display the data of CJ2C(T-CODE) using web dynpro abap.
CJ2C used to display a Gantt Chart.
Thanks.Hi,
Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
On action place the code and Deploy the application
byte[] bytes = new byte[ 1024];
FileOutputStream out = new FileOutputStream( new File( <path in server>));
InputStream in = resource.read( true);
int len;
while( ( len = in.read( bytes)) > 0)
out.write( bytes, 0, len);
in.close();
out.close();
Regards
Vinod V -
Hi Gurus;
Can some one send me the abap codes used mainly for reporting OR can some one give me some sample code used in reporting. my mail id "[email protected]".smod > rsr0001 > EXIT_SAPLRRS0_001 > ZXRSRU01 >
CASE I_VNAM.
WHEN 'ZE_FPPT'.
CALL FUNCTION 'Z_VAR_FP4'
EXPORTING
I_VNAM = i_vnam
I_STEP = i_step
I_T_VAR_RANGE = I_T_VAR_RANGE
IMPORTING
E_T_RANGE = E_T_RANGE.
FUNCTION Z_VAR_FP4.
""Local Interface:
*" IMPORTING
*" REFERENCE(I_VNAM) LIKE RSZGLOBV-VNAM
*" REFERENCE(I_STEP) TYPE I DEFAULT 0
*" REFERENCE(I_T_VAR_RANGE) TYPE RRS0_T_VAR_RANGE
*" EXPORTING
*" VALUE(E_T_RANGE) TYPE RSR_T_RANGESID
data: l_s_range type rsr_s_rangesid.
data: LOC_VAR_RANGE LIKE RRRANGEEXIT.
data: year(4).
data: mth(2).
IF I_STEP = 2 .
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE
( VNAM = '0I_FPER' ).
year = LOC_VAR_RANGE-HIGH+0(5).
mth = LOC_VAR_RANGE-HIGH+5(2).
if mth < 10.
concatenate '0' mth into mth.
endif.
concatenate year '0' mth into L_S_RANGE-HIGH.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDLOOP.
ENDIF.
ENDFUNCTION.
Regards,
BWer
Assign points if helpful.
Message was edited by: BWer
Maybe you are looking for
-
Forms 6.0 Crashing When I press ALT button without any menu on a form, including the Window menu. Are there any patches available for this. Steps to Repeat. 1.Create a form using Forms Wizard. 2.Remove the Default Menu and Navigation Bar. 3.Make the
-
"open dvd player" changes to "ignore" automatically. why?
hi my DVD player do not open automatically when DVD video is inserted. In the system preference->CDs/DVDs->"When you insert a DVD", I choose open dvd player and it change to ignore immediately every time. I tried to delete file "com.apple.DVDPlayer.p
-
How do place a file for download from our server?
I have some pdf forms that I place on a site, but I had the set up as hyperlinks to webpages so that they opened up in browsers. This isn't good because the pdfs are forms to be filled out and we've had a variety of problems with people trying to fil
-
Inspector is wrong! podcast duration bug/error
Here's what happened: using iWeb to publish a podcast. After eight episodes, noticed that using an ampersand ("&") in the description made for ugliness in RSS and iTunes ("&" becomes "&-amp" or something). So I go back and edit every entry -- changin
-
ECC 6 Obsolate commands & function modules
Hi, We are going to upgrade from 4.7 to ECC 6. I am looking for list of obsolate commands and function modules in ECC 6. Thanks aRs