How to access Target field type, length from DT definition
I have defined the XSD Type (String, Number, Date..) and the length in the DT for the Target message
How do I access this info. in the mapping - so I can fill trailing spaces on String data, and zero-fill on Numeric data on the outbound XML MT ?
Thanks in advance!
Hi Satish,
Thanks for this info.
Exactly - I am trying to avoid Field length maintenance on every field level mapping.
Currently, I have a HashMap defined as follows..
empFieldLengthsMap = new HashMap();
// emp field lengths
empFieldLengthsMap.put("Record_Type","1");
empFieldLengthsMap.put("Movement_Type","1");
empFieldLengthsMap.put("Company_Code","3");
and then a UDF that yields me the size as follows from the map
String out = "";
out = (String) empFieldLengthsMap.get( targetField );
if (out == null || out.equals("") ) {
out = "0";
return out;
HOWEVER, I cannot get the target field to input into this UDF! Any ideas?
Mustafa
Edited by: Mustafa Dadawalla on Jul 15, 2010 11:44 AM
Similar Messages
-
How to access Business object type attribute from a method/function modul ?
Hello,
i have created a business object type object along with attributes and methods. Now inside the method i want to access the attributes. inside the method i am writing:
data a type XXX.
a = me->attribute
this is creating a compilation error.
Now the method is defined as a function module in some package, so can anyone inform me how to access object attributes from the function module ?
pointes are awarded
RegardsHello,
thanks for your answer, but this too did not work, "=>" is for static attributes and the attributes i have are not static. Moreover, i tried it but it gave the same error :
the abap error was when i was checking the code is :
the type me=>documenttype is unknown
as you know in SWO1 i created an object and when i create a method you link it to a function module and this is where you have the implementation of the method, so from this method how can i access the attributes on the main object that i created in SWO1
regards -
How to access the table type field in the structure
Hi All,
I have a BADI CRM_MKT_ADR_SEARCH and a method CHANGE_SEARCH_RESULTS in this method I have a parameter CT_BP_CP_CHANNEL .This parameter has type CRMT_BP_CP_CHANNEL_TAB(this is table type) this has the line type CRMT_BP_CP_CHANNEL(this is structure) in this line type we have one field addrnumber.How to access this field in my method?Please help me in this regard.data lw_tab type CRMT_BP_CP_CHANNEL.
loop at CRMT_BP_CP_CHANNEL_TAB into lw_tab.
lv_field = lw_tab-addrnumber.
<further processing>
endloop. -
How to access hidden fields in a table
hi
what is the use of hidden fields in a table, ie. some fields doesn't visible in the field list of a table. but the fileds will be visible if u display its contents.
for example in table t518A the text field is not visible in the field list. But it will be visible if display its contents. can any one of u please help me out how to access those fields.
regards
sriHi Srivallika,
The table T518A has a text table called T518B. You can have a look at this table by:-
1. GOTO SE11 and display table T518A.
2. GOTO menu GOTO -> TEXT table. It gives the text table for the given table. Here its is T518B.
A Text table is table with same key fields as the main table with another extra Language key TYPE SPRAS. This table is related to the main table. Hence to access the extra text fields, you can use the TEXT table :).
Thanks and regards,
Ravi.
NOTE: Points keep me alive on SDN . -
How to access a field of a structure with a field symbol?
Dear all,
Currently I'm trying to access the fields of a structure (called "ls_tbl") dynamicly. The code looks as follows (of course the field symbols are defined correctly ;-):
ASSIGN lv_f1 TO <lv_f1>.
ASSIGN lv_f2 TO <lv_f2>.
lv_pp = ls_tbl-(<lv_f1>).
lv_pt = ls_tbl-(<lv_f2>).
Unfortunatly I get the following error message:
<<The data object "LS_TBL" does not have a component called "".>>
I really do not understand why ABAP is trying to interpret the field symbol name as a string. Does anybody have a clue how to access the field of ls_tbl with the help of a field symbol?
Many thanks!!!Hi ,
Please check the below sample code .
data : begin of st_table,
myfiledname type c value '1',
myfiledname1 type c value '2',
end of st_table .
data : lv_filedname(11) type c value 'MYFILEDNAME'
filed-symbols : <fs> type any,
<fs_table> type any.
assign st_table to <fs_table>.
Assign lv_filedname to <fs> .
assign component <fs> of structure <fs_table> to lv_pp.
Regards,
Ratheesh BS -
Ok, how do I target Air 2.5 from Flash CS5?
How do I target Air 2.5 from Flash CS5?
I'd kill to have the enhanced css support...
Thanks!
-TedYou can post this on Flash's forum. You should get a good answer from there.
As I understand, there should be an update in MAX. Not sure how the update will get released. -
How do I target Air 2.5 from Flash CS5?
Ok, how do I target Air 2.5 from Flash CS5?
I'd kill to have the enhanced css support right now...
Thanks!
-Tedok, so i found the answer to my own question, for the moment gor here for the extension to do 2.5 in cs5:
http://labs.adobe.com/technologies/flashpro_extensionforair/ -
How To Access PAGE ITEM (single row) from HTML source
Hi Guys,
I have a page Item that return a string.
I would like to show this string
How To Access PAGE ITEM (single row) from HTML source?
My desire final output is
<marquee>:P1_PAGE_ITEM</marquee>
Can please help me
ThanksHi,
You can refer the page items in your page header as &itemname. For example, if I have page item P15_TEST, I will add the following in header:
<marquee>
&P15_TEST.
</marquee>But make sure that you have a process before header to populate the value in your page item. Otherwise, there will be a null scrolling (which you can't see!) :)
Regards,
Zahid -
How to get the field type from the database dictionary in screen painter
hi,
I wanted to create a new input field that input field should have the data element from the structure that i have created. How to get the data field type from the database dictionary in the screen painterhi
good
there is two kinds of evernt
PROCESS ON HELP-REQUEST
PROCESS ON VALUE-REQUEST.
which ll help you to give two types of help one is f1 help and another one is f4 help
go through this link
http://help.sap.com/saphelp_nw2004s/helpdata/en/47/e07f622b9911d2954f0000e8353423/content.htm
thanks
mrutyun -
How to access complex data type from a soap web services?
hello
can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
Jdeveloper generates 3 classes
serviceStub
getproperties
response
i have to retreview the data which is a complex data type it gives some
unknown type. and the return value is a key-value pair data type .
regards
vsAfter you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.
-
How to read the field type from field id of DynamicFldTbl
Hi,
In my application, i am using DynamicFldTbl, whch parses FML32 field table definition file. My field table definition file contains information about field names and its types.
I checked the API of DynamicFldTbl and didn't find any API to get the field type from field it.
Any way to read the field type from field id?
Thanks in advance
RaguramanHi Raguraman,
Once you have the field table, you can then create an FML32 buffer (TypedFML32) using the constructor that takes a field table, and then use the Fldtype() method on the specific field ID you wish to get the type of. I know this is sort of tedious and we should provide Fldtype() and some others on the field table class directly.
Regards,
Todd Little
Oracle Tuxedo Chief Architect -
How to access dynamic fields in a field symbol
hi
how do i access the dynamic fields created in side a field-symbol....
wht i mean is i have a table, whose workarea i assign to field symbol. but this table is runtime, altough i have debugged and found the values in this table, I want to accees the field symbol in a generic way.
say the table has 3 fields now fld1 fld2 and fld3 so i want to access the field symbol <fs> as <fs>-(name) where name can be anything fld1 or fld2 whichever i assign....
thanks. Let me know if you have any further questions.Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to a field symbol before you can address it in a program.
Field symbols are similar to de-referenced pointers in the C programming language (that is, pointers to which the content operator * is applied). In ABAP, data references represent a real equivalent to pointers in the sense of variables that contain a memory address and can be used without the contents operator.
All operations programmed with field symbols are applied to the field assigned to it. A MOVE statement between two field symbols, for example, assigns the contents of the field assigned to another source field symbol to the field assigned to the target field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before the MOVEstatement.
You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks during the field assignment whether the assigned field matches the type of field symbol.
Field symbols provide greater flexibility when you address data objects:
· You can assign one field symbol to another, which allows you to address subfields.
· Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
· You can also force a field symbol to take different technical properties than those of the field assigned to it (casting).
The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. The MOVE statement (with your own auxiliary variables, if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
To declare a field symbol, use the statement
FIELD-SYMBOLS .
For field symbols, the angle brackets are part of the syntax. They identify field symbols in the program code.
If you do not specify any additions, the field symbol.
in a static ASSIGN and:
ASSIGN (dobj) TO from the second loop pass onwards. -
How to access complex arrays/types in a class
public class VirusScanMessage {
public byte[] fileContent;
public int fileSize;
public String messages;
public String datLocation;
jclass clazz = env->FindClass("VirusScanMessage");
// get field
jfieldID byteArrayField = env->GetFieldID(clazz,"fileContent","[b");
// get the byteArray object
jbyteArray byteArray = env->GetObjectField(object,byteArrayField);
// get array length
jsize fileContentLength = env->GetArrayLength(byteArray);
jbyte * fileContent = env->GetByteArrayElements(byteArray,0);
// do stuff
// release array
env->ReleaseByteArray(byteArray,fileContent,0);thats the normal way but how to access the arrays if they are complex like this(struct1,class2)?:
public class VirusScanMessage {
public struct1[] fileContent;
public int fileSize;
public String messages;
public String datLocation;
public class2 cl2;
}Note that your code is missing error checking.
thats the normal way but how to access the arrays if they are complex like this(struct1,class2)?:Retrieve each item from the array as an Object.
[http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/functions.html#wp21671] -
How to access screen field in pai event
Hi All,
I have created a custom screen it has the field say matnr selected from the dictionay.NOw how will I should access this field in PAI event module?
Thanks in advance
Maheshjust declare the same variable in your abap editor as per your layout field name.
suppose in your layout input field name is matnr just declare
data : matnr like mara-matnr.
in pai module if you are using matnr it will give you the screen data.
like
module pai input.
if matnr ne '1000'.
message 'Error matnr is not 1000' type 'E'.
endif.
endmodule.
reagards
shiba dutta -
How to access a field of an data source w/o binding a form field to it
Hi
This is a query regarding ADOBE print form.
How to access a record field (of an data source.... typical multi row records) where the record is bound to a subform.
Data is something like
(I have used abap parlance for understanding)
data : begin of data_tab occurs 0,
field1 type .....,
field2 type .....,
fieldm type .....,
fieldn type .....,
end of data_tab.
Subform is bound to
$.DATA_TAB.DATA[*]
How to access field1, field2,...... etc without creating subform fields and binding them to field1, field2, .... fieldn.
I know normal approach is to define subform fields and then bind it to $.field1, $.field2 etc
In the calculate event of a field bound to $.fieldm I have tried the following expressions to get the value of column fieldn of the same record but none of them worked.... Note that if I bind the field using $.fieldn data is displayed properly in the print form.
$record.data_tab.fieldn.value
$record.data_tab.data[*].fieldn.value
$record.data_tab.data.fieldn.value
$record.data_tab.fieldn.value
Otherwise I would have to define hidden fields just to use these column values in the event script even though these value are not to be displayed in the ADOBE print form.
Regards
AbapperI can't remember the exact sentence, but do a little search, as that is a common question in this forum....
How about:
$record.data_tab.data[1].fieldn.value
$record.data_tab.data[2].fieldn.value
$record.data_tab.data[2].fieldn.value
$record.data_tab.data[N].fieldn.value
Cheers.
Maybe you are looking for
-
I can no longer sync my touch with my computer. I'm being told that "the sync server failed to sync the iPod."
-
Discount pricing is not copied from Qoutation to Sales order.
Hi All, Issue: Discount pricing is not copied from Qoutation to Sales order. Please suggest the correct copy control/Routine programs which i can check to proceed furthur. Points will be rewarded. Regards, neslin.
-
Soft Proofing now dark & yellow
Photoshop (CS4 on Windows XP) froze at startup this morning - 3 times in a row. I was able to restart but now my custom Soft Proof settings, and I tried serveral, make the images display as dark and yellow. It's as if the Paper White setting was the
-
Device Manager and Desktop Software fail to work after a profile migration
Hi there, I have just moved in a Windows Domain so I had to change my IP configuration. I have done a moveuser to move my local profile to the domain's profile. My Device Manager and, therefore, desktop software are not responding anymore. I keep rec
-
My ipod shuffle 4gen won't work with my windows 7 computer
Hi I have a brand new ipod shuffle 4gen, it sincronizes music with my netbook but it doesn't work with my windows 7 computer. An apple assistant helped me to uninstall itunes completely and it worked for a day. Now it doesn't work again, can you help