Handling Multiple Output Parameters
Howdy.
What is the concensus approach for handling multiple output parameters in Java?
We have a legacy C API that we are porting to Java. All API routines already return an error value as an int. i.e.:
int foo(...);
What if we wanted to return additional info, such as a length and binary (not text) data?
int foo(...,int* len,char** data);
We use a char** for data cause we don't know in advance how long the data will be and we don't want callers to have to allocate arbitrary-sized arrays. In other words, we allocate the output data buffer internally.
How do you do this in Java? Obviously, we can use an Integer object to return the length, but passing in a byte[] for data will not return the internally allocated array to the caller:
public int foo(...,Integer len,byte[] data); // can't allocate data internally
We also thought about using ByteArrayOutputStream, but since the class does not provide direct access to the internal array, it requires an inefficient copy through the toByteArray() method in order to retrieve our data.
Any ideas?
Ricardo
Yes, that is the approach that we are currently
using. We have defined an Out class that incorporates
all possible output types as data members:Huh? One class that is used for all possible output types? I'm not quite sure what you mean by that. Classes should be meaningful in and of themselves, not just to encapsulate a bunch of unrelated fields. Sounds non-OO.
public class Out
byte[] out_bytes;
int out_int;
}I guess we feel this is somewhat inelegant...
The only real problem is with the byte[] arguments.
Any thoughts on that?
Thanks,
RicardoThere's nothing inherently wrong with a byte array - else there may not be such an animal in the language. Other than the comments above about maybe it being non-OO, the only other comment I could make on this without really seeing the whole context (how this class is really used, etc) would be that yes it looks like it is just encapsulating all possible output types. Not good. If a method is going to return a byte array, it should do so - not return a meaningless "Out" object which happens to contain that array. And another method returning an int should return the int, not this "Out" object containing the int. These don't appear to be related fields belonging to an object in an OO sense.
Similar Messages
-
How to view multiple output parameters from web services
I have used the Labview tool to create a .NET assembly from a WSDL file.
In the WSDL file the service has been defined to return 2 output parameters.
In Labview, when I invoke the method for this service the first output parameter ends up as the return value of the method. I can create an indicator for this and it gets updated properly when I run the VIS to use the web service.. The indicator is an integer value but recognizes the type defined within the WSDL file.
The second output parameter shows up as an output value. When I right click on it and create an indicator for it I get a .NET icon on the front panel rather than an integer value.
How can I view the value for this second output parameter after running the web service?
Is there a difference in how multiple output parameters handled in newer versions of Labview (I am using verison 7.1)?scrooge wrote:
You can try this link .
the link is dead... or i dont have access.. -
How to allow multiple output parameters in a user-defined service operation???
I have creating a self-defined service operation “LDAPAddUser” to connect to LDAP server to create user accounts. I want to get 2 output parameters after executing the operation. One is the result (Boolean data type) and one is the error message (String data type). However, since Java only support one return value in a method, it seems that only one output parameter can be returned. May I have the suggestion so that multiple parameters can be supported in this case? Here is the extracted code
In Java program,
public Boolean addUser(String url, String aName)
In file "component.xml",
<operation name="addUser" method="addUser" orchestrateable="true" anonymous-access="true">
<hint>Add a new user</hint>
<input-parameter name="url" type="java.lang.String" required="true" title="LDAP URL">
</input-parameter>
<input-parameter name="aName" type="java.lang.String" required="true" title="Admin Login Name">
</input-parameter>
<output-parameter name="Result" title="Result" type="java.lang.Boolean">
</output-parameter>
Besides the boolean return value, I want to get another return value (string data type). Any suggestion ?I've returned multiple values to LiveCycle by using a complex object as an intermediatory.
For example if I need to return two strings (firstName and lastName), I'll first build a single class (name) with two string attributes (private String firstName; private String LastName) and add getters and setters to my "name" class for each. My service class method will return an object of type "name".
for example public name mymethod(String GUID, String username, String password).......
Then in the component.xml you can return the two strings as long as you use the binding type "Bean":
<output-parameter name="firstName" title="First Name" binding-type="Bean" property="firstName">
</output-parameter>
<output-parameter name="lastName" title="Last Name" binding-type="Bean" property="lastName">
</output-parameter> -
Multiple output-parameters in a custom component
Is it possible to develop a custom component that returns multiple outputs?
I know that I can define multiple tag <output-parameter> in component.xml, but I don't know how the method of my class can return multiple Objects...
Thanks,
FabioYou can have multiple getters and setters function that will set or return multiple parameters. Each output parameter can be set to a specific function.
Jasmin -
Webservice with multiple output parameters
As a follow up on Can't create Webservice Project question of mine I have another question.
I have my webservice now, but only one output parameter. I can only find java-bean examples with just one. How do I get multiple of them.
Groetjes,
JeschaelHi Jan,
I've created a structure. It is a (non EJB) bean with 6 private Strings with getters and setters. I put it into a List (Vector to be precise). When I try to test it, using the Web Services Navigator, I get an error.
The structure really is just a copy from a SAP-ABAP structure. It looks like this:
Created on Feb 21, 2007
To change the template for this generated file go to
Window>Preferences>Java>Code Generation>Code and Comments
package com.test.struc;
import java.io.Serializable;
@author JeschaelL
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
public class Hrwpc_S_KeyObjec implements Serializable {
public String PlanVersion; //plvar
public String ObjectType; //otype
public String ObjectID; //objid
public String StartDate; //begda
public String EndDate; //endda
public String PlanningStatus; //istat
public String HistoricalRecordFlag; //histo
public String ObjectAbbreviation; //short
public String ObjectName; //stext
public String ExtendedObjectID; //realo
@return
public String getEndDate() {
return EndDate;
@return
public String getExtendedObjectID() {
return ExtendedObjectID; }
@return
public String getHistoricalRecordFlag() {
return HistoricalRecordFlag;
@return
public String getObjectAbbreviation() {
return ObjectAbbreviation;
-- etcetera --
Thanks for your time,
Jeschael -
Multiple Output formats from Single Source File? (Like Squeeze)
I'd really love to be able to batch process encodes in the following manner:
Drop my source video file into AME CS5, select an MP4 preset, and then have it encode multiple bitrate versions while adding filename extensions [e.g. _High (700 kb/s), _Mid (550 kb/s), _Low (400 kb/s)].
The simple answere is to drop, or duplicate, my input clip 3 times and just select 3 presets I could set up under the Hi, Mid, Lo parameters. But that's exactly what I'm trying to work around. I encode video ads for major web-video sites, and the volume is just manageable to batch process these (drag and drop large quantities, select multiple presets at once, hit Start.) To handle each ad we service would be far too time consuming, even for as simple as AME makes it to duplicate/choose new preset. (In the end, our ads jump onto our FTP via AME's FTP upload option, one of it's smartest features!)
We have quite a bit of encoding resources here at work, but AME has been giving us the most favorable results. Other options, such as Sorenson Squeeze, let you import your source clips, then apply 2 or more presets to them, before encoding the whole batch. Is there any similar functionality in Media Encoder? (Really don't want to move our workflow into Squeeze, with it's inferior MP4 encoding.)
Does anybody have any experience with this sort of high-volume multiple-outputs from individual source files? Any tips with scripts or Apple's "Automator" that could streamline this type of batch processing?Any update on this ability? We create many in house videos that need to be encoded to 14 different
bitrates for use with Flash Media Server as dynamic http streams.
Currently when I am ready to export a finished sequence, I will pick my first preset and queue it in AME. Then I duplicate that thirteen times, setting each of the new thirteen queued items to their appropriate bitrates. Then I have to change each of the output names to be "filename_bitrate.flv".
This process is much slower when queued in AME than if I exported each individually from PP. I just don't have the time to manually export each version.
I have also started noticing that some of the last few projects won't render beyond the quality of the first queued item. Do I need to render the largest bitrate file first?
Any indication from Adobe on the correct workflow to create multiple bitrate files to be consumed by FMS as dynamic http streams would be appreciated.
The link above is dead. Does anyone have an updated link to the document above? -
Hello,
I configured two output types (Bill of lading & Packing list) for the application V7-transaportation. I am able to get both the outputs. Now, I am able to get a print for BOL and also a print preview. For Packing list I am able to see the screen view(print preview), but when I try to print it directly it gives me an error " output could not be issued" . When I go to Output-> screen it is showing me the output.
I have maintained all the required print parameters and assigned the print profiles to the output types.Is there a problem with my configuration? can't I print two output types simultaneously?Hi,
Is there a printer defaulted to your output types? You can issue multiple outputs at the same time.
If the output types have been determined in your document, then nothing wrong with the determination process.
If the output can be previewed, nothing wrong with the SAPScript or Smartform.
So maybe something to do with compatibility with the printer chosen.
Phyllis. -
How to handle multiple datasources in a web application?
I have a J2EE Web application with Servlets and Java ServerPages. Beside this I have a in-house developed API for certain services built using Hibernate and Spring with POJO's and some EJB.
There are 8 databases which will be used by the web application. I have heard that multiple datasources with Spring is hard to design around. Considering that I have no choice not to use Spring or Hibernate as the API's are using it.
Anyone have a good design spesification for how to handle multiple datasources. The datasource(database) will be chosen by the user in the web application.Let me get this straight. You have a web application that uses spring framework and hibernate to access the database. You want the user to be able to select the database that he wants to access using spring and hibernate.
Hopefully you are using the Spring Framework Hibernate DAO. I know you can have more that one spring application context. You can then trying to load a seperate spring application context for each database. Each application context would have it's own configuration files with the connection parameters for each datasource. You could still use JNDi entries in the web.xml for each datasource.
Then you would need a service locater so that when a user selected a datasource he would get the application context for that datasource which he would use for the rest of his session.
I think it is doable. It means a long load time. And you'll need to keep the application contexts as small as possible to conserve resources. -
How to handle multiple streams
Hi
I wanted to handle multiple source Streams with Player. do i need to create a each player for each Stream ?? how can i do that ??
Thanks in Advance,
Karthikeyan RIt's not at all obvious what a SequenceOutputStream would do. The way to write lots of stuff over a socket is to wrap multiple output streams round sock.getOutputStream and flush each one when you've finished with it. (There may be issues with compressed / bit output streams).
-
How can we handle multiple applications in session method
how can we handle multiple applications in .. session method.
can any body reply me.
thanksHari,
hi Check out this sample code to use session method
REPORT ztest_report
NO STANDARD PAGE HEADING
LINE-SIZE 255
MESSAGE-ID ZRASH.
Internal Table Declarations *
*--Internal Table for Data Uploading.
DATA : BEGIN OF IT_FFCUST OCCURS 0,
KUNNR(10),
BUKRS(4),
KTOKD(4),
ANRED(15),
NAME1(35),
SORTL(10),
STRAS(35),
ORT01(35),
PSTLZ(10),
LAND1(3),
SPRAS(2),
AKONT(10),
END OF IT_FFCUST.
*--Internal Table to Store Error Records.
DATA : BEGIN OF IT_ERRCUST OCCURS 0,
KUNNR(10),
EMSG(255),
END OF IT_ERRCUST.
*--Internal Table to Store Successful Records.
DATA : BEGIN OF IT_SUCCUST OCCURS 0,
KUNNR(10),
SMSG(255),
END OF IT_SUCCUST.
*--Internal Table for Storing the BDC data.
DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*--Internal Table for storing the messages.
DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_FLAG1(1) VALUE ' ',
"Flag used for opening session.
V_TLINES LIKE SY-TABIX,
"For storing total records processed.
V_ELINES LIKE SY-TABIX,
"For storing the no of error records.
V_SLINES LIKE SY-TABIX.
"For storing the no of success records.
Selection screen *
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
V_SESNAM LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.
Start-of-selection *
START-OF-SELECTION.
*-- Form to upload flatfile data into the internal table.
PERFORM FORM_UPLOADFF.
TOP-OF-PAGE *
TOP-OF-PAGE.
WRITE:/ 'Details of the error and success records for the transaction'
ULINE.
SKIP.
End of Selection *
END-OF-SELECTION.
*-- Form to Generate a BDC from the Uploaded Internal table
PERFORM FORM_BDCGENERATE.
*--To write the totals and the session name.
PERFORM FORM_WRITEOP.
*& Form form_uploadff
Form to upload flatfile data into the internal table.
FORM FORM_UPLOADFF .
*--Variable to change the type of the parameter file name.
DATA : LV_FILE TYPE STRING.
LV_FILE = V_FNAME.
*--Function to upload the flat file to the internal table.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = LV_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = IT_FFCUST
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC = 0.
*--Deleting the headings from the internal table.
DELETE IT_FFCUST INDEX 1.
*--Getting the total number of records uploaded.
DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
ENDIF.
ENDFORM. " form_uploadff
*& Form Form_bdcgenerate
Form to Generate a BDC from the Uploaded Internal table
FORM FORM_BDCGENERATE .
*--Generating the BDC table for the fields of the internal table.
LOOP AT IT_FFCUST.
PERFORM POPULATEBDC USING :
'X' 'SAPMF02D' '0105',
' ' 'BDC_OKCODE' '/00' ,
' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
'X' 'SAPMF02D' '0110' ,
' ' 'BDC_OKCODE' '/00',
' ' 'KNA1-ANRED' IT_FFCUST-ANRED,
' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
' ' 'KNA1-SORTL' IT_FFCUST-SORTL,
' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
'X' 'SAPMFO2D' '0120',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0125',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0130',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0340',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0360',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0210',
' ' 'KNB1-AKONT' IT_FFCUST-AKONT,
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0215',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0220',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0230',
' ' 'BDC_OKCODE' '=UPDA'.
*--Calling the transaction 'fd01'.
CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
MESSAGES INTO IT_CUSTMSG.
IF SY-SUBRC <> 0.
*--Populating the error records internal table.
IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
APPEND IT_ERRCUST.
CLEAR IT_ERRCUST.
*--Opening a session if there is an error record.
IF V_FLAG1 = ' '.
PERFORM FORM_OPENSESSION.
V_FLAG1 = 'X'.
ENDIF.
*--Inserting the error records into already open session.
IF V_FLAG1 = 'X'.
PERFORM FORM_INSERT.
ENDIF.
*--Populating the Success records internal table.
ELSE.
IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
APPEND IT_SUCCUST.
CLEAR IT_SUCCUST.
ENDIF.
*--Displaying the messages.
IF NOT IT_CUSTMSG[] IS INITIAL.
PERFORM FORM_FORMATMSG.
ENDIF.
*--Clearing the message and bdc tables.
CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
ENDLOOP.
*--Getting the total no of error records.
DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
*--Getting the total no of successful records.
DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
*--Closing the session only if it is open.
IF V_FLAG1 = 'X'.
PERFORM FORM_CLOSESESS.
ENDIF.
ENDFORM. " Form_bdcgenerate
*& Form populatebdc
FOrm to Populate the BDC table.
FORM POPULATEBDC USING VALUE(P_0178)
VALUE(P_0179)
VALUE(P_0180).
IF P_0178 = 'X'.
IT_CUSTBDC-PROGRAM = P_0179.
IT_CUSTBDC-DYNPRO = P_0180.
IT_CUSTBDC-DYNBEGIN = 'X'.
ELSE.
IT_CUSTBDC-FNAM = P_0179.
IT_CUSTBDC-FVAL = P_0180.
ENDIF.
APPEND IT_CUSTBDC.
CLEAR IT_CUSTBDC.
ENDFORM. " populatebdc
*& Form FORM_OPENSESSION
Form to Open a session.
FORM FORM_OPENSESSION .
*--Variable to convert the given session name into reqd type.
DATA : LV_SESNAM(12).
LV_SESNAM = V_SESNAM.
*--Opening a session.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = LV_SESNAM
HOLDDATE = '20040805'
KEEP = 'X'
USER = SY-UNAME
PROG = SY-CPROG
IMPORTING
QID =
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11
IF SY-SUBRC <> 0.
WRITE :/ 'Session not open'.
ENDIF.
ENDFORM. " FORM_OPENSESSION
*& Form FORM_INSERT
fORM TO INSERT ERROR RECOED INTO A SESSION.
FORM FORM_INSERT .
*--Inserting the record into session.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FD01'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = IT_CUSTBDC
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
IF SY-SUBRC <> 0.
WRITE :/ 'Unable to insert the record'.
ENDIF.
ENDFORM. " FORM_INSERT
*& Form FORM_CLOSESESS
Form to Close the Open Session.
FORM FORM_CLOSESESS .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " FORM_CLOSESESS
*& Form FORM_FORMATMSG
Form to format messages.
FORM FORM_FORMATMSG .
*--Var to store the formatted msg.
DATA : LV_MSG(255).
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = SY-LANGU
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = LV_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE :/ LV_MSG.
ENDIF.
ULINE.
ENDFORM. " FORM_FORMATMSG
*& Form form_writeop
To write the totals and the session name.
FORM FORM_WRITEOP .
WRITE :/ 'Total Records Uploaded :',V_TLINES,
/ 'No of Error Records :',V_ELINES,
/ 'No of Success Records :',V_SLINES,
/ 'Name of the Session :',V_SESNAM.
ULINE.
ENDFORM. " form_writeop
Don't forget to reward if useful.. -
Urgent : OBIA - Handling multiple Global, Local and Document Currencies
All,
I need input on how to configure multiple currency codes in DAC for OBIA 7.9.6.x
My client's business goes around the the world and with multiple local currencies.They also need reporting currency to be multiple like in Euro, USD etc.
I went through a couple of threads in this forum,like -
Re: Configuring Global Currencies in BI Apps 7.9.6 for EBS 11.5.10 Source
Re: How we are using Global, Local and Document Currencies in DAC.
But I have some confusion regarding the configuration of DAC's 3 Global currency codes.
In order to fulfill my requirement - should I add additional codes in DAC?
Basically How am I supposed to handle multiple Local,Document and Global currencies? And then possible changes in rpd/reports required also?
Regards,
KrishCurrencies are discussed in the Setup and Configuration Guide here:
7.1.1.2 How to Configure Global Currencies
To configure the global currencies you want to report in your warehouse:
In the DAC Client, display the Design view.
For more information about logging into the DAC, see Section A.1, "How to Log Into the DAC Client".
Select a container from the drop down list to the right of the Execute button.
Display the 'Source System Parameters' tab.
Locate the following parameters and set the currency code values for them in the 'Value' box:
$$GLOBAL1_CURR_CODE (for the document currency).
$$GLOBAL2_CURR_CODE (for the local currency).
$$GLOBAL3_CURR_CODE (for the global currency).
Make sure that you spell the currencies as they are spelled in your source OLTP system.
Save your changes.
As far as for PLP items, those are Post Load Processing elements that perform cleanup tasks after the Base Warehouse tables have been loaded. They should never be modified and frankly run without any issues provided the rest of the plan executes properly. Do you have a specific quesiton about a PLP? -
Handling Multiple Error Messages through EXIT_SAPMM06E_012 for ME28
Dear Team,
After Executing ME28, system will give List of PO's that are to be Released . User will select Multiple PO's and
Press Release button in Application toolbar. once it is relased, User will press save Icon for all released PO's.
Once Save icon is presed, I need to do Validation for Multiple PO's in the user Exit EXIT_SAPMM06E_012 and capture my
ErrorMessages for all Released PO's for which Validation fails.
Here in the given user Exit, one PO will be processed at a time as PO is defined as Import Parameter but it will handle all PO's
and give the output in status bar saying 'Relased Saved' for all PO's which succesfully gonethrough.
once we execute ME28, system is showing list output with PO's to be Released(As system is handling with Write statments). In this case, we dont have scenario of PBO and PAI Modules( where user can correct error if any validation fails) like we have for ME22,etc.
I have Written simpel Error Message in the User Exit.
once i tried to trigger my user exit by Releasing and Saving with One PO, Error Message is displayed ( as information Message
appears) and if i Press Exit button in Error Message, it is coming out of Transaction.
Is there any Possibilty to Handle Multiple Error Messages ( in my case for Valdiation Failed Po's) in ME28 ,after Releasing and Saving , and also user should not come out of Transaction once Error Messages are Displayed.
Thanks and Regards
SureshHi Suresh,
there is a tekpo table to handle all po items. you can put it in loop and do validations.
if any errors through, there may be a ex_messages table of type bapiret2.
or
try like this: MESSAGE E368(00) WITH TEXT-001 TEXT-002.
thanks
srinu
Edited by: srinu rao on Sep 22, 2009 3:43 AM -
Data template and procedure output parameters
Hi all,
I have multiple sql statements and a MSSQL procedure witch I have to call when generating a report.
Therefore I use a data template.
The MSSQL procedure I call with EXEC. It returns the table that it sould return and everything is fine.
Except: the procedure also returns a punch of OUTPUT parameters and I don't know how to catch those parameters in my data template.
I have declared all these parameters in the BIP and also in the data template, but there are no values for them when I execute the report.
Here is a my current data template:
<dataTemplate name="NameOfTemplate">
<properties>
<property name="include_parameters" value="true"/>
</properties>
<parameters>
<parameter name="clientID" dataType="character"/>
<parameter name="dept" dataType="number" /> <!--This is for MSSQL output-->
<parameter name="forpay" dataType="number"/> <!--This is for MSSQL output-->
<parameter name="name" dataType="character"/> <!--This is for MSSQL output-->
</parameters>
<dataQuery>
<sqlStatement name="ARVE" dataSourceRef="connection1">
<![CDATA[
select
from
OAP.ACCOUNTS
where
ACCOUNTS.CLIENT_CODE = :clientID
]]>
</sqlStatement>
<sqlStatement name="ARVE_T" dataSourceRef="connection2" fixedSchema="false">
<![CDATA[EXEC Dept_proc
@ID = :clientID,
@Volg =:dept,
@Ettemaks =:forpay,
@Nimi =:name]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="ARVE_TULEMUS" source="ARVE">
<element name="ACCOUNT_SUM" value="SUMMA"/>
</group>
<group name="ARVE_TULEMUS" source="ARVE_T">
<element name="ARVE_NUMBER" value="ARVENUMBER"/>
<element name="ARVE_KUUPAEV" value="ARVEKUUPAEV"/>
<element name="ARVE_LEPINGU_SALDO" value="VOLGUSUMMA"/>
</group>
</dataStructure>
</dataTemplate>Where @Volg, @Ettemaks and @Nimi are MSSQL procedure output parameters that I want to show in my report.
Can anyone give ma an example how to do this?Hi all,
I have multiple sql statements and a MSSQL procedure witch I have to call when generating a report.
Therefore I use a data template.
The MSSQL procedure I call with EXEC. It returns the table that it sould return and everything is fine.
Except: the procedure also returns a punch of OUTPUT parameters and I don't know how to catch those parameters in my data template.
I have declared all these parameters in the BIP and also in the data template, but there are no values for them when I execute the report.
Here is a my current data template:
<dataTemplate name="NameOfTemplate">
<properties>
<property name="include_parameters" value="true"/>
</properties>
<parameters>
<parameter name="clientID" dataType="character"/>
<parameter name="dept" dataType="number" /> <!--This is for MSSQL output-->
<parameter name="forpay" dataType="number"/> <!--This is for MSSQL output-->
<parameter name="name" dataType="character"/> <!--This is for MSSQL output-->
</parameters>
<dataQuery>
<sqlStatement name="ARVE" dataSourceRef="connection1">
<![CDATA[
select
from
OAP.ACCOUNTS
where
ACCOUNTS.CLIENT_CODE = :clientID
]]>
</sqlStatement>
<sqlStatement name="ARVE_T" dataSourceRef="connection2" fixedSchema="false">
<![CDATA[EXEC Dept_proc
@ID = :clientID,
@Volg =:dept,
@Ettemaks =:forpay,
@Nimi =:name]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="ARVE_TULEMUS" source="ARVE">
<element name="ACCOUNT_SUM" value="SUMMA"/>
</group>
<group name="ARVE_TULEMUS" source="ARVE_T">
<element name="ARVE_NUMBER" value="ARVENUMBER"/>
<element name="ARVE_KUUPAEV" value="ARVEKUUPAEV"/>
<element name="ARVE_LEPINGU_SALDO" value="VOLGUSUMMA"/>
</group>
</dataStructure>
</dataTemplate>Where @Volg, @Ettemaks and @Nimi are MSSQL procedure output parameters that I want to show in my report.
Can anyone give ma an example how to do this? -
Handle multiple material numbers as import parameter in a function module
Hello Folks,
I want to handle multiple material numbers as import parameters.. I have tried using table types but having problem while reading the data....
My requirement is user will input say 10 materials , now i need to get all the information for that particular material ..
I am unable to use for all entries as it is saying that it is not internal table... I have found table types which is having sigon , option, low and high fields but user doesn't want it... He wants to enter only materials... Currently am using this MD_T_MATNR(table type)
I am stuck up here..
Appreciate any kind of help.
Regards,
RajHi,
it looks like you are on a good way, just something little is missing. Type MD_T_MATNR is suitable for your issue. I have tried it and probably your problem is that You have to use
SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~table_line.
instead of
SELECT ... FOR ALL ENTRIES IN it_matnr WHERE mara~matnr EQ it_matnr~matnr.
In this example I suppose that a name of your variable of type MD_T_MATNR is it_matnr. Problem is that table line is not structure, but data element, therefore You have to use ~table_line instead of ~matnr.
Hope it helps.
Adrian -
Output parameters with one name
With regard to Dialog Programming, I need to replicate an existing transaction. The transaction has multiple ouput parameters that have one common name. I'm having trouble manipulating these output parameters.
Do i assign these specific output parameters to one internal table with same name? Can you guys provide a sample code with regard to manipulation of these types of output parameters?
<b><REMOVED BY MODERATOR></b> Thanks in advance.
Best Regards.
Brando
Message was edited by:
Alvaro Tejada GalindoHi Brando Braganza,
a transaction does not have output parameters - by definition.
The best you can do is write down what you are doing. And please give the names and types of all objects involved.
Then qualified help will come!
Regards,
Clemens
Maybe you are looking for
-
Hi, I've configured a Sender File Adapter. It archives messages and adds a timestamp. Files are succesfully put on the integration engine and archived. However the files are not moved from the input directory, but are only copied So the files stay in
-
Stuff not showing up in finder searches that IS there -help!!
I have had some weird thing recently where I have searched for stuff in the finder, for it NOT to show up. I just searched for "preferences" and the only folder it comes up with is "opera preferences" (regardless if "kind" is set to "any" and I manua
-
How to display dynamic images using Struts
I am storing the image name in bean. I want to use the <html:img> tag to display my images. How can i do that using struts. Something or sort.. <html:img src=bean:write name="pageEntry" property="pageImg"/> Thank You
-
Vendors not getting published from Sourcing 7.0 to ECC
Dear Experts, In our SAP Sourcing System version 7.0 we are not being able to publish suppliers from Souring to ECC but opposite is working fine i.e Vendors are coming from ECC to sourcing perfectly fine. When ever we are creating a supplier in Sourc
-
Adding buttons in taskbar's thumbline like Windows Media Player have
i wana know that how can we add customize controls in taskbar's thumbline preview like windows media player has thee controls (i.e play/pause, next & previous) in windows 7