How to handle persistant fields of interfaces?
Hi,
I have a persistent class A which holds a reference to an interface I. This
interface is implemented by two other persistant classes B, C.
class A
private I myI;
class B implements I
class C implements I
Is it possible to make the member myI persistent?
Thak you very much for helping.
Regards,
Thomas
Kodo 2.4 has support for 1-1 relations to interfaces that are implemented
by persistent classes. Kodo 2.3 also has support, but only be serializing
the related object to a BLOB column.
Similar Messages
-
How to handle currency fields in BDC
Hi All,
Please tell me how to handle currency fields in BDC.... If possible give me some sample code...
Thanks in advance,
points will be given,
praveena.Declared it at the Global definitions.
in global data tab and currency/quant fields.
Initialize some value there itself.
Just before the text node create one program lines node,
and that,In the import and export parameters of it give total_amount.
refer to the following link:
http://sap-img.com/abap/figure-to-words-for-india-but-can-be-modified-to-any-requirement.htm
Currency Fields
Reward if useful. -
How to handle Custom field added in BP : Role Bill Account
Hi Friends,
I am working on an interface which creates Bill Account role for a BP but the problem is there are about 15 Custom fields added to standard BP transaction in BA role.
As I am using BAPI_BUPA_FS_CREATE_FROM_DATA2 for creating the BP and
BAPI_BUPA_CENTRAL_CHANGE for changing the BP role Bill Account?
Can anyone tell me how to handle those custom fields in the existing BAPIs or there is some other way of doing it?
Thanks in advance,
Pradeep
Note : Helpful answers will be rewarded.Hi,
I have seen these BAPIs but are they used with normal BAPIs for BP creation and change.
For example : I create the BP using BAPI_BUPA_FS_CREATE_FROM_DATA2 and for the Custom fields I should use these BAPIs as suggested by you alongwith the create BAPI.
And will it work for Changing the BP also.
Kindly clarify.
Regards,
Pradeep -
How to handle message prioritization in interface determination
Hi Experts,
How to handle the prioritization of messages if we say that for single source message it will be forwarded to 2 types of target messages.
Here's the scenario:
InterfaceDetermination object
SourceMessageA => TargetMessageTypeA
SourceMessageA => TargetMessageTypeB
Since both of the target messages will receive the source message, i want to prioritize that TargetMessageTypeB will be receive it first before TargetMessageTypeA.
Should I structure it in the Interface Determination as this:
SourceMessageA => TargetMessageTypeB
SourceMessageA => TargetMessageTypeA
or this should be handled by BPM? Let say BPM is the last option how could this be configured in ID?
Cheers,
R-jayHello Folk,
you have once option in the interface determination check the maintanence order at runtime , it will solve your problem.
regards,
Ravi. -
How to handle Mandatory field in a FORM
Hi,
Version - Forms Builder (9.0.4.2.0)
I just want to know the best practice to handle mandatory field in a FORM.
Because if we put required property to 'yes' then can we input message there without writing validation in WHEN-VALIDATE-ITEM trigger.
In one of form I have; cursor couldn't move without entering that form. (even we set to Required property to No) How do this happen.
rgds
shabarHello,
If you want to replace the Forms standard message, you can write an item/block/form level When-Validate-Item, then remove the mandatory property from the item.
If you let the property to YES, you can write a block-level ON-ERROR trigger to change the message:
declare
lv_errcod NUMBER := ERROR_CODE;
Begin
if lv_errcod = '40202' Then
Message('You absotutly HAVE to enter this field');
else
Message('err:' || lv_errcod );
end if ;
end;Francois -
How to Handle Blank Field Value based Condition in SmartForms
Dear Sir,
In SMARTFORM , we need to define a Condition that incase Field Value is not equal to BLANK value (blank means that field is empty) then a specific text gets printed .
Our problem is that We do not know as how to define Empty Field Value based condition .
Had it been Non Empty Field value based condition then solution was simple and could be done in following way :
Field Value R Comparision Value
WA_KZDKZ = 'X'
In our case , we need to give Blank (Empty Value) instead of 'X' .
Kindly help us pl .
Rgds
B MittalHi,
To handle blank field values in SMARTFORMS,
Go to the conditions tab in your SMARTFORM and give condition there
Field Comparision operator value
<Field name> <> Here symbol is diff space.
eg:
wa_mara-matnr =/ space.
Regards,
Santosh Kumar M. -
How to handle multiple fields data
Hi All,
My data is :
FldName FldTypeCode Text
Sandya 02 nothing
Raj 01 12/Oct/2008
Lokesh 03 12546
Harish 04 12565.35
King 01 12/Nov/2007
Cobra 02 texttype In the UI I have give with refcursor all three fields data. now from UI to DB he is passing all values to update at a time.
Q) Now My question is How to update all the values.
Eg: Create procedure procdname (ip_allvalues in typerecord)
is
begin
--statements;
end;
the above procedure input parameter can handle all three fields data when they pass,
1) If the parameter handles, which type i need to create ?
2) How i need to update multiple records at a time?
Please can any body...
Thanks in advance..sanjuv wrote:
In the UI I have give with refcursor all three fields data. now from UI to DB he is passing all values to update at a time.
Q) Now My question is How to update all the values.With an update statement. Identify the row with a where condition and then set the new values. That's one of the first reasons why primary keys are used.
1) If the parameter handles, which type i need to create ?
2) How i need to update multiple records at a time? If you don't explain how you User Interface is designed to work nobody can tell you anything about it. Anyway for such things there is no need to define any type.
Usually the application should submit an update command(like the following one) for each row to update.
update <table_name>
set field_1= <value1>,
field_2= <value2>
field_n= <valuen>
where <primary key column> = <primary key value of the row to update>Bye Alessandro
Edited by: Alessandro Rossi on 6-ott-2008 16.37 -
How to handle BLOB field in receiver JDBC adapter into ABAP table
Dear Experts,
I am working in a synchronous scenario with Sender ABAP Proxy to Oracle Database as receiver via SAP PO 7.4.I will be calling a stored procedure view with fields ID, NAME,Age,*** and BLOB (Image binary).
1. The response from Oracle Database field BLOB is to be stored in ABAP table.Would I have to write any JAVA program to read the BLOB or the receiver JDBC adapter will handle it and store in a table by using ABAP proxy once it reaches ECC.
2. If yes, would the JAVA program have to deal with other 4 fields.
3. Can I use a UDF mapping to this BLOB field.
Regards
Rebecca...Dear Praveen,
Thanks for your response...
Please correct me if I am wrong.
1. For 1-1 response mapping for BLOB field, I will use just use the below UDF code.
public static byte[] hexStringToByteArray(String s) {
int len = s.length();
byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
+ Character.digit(s.charAt(i+1), 16));
return data;
2. ===Using the byte data, create binary attachment in mapping for abap proxy response===
Could you please share how to create the binary attachment.. I am not clear
Regards... -
How to handle custom field using BAPI_PO_Create1
i used to bapi_po_create1 to upload purchase order. in purchase order one custom field in item level warranty.
in CI_EKOPODB . I was send custom data in bapi using EXTENSIONN. BUT I GOT
ERROR PLEASE ENTER VALUE IN WARRANTY AND
Error transferring ExtensionIn data for enhancement CI_EKPODB.
IN A FORUM I GOT ANSWER TO IMPLEMENT BADI ME_BAPI_PO_CUST. BUT I AM NOT KNOW HOW TO IMPLEMENT IT PLEASE GUIDE ME.
PRANESH
Edited by: Praneshom on Mar 31, 2011 11:26 AM
Edited by: Praneshom on Mar 31, 2011 11:28 AM
Moderator message: please do not post in all upper case.
Edited by: Thomas Zloch on Mar 31, 2011 11:48 AMhi Diwakar.
my warranty field is int4 length 10.
I am already use BAPI_TE_MEPOITEM.
bapi_te_mepoitem-po_item = h_item..
bapi_te_mepoitem-warrenty = '6'.
WRNTY = bapi_te_mepoitem-warrenty.
CONDENSE wrnty.
CONCATENATE bapi_te_mepoitem-po_item WRNTY INTO POIT SEPARATED BY SPACE.
MOVE 'BAPI_TE_MEPOITEM' TO i_extensionin-structure.
MOVE POIT TO i_extensionin-valuepart1.
APPEND i_extensionin.
bapi_te_mepoitemx-po_item = h_item.
bapi_te_mepoitemx-warrenty = 'X'. "<--here the "difference"
CONCATENATE bapi_te_mepoitemx-po_item bapi_te_mepoitemx-warrenty INTO POITX SEPARATED BY SPACE.
MOVE 'BAPI_TE_MEPOITEMX' TO i_extensionin-structure.
MOVE bapi_te_mepoitemx TO i_extensionin-valuepart1.
MOVE POITX TO i_extensionin-valuepart1.
MOVE bapi_te_mepoitemx-warrenty TO i_extensionin-valuepart2.
APPEND i_extensionin.
Please review this code
Thanks
Pranesh -
How to handle Lookup Field in Add / Edit Forms
I have a list of properties and a photo library where each image has a 'property' column that defines which property it pertains to.
I've customized the DefaultDisplayForm and added a web part to show the images from Photo library related to the selected property. This works because I've "connections" so that filtering takes place (the property list "Provides
Row" to the Photos Web part which obtains 'Filtered Value from' the selected property
While this works fine, I am not sure how to extend this so that
1) Modify the DefaultEditForm so that user can drag / drop additional photos to the Photos List View web part, and have the lookup field be populated automatically.
2) Modify the DefaultAddForm to allow user to drag / drop photos for a new property (using drag drop) and have the lookup field be populated automatically.
3) Modify the DefaultDisplayForm to disallow the user from adding photos using drag / drop (i.e.l to force them to use the Default Edit Form to do this).
I would imagine I need to add some JavaScript snipped that sets the value of the lookup field in each photo being uploaded to the Property selected in the other webpart but I am not sure where I should do that ?
Any guidance appreciated.,Hi,
As there is no such OOTB feature can meet your requirement, it will need some customization with the REST API and JavaScript to implement the effect of drag and drop and the
auto-populated functionality.
Here is a demo about how to use the HTML file upload control to perform the picture uploading with “drag and drop”:
http://www.html5rocks.com/en/tutorials/file/dndfiles/
Another demo about how to upload file using REST API:
http://anthony-verschraegen.blogspot.com/2013/12/sharepoint-2013-js-upload-file-to.html
SharePoint 2013 REST API:
http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/office/jj164022.aspx
Best regards
Patrick Liang
TechNet Community Support -
How to handle empty field in idoc to file scenario
some field of IDoc is empty, there occurs error. like
<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:vendor_list/vendor[3]/company_code. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd atHi Shen,
You can do this in two ways :
1.If you are above XI3.0 SP14 then you can use the node function "mapWithDefault" in between the mapping. This will create the xml tag for the field on the target side even if you are not having those fields in the source side i.e., idoc.
2.At first check your field exists or not at runtime & based on that If exists then you map it to the target field else if you dont have then if the field is alphanumeric then map the same length spaces as constant in the target or if the target field is numeric then map with a constant having that many no. of zeros.
Ex:
If>Idocfield>Exists>then>Idocfield
>else>constant(may be with spaces or zeros)
Regards,
Vinod. -
How to handle error in Syncronus interface?
Hello everybody,
i have a Proxy -> PI -> jdbc interface scenario.
Sometimes the table insert have a error and i would like send back to proxy response the text error.
I tried to generate 2 Fault message and map them but no result.
In case of error i have in message monitor a error like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Inbound Message
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.xxxxxxxxxxx error to send back<SAP:AdditionalText>
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Any suggestion?
Thanks in advanceI think JDBC adapter does not support application interface.
So you can only access the error text of system fault exception. -
How to handle varchar(4000) field in reporting?
Hello,
I am having a Oracle database, the data in tables of which is being stored from a web application. One of the fields of a table is having varchar(4000) datatype.
The data in this field is text which may contain carriage returns also.
I have to create report of this table. How to display this data properly in a report?
I tried few things:
Accessed the table using SQL Developer and pasted the query output in Excel.
As the text contains carriage returns, it is being spread into one or more rows.
How to handle this? What is the proper way to create report for such data?
Please help.
-SameerYou the following to remove the carriage returns
SQL> select 'a'||chr(10)||'line2
2
SQL> select 'line 1'||chr(10)||'line 2' from dual ;
'LINE1'||CHR(
line 1
line 2
SQL> select replace('line 1'||chr(10)||'line 2',chr(10),'') from dual ;
REPLACE('LIN
line 1line 2
If this is not the soln , can you paste some sample data -
How to handle a comma in a field in CSV file during FCC ?
Hi,
I am having a requirement where we have to convert a CSV file into XML using File Content Conversion . The issue is one of the field in the file is having a comma inside. So the XML parser is taking it as a field separator and throwing an error.
The contents of the file are as follows:
"02975859","New Key","9","Failed, rejected by RTI server"
How to handle a comma inside field "Failed, rejected by RTI server".
Any help would be appreciated.
Regards
PraveshHi ,
You have to write an java mapping programm to perdromance this task , in a estandar way i think is not possible , because the fiel adapter have just one option for the delimiter character.
Here's some code that could help you
Supouse a file in this way:
1,rahul,siemens,mumbai
2,consultant,12032005
1,viswanath,sisl,hyderabad
2,systemeng,23052005
package TXTMapping;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.Map;
import com.sap.aii.mapping.api.StreamTransformation;
public class TMapping implements StreamTransformation {
private Map map;
public void setParameter (Map param){
map = param;
public void execute (InputStream in, OutputStream out){
try{
out.write("<?xml version ='1.0' encoding='UTF-8'?>".getBytes());
out.write("<ns0:Output_Data xmlns:ns0=\"urn:javamapping_test\">".getBytes());
String line = null;
BufferedReader bin = new BufferedReader(new InputStreamReader(in));
StringBuffer buffer = new StringBuffer();
while((line = bin.readLine())!= null){
String Company = null;
String Name = null;
String Place = null;
String Desgn = null;
String Since = null;
char[] str= new char[100];
str = line.toCharArray();
String[] Data = new String[10];
int S1 = 0;
int s2 = 2;
for (int i=2; i<line.length(); i++)
if (str<i>==',' && str[0]=='1')
Data[S1]= line.substring(s2,i);
S1=S1+1;
s2 = i+1;
if (i == line.length()-1 && str[0] == '1')
Data[S1]= line.substring(s2,i+1);
Name = Data[0];
Company = Data[1];
Place = Data[2];
out.write ("<Data>".getBytes());
out.write ("<Header>".getBytes());
out.write (("<Name>"Name"</Name>").getBytes());
out.write (("<Company>"Company"</Company>").getBytes());
out.write (("<Place>"Place"</Place>").getBytes());
out.write ("</Header>".getBytes());
if (str<i>==',' && str[0]=='2')
Data[S1]= line.substring(s2,i);
S1=S1+1;
s2 = i+1;
if (i == line.length()-1 && str[0] == '2')
Data[S1]= line.substring(s2,i+1);
Desgn = Data[0];
Since = Data[1];
out.write ("<Item>".getBytes());
out.write (("<Designation>"Desgn"</Designation>").getBytes());
out.write (("<Since>"Since"</Since>").getBytes());
out.write ("</Item>".getBytes());
out.write ("</Data>".getBytes());
out.write("</ns0:Output_Data>".getBytes());
catch(Throwable t){
t.printStackTrace(); -
How to handle empty Dats field received from SAP RFC response
Hi All,
I am invoking a SAP RFC which gives me a Dats field in response.
A valid dats fields is successfully received by my pipelines.
But when an empty Dats field is received, My pipeline fails and i get error.
How to handle the empty Dats field from SAPHi Anant,
This is because the legacy SAP adapter accepted RFC messages with date field empty. In the new version, the same call results in an error. WCF-SAP adapter doesn't allow blank XML nodes.
You need to use the below custom pipeline component as a workaround.
Refer:
Pipeline component for enabling legacy behavior in WCF-SAP adapter.
Rachit
Please mark as answer or vote as helpful if my reply does
Maybe you are looking for
-
Can I delete all files and users (including admin account) without re-installing SL?
I have a 1st generation Macbook Air, running Snow Leopard 10.6.8. Just bought myself a new MBA, want to sell the old one (privately, not soliciting here). The original install disks were Leopard. I bought a family pack SL and upgraded the MBA at th
-
Running Lion and Snow Leopard on the same MacBook Pro
So here's the thing .....apparently Lion won't run Photoshop and Illustrator CS2 (which I'm quite happy with and not about to shell out silly amounts of money to Adobe for even CS3) and apparently there may be (and I stress may be) problems with Word
-
Message Send Failure - Only in one location
When sending MMS to ANYONE in my home town, It never goes through and results in a "Message Send Failure". Every once in a while it MIGHT work. I have full bars.. in fact, I can see the tower from my back yard with a clear line of sight. it's right n
-
my itunes says that it is not correctly localized for this language. please run english version. how do i do that?
-
Can somebody contact me to walk me through solving this problem?