Conversion of MENGE and DMBTR fields
Hi Guru's,
Here I'm facing some problem with the conversion
I have to convert price field(EKBE-DMBTR) from 123.45 of data type CURR to 12345 of data type CHAR, and
also quantity field(EKBE-MENGE) from 123.456 of data type QUAN to 123456 of data type Numeric which are in EKBE table.
Hi,
Use WRITE statement to convert the currency value to a character value.
WRITE <curr field> TO <char field> CURRENCY <currency>.
or
Try out this FM.
TRS_CONVERT_AMOUNT_TO_TEXT
For qty also you can use write.
<b>Reward if helpful.</b>
Similar Messages
-
Content conversion without delimiter and key fields
I am pretty new to XI, so it has been very challenging till now... (and someway I want to keep it that way) But this problem has kept me awake a couple of nights, so I will unleash it to the XI experts at SDN!
I have to read a legacy file (customers are ordering stuff) with the following content into XI. I finally found out you can use file content conversion to do the job, but I have only seen scenarios where people can use delimiters or key fields so far. I suppose XI can do this job as good as the others, but the question is how it has to be done! :-s
Do I have to use key fields? Or can I simply state there will be 1 header line, X order lines, 1 EOF line?
Sample content:
100207.310551
0107299700001
0108658400001
0109575600001
1200276500001
0109745600001
9999999999999
Header line containing the customer (100207) and the ticket number (300551) separated by a dot.
In this case 5 order lines containing material (8 digits, ex 01072997) and quantity (5 digits, ex 00001)
Line containing only 9's to indicate the end of the file has been reached.
Thanks in advance!
SvenHi Sven,
This FCC might help u..If your structure like ...
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:bestin xmlns:ns0="http://test.com">
<recordset>
<header>
<client>100207</client>
<ticket>310551</ticket>
</header>
<item>
<material>01072997</material>
<quantity>00001</quantity>
</item>
<item>
<material>01086584</material>
<quantity>00001</quantity>
</item>
<item>
<material>01095756</material>
<quantity>00001</quantity>
</item>
<item>
<material>12002765</material>
<quantity>00001</quantity>
</item>
<item>
<material>01097456</material>
<quantity>00001</quantity>
</item>
</recordset>
</ns0:bestin>
then
RecordStructure----header,item
otherwise
RecordStructure----client,ticket,item
client.fieldFixedLengths----give length of client
ticket.fieldFixedLengths----
item.fieldFixedLengths----
client.fixedLengthTooShortHandling--Cut
ticket........same
item.....
client.addHeaderLine--0
ticket........same
item.....
recordsetStructureOrder---var
Cheers!
Samarjit
Message was edited by:
Samarjit Dey -
Difference between fields MENGE and MNGLG
Hi All,
Can any one explain me the difference between fields MENGE and MNGLG ( both are Component Qty).
I need to know this we are developing a report based on
CS12, CS13…and which one I need to consider.
Thanks for the helpHi,
MNGLG field gives the calculated component quantity based on your input required quantity EMENG. The value of which will match with the production order. ( no rounding off )
EMENG is the quantity of the parent product that you want to produce and then the function module will return you with the quantities of each of the components required to make this quantity of the parent product. The fields MNGLG, MNGKO will give you the required component quantity in base unit of measure and component unit of measure(as per the BOM).
Regards,
Narresh -
Runtime error in Dynamic internal table with AMOUNT and Quantity Fields..
Dear friends,
I am attempting write a dymanic Select Statement (with joins).
And the sleect query looks like this..
SELECT (LT_SEL_LIST)
INTO CORRESPONDING FIELDS OF
TABLE <DYN_TABLE>
FROM (LT_FROM_LIST)
WHERE (LT_WHERE3).
Here the into table is a dynamically created internal table..
which is created by ...this
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_OUTPUT2[]
IMPORTING
EP_TABLE = DY_TABLE.
the it_output2 contains the the fieldcatlog information of dynamically given fields :-
like:-
TABNAME
FIELDNAME
DATATYPE
LENG
INTTYPE
ROLLNAME
DECIMALS
REFTABLE
REFFIELD
i mean the internal table is constructed with reference to all the bove metadata.
Problem:- This query run fine with all the fields Except AMOUNT AND QUANTITY fields....
When the selection list contain VBAK-NETWR or MSEG-MENGE..It throws a runtime error.
"The data read during a SLECT access couldnt be inserted into the target field,either conversion is not supported for
the target field's type or the target field is too short."
after this I even tried to construct the dynamic table with CFILEDNAME and QFIELDNAME in the Fieldcatalog.
so now my fieldcatlog looks like this:---
LOOP AT IT_DD03L..
IF IT_DD03L-DATATYPE = 'CURR'.
TABLEFIELD-CFIELDNAME = IT_DD03L-FIELDNAME .
ENDIF.
IF IT_FIELDCAT3-DATATYPE = 'QUAN'.
TABLEFIELD-QFIELDNAME = IT_DD03L-FIELDNAME .
ENDIF.
TABLEFIELD-TABNAME = IT_DD03L-TABNAME.
TABLEFIELD-FIELDNAME = IT_DD03L-FIELDNAME.
TABLEFIELD-DATATYPE = IT_DD03L-DATATYPE.
TABLEFIELD-INTLEN = IT_DD03L-LENG.
TABLEFIELD-INTTYPE = IT_DD03L-INTTYPE .
TABLEFIELD-ROLLNAME = IT_DD03L-ROLLNAME.
TABLEFIELD-DECIMALS = IT_DD03L-DECIMALS.
TABLEFIELD-REF_TABLE = IT_DD03L-REFTABLE.
TABLEFIELD-REF_FIELD = IT_DD03L-REFFIELD.
APPEND TABLEFIELD.
CLEAR TABLEFIELD.
ENDLOOP.
Note:- this is a test code so ignore performance issues...
Please help me with some code ...to avoid the Runtime erorr.
Thanks,
jeevan.Hi Jeevan,
Why are moving only few fields from DD03L table to your field catalog? Why don't you use move-corresponding? The following code works for me in ECC6.0.
data: it_dd03l type table of dd03l initial size 0,
ls_dd03l type dd03l,
lt_fldcat TYPE lvc_t_fcat,
ls_fldcat TYPE lvc_s_fcat,
ls_where(72) TYPE c,
lt_where LIKE TABLE OF ls_where,
lt_fld LIKE TABLE OF ls_where,
lt_data_dy TYPE REF TO data.
field-symbols: <ft_data> TYPE STANDARD TABLE.
select * into table it_dd03l from dd03l
where tabname = 'VBAK'
and ( fieldname = 'VBELN' or fieldname = 'NETWR' ).
check sy-subrc eq 0.
loop at it_dd03l into ls_dd03l.
move-corresponding ls_dd03l to ls_fldcat.
append ls_fldcat to lt_fldcat.
move ls_dd03l-fieldname to ls_where.
append ls_where to lt_fld.
if ls_dd03l-fieldname = 'VBELN'.
clear ls_where.
concatenate ls_dd03l-fieldname ' <> ''''' into ls_where.
append ls_where to lt_where.
endif.
endloop.
check not lt_fldcat is initial.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_fldcat
IMPORTING
ep_table = lt_data_dy
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE no_configuration_data.
ENDIF.
ASSIGN lt_data_dy->* TO <ft_data>.
check sy-subrc eq 0.
select (lt_fld) from VBAK into corresponding fields of table
<ft_data>
where (lt_where).
Thanks
Bala -
Summing of currency and quantity fields individually
hi experts
From Table BSIS fields are BELNR, BUDAT, DMBTR, MENGE required output is quantity and
currencey fields should be sum at line item level.write a program ?
regds
Venkyselect belnr budat DMBTR MENGE FROM BSIS INTO table it_bsis.
loop at it_bsis.
AT NEW BUDAT.
SUM.
ENDAT.
ENDLOOP.
SUM----
IT WILL AUTOMATICALLY SUMS THE QUANTITY AND CURRENCY , INTEGER FIELDS -
Negative sign for DMBTR field in ALV output
Hi Experts,
Before posting I have searched for more than 3 hours in the forums to get a solution for this.
I did not get any solution so I am posting this problem which I need to resolve.
I have to display the DMBTR field in ALV output for which a grand total will have to be displayed.
Here for all the values in DMBTR which are negative are getting displayed as '- 6673.56','- 289956.23' as I am using the edit mask 'V_____________.__'.
I have to get the value shown as '-6673.56', '-289956.23'.
I tried to use convert this DMBTR to String and have successfully displayed the negative sign correctly in front of the value but I am not getting the totals which I need to have
PLease check and suggest for a solution.
Regards
KishoreHi,
If this is the case, then you can use character field to display the sign on the left. Sum up the total and use the event end of list to display the same. Remember to set the TECH and NO_OUT in the field catalog.
Hope this helps.
Regards,
Siva -
MS Word Web Service Interface: bad format of date and currency fields
Hi,
I am using MS Word Web Service interface to create contract documents. However, my date and currency fields show in a strange format. Date is in"YYYY-MM-DD" format, while currencies always have "." as decimal separator (probably technical values). My user settings are "DD.MM.YYYY" for dates and "n.nnn,dd" for decimal numbers.
My workaround is to create a Z structure for WS interface with char fields and then do conversion through CRM_WST_RT_BADI->OUTBOUND_PROCESSING method. This works, but requires a lot of custom development.
Is there a way to "tell" the interface to use correct formats in MS Word without doing it all manually through custom fields?
Thanks!
KR,
IgorOh, indeed!
We might be closer than you think - I live close to Croatian-Slovenian border so we might pop out for a drink! But we can discuss this out of forum...
Now work again:
Is there any documentation on possible formatting keywords? I suppose it's possible to set up decimal places, custom date formats etc.
Cheers,
Igor -
IDOC mapping issue (calculation using parent and child fields)
We are mapping an IDOC to a file for output to a third party. The IDOC has many segments, some of which are embedded. This is where I'm having the issue. I am trying to perform a calculation on a field from the parent node (E1EDP01-MENGE) with the field from the child node (E1EDP05-KRATE) to determine the total tax for that line (qty X rate).
<b>Issue:</b> The mapping that is in place is using the same MENGE value for all calculations, even where the E1EDP01 segment is not a parent of the E1EDP05 segment.
Please review the screen prints and explain how I can correctly group the E1EDP05 child segments rate field (KRATE) with the corresponding parent segment E1EDP01 quantity (MENGE).
<b>Example:</b>
Parent segment, E1EDP01 / Child segment E1EDP05 (There are many E1EDP05 segments for 1 E1EDP01 segment)
E1EDP01 (parent node)
E1EDP05 (child node)
<b>Target structure</b>
ITEM (parent) --->E1EDP01 is mapped at node level
-->ITEM_DATA --->E1EDP01 is mapped at node level
-->ITEM_TAX --->E1EDP01 is mapped at node level
-->(fields for item_tax)
-->Record type
-->Invoice number
-->Line total
-->etc...
I am mapping (E1EDP01-MENGE) for calculation with (E1EDP05-KRATE) to determine tax at the line item level. I have the context set at each Node, E1EDP01 for MENGE and E1EDP05 for KRATE. I was using CopyValue, but this was using the frist occurence of MENGE for all line items.
<b>mapping example</b>
<u><b>*I am using MENGE (Copy_Value) then multiplying by KRATE to get the line item total. This was causing the same MENGE (because of Copy_Value) for all line items.</b></u>
E1EDP01-MENGE|Copy_Value|MULT--->TAX_ITEM-LINE_TOTAL
E1EDP05-KRATE|
I removed the CopyValue and now I'm getting the following error:
Cannot produce target element /ns0:MT_DTN_INVOICE1/INVOICE/ITEM/ITEM_TAX[3]/LINE_TOTAL. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
How can I map this so the child records (E1EDP05) are grouped with the correct parent records (E1EDP01)?
Thanks in advance!
MichaelCheck this blog:
/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
Regards
Stefan -
Hi All,
While transferring materials form ECC to GTS (Sandbox), i am receiving the above mentioned error.
Conversion error in module API6850_HDR_PROD_MAP, field API6850_HDR-WEIGHTUNIT_ISO, value LBR.
As per standard , In the ISO code for US pound its mentioned as LBR in both ECC and GTS
But within material master we generally use LB as US pound.
Can anyone please let us know how we can solve this one?
Regards
ProloyHello Proloy,
UoM handling is often issue within material transfer.
You have generally 2 options:
1. In GTS maintain via TA CUNI your LB as is in your feeder. I would suggest to adjust GTS customizing with your ERP. Just do Utilities --> Adjustment and your RFC to feeder.
2. Or you can map your LB to GTS LBR via user exit.
Cheers,
Gabriel. -
Currency and Quantity fields problem in FM
Hi ALL
<b>Can anyone help me on this. Very Urgent</b>
I created a FM, in that i used NETPR,MENGE,WEMNG.(CURRENCY , QUANTITY ) fields.
When i am trying to activate, it is asking for reference fields.
I don't know how to resolve it...
Regards
Prabhakarhi,
pls refer to this thread for use...
how can create a function module for currency and quantity fields
Message was edited by: Ganesh Sundarakrishnan -
Can u pls tell what r the currency and quantity fields in detail.
hi to all can u pls teell
can u pls tell what r the currency and quantity fields in detail.
what is reference table .and reference fields .why we r giving theese reference table names while creating the currency fields .Hi,
Currency amount fields and quantity fields are numeric fields which each have a currency or unit field assigned to them. The correct interpretation of the values in these fields depends on its currency or unit of measure. Therefore, you can decide whether you want their corresponding currency/unit of measure to be displayed before or after the field, or not at all. Proceed as follows:
1. Select the field.
2. Choose one of the options from the window on the lower left (before, No currency field/unit, or after).
3. Choose Apply.
For more information check the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/0b/5da4e42cf511d5b692006094192fe3/frameset.htm
Following are system variables of currency:
SY-CCURS
R/2 - exchange rate and result field for CURRENCY CONVERSION. Not filled in R/3.
SY-CCURT
R/2 - table exchange rate for CURRENCY CONVERSION. Not filled in R/3.
SY-CDATE
R/2 - exchange rate date for CURRENCY CONVERSION. Not filled in R/3.
SY-CTABL
R/2 - exchange rate table for CURRENCY CONVERSION. Not filled in R/3.
SY-CTYPE
R/2 - exchange rate type for CURRENCY CONVERSION. Not filled in R/3.
SY-DCSYS
Dialog system of the R/2 System. Not filled in R/3.
SY-WAERS
Formerly the company code currency after reading a posting segment. Not filled in R/3.
Regards,
Bhaskar -
Conversion Routines - R3 and BW
I need to create a custom InfoObject in BW to map to an R3 field in an InfoSource. The R3 field has the ABPSP converions routine applied to it. As a rule of thumb is it always best to apply the same conversion routine to the matching BW InfoObject? Is there a time that I wouldn't want to match the conversion routine of the R3 field to the matching BW InfoObject? Your help is appreciated.
Hi David,
Conversion routines in BW will aid in eliminating the technical differences of data format to be acceptable by the BW system. You cannot directly map R/3 Conversion routine to BW Conversion routine as far as my knowledge goes. Please map the infoobject in BW with the R/3 field directly and check if the converted data is directly coming into BW from the R/3 system as you said there is a conversion already existing in R/3. If this doesnot solve your problem, then you can create your own conversion routines using SM37 t.code wherein you will create your conversion rule specifying CONVERSION_EXIT_XXXXX_INPUT and CONVERSION_EXIT_XXXXX_OUTPUT. Where XXXXX is a 5 letter user-specified name of the Conversion. INPUT code is written for converting sourcesystem data to be acceptable into BW tables. OUTPUT is written to converting the BW data into acceptable reporting display. You need to activate both the function modules created in order to use them during infoobject property settings. While using them you can directly see the XXXXX (user-specific) conversion during infoobject conversion settings.
Hope this might be helpful to you. Award points if useful.
Thanks
Kishore Kumar -
How to find conversion exit MATN1 for the field MATNR
Hi Friends !
I want to run the infopackage with selection on material. But when put some value in the infopackage selection screen, it says "cannot find conversion exit MATN1 for the field MATNR".
Ques is how to find where this conversion exit is written? Will it be written in ECC side or BI side?
Source System Datasource : 0MAT_SALES_ATTR
InfoObject in BI : 0MAT_SALES
With Regards
RekhaHI ,
It will be available in the BI system itself as FM , you can find them in TCODE : SE37 --> provide the converstion exit name
with star on both sides like MATN1 and press F4 key , every convertion exit will have two FM s , one for INPUT and
one for OUT put , you can try the Test Run ofFM to check how it works
For MATN1
CONVERSION_EXIT_MATN1_INPUT
CONVERSION_EXIT_MATN1_OUTPUT
Regards,
Sathya -
Dear expert,
I want to know about MSEG-DMBTR field.
DMBTR (Amount in local currency)
This field(DMBTR) contain SUM OF amount ( dmbtr = Base Amount + excise(all) + vat or cst + dilivery cost)
or
only DMBTR = Base Amount.
please help me.
Thanks and regards
jyoti prakashHi
DMBTR has only the "Base Amount". For taxes and other amounts, you have different other fields.
I hope this is helpful.
Thanks
Shakir -
DSO - What key fields and data fields in dso
Hi experts,
I need to create a dso in between the cube and 2 data sources(2lis_11_vaitm, 2lis_12_vcscl) to stage the data. My question is: what key fields and data fields to choose for the dso? is there a standard dso to copy? please explain in detail the model to set up, whether to connect both the ds's to dso and then to cube or one ds to dso and the other to the cube. more details will help.Check this for standard DSO:
http://help.sap.com/saphelp_nw04/helpdata/en/43/fcdc387f34384f94c3227baf3837a8/content.htm
Thanks...
Shambhu
Maybe you are looking for
-
Error deploying composite on SOA Suite 11g: premature EOF encountered
I am getting the following error when trying to deploy a SOA composite from Jdev 11.1.1.2.0 (on XP) to SOA suite 11.1.1.2.0 (on linux): [10:36:43 AM] Error sending deployment request to server soa_server1 [xxx.xxx.x.xx:8001] java.io.EOFException: Pre
-
This is a stumper of a problem
This is quite a specialised problem and i hope someone can help me I am writing a jsp web page to display information from a ldap directory. It works fine except i need to specify where the program is to search the ldap tree. When i specify no locati
-
Preset Preview on Second Monitor
I would like to take this opportunity to submit a feature request that would make it possible to preview how a preset would look like on a second monitor. As it currently stands you can preview the effect in the small image above the preset list. Unf
-
How I download a Tv series from DVD to itunes?
How I download a Tv series from DVD to itunes?
-
Icon on call out screen blue and black box
Hi I have a bb curve 8330 I'm getting a blue and black box blue on top and diagonal line then black on the bottom when I make a call out this just showed up. Its on the right hand side top. Also it goes away when I put speaker phone on. I have had my