InFile Functionality Options and Attempt to Debug via Inputting a File
Hi,
I am having 2 issues.
1. The first is that when I run this in debug mode, I have my .dat file I want to read in, however it is not being read in. I set my 'Working Directory' in Debugging properities to be the Visual Studio\Projects folder and made sure the .dat file is
in the folder.
2. The second is that I am using the read command, however want to save items within this .dat file to variables in a class. Is there an example of that? Will using the 'getline' command and then setting it to a variable work in this case or
is recommended?
Any help of any of these would be appreciated. Thanks.
#include <iostream>
#include <fstream>
#include <complex>... std::vector<samp_type> buff(samps_per_buff);
std::ifstream infile(file.c_str(), std::ifstream::binary);...infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type));
Hi,
I am having 2 issues.
1. The first is that when I run this in debug mode, I have my .dat file I want to read in, however it is not being read in. I set my 'Working Directory' in Debugging properities to be the Visual Studio\Projects folder and made sure the .dat file
is in the folder.
2. The second is that I am using the read command, however want to save items within this .dat file to variables in a class. Is there an example of that? Will using the 'getline' command and then setting it to a variable work in this
case or is recommended?
Any help of any of these would be appreciated. Thanks.
#include <iostream>
#include <fstream>
#include <complex>
std::vector<samp_type> buff(samps_per_buff);
std::ifstream infile(file.c_str(), std::ifstream::binary);
infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type));
1. You should always check if a file is opened successfully
std::vector<samp_type> buff(samps_per_buff);
std::ifstream infile(file.c_str(), std::ifstream::binary);
if (!infile.is_open())
// report error
2. As written, your code will not work because the vector buff is empty. The usual way to read an unknown number of records is something like
std::vector<samp_type> buff(samps_per_buff);
samp_type st;
while (infile.read((char*)&st, sizeof(samp_type))
buff.push_back(st);
If the file was written from a vector of samp_type, then the data will automatically be restored.
[In order for this to work, the class samp_type needs to be POD or standard_layout. This means in particular that it should not have virtual functions.]
David Wilkinson | Visual C++ MVP
Similar Messages
-
I'm running Windows 7 and iTunes (and the other Apple programs) wouldn't automatically update. Went through all the options and finally had to delete all Apple files and re-download iTunes. Worked fine, until the next update. Is there a glitch in the system? Does someone know of some proprietory block (I think it is related to Quicktime)? Also, once I re-downloaded everything, cleaned everything up, and deleted duplicate files, I closed down my computer. When I re-started it, iTunes was "brand new" -- all of my music, organization, tagging, etc. was gone and had to start over. Idea?
Ok, so after like 4 days of going through all these different issues, I figured out that several programs weren't downloading, and it was an issue with my wireless connectivity messing up the digital signatures, so if you plug in your comp to the modem and delete your temp files, it should start to work!
-
Java PI7.1 mapping and standalone NWDS debugging using local XML files
>>which can be debugged in standalone NWDS using local files.
yes its possible...u just have to add static void main (as sugested in the blog) ..
Note: i dont have a system as of now..so i guess there can be some sysntax errors. Please check.
create input xml file with name "input.xml" and place it under "D" drive (it can be any location)
package prasad.NewAPI;
import java.io.IOException;
import java.io.InputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.sap.aii.mapping.api.AbstractTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
* @author Prasad Nemalikanti
public class NewAPIJavaMapping extends AbstractTransformation {
public static void main(String[] args) {
try{
NewAPIJavaMapping javaMapping =new NewAPIJavaMapping();
FileInputStream in=new FileInputStream("D:\\input.xml");
FileOutputStream out=new FileOutputStream("D:\\output.xml");
javaMapping.execute(in,out);
catch(Exception e)
e.printStackTrace();
String result="";
/* The transform method which must be implemented */
public void transform(TransformationInput in,TransformationOutput out) throws StreamTransformationException
InputStream instream = in.getInputPayload().getInputStream();
// String for constructing target message structure
String fresult="<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
fresult = fresult.concat("<ns0:MT_Customer xmlns:ns0=\"urn:newapi-javamapping\">");
try{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(instream);
traversingXML(doc);
catch(Exception e){}
fresult = fresult.concat(result);
fresult = fresult.concat("</ns0:MT_Customer>");
try{
out.getOutputPayload().getOutputStream().write(fresult.getBytes());
/* assigning the created target message to "TransformationOutput"*/
catch(IOException e1){}
/*DOM Parser */
public void traversingXML(Node node)
NodeList children = node.getChildNodes();
for(int i=0;i<children.getLength();i++)
Node child = children.item(i);
short childType = child.getNodeType();
if(childType==Node.ELEMENT_NODE)
String nodeName=child.getNodeName();
String targetNodeName=null;
if(nodeName.equals("Users"))
targetNodeName="Customers";
else if(nodeName.equals("ID"))
targetNodeName="CustomerID";
else if(nodeName.equals("UserName"))
targetNodeName="Name";
else if(nodeName.equals("City"))
targetNodeName="City";
else if(nodeName.equals("State"))
targetNodeName="State";
else if(nodeName.equals("Country"))
targetNodeName="Country";
if(targetNodeName!=null)
result=result.concat("<"+targetNodeName+">");
traversingXML(child);
if(targetNodeName!=null)
result=result.concat("</"+targetNodeName+">");
else if(childType==Node.TEXT_NODE)
String nodeValue = child.getNodeValue();
result = result.concat(nodeValue);I have tested this and it is working..please chk the same
package com.test;
import java.io.IOException;
import java.io.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.sap.aii.mapping.api.AbstractTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
public class JavaMapping extends AbstractTransformation {
/* The transform method which must be implemented */
public void transform(TransformationInput in,TransformationOutput out) throws StreamTransformationException
this.execute(in.getInputPayload().getInputStream(),
out.getOutputPayload().getOutputStream());
String result="";
public void execute(InputStream in1, OutputStream out1)
throws StreamTransformationException {
// String for constructing target message structure
String fresult="<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
fresult = fresult.concat("<ns0:MT_Customer xmlns:ns0=\"urn:newapi-javamapping\">");
try{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(in1);
traversingXML(doc);
catch(Exception e){}
fresult = fresult.concat(result);
fresult = fresult.concat("</ns0:MT_Customer>");
try{
out1.write(fresult.getBytes());
/* assigning the created target message to "TransformationOutput"*/
catch(IOException e1){}
/*DOM Parser */
public void traversingXML(Node node)
NodeList children = node.getChildNodes();
for(int i=0;i<children.getLength();i++)
Node child = children.item(i);
short childType = child.getNodeType();
if(childType==Node.ELEMENT_NODE)
String nodeName=child.getNodeName();
String targetNodeName=null;
if(nodeName.equals("Users"))
targetNodeName="Customers";
else if(nodeName.equals("ID"))
targetNodeName="CustomerID";
else if(nodeName.equals("UserName"))
targetNodeName="Name";
else if(nodeName.equals("City"))
targetNodeName="City";
else if(nodeName.equals("State"))
targetNodeName="State";
else if(nodeName.equals("Country"))
targetNodeName="Country";
if(targetNodeName!=null)
result=result.concat("<"+targetNodeName+">");
traversingXML(child);
if(targetNodeName!=null)
result=result.concat("</"+targetNodeName+">");
else if(childType==Node.TEXT_NODE)
String nodeValue = child.getNodeValue();
result = result.concat(nodeValue);
public static void main(String[] args) {
try{
JavaMapping javaMapping =new JavaMapping();
FileInputStream in=new FileInputStream("D:\\Input.xml");
FileOutputStream out=new FileOutputStream("D:\\output.xml");
javaMapping.execute(in,out);
catch(Exception e)
e.printStackTrace();
AM -
I get this message when I am trying to save a file that was done in CS4, now using CS6 "Cannot save the file as the font "ArmenianLSU-italic" could not be embedded because of licensing restrictions. Turn off the pdf compatibility option and try again." Even if I start a new file I unable to save it with this font. I need to use this font.
Then you need to outline all text before savng the PDF.
Make sure you do this on a copy of the file. -
I am posting this as a problem for NI to look at.
I am using the Compund Arithmetic function in XOR mode Inverted with 5 inputs. File is also set up in reentrant mode. When I attempt to save the file I get the following error:
Compiler error. Report this problem to National Instruments Tech Support.
int inv mode=0x40000
Advertising Section:
Alliance Member
William Simmons
Simmons Software Engineering, Inc.
714 Germantown Pkwy Ste 5-341
Cordova, TN 38018
(901) 679-3513
[email protected]
LabVIEW, TestStand, Automated Test
environments, On-Site, Off-Site
Attachments:
NXOR_error.vi 73 KBXOR is a new addition to compound arithmetic node. LabVIEW developpers just overlooked the fact that the outpout could be inverted. The compiler fails to generate the proper code because the inversion is not expected.
Just do what the message says. Report the problem to NI Tech Support (and use a separate inverter node).
LabVIEW, C'est LabVIEW -
Using select option and function module in single view
Hi All,
I Have a requirment ,using service call i get a function module and bind to specified UI elements with low and high attributes to input fileds which i designed in my view . And i have to keep range for input values using select options for those input values and clicking on submit i have to display data in VC but it's going to dump
the bug is
Adapter error in INPUT_FIELD "SALEDOC_TXT" of view "ZSD_ORDERSTATUS.MAIN": Context binding of property VALUE cannot be resolved: Node COMPONENTCONTROLLER.1.ZSD_ORDER_STATUS.1.CHANGING.1.S_VBELN does not contain any elements
can any one get me out of this.
Thank U,
MadhanHi,
Call FM using CALL FUNCTION, if you want to pass selectoptions type values to FM..
Try like this...
DATA : delivery TYPE TABLE OF RVBELN,
wa_delivery TYPE RVBELN,
wa_delivery-sign = 'E'.
wa_delivery-option = 'BT'.
wa_delivery-low = lv_FROM_DELIVERYNO.
wa_delivery-high = lv_TO_DELIVERYNO.
APPEND wa_delivery to delivery.
CLEAR wa_delivery.
Pass Delivery to FM.
Cheers,
Kris. -
Every other function works perfectly, and my Internet/router are working at top speed. I can watch HD Netflix and YouTube but nothing via my iTunes library on my MacBook or iPad. All software is updated. The AppleTV will recognize that Air Play is trying to do it's thing, but with music files it sounds like they're skipping and video files just load endlessly.
I'm searching for an answer to almost the same exact problem, using almost the same exact hardware and software. Has an answer been found?
The files that I'm trying to burn come from eMusic, and they are formatted mp3. Recently, (after the iTunes update to 9.2.3?,) they would not drag and drop from iTunes into Toast. From several different discussions I've tried working around this by dragging to the desktop first then dragging and dropping to Toast, going to Toast from a programmer's homemade help window, " iToons," and today, after talking with Apple support, going directly to Toast from my eMusic folder. Alas, all recordings do not perform like they use to. Sometimes they play and sometimes not. There is one I managed, that is listenable, but sometimes I have to put it in my car stereo over and over again as it gets ejected with an error code, sometimes, finally it takes it... Some of the recordings on other disks I've burned are not clean - they have white-noise sounds creeping in... I use to have none of these problems. One time as I was listening to a CD that managed to play, and it just stopped playing... Is there an answer out there to get back to how it use to be? Thanks for you help. -
The reference article in question says "Manually manage music and videos" but I only have the option to "Manually manage videos" via the iPad on iTunes. How do I actually manage music?
Edit: classic Apple.If you post from a a question from the bottom of an article's page then you should get its reference, e.g. HT1535 in your case, on the post's title. The ability to edit you post only lasts for 15 minutes and allows you to correct/add extra info.
I get the 'manually manage music and videos' tockbox as described on that article. If you only 'videos' then are you using iTunes Match on your iPad ? I don't use it but I've seen posts that say having it enabled on a device can affect the syncing of music. -
I'm in Afghanistan with limited internet options. I have a wifi service plan I am signed up for however, a log in and password are required via browser log in, not a security key attached to the wifi (like a hotel). Please help...
the appletv will not be able to work on it's own
you can use a computer or iphone acting the role of hotspot login using it's browser and getting internet access and then sharing it with the appletv
so the appletv sees it as a wifi router it connects to -
When I last used Firefox support, several years ago, I saw mention of a long list of options and settings available, using a kind of local URL, beginning with "about:". I can't find it now. The text "forums" that I saw then seem to have disappeared and been replaced by support for dummies who might be frightened if they saw a page containing more than just a tiny amount of information.
The question is: where can I find this guide, listing all the available options and settings so that I can make my own decisions?I must have forgotten; it wasn't exactly FF support, but Mozillazine. '''Thank you for the pointer'''. The "long list" I was thinking of was in fact about:config, which is pointed to by that page.
Given all that, I think it should be easier to find Mozillazine from the FireFox support pages. -
Firefox no longer opens PDF files. Explorer works OK. I have checked the Applications window in the Tools/Options and it says I am using PDF-xChange viewer....It just does not do anything. I get the message in the Download Error window which says...."could not be saved, because you cannot change the contents of that folder. Is the same error which I get when I attempt to open a PDF file on a webpage using the Firefox browser....Explorer works OK so I am now forced to Explorer to read PDF files via a browser.
== This happened ==
Every time Firefox opened
== After removing a old copy of PDF-xChange Viewer and updating to the last versionThe error message suggests that the file (pdf) that you're trying to download cannot be saved in the folder Firefox tries to save it in.
This can be due to several things - it could be a non-existing folder (could be a problem with the updated application), the hard drive could be too full to store the file (less likely if you can generally surf the net without error messages) or it could contain an error.
To complicate things a little further, it seems to me that you have (at least) 3 different PDF-handling plugins in Firefox from different programs:
PDF-XChange Viewer Netscape Gecko Plugin
Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
Zeon PDF Plugin For Mozilla
This shouldn't matter too much, thou, as it will most likely simply use either the latest installed or the first one it finds when looking up associations for files of type 'pdf'.
First, in Tools > Options... > tab General > section File download, select "Save files in" and Browse your way to a (non-writeprotected!) folder on a drive where you're certain there is enough free space - like the Desktop folder to make the files end up on your Windows desktop.
Second, under Applications as you mention yourself, find all document types related to PDF files, and set these to one of the programs. Check the entire list to be sure there isn't one hiding under one of the other programs' document types (Adobe Acrobat document, PDF X-Change and Zeon).
Restart Firefox, and try opening a PDF again.
If it fails once more, try changing the documents again to one of the other programs, like "Use Adobe Acrobat (in Firefox)".
If it STILL fails, change it to simply "Save file". Then you can simply browse your way to the download folder with Windows Explorer, and doubleclick the PDF file to see which program actually handles PDF files as default on the machine, and if it works properly.
If Firefox flatly refuses to save the PDF files in a folder which you're certain both exist and has space for the file, some (probably security related) program is most likely interfering with Firefox, preventing it in storing PDF files on the system. -
Function Module working only in debug mode
Hi all,
The following Function Module works only in debug mode. The purpose of this FM is to create a notification and to put it in progress status. If I put a breakpoint before "CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'" it works. If I execute this FM without putting a breakpoint at that place it creates the notification but doesnt put it in progress status.
In other words, the last BAPI call doesnot work if I dont put a breakpoint before.
Can somebody help me to find out where is the problem?
Thanks,
Younes
FUNCTION ZFM_CREATE_NOTIF_IN_PROCESS.
""Local interface:
*" IMPORTING
*" VALUE(NOTIFTYP) TYPE CHAR2
*" VALUE(NOTIFHEADER) TYPE BAPI2080_NOTHDRI
*" EXPORTING
*" VALUE(NOTIFNUMBER) TYPE CHAR12
*" VALUE(NOTIFCURSTATUS) TYPE CHAR40
DATA: gs_bapi2080_nothdre TYPE bapi2080_nothdre,
gt_return TYPE TABLE OF bapiret2.
The notification is created with a temporary number
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
notif_type = NOTIFTYP
notifheader = NOTIFHEADER
IMPORTING
notifheader_export = gs_bapi2080_nothdre
TABLES
return = gt_return.
READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.
CHECK sy-subrc IS NOT INITIAL.
*The notication will be saved with a number which isnt temporary
CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
EXPORTING
number = gs_bapi2080_nothdre-notif_no
IMPORTING
notifheader = gs_bapi2080_nothdre
TABLES
return = gt_return.
READ TABLE gt_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.
CHECK sy-subrc IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
The Notif is already created, it will be put in progress status
NOTIFNUMBER = gs_bapi2080_nothdre-notif_no.
CALL FUNCTION 'BAPI_ALM_NOTIF_PUTINPROGRESS'
EXPORTING
NUMBER = NOTIFNUMBER
LANGU = SY-LANGU
IMPORTING
SYSTEMSTATUS = NOTIFCURSTATUS
TABLES
RETURN = gt_return.Hi Emmanuel,
Now I get your problem: you want to wait to have the commit finished! The call to BAPI_TRANSACTION_COMMIT has an optional parameter 'WAIT' which is space by default which causes only a commit. When you set this parameter to 'X' it will do a commit work and wait.
This should solve your problem!
Regards,
John. -
Why does iPhoto change the sort order of the photos in my album when I attempt to share via Photo Stream?
Did anyone find a good way to sort the shared albums better, so that the ones you share with can better find their way around.
You can arrange them manually in an album, select all and use the Photos ➙ Batch Change ➙ Date to menu option and check the box to add a set interval between photos. That will let the photos be sorted by date and be in the order you want:
OT -
Function Groups and Function Modules
Hi,
Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
Regards,
ChandruHi,
Function Group creation -
A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
FG Creation:
1) Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
2) Then give a name for ur function group (starts with Y or Z) and press ENTER.
3) The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
Function Module:
A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
Both exist within an external program.
Both enable parameters to be passed and returned.
Parameters can be passed by value, by value and result, or by reference.
The major differences between function modules and external subroutines are the following:
Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
tables work areas are not shared between the function module and the calling program.
Different syntax is used to call a function module than to call a subroutine.
Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
Defining Data within a Function Module
Data definitions within function modules are similar to those of subroutines.
Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
Defining the Function Module Interface
To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
To define parameters, you must go to one of two parameter definition screens:
1) Import/Export Parameter Interface
2) Table Parameters/Exceptions Interface
Then in the FM interface screen, give the following
1) Import parameters
2) Export parameters
3) Changing parameters
Then give
1) Define internal table parameters
2) Document exceptions
You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
Syntax for the call function Statement
The following is the syntax for the call function statement.
call function 'F'
[exporting p1 = v1 ... ]
[importing p2 = v2 ... ]
[changing p3 = v3 ... ]
[tables p4 = it ... ]
[exceptions x1 = n [others = n]].
where:
F is the function module name.
p1 through p4 are parameter names defined in the function module interface.
v1 through v3 are variable or field string names defined within the calling program.
it is an internal table defined within the calling program.
n is any integer literal; n cannot be a variable.
x1 is an exception name raised within the function module.
The following points apply:
All additions are optional.
call function is a single statement. Do not place periods or commas after parameters or exception names.
The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
sample FM
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab =
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.
Example
1 report ztx1905.
2 parameters: op1 type i default 2, "operand 1
3 op2 type i default 3. "operand 2
4 data rslt type p decimals 2. "result
5
6 call function 'Z_TX_DIV'
7 exporting
8 p1 = op1
9 p2 = op2
10 importing
11 p3 = rslt.
12
13 write: / op1, '/', op2, '=', rslt.
Regards,
Shanthi.P
Reward points if useful ****
Edited by: shanthi ps on Jan 26, 2008 12:03 PM -
Web Dynpro ABAP - Select Option and ALV Component Usage
Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
Note
The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I went in debug and the piece of code dumping is:
lt_range_table =
wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
Is there someone who can help me?
Thanks in advance,
Stefano.Hi,
I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
Web Dynpro ABAP - Select Option and ALV Component Usage
In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
I implemented and generated the web dynpro with success but when i execute a test i get
an error as
Note
The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
data: itab type standard table of zmy_table,
wa type zmy_table.
data:
node_employee type ref to if_wd_context_node,
elem_employee type ref to if_wd_context_element,
stru_employee type wd_this->element_employee ,
item_userid like stru_employee-userid.
navigate from <CONTEXT> to <EMPLOYEE> via lead selection
node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
@TODO handle not set lead selection
if ( node_employee is initial ).
endif.
get element via lead selection
elem_employee = node_employee->get_element( ).
@TODO handle not set lead selection
if ( elem_employee is initial ).
endif.
alternative access via index
Elem_Employee = Node_Employee->get_Element( Index = 1 ).
@TODO handle non existant child
if ( Elem_Employee is initial ).
endif.
get single attribute
elem_employee->get_attribute(
exporting
name = `USERID`
importing
value = item_userid ).
select *
from zmy_table
into table itab
where userid = item_userid.
node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
node_employee->bind_elements( itab ).
Is there someone who can help me and can tell am i doing wrong?
Thanks in advance,
Dheeraj
Maybe you are looking for
-
I dont really want to get my parents involved. My whole family is eligible for an upgrade, if i order it online and have it sent to the store, then my parents will have to be there correct?
-
How to downgrade from Windows 8 to Windows 7 new s2030
HI I just bought a new Lenovo S20-30 becasue I read a review somewhere that it comes with pre-installed Windows 7 drivers. Does anyone know how I set the ball rolling to install Windows 7 please? Will I need to get discs or can I download it all? Tha
-
Indesign CS6 transparency problem
Hi all, Problem: A placed TIFF with a transparent background overlaps an indesign partially transparent graphic shape and where the two transparencies overlap text appears heavier, opacity is darker and sometimes there is an outline at the edge of th
-
Hi to all, i'm working to light framework page, to create an external facing portal. But i don't know where i can find the default light navigation iViews. Can someone tellme where i can find it? Thanks to all, Anna
-
How do I upgrade iPhoto?
I have OS 10.5.5. I thought iPhoto gets upgraded with it the OS but it turns out I have version 2.0.1 (don't laugh). How do I upgrade it so I can use it? I tried downloading the current version but it won't let me install it. What do I do to get up t