CONVERSION_EXIT_CUNIT_INPUT
Hello Everyone,
I am getting this error while uploading the transaction data. I created the Info Package and in the External Data tab, I gave the link to the csv file which I am trying to upload. When I am trying to preview the data, I am getting this error
Error in conversion exit: CONVERSION_EXIT_CUNIT_INPUT
I checked the excel file which I am uploading and data is correct. I did not see any extra spaces.
Could someone please tell me what do I have to do to remove this error.
Regards,
Abhishek
Thanks!!
In the UNIT field, one of the units (CS) did not have export parameter in the logon language.
Thanks for your help
Regards,
Abhishek
Similar Messages
-
Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT
Dear all
I got the following error
" Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT "
This is an original sample data.
~
CUST007,SREP07,MAT008,3,DZ,1,,19990424
CUST008,SREP08,MAT008,3,DZ,2,,19980328
CUST008,SREP08,MAT009,2,CS,3,,19980203
CUST008,SREP08,MAT010,1,LB,4,,19991104
CUST009,SREP09,MAT011,1.5,LB,5,,20000407
CUST010,SREP10,MAT011,1.5,LB,6,,20000701
~
you can download it from [ http://safariexamples.informit.com/0201703661/IC_DEMOBC.csv ]
As you can see , [T-Code CUNI screenshot] ( http://static.flickr.com/35/71412534_4998517812_o.jpg )
there is no LB.
so i tried to create LB. but... i couldn't ..
Because, LB already exists in the Table T600 & T600A
T600 screenshot ( http://static.flickr.com/35/71412793_dcbae3d11a_o.jpg )
T600A screenshot ( http://static.flickr.com/34/71412535_96f9278862_o.jpg )
What do you think ?
The value of SPRAS is DE.
is it possible to cause the error ?
Well, i deleted the value of UNIT column from the original data so that i could escape the error " Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT ".
~
CUST007,SREP07,MAT008,3,,1,,19990424
CUST008,SREP08,MAT008,3,,2,,19980328
CUST008,SREP08,MAT009,2,,3,,19980203
CUST008,SREP08,MAT010,1,,4,,19991104
CUST009,SREP09,MAT011,1.5,,5,,20000407
CUST010,SREP10,MAT011,1.5,,6,,20000701
~
But i don't think it is a right way. isn't it?
Thanks in advance.
David.KangDear Eugene
Thanks a lot today.
Yeah, my incoming data do not match with the transfer structure.
Take a brief look at my case studies.
[Data Selection] tab
http://static.flickr.com/34/71452760_2117e1d4c0_o.jpg
[Data targets ] tab
http://static.flickr.com/34/71452762_035aaa8d78_o.jpg
[Processing ] tab
http://static.flickr.com/34/71452763_fa322fe8f1_o.jpg
[External Data] tab
1) IC_DEMOBC.csv ( It includes the value of UNIT column. )
( The original data file is http://safariexamples.informit.com/0201703661/IC_DEMOBC.csv )
http://static.flickr.com/20/71452764_fb4a24a809_o.jpg
- Preview result screenshot
http://static.flickr.com/35/71452765_07a4ae8e12_o.jpg
2) IC_DEMOBC2.csv ( It inculdes only two rows with UNIT values : CS. )
http://static.flickr.com/20/71452766_da7b2c46b7_o.jpg
- Preview result screenshot
http://static.flickr.com/35/71453112_348077e31a_o.jpg
3) IC_DEMOBC3.csv ( It inculdes all rows without UNIT values. )
http://static.flickr.com/34/71453113_301afeca73_o.jpg
- Preview result screenshot
http://static.flickr.com/20/71453114_8438122d06_o.jpg
I try to solve it by myself.
( i already spend almost one week~~ . )
but i feel the end is coming soon.
with kind regards
david -
Help on this error? CONVERSION_EXIT_CUNIT_INPUT
Hi,
I am loading a flat file and got the following errors:
Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT
Message no. RSAR137
Diagnosis
An error occurred in record 84075 during execution of conversion exit CONVERSION_EXIT_CUNIT_INPUT for field VOLUMEUNIT.
Procedure
Check that the record where the error occurred has the correct format, and correct it accordingly.
The data could not even get to the PSA because the load failed.
Any help to deal with this problem?
ThanksHi,
This is on production so the option to create is not available.
I tried it on Dev and the option to Create exists.
Now, I am trying to understand the significance of what you are directing me to do because, I have similar monthly reports and 7 of the flat files loaded successfully but one. So if the problem is u201CVolu201D which in fact, was not available in the CUNI output, then why did the file load for the other 7 files but this only. That is what I am wondering now.
Also, doesnu2019t the original error suggest that the error is due to just a single record?:
u201CAn error occurred in record 84075 during execution of conversion exit CONVERSION_EXIT_CUNIT_INPUT for field VOLUMEUNIT.u201D
Thanks -
Error:CONVERSION_EXIT_CUNIT_INPUT
Hello All,
I am facing a problem with Flat file load. When I am tring to load master data attributes for a custom infoobject, I am getting the error:CONVERSION_EXIT_CUNIT_INPUT, eventhough there are no Unit infoobjects as attributes to it. Strangely, I am getting this error in my development system but not in the acceptance system.
Could anyone let me know how to overcome this problem.
Many thanks in advance,
Regards,
VinayHi Vinay,
BW system global settings are generally the same you can change directly in the InfoPackage and this kind of error are generally related to:
1)File Format ASCII or CSV, with the corresponding symbol for CSV (Escape character, ...).
2)Character for decimals or thousands.
3)Sequence and number of digit of the different fields of the Flat File related to the fields of the DataSource.
4)Error if in this moment you have opened the file.
5)Correct path of the file.
6)Error due to text without exit from InfoPackage and RSA1: in many case you have solved the problem, but if you do not go back to the initial screen of BW the system doesn' t feel the changes.
7)Problem with the connection to the source system: in source system tree right mouse click on your SS and select control/check.
Try checking all the settings of the other system, where the preview is functioning, with the system where it is not functioning and let me know please.
Ciao.
Riccardo. -
Error: CONVERSION_EXIT_CUNIT_INPUT and 0Unit
Hello Experts,
1.
I am loading a simple .csv (Excel) file and I get the error:
Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT
Any hints here?
2.
--Somehow I suspect the column for Units (0Unit), with values: Case, Each, Dozen, U.S. pound, can be the culprit. Where in BW can I see the list of approved values in 0Unit to see if these 4 values are in the list?.
Thanks in advance.hi Amanda,
table t006* contains 'master' data for all unit of measurement, characteristic 0unit.
to populate data of any characteristic infoobject that reference to 0unit, the value must exist in the table.
to display the table you can use transaction se16.
for entry/maintain you can use transaction CUNI
or first transfer from r/3 use rsa1->source system->right click r/3 source system->'transfer global setting', mark 'unit of measurements' and choose option 'update table'->execute, after that se16 check if EA and DZ exist or not (also the other 2 values).
as i mentioned, we cannot maintain unit for 'Case, Each, Dozen, U.S. pound'. for unit just have 3 digit.
i do suggest, first correct your .csv file for these values, 'each' with EA and 'dozen' with DZ, don't know code the Unit Of Measurement for 'case' and 'us pound'.
if no standard code for case and us pound, you may define them with transaction CUNI, e.g us pound with USP, remember to change the .csv value with the same.
hope this helps. -
Error CONVERSION_EXIT_CUNIT_INPUT - RSAR137
Hi all,
I have an error CONVERSION_EXIT_CUNIT_INPUT - RSAR137 when i try to load a CSV file in a ODS.
I have this error only when I try to load the file from Application Server, if I load the CSV file from workstation it loads without errors.
I use this IO: 0CRM_SALUNI
I have to load HL measurement units, I found the SAP Note 681931
For RSAR 137: Error in the conversion exit ...
Loaded values must have the external format in the logon language.
The conversion exit reads from the T006A table with the logon language from SPRAS and the loaded value from MSEH3.
If there is no entry there for the logon language, an error occurs in the conversion exit.
You can maintain entries in this table in the Customizing:
Transaction SPRO->SAP reference IMG->BW Customizing Implementation Guide->General Settings ->Measurement units.
Select the measurement units here using the relevant button.
But in my Transaction SPRO everithing is ok...
I can not understand where is the problem.
Thanks to all,
axhi Rizzo,
seems that there is something wrong with your unit filed which u r loading from flatfile.
i think the Unit which u r loading should be maintained in the Table T006* eg. (T006A).
to transfer from R/3 use the following setting go to source system in RSA1--> right click and Click on 'Tranfer Gloabal Setting'
hope this willl help you.
thanks -
Error in converstion exit CONVERSION_EXIT_CUNIT_INPUT
Hi All..
I am getting the fallowing error while trying to load data from flat file(fu- fu book).
"Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT". The csv file has the following values as unit of measure "CS, DZ,EA and LB".
I changed CS to CSE but i am not sure whats the correct unit for DZ, i am hoping that EA and LB are right values.
appreciate if some body can help me in figuring out the right UOM.
will reward the helpful answers..
Thanks in advance
Deepthi.Hi Deepthi,
Welcome to SDN!!
Also check these posts:
Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT
Need help on this error
errors-urgent help needed
Re: 0Unit / se16 / CUNI
Bye
Dinesh -
Error in CONVERSION_EXIT_CUNIT_INPUT
Hi ,
when i am trying to convert ST to internal formatt using FM 'CONVERSION_EXIT_CUNIT_INPUT', I am getting the errror
'Unit ST is not created in language EN', I Have cheked in T006 Table there is no entrey is maintained for the ST.
BUT When i have chekd in CUNI transaction the configuration is maintaines. so can anybody help how to the entry is filled in the Table T006 .
regadrs
RaghuHi Raghu,
Use below function module for conversion.
CONVERSION_EXIT_CUNIT_OUTPUT.
You will get PC(Pieces). Entry with PC exits in T006 table.
Thanks,
Ashok. -
Not able to create sales order using BAPI - BAPI_SALESORDER_CREATEFROMDAT2
Hi Experts,
I am not able to create sales order . I am using BAPI - BAPI_SALESORDER_CREATEFROMDAT2
to create sales order .I am passing external sales order number to the parameter
SALESDOCUMENTIN.
I am getting following error.
"524 |Only quantity 1 EA is allowed (Item 00001"
Here EA is UOM(Unit of measurement).
Below is the sample program through which i am trying to create the sales order.
*& Report ZSDC_SALES_TEST
report zsdc_sales_test.
*DATA: wa_bapi_header TYPE bapisdhd1.
Include Name - ZSDC_SALES_ORD_UPLOAD_TOP
Program Name - ZSDC_SALES_ORD_UPLOAD_1393
Program Title - Include for Data Declaration and selection screen
Created by - Lalitha W
Created on - 18-Nov-2008
Object ID - SD_C_1393_SALES_ORDER_UPLOAD
Request Id - SD3K905579
Description - This is a common INCLUDE for data declarations and
*selection screen details.
HISTORY
Date |Developer |Req by | Description |Reference ID
| | | |
| | | |
TYPE-POOLS
*TYPE-POOLS: truxs, abap, slis.
TABLES
*TABLES: t100.
TYPES
types:begin of ty_header,
auart(4) type c, " Sales Order Type
vkorg(4) type c, " Sales Organization
vtweg(2) type c, " Distrubution Channel
spart(2) type c, " Division
kunnr_1(10) type c, " Sold to Party
kunnr_2(10) type c, " Ship to Party
augru(3) type c, " Order Reason
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
ketdat(10) type c, " Required Delivery Date
zterm(4) type c, " Payment Terms
inco1(3) type c, " Inco Terms -1
inco2(28) type c, " Inco Terms -2
prsdt(10) type c, " pricing date
waerk(5) type c, " Document Currency
vkbur(4) type c, " Sales Office
vkgrp(3) type c, " Sales group
pltyp(2) type c, " Price List type
kdgrp(2) type c, " Customer Group
bstkd_e(35) type c, " Ship-to-party PO number
submi(10) type c, " Collective Number
bname(35) type c, " Name
ihrez(12) type c, " Your Reference
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
partner_1(25) TYPE c, " Partner(Bill To Party Number)
partner_2(25) TYPE c, " Partner(Payer Number)
partner_3(25) TYPE c, " Partner(Sales Responsible Number)
partner_4(25) TYPE c, " Partner(Order admin)
partner_5(25) TYPE c, " Partner(Contact person)
partner_1(10) type c, " Partner(Bill To Party Number)
partner_2(10) type c, " Partner(Payer Number)
partner_3(10) type c, " Partner(Sales Responsible Number)
partner_4(10) type c, " Partner(Order admin)
partner_5(10) type c, " Partner(Contact person)
tdspras_1(2) type c,
text_1(500) type c, " Text Before Items Z012
tdspras_2(2) type c,
text_2(500) type c, " Invocie Up Z034
tdspras_3(2) type c,
text_3(500) type c, " Invocie Down Z035
tdspras_4(2) type c,
text_4(500) type c, " Customer Reference Continue Z018
tdspras_5(2) type c,
text_5(500) type c, " Dispatch Marks/ Order Z019
tdspras_6(2) type c,
text_6(500) type c, " Ordered By Z003
tdspras_7(2) type c,
text_7(500) type c, " Sales Parameters Z002
kvgr1(3) type c, " Industry
kvgr2(3) type c, " customer BU
end of ty_header.
types: begin of ty_item,
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
bstkd_e(35) type c, " Ship-to-party PO number
posnr(6) type c, " POSTION NUMBER
matnr(18) type c, " Material Number
kwmeng(18) type c, " Order Quantity
pstyv(4) type c, " Sales doc. item categ
kursk(18) type c, " EXCHANGE RATE****
ffprf(8) type c, " DIP PROFILE
werks(4) type c, " Delivering Plant
vstel(4) type c, " SHIPPING POINT
lgort(4) type c, " STORAGE LOCATION
route(6) type c, " Route
kurrf(18) type c, " EXCHANGE RATE-FI
ntgew(18) type c, " Net Weight
brgew(18) type c, " Gross Weight
gewei(3) type c, " Weight Unit
prctr(10) type c, " profit center
abgrs(6) type c, " RESULT ANALYSIS KEY
kalsm_k(4) type c, " COSTING SHEET
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
text_1(500) type c, " material Text 0001
tdspras_1(1) type c,
text_2(500) type c, " Pr Text 9001
tdspras_2(1) type c,
end of ty_item.
types: begin of ty_schedule_line,
bstkd(35) type c, "PO number
bstdk(10) type c, "PO date
bstkd_e(35) type c, "Ship-to-party PO number
posnr(6) type c, "sales doc.Item
etdat(10) type c, "Schedule line date
wmeng(2) type c, "Order Quantity
end of ty_schedule_line.
types: begin of ty_err ,
auart(4) type c, " Sales Order Type
vkorg(4) type c, " Sales Organization
vtweg(2) type c, " Distrubution Channel
spart(2) type c, " Division
kunnr_1(10) type c, " Sold to Party
kunnr_2(10) type c, " Ship to Party
augru(3) type c, " Order Reason
bstkd(35) type c, " PO Number
bstdk(10) type c, " PO Date
ketdat(10) type c, " Required Delivery Date
zterm(4) type c, " Payment Terms
inco1(3) type c, " Inco Terms -1
inco2(28) type c, " Inco Terms -2
prsdt(10) type c, " pricing date
waerk(5) type c, " Document Currency
vkbur(2) type c, " Sales Office
vkgrp(3) type c, " Sales group
pltyp(2) type c, " Price List type
kdgrp(2) type c, " Customer Group
bstkd_e(35) type c, " Ship-to-party PO number
submi(10) type c, " Collective Number
bname(35) type c, " Name
ihrez(12) type c, " Your Reference
kschl_1(4) type c, " Condition Type
kbetr_1(11) type c, " Amount
kschl_2(4) type c, " Condition Type
kbetr_2(11) type c, " Amount
kschl_3(4) type c, " Condition Type
kbetr_3(11) type c, " Amount
partner_1(25) type c, " Partner(Bill To Party Number)
partner_2(25) type c, " Partner(Payer Number)
partner_3(25) type c, " Partner(Sales Responsible Number)
partner_4(25) type c, " Partner(Order admin)
partner_5(25) type c, " Partner(Contact person)
tdspras_1(2) type c,
text_1(500) type c, " Text Before Items Z012
tdspras_2(2) type c,
text_2(500) type c, " Invocie Up Z034
tdspras_3(2) type c,
text_3(500) type c, " Invocie Down Z035
tdspras_4(2) type c,
text_4(500) type c, " Customer Reference Continue Z018
tdspras_5(2) type c,
text_5(500) type c, " Dispatch Marks/ Order Z019
tdspras_6(2) type c,
text_6(500) type c, " Ordered By Z003
tdspras_7(2) type c,
text_7(500) type c, " Sales Parameters Z002
kvgr1(3) type c, " Industry
kvgr2(3) type c, " customer BU
message(600) type c,
end of ty_err.
types: begin of ty_t685a,
kschl type kschl,
krech type krech,
end of ty_t685a.
INTERNAL TABLES
***header
data: g_krech_1(4) type c, " Calculation type for condition
g_krech_2(4) type c, " Calculation type for condition
g_krech_3(4) type c. " Calculation type for condition
g_krech_4(4) TYPE c, " Calculation type for condition
g_krech_5(4) TYPE c, " Calculation type for condition
g_krech_6(4) TYPE c, " Calculation type for condition
g_krech_7(4) TYPE c, " Calculation type for condition
g_krech_8(4) TYPE c, " Calculation type for condition
g_krech_9(4) TYPE c, " Calculation type for condition
g_krech_10(4) TYPE c, " Calculation type for condition
g_krech_11(4) TYPE c, " Calculation type for condition
g_krech_12(4) TYPE c, " Calculation type for condition
g_krech_13(4) TYPE c, " Calculation type for condition
g_krech_14(4) TYPE c, " Calculation type for condition
g_krech_15(4) TYPE c, " Calculation type for condition
g_krech_16(4) TYPE c, " Calculation type for condition
g_krech_17(4) TYPE c, " Calculation type for condition
g_krech_18(4) TYPE c, " Calculation type for condition
g_krech_19(4) TYPE c, " Calculation type for condition
g_krech_20(4) TYPE c. " Calculation type for condition
Items
data: g_krech_item_1(4) type c, " Calculation type for condition
g_krech_item_2(4) type c, " Calculation type for condition
g_krech_item_3(4) type c. " Calculation type for condition
g_krech_item_4(4) TYPE c, " Calculation type for condition
g_krech_item_5(4) TYPE c, " Calculation type for condition
g_krech_item_6(4) TYPE c, " Calculation type for condition
g_krech_item_7(4) TYPE c, " Calculation type for condition
g_krech_item_8(4) TYPE c, " Calculation type for condition
g_krech_item_9(4) TYPE c, " Calculation type for condition
g_krech_item_10(4) TYPE c, " Calculation type for condition
g_krech_item_11(4) TYPE c, " Calculation type for condition
g_krech_item_12(4) TYPE c, " Calculation type for condition
g_krech_item_13(4) TYPE c, " Calculation type for condition
g_krech_item_14(4) TYPE c, " Calculation type for condition
g_krech_item_15(4) TYPE c, " Calculation type for condition
g_krech_item_16(4) TYPE c. " Calculation type for condition
data: it_t685a type standard table of ty_t685a.
data: wa_bapi_header type bapisdhd1,
wa_bapi_headerx TYPE bapisdhd1x,
it_bapi_item type table of bapisditm,
it_bapi_itemx TYPE TABLE OF bapisditmx,
it_bapi_cond type table of bapicond,
it_bapi_condx TYPE TABLE OF bapicondx,
it_bapi_partner type table of bapiparnr,
it_bapi_shdl type table of bapischdl,
it_bapi_shdlx TYPE TABLE OF bapischdlx,
it_bapi_order_text type TABLE OF BAPISDTEXT,
it_bapireturn type table of bapiret2.
data: wa_bapi_item like line of it_bapi_item,
wa_bapi_itemx LIKE LINE OF it_bapi_itemx,
wa_bapi_cond like line of it_bapi_cond,
wa_bapi_condx LIKE LINE OF it_bapi_condx,
wa_bapi_partner like line of it_bapi_partner,
wa_bapi_shdl like line of it_bapi_shdl,
wa_bapi_shdlx LIKE LINE OF it_bapi_shdlx,
wa_bapi_order_text like LINE OF it_bapi_order_text,
wa_bapireturn like line of it_bapireturn.
*DATA: zmode(1) VALUE 'N'.
data: it_header type standard table of ty_header.
*DATA: it_temp_header TYPE STANDARD TABLE OF ty_header.
data: it_item type standard table of ty_item.
*DATA: it_temp_item TYPE STANDARD TABLE OF ty_item.
data: it_err type standard table of ty_err.
data: it_fline1 type standard table of tline,
wa_fline1 type tline.
data: it_thead1 type thead.
data: it_fline2 type standard table of tline,
wa_fline2 type tline.
data: it_thead2 type thead.
data: it_fline3 type standard table of tline,
wa_fline3 type tline.
data: it_thead3 type thead.
data: it_fline4 type standard table of tline,
wa_fline4 type tline.
data: it_thead4 type thead.
data: it_fline5 type standard table of tline,
wa_fline5 type tline.
data: it_thead5 type thead.
data: wa_header like line of it_header,
wa_item like line of it_item,
wa_err type ty_err,
wa_bill LIKE LINE OF it_bill,
wa_bill1 LIKE LINE OF it_bill,
wa_iterr like line of it_err,
wa_t685a like line of it_t685a.
wa_bill_item TYPE ty_bill_item.
data: it_schedule_line type standard table of ty_schedule_line,
wa_schedule_line type ty_schedule_line.
data: sales_order_no type bapivbeln-vbeln.
data: ext_sales_order_no type bapivbeln-vbeln.
Variable to be used to separate the fields which are concatenated by a
runtime character
*DATA: g_tabchar(1) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
*DATA: wa_truxs_t_text_data TYPE truxs_t_text_data.
*DATA: g_filename TYPE string,
g_path TYPE string,
g_fullpath TYPE string,
g_user_action TYPE i,
g_file_encoding TYPE abap_encoding.
*DATA : g_text(8192),
data : g_mstring1(100) type c,
g_mstring2(100) type c,
g_mstring3(100) type c,
g_mstring4(100) type c,
g_mstring5(100) type c.
data: g_count1 type ebelp,
g_str_count1(6) type c.
data: g_count type ebelp,
g_str_count(6) type c.
*DATA: f_subrc LIKE sy-subrc,
f_subrc1 LIKE sy-subrc,
f_error(500) TYPE c,
item1(27) TYPE c,
item2(27) TYPE c,
item3(27) TYPE c,
item4(27) TYPE c,
i TYPE ekpo-ebelp.
*DATA: g_billplan_header TYPE c,
g_billplan_item TYPE c.
data : g_external_so type vbak-vbeln. "SO
SELECTION-SCREEN
selection-screen begin of block frame1 with frame title text-001 .
parameters:p_file1 type rlgrap-filename, "OBLIGATORY, "Header data.
p_file2 type rlgrap-filename, "OBLIGATORY, "Item Data.
p_file3 type rlgrap-filename, "Schedule line.
p_file4 type rlgrap-filename ."OBLIGATORY. "Error file.
selection-screen end of block frame1.
start-of-selection.
wa_bapi_header-doc_type = 'Z0MX'. "order type
wa_bapi_header-sales_org = '0130'."sales org
wa_bapi_header-distr_chan = '13'. "distr channel
wa_bapi_header-division = '13'. "division
Old code from copied program
wa_bapi_header-purch_no_s = wa_header-kunnr_2. " Ship to party
New code as required in Finland project
We are using to Header ->Order Tab -> Ship to Party -> Purchase order no (BSTKD_E) to store Old legacy SO number
wa_bapi_header-purch_no_s = 'MX100443'. "External SO i.e Old legacey SO number
wa_bapi_header-ref_1_s = '0000666666'. "Sold to party
wa_bapi_header-ord_reason = wa_header-augru.
wa_bapi_header-purch_no_c = 'ddr1234'. " PO number
wa_bapi_header-purch_date = sy-datum. " PO date
wa_bapi_header-req_date_h = sy-datum. " Required Delivery Date
wa_bapi_header-pmnttrms = '01'. " Payment Terms
wa_bapi_header-incoterms1 = wa_header-inco1.
wa_bapi_header-incoterms2 = wa_header-inco2.
wa_bapi_header-price_date = wa_header-prsdt. " Pricing date
wa_bapi_header-currency = wa_header-waerk. " Document Currency
wa_bapi_header-sales_grp = wa_header-vkgrp. " Sales group
wa_bapi_header-price_list = wa_header-pltyp. " Price list type
wa_bapi_header-cust_group = wa_header-kdgrp. " Cust Group
wa_bapi_header-ship_type = wa_header-vsart. " Shipping Type
wa_bapi_header-purch_no_s = wa_header-bstkd_e. " Ship-to-party po number
wa_bapi_header-collect_no = wa_header-submi. " Collective No.
wa_bapi_header-name = wa_header-bname. " Name
wa_bapi_header-ref_1 = wa_header-ihrez. " Your Reference
wa_bapi_header-cust_grp1 = wa_header-kvgr1. " Industry
wa_bapi_header-cust_grp2 = wa_header-kvgr2. " Customer BU
*ENDFORM. " f_header
IF wa_header-partner_1 IS NOT INITIAL.
wa_bapi_partner-partn_role = 'AG'.
wa_bapi_partner-partn_numb = '0000666666'.
wa_bapi_partner-itm_number = '000000'.
append wa_bapi_partner to it_bapi_partner.
clear wa_bapi_partner.
ENDIF.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_header-partner_2
importing
output = wa_header-partner_2.
IF wa_header-partner_2 IS NOT INITIAL.
wa_bapi_partner-partn_role = 'WE'.
wa_bapi_partner-partn_numb = '0000666666'.
wa_bapi_partner-itm_number = '000000'.
append wa_bapi_partner to it_bapi_partner.
clear wa_bapi_partner.
ENDIF.
perform f_item.
data : order_items_inx type table of bapisditmx with header line.
order_items_inx-material = 'X'. "
order_items_inx-target_qty = 'X'. "
order_items_inx-comp_quant = 'X'. "
order_items_inx-trgqty_den = 'X'.
order_items_inx-rnddlv_qty = 'X'.
order_items_inx-updateflag = 'I'.
order_items_inx-target_qu = 'X'.
order_items_inx-plant = 'X'. "
append order_items_inx.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
salesdocumentin = 'MX11111152'
order_header_in = wa_bapi_header
order_header_inx = wa_bapi_headerx
importing
salesdocument = sales_order_no
tables
return = it_bapireturn
order_items_in = it_bapi_item
order_items_inx = order_items_inx
order_partners = it_bapi_partner
order_conditions_in = it_bapi_cond.
if sy-subrc is initial.
commit work.
endif.
*& Form f_item
text
form f_item .
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = wa_item-posnr
importing
output = wa_item-posnr.
wa_item-posnr = '000010'.
IF sy-subrc EQ 0. "IS INITIAL.
move wa_item-posnr to g_str_count."commented out by shakti
ENDIF.
wa_bapi_item-itm_number = wa_item-posnr. " Line item
WA_BAPI_ITEM-PO_ITM_NO = WA_ITEM-EBELP.
wa_bapi_item-division = wa_item-spart.
wa_bapi_item-purch_no_c = 'ddr1234'. " po number
wa_bapi_item-purch_date = sy-datum. " po date
wa_bapi_item-purch_no_s = 'MX11111112'. " Ship-to-party po number
wa_item-matnr = 'MAXIMO_SERVICE'.
call function 'CONVERSION_EXIT_MATN1_INPUT'
exporting
input = wa_item-matnr
importing
output = wa_item-matnr
exceptions
length_error = 1
others = 2.
if sy-subrc is initial.
wa_bapi_item-material = wa_item-matnr. "material
endif.
wa_bapi_item-target_qty = '1'. " Order qty
wa_bapi_item-comp_quant = '1'.
wa_bapi_item-target_qu = 'EA'.
wa_bapi_item-fixed_quan = '1'.
wa_bapi_item-comp_quant = wa_item-kwmeng.
wa_bapi_item-trgqty_den = '1'.
wa_bapi_item-rnddlv_qty = wa_item-kwmeng.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_item-ps_psp_pnr
IMPORTING
output = wa_item-ps_psp_pnr.
IF sy-subrc = 0.
wa_bapi_item-wbs_elem = wa_item-ps_psp_pnr.
ENDIF.
wa_bapi_item-item_categ = 'ZMAX'.
wa_bapi_item-ex_rate_fi = wa_item-kurrf.
wa_bapi_item-dli_profil = wa_item-ffprf. " Dynamic item processor profile
wa_bapi_item-route = wa_item-route. " route
wa_bapi_item-exchg_rate = wa_item-kursk.
wa_bapi_item-plant = '2090'. " Plant
wa_bapi_item-ship_point = 'FN11'. " Shipping point
wa_bapi_item-store_loc = wa_item-lgort. " stg loc
REPLACE ALL OCCURRENCES OF ',' IN wa_item-ntgew WITH '.'.
REPLACE ALL OCCURRENCES OF ',' IN wa_item-brgew WITH '.'.
wa_bapi_item-net_weight = wa_item-ntgew. "
wa_bapi_item-gross_wght = wa_item-brgew. "
call function 'CONVERSION_EXIT_CUNIT_INPUT'
exporting
input = wa_item-gewei
language = sy-langu
importing
output = wa_item-gewei.
EXCEPTIONS
unit_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
wa_bapi_item-untof_wght = 'KG'. " weight unit
replace all occurrences of ',' in wa_item-kursk with '.'.
replace all occurrences of ',' in wa_item-kurrf with '.'.
wa_bapi_item-profit_ctr = wa_item-prctr. " Profit center
wa_bapi_item-resanalkey = wa_item-abgrs. " RESULT ANALYSIS KEY
wa_bapi_item-cstg_sheet = wa_item-kalsm_k. " COSTING SHEET
append wa_bapi_item to it_bapi_item.
endform. " f_item
Thanks & regards,
Chetansee the following to create sales order:-
*& Report ZSALESORDER
*&DEVELOPED BY JANI KRUPA 4.10.2008
REPORT ZSALESORDER.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d .
SELECTION-SCREEN END OF LINE.
Complete Deliver
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
DATA: lt_schedules_ink TYPE STANDARD TABLE OF bapisdhead1
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
v_text10 = 'Complete delivery'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
*Complete delivery
header-COMPL_DLV = p_autlf.
header-COMPL_DLV = 'X'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
item category
itemx-ITEM_CATEG = 'X'.
APPEND item.
APPEND itemx.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000020'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Fill schedule lines
lt_schedules_in-itm_number = '000020'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000020'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF. -
Error while creating INFOPACKAGE to load transaction data
Hi,
I am getting the following error while creating infopackage:
"Error in Conversion exit CONVERSION_EXIT_CUNIT_INPUT"
I am getting this error when I click on the Start button under the schedule tab in the screen Administrator Workbench: Modelling.
I clicked on Monitor icon to view the diagnosis. The diagnosis is mentioned below:
the screen is Performance Assistant Window and the diagnosis message appears in italics.
<i>Message No RSAR137
DIAGNOSIS
An error occurred in record 1 during execution of conversion exit CONVERSION_EXIT_CUNIT_INPUT for field UNIT.
Procedure
Check that the record where error occurred has the correct format and correct it accordingly. </i>
Please note that I have succesfully created update rules as I didn't get any error.
Also I would like some one to explain me clearly the differences between transfer rules and update rules with a clear explanation please.
Please help me.
Thank you.
Tristan.Hello Tristan,
I was used to get the same kind of problems before.
I got the problem with the data source type-Flat File (.csv)
One solution that I have done:
1) checked the particular record in which the error message refer to
2) tested the particular unit from the transaction se37
Function Module = CONVERSION_EXIT_CUNIT_INPUT
Press F8 in order to execute
This would be help a bit
3) corrected data from the flat file
another alternative solution was by:
handling the data using routine in the transfer rules
For my case, before executing the InfoPackage, data from flat file could be previewed. At this point, I could check which records caused the problems.
I'm not sure about your case whether data came from which type of data source.
That's all I could share for now.
-WJ- -
Problem coming while assigning values to a particular field.
Hi,
I was taking MEINS data from the table ESLL to the output.
But as per user request some logic was to be added befor the output comes.
Earlier i was looping in the internal table of ESLL n giving it to the o/p final table, now i changed it as follows.
wa_final-meins = it_esll2-meins. -R002
***********Start of + R002 *********
IF it_esll2-meins = 'LE'.
wa_final-meins = 'PU'.
ELSEIF it_esll2-meins = 'TAG' .
wa_final-meins = 'DAY'.
ELSEIF it_esll2-meins = '10'.
wa_final-meins = 'D'.
ELSEIF it_esll2-meins = 'STD'.
wa_final-meins = 'HR'.
ELSEIF it_esll2-meins = 'HAR'. 'PU' 'DAY'
wa_final-meins = 'HA'.
ELSE.
wa_final-meins = it_esll2-meins.
ENDIF.
***********End of + R002 *********
Now the o/p comes ok,but while they trying to download to excel those o/ps which is assinged the values like 'PU' ' DAY ' ' D' etc its coming as star.
So i anticipate that its becoz i a trying to assign character to the field MEINS (wa_final-meins = it_esll2-meins.) which is of type ' UNIT '.
So what to do to solve this.
Pleae reply with your valuble suggestions.
Regards,
NitinHi,
You will have to make use of the conversion exits function modules before comparing.
CONVERSION_EXIT_CUNIT_OUTPUT
CONVERSION_EXIT_CUNIT_INPUT
Regards,
Ankur Parab -
Currency problem in BAPI_MATERIAL_SAVEDATA while uploading valuation class
Hello Experts,
I am uploading valuation class using BAPI_MATERIAL_SAVEDATA.
While uploading it is showing runtime error "Unable to interpret KG as a number".
I have used the FM CONVERSION_EXIT_CUNIT_INPUT to convert the UOM from the file to Field symbol.
still the same. please guide me.
I have pasted my code below.
Kindly go through and help would be highly appreciated.
*& Report ZPRI_MAT_PRICE_UPLOAD
REPORT ZPRI_MAT_PRICE_UPLOAD no standard page heading line-size 150.
tables : mbew, " Material valuation
makt, " Material description
mara. " General material master
data : begin of t_matvclass occurs 0,
material type matnr, " Material
ind_sec type mbrsh, " Industry sector
mat_typ type mtart, " Material type
val_class type BKLAS, " Valuation class
MOV_PR TYPE VERPR, " MOVING PRISE
STD_PR TYPE STPRS, " STANDARD PRISE
base_uom like mara-meins, " Material unit
mat_desc type maktx, " Material description - MAKTX
plant type werks, " Plant
langu(2),
end of t_matvclass.
data : wa like line of t_matvclass.
data: begin of it_makt occurs 0.
include structure bapi_makt.
data end of it_makt.
data :bapi_head like bapimathead, " Header Segment with Control Info
bapi_clientdata like bapi_mara, " Material Data at Client Level
bapi_clientdatax like bapi_marax, "Checkbox Structure
bapi_valclass like BAPI_MBEW, " Valuation class
bapi_valclassx like BAPI_MBEWX, " Checkbox Structure
* BAPI_MOVING_PR LIKE BAPI_MBEW, "MOVING PRISE
* BAPI_MOVING_PRX LIKE BAPI_MBEWX, "MOVING PRISE
* BAPI_STD_PRISE LIKE BAPI_MBEW, "STANDARD PRISE
* BAPI_STD_PRISEX LIKE BAPI_MBEWX, "STANDARD PRISE
bapi_return like bapiret2, " Bapi return structrue
returnm type table of bapi_matreturn2 with header line.
data : it_excel type alsmex_tabline occurs 0 with header line.
data: begin of it_ret occurs 0.
include structure bapiret2.
data end of it_ret.
* Data objects for exception handling.
data : lv_converr type ref to CX_SY_CONVERSION_ERROR,
lv_dynerr type ref to CX_SY_DYN_CALL_ERROR.
data : txt_converr type string,
txt_converr_l type string,
txt_dynerr type string,
txt_dynerr_l type string.
data : char_uom(4) type c. " Global UOM after conversion
* Declaring selection screen for selecting a data file
* for uploading valuation class
selection-screen begin of block b1 with frame title text-001.
parameter : file_nam type rlgrap-filename obligatory default
'C:\master data UPDATED_test.xls'.
parameter : p_begcol type i default 1, " no-display,
p_begrow type i default 2, " no-display,
p_endcol type i default 9, " no-display,
p_endrow type i default 267. " no-display.
*parameters: p_valare type mbew-bwkey obligatory. " Valuation area
selection-screen end of block b1.
at selection-screen on value-request for file_nam.
perform F_get_file using file_nam.
start-of-selection.
perform F_xls_itab using file_nam changing it_excel.
perform F_move_data.
*perform F_get_data.
perform F_Display_data.
*& Form F_xls_itab
* text
* -->P_FILE_NAM text
* <--P_IT_EXCEL text
form F_xls_itab using p_file_nam changing p_it_excel.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = file_nam
i_begin_col = p_begcol
i_begin_row = p_begrow
i_end_col = p_endcol
i_end_row = p_endrow
tables
intern = it_excel
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
endform. " F_xls_itab
*& Form F_get_file
* Subroutine to get the file on F4
* -->P_FILE_NAM text
form F_get_file using p_file_nam.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = ' '
* STATIC = ' '
* MASK = ' '
CHANGING
file_name = file_nam
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
endform. " F_get_file
*& Form F_Display_data
* text
* --> p1 text
* <-- p2 text
form F_Display_data .
skip 2.
*write:/2 'Valuation area :', p_valare.
*write:/2 'Standard price :', p_stdprc.
skip 2.
write:/29 sy-uline(120).
write:/29 sy-vline,
30 'Material' color 1, " Material - MATNR
50 sy-vline, 'Ind_sector' color 1, " Industry sector - MBRSH
62 sy-vline, 'Mat_typ' color 1, " Material type - MTART
75 sy-vline, 'Valuation class' color 1, " Valuation class
85 sy-vline, 'Base UOM' color 1, " Base UOM
95 sy-vline, 'Material Decp' color 1, " Material descp
120 sy-vline, 'Mov Price', " Moving price
130 sy-vline, 'Std Price', " Standard price
140 sy-vline, 'Plant', " Plant
150 sy-vline.
write:/29 sy-uline(120).
loop at t_matvclass into wa.
write:/29 sy-vline,
30 wa-material color 2, " Material - MATNR
50 sy-vline,
55 wa-ind_sec color 2 right-justified, " Industry sector
62 sy-vline,
66 wa-mat_typ color 2, " Material type - MTART
75 sy-vline,
78 wa-val_class color 2 right-justified, " Valuation class
85 sy-vline,
88 wa-base_uom color 2 right-justified, " Base UOM
95 sy-vline,
98 wa-mat_desc color 2 left-justified, " Material Desc
120 sy-vline, wa-MOV_PR, " Standard price
130 sy-vline, wa-STD_PR, " Moving price
140 sy-vline, wa-plant, " Plant
150 sy-vline.
endloop.
write:/29 sy-uline(64).
endform. " F_Display_data
*& Form F_move_data
* Subroutine to move data from excel to internal table
* --> p1 text
* <-- p2 text
form F_move_data .
data : lv_index type i.
field-symbols <fs>.
* Sorting the internal table
sort it_excel by row col.
clear it_excel.
loop at it_excel.
move it_excel-col to lv_index.
* Assigning each record to the internal table row.
assign component lv_index of structure wa to <fs>.
* Assigning the field value to a field symbol
if lv_index eq 5.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = it_excel-value
LANGUAGE = SY-LANGU
IMPORTING
OUTPUT = char_uom.
** Moving the converted UOM to field symbol
move char_uom to <fs>.
else.
move it_excel-value to <fs>.
endif.
at end of row.
append wa to t_matvclass.
clear wa.
endat.
endloop.
endform. " F_move_data
*& Form F_get_data
* text
* --> p1 text
* <-- p2 text
form F_get_data .
loop at t_matvclass into wa.
try.
* BAPIHEAD --- > Header Segment with Control Information
bapi_head-material = wa-material.
bapi_head-ind_sector = wa-ind_sec.
bapi_head-matl_type = wa-mat_typ.
bapi_head-account_view = 'X'.
* For Clien Data
bapi_clientdata-BASE_UOM = wa-base_uom.
bapi_clientdatax-base_uom = 'X'.
bapi_clientdatax-base_uom_iso = 'X'.
* For Valuation Class.
bapi_valclass-val_area = wa-plant.
bapi_valclass-val_class = wa-val_class.
bapi_valclass-std_price = wa-STD_PR.
bapi_valclass-MOVING_PR = wa-MOV_PR.
* For Valuation Class control checkbox.
bapi_valclassx-val_area = wa-plant.
bapi_valclassx-val_class = 'X'.
bapi_valclassx-std_price = 'X'.
bapi_valclass-MOVING_PR = 'X'.
refresh it_makt.
wa-langu = SY-LANGU.
it_makt-langu = wa-langu.
it_makt-matl_desc = wa-mat_desc.
append it_makt.
clear it_ret.
refresh it_ret.
if t_matvclass[] is initial.
write:/ 'Cannot be updated'.
else.
perform F_call_bapi.
endif.
catch CX_SY_CONVERSION_ERROR into lv_converr.
txt_converr = lv_converr->get_text( ).
txt_converr_l = lv_converr->get_longtext( ).
write:/ 'Error:', txt_converr color 5.
write:/ 'Error:', txt_converr_l color 3.
endtry.
endloop.
endform. " F_get_data
*& Form F_bapi_commit
* text
* --> p1 text
* <-- p2 text
form F_bapi_commit.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
if sy-subrc eq 0.
write:/2 ' Transaction commited' color 4.
else.
write:/2 'Unable to commit the transaction' color 4.
endif.
endform. " F_bapi_commit
*& Form F_call_bapi
* text
* --> p1 text
* <-- p2 text
form F_call_bapi .
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = bapi_head
CLIENTDATA = bapi_clientdata
CLIENTDATAX = bapi_clientdatax
VALUATIONDATA = bapi_valclass
VALUATIONDATAX = bapi_valclassx
IMPORTING
RETURN = it_ret
TABLES
MATERIALDESCRIPTION = it_makt
RETURNMESSAGES = returnm.
IF it_ret-type eq 'E' or it_ret-TYPE eq 'S'.
Write:/1 it_ret-type,
8 it_ret-id,
30 it_ret-number,
38 it_ret-message,
190 it_ret-parameter,
210 it_ret-row,
220 it_ret-field.
endif.
endform. " F_call_bapi
Regards,
Ranjith Nresloved.
issue with the internal table structrue. -
Error while loading CSV Flat file
Hi,
I am getting the following errors while loading a flat file into the DataSource:
1. Error 'Unit CS is not created in language EN...' at conversion exit CONVERSION_EXIT_CUNIT_INPUT (field UNIT record 1, value CS)
2. Error 'The argument '9,018.00' cannot be interpreted as anumber' on assignment field /BIC/ZTVSA record 1 value 9,018.00
What can I do to correct this?
ThanksI am taking the following (Headers) fields in this order in a CSV file :
0LOGSYS ,0MATERIAL,0UNIT,0BASE_UOM,0COMP_CODE,0PLANT,0FISCPER,0FISCVARNT,
0CURRENCY,0PRICE_TYPE,ZTVSAKF,ZVOTVSKF,0PRICE_CTRL,ZPRICE_STKF,0PRICE_BASE,
0VAL_CLASS,0CURTYPE,0VALUATION
I have added all these fields in the DataSource as well. T-Code CUNIT has CS as a Unit.
I deleted and recreated the DataSource and am getting this error now:
Error 'Unit CS is not created in language EN...' at conversion exit CONVERSION_EXIT_CUNIT_INPUT (field UNIT record 1, value CS)
Error 'The argument '1,398.00' cannot be interpreted asa number' on assignment field /BIC/ZTVSAKF record 1 value 1,398.00
Error 'The argument '8,10.00' cannot be interpreted as anumber' on assignment field /BIC/ZTVSKF record 1 value 8,10.00
Error 'Unit 0 is not created in language EN...' at conversion exit CONVERSION_EXIT_CUNIT_INPUT (field BASE_UOM record 1, value )
Error 'Unit CS is not created in language EN...' at conversion exit CONVERSION_EXIT_CUNIT_INPUT (field UNIT record 1, value CS)
Error 'The argument '5,50.00' cannot be interpreted as anumber' on assignment field /BIC/ZTVSAKF record 1 value 5,50.00
Does it matter what order the columns are in? -
How to find out the conversion exit format for VBRP-VRKME
Hi Gurus,
I am writing a report to fetch delivery details based on storage location'123'. My requirement is tat i shud convert the Billed Quantity unit TO Base unit of measure. In my VBRP table the field value/contents of VBRP-VRKME have values PAK for PAC( packets) and KAR for CAR(carton). When i click on User-specific Settings - - Check the filed CHEECK CONVERSION EXITS , i am able to get see the PAC and CAR respectively.
But unfortunately when i selecting te fields form vbrp in my internal table i am getting the values 'PAK' for PAC and 'KAR' for CAR'. AS i am writing a report can any one suggest me how to convert this , as i wud b making use of FM MD_CONVERT_MATERIAL_UNIT to convert to base unit of measure, n this FM is not accepting the values like PAK and CAK.
Your Sugesstions are of utmost importance for me.
Thanking you,
ZIaHi,
Conversion routines are maintained at Domain Level(Definition Tab), Meins is the domain for VRKME data element.
You have to use the following routines,
CONVERSION_EXIT_CUNIT_INPUT
CONVERSION_EXIT_CUNIT_OUTPUT
Regards
Srini -
Hi,
Currently I'm facing an error "In case of account assignment, please enter acc. assignment data for item" when create a Purchase Order using BAPI_PO_CREATE1. The condition of the data that need to pump into the system is that this PO is an open item PO where does not require a metarial code for input, but it will pump in Short Text and Material Group. Other than that, the account assignment category is "K" and the item category is "9".
Below is the coding that I have implemented.
IF wa_temp_upr1-waers IS NOT INITIAL.
MOVE wa_temp_upr1-waers TO wa_header-currency.
wa_headerx-currency = abap_true.
ENDIF.
MOVE: wa_temp_upr1-lifnr TO wa_header-vendor,
wa_temp_upr1-unsez TO wa_header-collect_no,
wa_temp_upr1-bukrs TO wa_header-comp_code,
sy-datum TO wa_header-doc_date,
sy-langu TO wa_header-langu,
'KTN1' TO wa_header-purch_org,
wa_temp_upr1-bkgrp TO wa_header-pur_group,
wa_temp_upr1-zterm TO wa_header-pmnttrms.
wa_headerx-collect_no = abap_true.
wa_headerx-po_number = abap_true.
wa_headerx-comp_code = abap_true.
wa_headerx-vendor = abap_true.
wa_headerx-doc_date = abap_true.
wa_headerx-langu = abap_true.
wa_headerx-purch_org = abap_true.
wa_headerx-pur_group = abap_true.
wa_headerx-pmnttrms = abap_true.
IF wa_temp_upr1-meins IS NOT INITIAL.
MOVE wa_temp_upr1-meins TO zunit_e.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = zunit_e
LANGUAGE = 'E'
IMPORTING
OUTPUT = zunit_e.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ELSE.
MOVE zunit_e TO wa_temp_upr1-meins.
ENDIF.
MODIFY it_upr1 FROM wa_temp_upr1.
ENDIF.
ADD 10 TO line_item.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '01'
OBJECT = 'SERVICE'
IMPORTING
NUMBER = pckg_no.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = wa_temp_upr1-matnr
IMPORTING
OUTPUT = wa_po_item-material.
MOVE: line_item TO wa_po_item-po_item,
wa_temp_upr1-ewerks TO wa_po_item-plant,
wa_temp_upr1-lgort TO wa_po_item-stge_loc,
wa_temp_upr1-matnr TO wa_po_item-material,
wa_temp_upr1-menge TO wa_po_item-quantity,
wa_temp_upr1-peinh TO wa_po_item-price_unit,
wa_temp_upr1-netpr TO wa_po_item-net_price,
wa_temp_upr1-meins TO wa_po_item-po_unit,
wa_temp_upr1-afnam TO wa_po_item-preq_name,
wa_temp_upr1-eeind TO wa_po_item-price_date,
' ' TO wa_po_item-gr_ind,
'X' TO wa_po_item-ir_ind,
'X' TO wa_po_item-prnt_price,
' ' TO wa_po_item-distrib.
wa_po_item-acctasscat = 'K'.
MOVE pckg_no TO wa_po_item-pckg_no.
wa_po_itemx-pckg_no = abap_true.
IF wa_temp_upr1-bismt IS INITIAL.
MOVE: wa_temp_upr1-short_text TO wa_po_item-short_text,
wa_temp_upr1-matl_group TO wa_po_item-matl_group,
'9' TO wa_po_item-item_cat.
wa_po_itemx-short_text = abap_true.
wa_po_itemx-matl_group = abap_true.
wa_po_itemx-item_cat = abap_true.
wa_potext-po_item = wa_po_item-po_item.
wa_potext-text_id = 'F01'.
APPEND wa_potext TO it_potext.
ENDIF.
MOVE wa_po_item-po_item TO wa_po_itemx-po_item.
wa_po_itemx-plant = abap_true.
wa_po_itemx-po_itemx = abap_true.
wa_po_itemx-stge_loc = abap_true.
IF wa_po_item-material IS NOT INITIAL.
wa_po_itemx-material = abap_true.
ENDIF.
wa_po_itemx-quantity = abap_true.
wa_po_itemx-price_unit = abap_true.
wa_po_itemx-net_price = abap_true.
wa_po_itemx-po_unit = abap_true.
wa_po_itemx-preq_name = abap_true.
wa_po_itemx-price_date = abap_true.
wa_po_itemx-acctasscat = abap_true.
wa_po_itemx-gr_ind = abap_true.
wa_po_itemx-distrib = abap_true.
wa_po_itemx-part_inv = abap_true.
APPEND wa_po_item TO it_item.
APPEND wa_po_itemx TO it_itemx.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = wa_temp_upr1-kostl
IMPORTING
OUTPUT = wa_temp_upr1-kostl.
wa_account-costcenter = wa_temp_upr1-kostl.
ADD 1 TO l_acc.
ADD 10 TO v_po_item.
MOVE v_po_item TO wa_account-po_item.
MOVE '01' TO wa_account-serial_no.
APPEND wa_account TO it_account.
wa_accountx-costcenter = abap_true.
MOVE v_po_item TO wa_accountx-po_item.
MOVE '01' TO wa_accountx-serial_no.
wa_accountx-SERIAL_NOX = abap_true.
wa_accountx-po_itemx = abap_true.
APPEND wa_accountx TO it_accountx.
*********** services
wa_services-pckg_no = pckg_no.
wa_services-line_no = '0000000001'.
wa_services-outl_ind = 'X'.
wa_services-subpckg_no = pckg_no + 1.
wa_services-quantity = wa_temp_upr1-menge.
wa_services-base_uom = wa_temp_upr1-meins.
wa_services-price_unit = wa_temp_upr1-peinh.
wa_services-gr_price = wa_temp_upr1-netpr.
IF wa_temp_upr1-short_text IS NOT INITIAL.
wa_services-short_text = wa_temp_upr1-short_text.
ENDIF.
APPEND wa_services TO it_services.
CLEAR: wa_services,
val_lin.
wa_services-pckg_no = pckg_no + 1.
wa_services-line_no = '0000000002'.
wa_services-quantity = wa_temp_upr1-menge.
wa_services-base_uom = wa_temp_upr1-meins.
wa_services-price_unit = wa_temp_upr1-peinh.
wa_services-gr_price = wa_temp_upr1-netpr.
IF wa_temp_upr1-short_text IS NOT INITIAL.
wa_services-short_text = 'SERVICE 1'.
ENDIF.
IF NOT wa_temp_upr1-matl_group IS INITIAL.
wa_services-matl_group = wa_temp_upr1-matl_group.
ENDIF.
APPEND wa_services TO it_services.
************* service account assignment
wa_services_acc-pckg_no = pckg_no + 1.
wa_services_acc-line_no = '0000000002'.
wa_services_acc-serno_line = '01'.
wa_services_acc-quantity = wa_temp_upr1-menge.
wa_services_acc-serial_no = '01'.
wa_services_acc-net_value = wa_temp_upr1-netpr.
APPEND wa_services_acc TO it_services_acc.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = wa_header
POHEADERX = wa_headerx
TESTRUN = pa_test
NO_PRICE_FROM_PO = 'X'
IMPORTING
EXPPURCHASEORDER = va_ebeln
EXPHEADER = wa_expheader
TABLES
RETURN = it_return
POITEM = it_item
POITEMX = it_itemx
POACCOUNT = it_account
POACCOUNTX = it_accountx
POSERVICES = it_services
POSRVACCESSVALUES = it_services_acc
POTEXTITEM = it_potext.
I have done some search regarding this error and try to implemented it, but still does not working.
example website that i found for this error is:
David Klein's Corner: SAP Purchase Order Creation Error via BAPI - "In case of account assignment, please enter acc…
PO Upload through BAPI_PO_CREATE1 - Problem in Service Item
Currently my system is using: SAP_APPL SAPKH60604
I am really stuck on this error. Hope you all can help me on this matter.
Thanks.Hi,
Filling the service line have the problem,
while filling the services we must follow correct order,
Here You entering the new services, first manually create purchase order after that observe the table
'ESLL' and use the FM;-' MS_FETCH_SPEC_FOR_LIST' how the services are inserting after that you also follow the same order.
if service entries are created before the creation of the PO.
then follow as bellow....
SELECT * FROM esll INTO TABLE lt_esll WHERE packno = wa_tmp_spec-packno.
IF sy-subrc = '0'.
LOOP AT lt_esll.
CLEAR : lt_poservices.
lt_poservices-pckg_no = lt_esll-packno .
lt_poservices-line_no = lt_esll-introw .
lt_poservices-ext_line = lt_esll-extrow .
lt_poservices-outl_level = lt_esll-rang .
lt_poservices-outl_no = lt_esll-extgroup .
lt_poservices-outl_ind = lt_esll-del .
lt_poservices-subpckg_no = lt_esll-sub_packno .
lt_poservices-service = lt_esll-srvpos .
lt_poservices-edition = lt_esll-ausgb .
lt_poservices-ssc_item = lt_esll-stlvpos .
lt_poservices-ext_serv = lt_esll-extsrvno.
lt_poservices-quantity = lt_esll-menge .
lt_poservices-base_uom = lt_esll-meins .
lt_poservices-ovf_tol = lt_esll-uebto .
lt_poservices-ovf_unlim = lt_esll-uebtk .
lt_poservices-gr_price = lt_esll-tbtwr .
lt_poservices-from_line = lt_esll-frompos .
lt_poservices-to_line = lt_esll-knt_introw.
lt_poservices-short_text = lt_esll-ktext1 .
lt_poservices-distrib = lt_esll-vrtkz .
lt_poservices-pers_no = lt_esll-pernr .
lt_poservices-wagetype = lt_esll-lgart .
lt_poservices-con_pckg = lt_esll-knt_packno.
lt_poservices-con_line = lt_esll-knt_introw .
lt_poservices-matl_group = lt_esll-matkl .
lt_poservices-taxjurcode = lt_esll-txjcd.
lt_poservices-tax_code = lt_esll-mwskz .
lt_poservices-date = lt_esll-sdate .
APPEND lt_poservices TO lt_poservices[].
CLEAR lt_esll.
ENDLOOP.
ENDIF.
CALL FUNCTION 'MS_FETCH_SPEC_FOR_LIST'
EXPORTING
spec_packno = wa_tmp_spec-packno
* ONLINE_DATA = ' '
* IMPORTING
* LIMIT =
TABLES
servicetab = lt_ml_esll1
* LIMITTAB =
EXCEPTIONS
no_specification_exist = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
LOOP AT lt_ml_esll1 INTO DATA(ls_ml_esll1).
CLEAR : lt_poservices.
lt_poservices-pckg_no = ls_ml_esll1-packno .
lt_poservices-line_no = ls_ml_esll1-introw .
lt_poservices-ext_line = ls_ml_esll1-extrow .
lt_poservices-outl_level = ls_ml_esll1-rang .
lt_poservices-outl_no = ls_ml_esll1-extgroup .
lt_poservices-outl_ind = ls_ml_esll1-del .
lt_poservices-subpckg_no = ls_ml_esll1-sub_packno .
lt_poservices-service = ls_ml_esll1-srvpos .
lt_poservices-edition = ls_ml_esll1-ausgb .
lt_poservices-ssc_item = ls_ml_esll1-stlvpos .
lt_poservices-ext_serv = ls_ml_esll1-extsrvno.
lt_poservices-quantity = ls_ml_esll1-menge .
lt_poservices-base_uom = ls_ml_esll1-meins .
lt_poservices-ovf_tol = ls_ml_esll1-uebto .
lt_poservices-ovf_unlim = ls_ml_esll1-uebtk .
lt_poservices-gr_price = ls_ml_esll1-tbtwr .
lt_poservices-from_line = ls_ml_esll1-frompos .
lt_poservices-to_line = ls_ml_esll1-knt_introw.
lt_poservices-short_text = ls_ml_esll1-ktext1 .
lt_poservices-distrib = ls_ml_esll1-vrtkz .
lt_poservices-pers_no = ls_ml_esll1-pernr .
lt_poservices-wagetype = ls_ml_esll1-lgart .
lt_poservices-con_pckg = ls_ml_esll1-knt_packno.
lt_poservices-con_line = ls_ml_esll1-knt_introw .
lt_poservices-matl_group = ls_ml_esll1-matkl .
lt_poservices-taxjurcode = ls_ml_esll1-txjcd.
lt_poservices-tax_code = ls_ml_esll1-mwskz .
lt_poservices-date = ls_ml_esll1-sdate .
APPEND lt_poservices TO lt_poservices[].
CLEAR ls_ml_esll1.
ENDLOOP.
CLEAR : lt_poservices.
*& Filling the po service values internal table from service internal table
LOOP AT lt_poservices[] INTO lt_poservices WHERE gr_price GT 0.
READ TABLE lt_ml_esll1 INTO wa_msll WITH KEY packno = lt_poservices-pckg_no
introw = lt_poservices-line_no
extrow = lt_poservices-ext_line..
IF sy-subrc EQ 0.
CLEAR lt_posvalues.
lt_posvalues-pckg_no = wa_msll-packno.
lt_posvalues-line_no = wa_msll-introw.
lt_posvalues-quantity = wa_msll-menge.
* lt_posvalues-net_value = wa_msll-netwr.
lt_posvalues-serno_line = '01'.
lt_posvalues-serial_no = '01'.
* lt_posvalues-percentage = '100'.
APPEND lt_posvalues TO lt_posvalues[].
CLEAR : wa_msll.
ENDIF.
ENDLOOP.
note:- if it is correct give points
Maybe you are looking for
-
Need a Folder Action Script to automate running of Applescripts in iTunes
I posted this in the OSX forum but thought i'd try here too: I have a couple of applescripts that I have begun using on some of my podcasts. Specifically they will deselect "Skip When Shuffling" and "Remember Track Position" (Thanks Doug!). I feel li
-
Invoice no for payment received.
Hi, I have found all payment entries made today against customer. But I want to find out the related invoice no for the same. how to get this and from which table. Thanks
-
My phone will not read my sd card. PLEASE HELP!!!
My phone was reading my card but then I pulled it out and it will not recoqnize it now. Its like theres not even a card there. I also cannot find the pictures that I was moving from the phone to the memory card.
-
New 6301 Wallet & Screen saver
I have just beeen upgraded from a 62301i, which I loved to a 6301. I'm afraid that my problems are a lot less'techy' than the ones you're used to and I hope someone can help. 1. My old phone had a wallet with a pin number, where I could store secure
-
What is the easiest way to burn a music cd?
I've been having trouble burning cds on my mac air (10.7.3) with the latest version of iTunes. After I import the cd from the superdrive and insert a blank cd, iTunes closes and I'm taken to the desktop which has the "untitled disc" on it. I have no