Convert Data task issue
Hello experts,
We are facing one very weird problem. We are loading actuals from a flat file to consol application. We have transformation written to map all unavailable brands to NOT_ASSIGNED group. We have list of all brands which are not maintained in brand dimension. These brands are maintained in conversion file to move them to NOT_ASSIGNED.
This logic is working fine till last week. Now for 2 brands, sometimes the data is getting rejected though these brands are maintained in brand dimension. If we run the package manually, it does not reject the data for these brands. But when the package is running from schedule, it rejects data for those two brands.
Sorry Roberto for the confusion. Here is the design of the package:
Following two scenarios are possible with each record in the data load:
1. Valid brand u2013 the brand is maintained in the brand dimension. No conversion is required. Let the record go as it comes.
2. Non-valid brand u2013 the brand is not a valid brand for BPC. This brand is not at all maintained in brand dimension. Map this record to NO_BRAND as NO_BRAND is not considered during reporting. All non-valid brands are maintained in conversion file to NO_BRAND to ensure no record has been missed in BPC.
These two brands are maintained properly in brand dimension. We have also fully optimized applications to keep consistency in application.
The package is scheduled to run every morning to bring actuals to Consol Application. Most of the time, this package gives reject list.
When we run this package by selecting NOW option, the behavior of this package is not getting changed. Most of the instances reject the data.
We have not changed anything. But weird behavior is sometimes this package doesnu2019t reject the records.
Hope this will give you enough information to help.
Thanks for all your informative ideas. They are really helpful.
Similar Messages
-
Standard Inport Package is getting failed at Convert Data Task
Hi All,
When running standard import package on any application, it's getting failed at Convert Data Task.
Do any body faced similar kind of issue, please let me know what might be the cause or any solution to the above issue would be appreciated.
Regards,
Sreekanth.Hi,
The format of dimension members in the external file is different from the BPC internal format. Check your conversion file. The problem is with your conversion file.
For example:
In the external file Time dimension values is given as Jan, Feb, Mar etc..
In BPC asume you are maintaining time dimension members as 2008.Jan, 2008.Feb etc.
Then you should define this in conversion file. Jan should be replaced by 2008.Jan when it enter BPC application. Also, the values you define in the Internal format should be maintained as master data (dimension members).
regards,
Lokesh Nandula -
Crystal Data Conversion Issue (Error converting data type varchar to datetime)
Hi,
I can run stored procedure without error in SQL Server using my personal credentials as well as database credentials.
I can also run Crystal Report after connecting to Stored procedure without error on my desktop using my personal credentials as well as database credentials.
But when I upload the crystal report in BOBJDEV and when I run using database credentials report fails saying that "Error in File ~tmp1d1480b8e70fd90.rpt: Unable to connect: incorrect log on parameters. Details: [Database Vendor Code: 18456 ]" but I can run the crystal report successfully on BOBJDEV using my personal credentials.
I googled (Data Conversion Error Message) about this issue & lot of people asked to do "Verify Database" in Crystal Report. So I did that, but when I do it I am getting a error message like this:
Error converting data type varchar to datetime.
Where do you think the error might be occurring? Did anyone faced this kind of issue before? If so, how to resolve it?
(FYI, I am using Crystal Reports 2008, & for stored procedure I have used SSMS 2012 )
Please help me with this issue.
Thanks & Regards.
Naveen.hello Naveen,
since the report works fine in the cr designer / desktop, we need to figure out where you should post this question.
by bobjdev do you mean businessobjects enterprise or crystal reports server? if so please post this question to the bi platform space.
-jamie -
Error converting data type nvarchar to numeric 'witholding tax' (OWHT)
Hi Guys.
After I have upgraded my clients 2007 PL 30 database to 8.81 PL05, and running a repair to fix inconsistincies, I am receiveing some error when opening any sales documents.
It takes place when I open a sales document, or browse previous docs. When browsing previous docs, it onlly happens on some of them.
I also receive a different error when viewing sales orders: Error converting data type nvarchar to numeric (CRD2).
Any ideas how to fix it?
It does not limit me from processing and using the rest of the functionality. All calculations with queries in the docs are still working.
Thanks.Hi,
Please check Note No. : 1402855 and see if the same applied to the issue mentioned by you.
Kind Regards,
Jitin
SAP Business One Forum Team -
Im getting an error when running a procedure that includes this code.
I need to select from a dynamic column name and save the result in a variable, but seem to be having trouble with the values being fed to sp_executesql
DECLARE @retval AS DECIMAL(12,2)
DECLARE @MonthVal VARCHAR(20), @SpreadKeyVal INT
DECLARE @sqlcmd AS NVARCHAR(150)
DECLARE @paramdef NVARCHAR(150)
SET @MonthVal = 'Month' + CAST(@MonthNumber AS VARCHAR(2) );
SET @SpreadKeyVal = @SpreadKey; --CAST(@SpreadKey AS VARCHAR(10) );
SET @sqlcmd = N' SELECT @retvalout = @MonthVal FROM dbo.CourseSpread WHERE CourseSpreadId = @SpreadKeyVal';
SET @paramdef = N'@MonthVal VARCHAR(20), @SpreadKeyVal INT, @retvalout DECIMAL(12,2) OUTPUT'
--default
SET @retval = 0.0;
EXECUTE sys.sp_executesql @sqlcmd,@paramdef, @MonthVal = 'Month4',@SpreadKeyVal = 1, @retvalout = @retval OUTPUT;
SELECT @retval
DECLARE @return_value DECIMAL(12,2)
EXEC @return_value = [dbo].[GetSpreadValueByMonthNumber]
@SpreadKey = 1,
@MonthNumber = 4
SELECT 'Return Value' = @return_value
Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for:
https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
>> I need to select from a dynamic column name and save the result in a variable, but seem to be having trouble with the values being fed to sp_executesql <<
This is so very, very wrong! A column is an attribute of an entity. The idea that you are so screwed up that you have no idea if you want
the shoe size, the phone number or something else at run time of this entity.
In Software Engineering we have a principle called cohesion that says a model should do one and only one task, have one and only one entry point, and one and only one exit point.
Hey, on a scale from 1 to 10, what color is your favorite letter of the alphabet? Yes, your mindset is that level of sillyity and absurdity.
Do you know that SQL is a declarative language? This family of languages does not use local variables!
Now think about “month_val” and what it means. A month is a temporal unit of measurement, so this is as silly as saying “liter_val” in your code. Why did you use “sp_” on a procedure? It has special meaning in T-SQL.
Think about how silly this is:
SET @month_val = 'Month' + CAST(@month_nbr AS VARCHAR(2));
We do not do display formatting in a query. This is a violation of at the tiered architecture principle. We have a presentation layer. But more than that, the INTERVAL temporal data type is a {year-month} and never just a month. This is fundamental.
We need to see the DDL so we can re-write this mess. Want to fix it or not?
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How to Convert Date to Month in Database which is pointing to EBS, Not DWH.
Hi Friends,
We are planning to create reports in OBIEE and the Source is EBS. That means, we don’t want to depends on Datawarehouse and Informatica and OBIApps. We just create some reports and they are pointing to EBS database.
For testing purpose, we have taken one HR Report and it containsthe below columns:
Month (Dim)
Revenue Per Employee Headcount (Fact)
Average Cost per Active Workforce Headcount (Fact)
In my little investigation, we found that Revenue column is coming from EBS: GL_BALANCES. And we configured W_Day_D base table in DAC as there is no Month column in EBS (Not sure).
*** Coming to my problem, how can I call Month column in my database pointed to EBS. How to convert Date to Month in my database.
I could be wrong but anyone please look into this issue.. How can I create columns for that exact OBI report in EBS database instead of DwH.
Thanks in Advance..
Raghu NagadasariHi Veeresh,
You are right. Here, no need of using W_DAY_D table, but, we need all the stuff from the table and to explain my problem i have taken that table as an example. Now, we ran scripts for W_MONTH_D and W_DAY_D tables with EBS columns. So, we are getting data for the tables. In the same manner we have to create scripts for the below tables.
W_GL_ACCOUNT_D
W_GL_OTHER_F
W_STATUS_D
W_MCAL_DAY_D
W_EMPLOYMENT_STAT_CAT_D
W_WRKFC_BAL_A
W_DAY_D (Completed)
W_MONTH_D (Completed)
But, we are not aware of EBS Tables and their columns much. So, we are back tracing from RpD --> DAC --> Info --> EBS for each and every column and its taking much time.
So, if anyone of you facing the same issue, please share the EBS tables for the corresponding OBI tables, which are mentioned above. -
LSMW dump at step 11-Convert data
Hi Guys,
i uploaded some vendors using LSMW in my DEV System. For testing purposes in the test client,a project import from DEV into TST which went on well.Unfortunately at step 11-convert Data , it flagged an error and threw a dump.
The dump file is below.
Please does anyone have a clue
<removed by moderator>
Moderator message: please post only relevant parts of the dump, your posts must contain less than 5000 characters to preserve formatting.
Edited by: Thomas Zloch on Apr 6, 2011 12:40 PMHi Saravanan M,
I got some assistance that before step 110convert Data , i could generate my conversion program i which i have done.
the issue now is that i have an error at line 98: the error is 'ZFB60_NEW has already been declared'.
This is the generated conversion code
<removed by moderator>
Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve formatting.
Edited by: Thomas Zloch on Apr 6, 2011 12:39 PM -
How we can view convert data after XSLT mapping & before Graphical mapp
Hello Friends,
Currently i am working on XI standard content. In this client need some customization.
In interface mapping, XSLT mapping on 1st position & Graphical mapping on 2nd position.
As per my understanding 1st XSLT mapping will be exected then Graphical mapping.
Can I see or check convert data from XSLT mapping.
I want to check data between XSLT mapping & Graphical mapping.
Kindly help me out.
Regards,
Narendra>
Narendra GSTIT wrote:
> I dont want to test standalone XSL Code.
>
> The data which I get from Source interface and after XSLT mapping I want to check this that my XSLT code is going well or not.
>
> i.e. check for proper input & get proper output.
You have ro do standalone testing of the XSLT mapping.....Interface Mapping or Interface Determination will give you output message which will be that of message mapping (the last mapping)
What is the issue in testing the XSLT mapping alone?...may be in Stylus Studio.
Just ensure that XSLT mapping produces proper output and then this output message of XSLT is the input to your Message Mapping.....once the entire Interface mapping gets executed then it would mean that all the included mapping programs work fine.
Regards,
Abhishek. -
Convert data to MSWORD, MSEXCEL or PDF
Hi,
I have a requirement of sending SAP std report output as an attachment via email. I am thinking of using SUBMIT TO MEMORY or SPOOL and then get the data from there and convert and send as file attachment using SO_DOCUMENT_SEND_API1 or class CL_BCS. The file is required to be sent as MSWORD or MSEXCEL or PDF which can be decided by having a parameter on selection screen..
But I am not sure on how to convert data after retrieving it back from Memory or spool. There are a few function modules to convert. Can anyone give me the names please in each case like
For Spool to PDF function CONVERT_ABAPSPOOLJOB_2_PDF can be used
For Spool to Excel ?
For Spool to Word ?
For memory to PDF ?
For memory to Word ?
For memory to Excel ?
Regards,
VinHi,
I just had the same reuirement and i did it few days back . here is the code ...juz modify it accordingly.
The program will send my ABAP report as a PDF attachment to the USER>
REPORT ZRMM0055 NO STANDARD PAGE HEADING
MESSAGE-ID ZZ
LINE-SIZE 255
LINE-COUNT 65.
TABLES DECLARATION *
TABLES : MARD, " Storage Location Data for Material
MARC, " Plant Data for Material
MSEG,
SSCRFIELDS. " Fields on selection screens
Internal Tables declaration. *
*---Internal Table to hold the MARD table data
DATA : BEGIN OF IT_MARD OCCURS 0,
MATNR LIKE MARD-MATNR, " Material Number
WERKS LIKE MARD-WERKS, " Plant
LGORT LIKE MARD-LGORT, " Storage Location
LMINB LIKE MARD-LMINB, " Reorder Point
LABST LIKE MARD-LABST, " Stock at storage loc
END OF IT_MARD.
*---Internal table to hold data from MSEG, MKPF, MAKT
DATA : BEGIN OF IT_MSEG OCCURS 0,
MATNR LIKE MARD-MATNR, " Material Number
WERKS LIKE MARD-WERKS, " Plant
LGORT LIKE MARD-LGORT, " Storage Location
MENGE LIKE MSEG-MENGE, " Quantity
MEINS LIKE MSEG-MEINS, " UOM
LIFNR LIKE MSEG-LIFNR, " Account Number of Vendor
SHKZG LIKE MSEG-SHKZG, " Credit/Debit Indicator
EBELN LIKE EKPO-EBELN,
MENGE1 LIKE EKPO-MENGE, " Open PO qty
EINDT LIKE EKET-EINDT,
DISPO LIKE MARC-DISPO, " MRP controller
EKGRP LIKE MARC-EKGRP, " Purchasing Group
MAKTX LIKE MAKT-MAKTX,
END OF IT_MSEG.
*----Internal table to hold the data from EKPO and EKET table
DATA : BEGIN OF IT_EKPO OCCURS 0,
EBELN LIKE EKPO-EBELN, " PO document
EBELP LIKE EKPO-EBELP, " Item
MATNR LIKE MARD-MATNR, " Material Number
WERKS LIKE MARD-WERKS, " Plant
LGORT LIKE MARD-LGORT, " Storage Location
MENGE LIKE EKPO-MENGE, " Quantity
EINDT LIKE EKET-EINDT, " Delivery Date
END OF IT_EKPO.
*--Internal Table to hold the final data
DATA : BEGIN OF IT_FINAL OCCURS 0,
MATNR LIKE MARD-MATNR, " Material Number
MAKTX LIKE MAKT-MAKTX, " Material Description
LMINB LIKE MARD-LMINB, " Reorder Point
MEINS LIKE MSEG-MEINS, " UOM
LABST LIKE MARD-LABST, " On hand inventory at storageloc
TOT_LABST LIKE MARD-LABST, " Total On hand at plant
ISSUE LIKE MSEG-MENGE, " YTD issue
RECEIPT LIKE MSEG-MENGE, " YTD receipts
DISPO LIKE MARC-DISPO, " MRP controller
EKGRP LIKE MARC-EKGRP, " Purchasing Group
MENGE LIKE EKPO-MENGE, " Open PO Quantity
EINDT LIKE EKET-EINDT, " Next Delivery Date
LIFNR LIKE MSEG-LIFNR, " Vendor
EBELN LIKE MSEG-EBELN, " PO number
END OF IT_FINAL.
*----Internal table to hold YTD data
DATA : BEGIN OF IT_YTD OCCURS 0,
MENGE LIKE MSEG-MENGE,
MEINS LIKE MSEG-MEINS,
SHKZG LIKE MSEG-SHKZG,
END OF IT_YTD.
DATA : BEGIN OF X_MSEG,
MBLNR LIKE MSEG-MBLNR,
MJAHR LIKE MSEG-MJAHR,
MATNR LIKE MARD-MATNR, " Material Number
WERKS LIKE MARD-WERKS, " Plant
LGORT LIKE MARD-LGORT, " Storage Location
MENGE LIKE MSEG-MENGE, " Quantity
MEINS LIKE MSEG-MEINS, " UOM
LIFNR LIKE MSEG-LIFNR, " Account Number of Vendor
SHKZG LIKE MSEG-SHKZG, " Credit/Debit Indicator
EBELN LIKE EKPO-EBELN,
MENGE1 LIKE EKPO-MENGE, " Open PO Qty
EINDT LIKE EKET-EINDT,
DISPO LIKE MARC-DISPO, " MRP controller
EKGRP LIKE MARC-EKGRP, " Purchasing Group
MAKTX LIKE MAKT-MAKTX,
END OF X_MSEG.
DATA: V_LMINB(16) TYPE C,
S_LABST(16) TYPE C,
V_TOT_LABST(16) TYPE C,
S_ISSUE(16) TYPE C,
S_RECEIPT(16) TYPE C,
V_MENGE(16) TYPE C,
V_EINDT(8) TYPE C.
DATA: T_PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
VARIABLES DECLARATION *
DATA : V_SUM TYPE MSEG-MENGE, " Variable for adding GI's to Stock
V_TEMP TYPE MSEG-MENGE, " Variable for adding GI's to Stock
V_TABIX TYPE SY-TABIX, " Loop count
V_ISSUE LIKE MSEG-MENGE, " Variable for calculating YTD issues
V_RECEIPT LIKE MSEG-MENGE, " Var for Calculating YTD Receipts
V_LABST LIKE MARD-LABST, " Var for Total On hand inv at plant
V_MJAHR LIKE MSEG-MJAHR, " Variable for holding the Year
f_color.
*----Declaration to send Email
DATA: IT_PDF LIKE TLINE OCCURS 10 WITH HEADER LINE,
IT_XI_PDF LIKE TLINE OCCURS 0 WITH HEADER LINE,
IT_HTML LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
IT_XI_TEMP LIKE BAPIQCMIME OCCURS 0 WITH HEADER LINE,
IT_XI_MIME(255) TYPE C OCCURS 0 WITH HEADER LINE.
DATA:
LS_DOCDATA TYPE SODOCCHGI1,
LT_OBJPACK TYPE TABLE OF SOPCKLSTI1 WITH HEADER LINE,
LT_OBJHEAD TYPE TABLE OF SOLISTI1 WITH HEADER LINE,
LT_OBJTXT TYPE TABLE OF SOLISTI1 WITH HEADER LINE,
LT_OBJBIN TYPE TABLE OF SOLISTI1 WITH HEADER LINE,
LT_RECLIST TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
LT_LISTOBJECT TYPE TABLE OF ABAPLIST WITH HEADER LINE,
LT_LISTOBJECTLN(1000) TYPE C,
L_TAB_LINES TYPE I,
L_ATT_TYPE LIKE SOODK-OBJTP.
DATA: IT_OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
Internal table for Single List with Column Length 255
DATA : IT_OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
Internal table for Single List with Column Length 255
DATA : IT_OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
Internal table for Structure of the API Recipient List
DATA : IT_RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
Structure of the API Recipient List
DATA: X_DOC_CHNG LIKE SODOCCHGI1.
SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK S1 WITH FRAME TITLE TEXT-001.
PARAMETERS:
P_WERKS LIKE MARD-WERKS OBLIGATORY. " Plant
SELECT-OPTIONS:
S_BUKRS for mseg-bukrs, " Company code
S_LGORT FOR MARD-LGORT OBLIGATORY, " Storage Location
S_MATNR FOR MARD-MATNR, " Material Number
S_DISPO FOR MARC-DISPO, " MRP Controller
S_DATE FOR SY-DATUM DEFAULT SY-DATUM OBLIGATORY. " Date Range
SELECTION-SCREEN END OF BLOCK S1.
SELECTION-SCREEN BEGIN OF BLOCK S2 WITH FRAME TITLE TEXT-002.
PARAMETERS:
P_MAIL TYPE C AS CHECKBOX. " Mail to user Group
SELECT-OPTIONS:
S_UNAME FOR SY-UNAME NO INTERVALS. " Usergroup id
SELECTION-SCREEN END OF BLOCK S2.
Initialization
INITIALIZATION.
AT S E L E C T I O N - S C R E E N
AT SELECTION-SCREEN.
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
PERFORM VALIDATE_MAIL.
PERFORM VALIDATE_DATA.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM FETCH_DATA.
END-OF-SELECTION *
END-OF-SELECTION.
IF NOT IT_FINAL[] IS INITIAL.
PERFORM DOWNLOAD_DISPLAY_REPORT.
ENDIF.
TOP-OF-PAGE *
TOP-OF-PAGE.
PERFORM PAGE_HEADER.
*& Form Fetch_DATA
Pick data
FORM FETCH_DATA .
DATA : V_EBELN LIKE EKPO-EBELN,
V_EBELP LIKE EKPO-EBELP,
V_MENGE LIKE EKPO-MENGE,
V_EINDT LIKE EKET-EINDT,
V_DISPO LIKE MARC-DISPO,
V_EKGRP LIKE MARC-EKGRP,
V_MAKTX LIKE MAKT-MAKTX.
*----Select data from MARD Table
SELECT MATNR " Material Number
WERKS " Plant
LGORT " Storage Location
LMINB " Reorder Point Level
LABST " Stock with unrestricted use
INTO TABLE IT_MARD
FROM MARD
WHERE MATNR IN S_MATNR AND
WERKS = P_WERKS . "AND
LGORT IN S_LGORT.
D~LMINB <> SPACE .
IF SY-SUBRC = 0.
LOOP AT IT_MARD.
CLEAR : V_EBELN, V_EBELP, V_MENGE, V_EINDT.
*---select data from EKPO table
SELECT EBELN
EBELP
MENGE
UP TO 1 ROWS
FROM EKPO
INTO (V_EBELN, V_EBELP, V_MENGE)
WHERE MATNR = IT_MARD-MATNR AND
WERKS = IT_MARD-WERKS AND
LGORT = IT_MARD-LGORT AND
BUKRS IN S_BUKRS AND
ELIKZ = SPACE.
ENDSELECT.
IF SY-SUBRC = 0.
X_MSEG-EBELN = V_EBELN.
X_MSEG-MENGE1 = V_MENGE.
SELECT EINDT
UP TO 1 ROWS
FROM EKET
INTO V_EINDT
WHERE EBELN = V_EBELN AND
EBELP = V_EBELP.
ENDSELECT.
IF SY-SUBRC = 0.
X_MSEG-EINDT = V_EINDT.
ENDIF.
ENDIF.
*---Select Data from MARC table.
CLEAR : V_DISPO, V_EKGRP.
SELECT DISPO
EKGRP
UP TO 1 ROWS
FROM MARC
INTO (V_DISPO, V_EKGRP)
WHERE MATNR = IT_MARD-MATNR AND
WERKS = IT_MARD-WERKS AND
DISPO IN S_DISPO.
ENDSELECT.
IF SY-SUBRC = 0.
X_MSEG-DISPO = V_DISPO.
X_MSEG-EKGRP = V_EKGRP.
else.
continue.
ENDIF.
*---select Material Description from MAKT
CLEAR V_MAKTX.
SELECT SINGLE MAKTX
FROM MAKT
INTO V_MAKTX
WHERE MATNR = IT_MARD-MATNR AND
SPRAS = SY-LANGU.
IF SY-SUBRC = 0.
X_MSEG-MAKTX = V_MAKTX.
ENDIF.
*----Select data from MSEG Table
SELECT MBLNR
MJAHR
MATNR " Material Number
WERKS " Plant
LGORT " Storage Location
MENGE " Quantity
MEINS " UOM
LIFNR " Account No of Vendor
SHKZG " Credit/Debit Indicator
FROM MSEG
INTO X_MSEG
WHERE MATNR = IT_MARD-MATNR AND
WERKS = IT_MARD-WERKS AND
LGORT = IT_MARD-LGORT AND
BUKRS IN S_BUKRS.
*---Subroutine to check whether the document is in the given date range
PERFORM CHECK_DATE.
ENDSELECT.
ENDLOOP.
ELSE.
STOP.
ENDIF.
*----Select YTD receipts and Issues to date from MSEG
CLEAR : V_MJAHR, V_ISSUE, V_RECEIPT.
IF S_DATE[] IS NOT INITIAL.
V_MJAHR = S_DATE+3(4).
ELSE.
V_MJAHR = SY-DATUM+0(4).
ENDIF.
SELECT MENGE
MEINS
SHKZG
FROM MSEG
INTO TABLE IT_YTD
WHERE WERKS = P_WERKS AND
MJAHR = V_MJAHR.
*--Calculating YTD receipts and Issues
IF SY-SUBRC = 0.
LOOP AT IT_YTD.
IF IT_YTD-SHKZG = 'S'.
V_ISSUE = V_ISSUE + IT_YTD-MENGE.
ELSE.
V_RECEIPT = V_RECEIPT + IT_YTD-MENGE.
ENDIF.
ENDLOOP.
IT_FINAL-ISSUE = V_ISSUE.
IT_FINAL-RECEIPT = V_RECEIPT.
ENDIF.
*-----Logic for printing the material
LOOP AT IT_MSEG.
V_TABIX = SY-TABIX.
AT NEW MATNR.
*----Logic for calculation of Total On hand inv at plant.
*---Sum of all MARD-LABST.
CLEAR V_LABST.
LOOP AT IT_MARD WHERE MATNR = IT_MSEG-MATNR.
V_LABST = V_LABST + IT_MARD-LABST.
ENDLOOP.
IT_FINAL-TOT_LABST = V_LABST.
ENDAT.
AT NEW LGORT.
CLEAR : V_SUM.
ENDAT.
READ TABLE IT_MARD WITH KEY MATNR = IT_MSEG-MATNR
WERKS = IT_MSEG-WERKS
LGORT = IT_MSEG-LGORT.
IF SY-SUBRC = 0 AND IT_MARD-LMINB > 0.
*---Logic for adding/Subtracting GR/GI
IF V_TABIX = 1.
IF IT_MSEG-SHKZG = 'S'.
V_TEMP = IT_MARD-LABST + IT_MSEG-MENGE.
ELSE.
V_TEMP = IT_MARD-LABST - IT_MSEG-MENGE.
ENDIF.
ENDIF.
IF IT_MARD-LABST < IT_MARD-LMINB. "Stock < Reorder Point
*---Check for any goods receipts on the given day. SHKZG = 'S'
IF IT_MSEG-SHKZG = 'S' .
IF V_TABIX = 1.
V_SUM = V_TEMP.
ELSE.
V_SUM = V_SUM + IT_MSEG-MENGE.
ENDIF.
IF V_SUM < IT_MARD-LMINB.
IT_FINAL-MATNR = IT_MARD-MATNR.
IT_FINAL-MAKTX = IT_MSEG-MAKTX.
IT_FINAL-LMINB = IT_MARD-LMINB.
IT_FINAL-MEINS = IT_MSEG-MEINS.
IT_FINAL-LABST = IT_MARD-LABST.
IT_FINAL-DISPO = IT_MSEG-DISPO.
IT_FINAL-EKGRP = IT_MSEG-EKGRP.
IT_FINAL-LIFNR = IT_MSEG-LIFNR.
IT_FINAL-ISSUE = V_ISSUE.
IT_FINAL-RECEIPT = V_RECEIPT.
IT_FINAL-TOT_LABST = V_LABST.
IT_FINAL-EBELN = IT_MSEG-EBELN.
IT_FINAL-MENGE = IT_MSEG-MENGE1.
IT_FINAL-EINDT = IT_MSEG-EINDT.
APPEND IT_FINAL.
CLEAR IT_FINAL.
ENDIF.
ELSE.
*--- If there is no Goods receipt mov't type on the given day, then
*---add all the goods issues to the storage location stock.
*---Goos Receipt = 'S' , Goods Issue = 'H'.
IF V_TABIX = 1.
V_SUM = V_TEMP.
ELSE.
V_SUM = V_SUM - IT_MSEG-MENGE.
ENDIF.
IF V_SUM < IT_MARD-LMINB.
IT_FINAL-MATNR = IT_MARD-MATNR.
IT_FINAL-MAKTX = IT_MSEG-MAKTX.
IT_FINAL-LMINB = IT_MARD-LMINB.
IT_FINAL-MEINS = IT_MSEG-MEINS.
IT_FINAL-LABST = IT_MARD-LABST.
IT_FINAL-DISPO = IT_MSEG-DISPO.
IT_FINAL-EKGRP = IT_MSEG-EKGRP.
IT_FINAL-LIFNR = IT_MSEG-LIFNR.
IT_FINAL-ISSUE = V_ISSUE.
IT_FINAL-RECEIPT = V_RECEIPT.
IT_FINAL-TOT_LABST = V_LABST.
IT_FINAL-EBELN = IT_MSEG-EBELN.
IT_FINAL-MENGE = IT_MSEG-MENGE1.
IT_FINAL-EINDT = IT_MSEG-EINDT.
APPEND IT_FINAL.
CLEAR IT_FINAL.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " Fetch_DATA
*& Form check_date
text
FORM CHECK_DATE .
DATA: LV_BLDAT LIKE MKPF-BLDAT.
SELECT SINGLE BLDAT
FROM MKPF
INTO LV_BLDAT
WHERE MBLNR = X_MSEG-MBLNR AND
MJAHR = X_MSEG-MJAHR AND
BLDAT IN S_DATE.
IF SY-SUBRC = 0.
MOVE : X_MSEG-MATNR TO IT_MSEG-MATNR,
X_MSEG-WERKS TO IT_MSEG-WERKS,
X_MSEG-LGORT TO IT_MSEG-LGORT,
X_MSEG-MENGE TO IT_MSEG-MENGE,
X_MSEG-MEINS TO IT_MSEG-MEINS,
X_MSEG-LIFNR TO IT_MSEG-LIFNR,
X_MSEG-SHKZG TO IT_MSEG-SHKZG,
X_MSEG-EBELN TO IT_MSEG-EBELN,
X_MSEG-MENGE1 TO IT_MSEG-MENGE1,
X_MSEG-EINDT TO IT_MSEG-EINDT,
X_MSEG-DISPO TO IT_MSEG-DISPO,
X_MSEG-EKGRP TO IT_MSEG-EKGRP,
X_MSEG-MAKTX TO IT_MSEG-MAKTX.
APPEND IT_MSEG.
CLEAR IT_MSEG.
ENDIF.
ENDFORM. " check_date
*& Form PAGE_HEADER
To Print page header and other details
FORM PAGE_HEADER . "#EC CALLED
*---Page header
ULINE AT /1(150).
FORMAT COLOR COL_BACKGROUND INTENSIFIED ON .
WRITE:/ 'Run Date:'(t08), SY-DATUM, 50 'Stanley Works'(t07),
110 'Page No:'(t09), SY-PAGNO LEFT-JUSTIFIED.
WRITE:/ 'Run Time:'(t10), SY-UZEIT, 47 SY-TITLE, 110 SY-UNAME.
WRITE:/ 'Source :'(t11), SY-SYSID, 110 SY-CPROG .
ULINE AT /1(150).
WRITE :/1 'Safety Stock Report for Plant :'(t13),P_WERKS.
ENDFORM. "PAGE_HEADER
*& Form VALIDATE_DATA
Subroutine to Validate selection screen data
FORM VALIDATE_DATA .
DATA V_TEMP(20) TYPE C. "#EC NEEDED
*--Validation for Plant.
CLEAR V_TEMP.
SELECT SINGLE WERKS
INTO V_TEMP
FROM T001W
WHERE WERKS = P_WERKS.
IF SY-SUBRC NE 0.
MESSAGE E001(ZZ) WITH 'Invalid Plant'(t03). "#EC *
ENDIF.
*--Validation for Storage Location.
CLEAR V_TEMP.
IF NOT S_LGORT[] IS INITIAL.
SELECT LGORT INTO V_TEMP UP TO 1 ROWS
FROM T001L
WHERE LGORT IN S_LGORT.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE E001(ZZ) WITH 'Invalid Storage Location'(t04).
ENDIF.
ENDIF.
*--Validation for Material Number.
CLEAR V_TEMP.
IF NOT S_MATNR[] IS INITIAL.
SELECT MATNR
INTO V_TEMP
UP TO 1 ROWS
FROM MARA
WHERE MATNR IN S_MATNR.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE E001(ZZ) WITH 'Invalid Material Number'(t05).
ENDIF.
ENDIF.
*--Validation for MRP controller.
CLEAR V_TEMP.
IF NOT S_DISPO[] IS INITIAL.
SELECT DISPO INTO V_TEMP UP TO 1 ROWS
FROM T024D
WHERE DISPO IN S_DISPO.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE E001(ZZ) WITH 'Invalid MRP Controller'(t06).
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_DATA
*& Form validate_mail
Validate user id
FORM VALIDATE_MAIL .
IF P_MAIL = 'X' AND S_UNAME[] IS INITIAL.
MESSAGE E001(ZZ) WITH 'Enter User Mail id'(t01).
ENDIF.
ENDFORM. " validate_mail
*& Form SEND_MAIL
Send email to SAP inbox
FORM SEND_MAIL .
Structures and internal tables for the send data
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE,
OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE,
OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE,
RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1,
TAB_LINES LIKE SY-TABIX.
Data for the status output after sending
DATA: SENT_TO_ALL LIKE SONV-FLAG.
CLEAR: IT_RECLIST, IT_RECLIST[],
IT_OBJTXT , IT_OBJTXT[],
IT_OBJPACK, IT_OBJPACK[],
IT_OBJBIN , IT_OBJBIN[],X_DOC_CHNG.
LOOP AT IT_HTML.
OBJBIN-LINE = IT_HTML-LINE.
APPEND OBJBIN.
CLEAR OBJBIN.
ENDLOOP.
Create the document which is to be sent
DOC_CHNG-OBJ_NAME = 'List'(012).
DOC_CHNG-OBJ_DESCR = 'Mail'(m05).
Heading
OBJTXT-LINE = 'Safety Stock Report attached'(014).
APPEND OBJTXT.
CLEAR OBJTXT.
Size
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Fill the fields of the packing_list for the main document:
CLEAR OBJPACK-TRANSF_BIN.
The document needs no header (head_num = 0)
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
Body
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'(m02).
APPEND OBJPACK.
Create the attachment (the list itself)
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
Fill the fields of the packing_list for the attachment:
OBJPACK-TRANSF_BIN = 'X'.
Header
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
Body
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'PDF'(m01).
OBJPACK-OBJ_NAME = 'Attachment'(m03).
OBJPACK-OBJ_DESCR = 'Mail with pdf Attachment'(018).
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
*-Fill the mail recipient list
LOOP AT S_UNAME.
RECLIST-RECEIVER = S_UNAME-LOW.
RECLIST-REC_TYPE = 'B'.
APPEND RECLIST.
CLEAR: RECLIST.
ENDLOOP.
*-Send the document by calling the SAPoffice API1 module for sending
*-documents with attachments
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL = SENT_TO_ALL
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC .
WHEN 0.
MESSAGE s001 WITH 'Mail has been sent successfully'(003).
WHEN OTHERS.
MESSAGE s001 WITH 'Problem in sending the mail'(004).
ENDCASE.
ENDFORM. " SEND_MAIL
*& Form download_display_report
Download and dispaly report
FORM DOWNLOAD_DISPLAY_REPORT .
DATA: X_PARAMS TYPE PRI_PARAMS,
V_VALID.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY = ' '
LAYOUT = 'X_65_255'
NO_DIALOG = 'X'
IMPORTING
OUT_PARAMETERS = X_PARAMS
VALID = V_VALID.
IF V_VALID <> SPACE.
NEW-PAGE PRINT ON PARAMETERS X_PARAMS NO DIALOG.
PERFORM DISPLAY_REPORT.
NEW-PAGE PRINT OFF.
PERFORM CONV_TO_PDF_DOWNLOAD.
ENDIF.
PERFORM DISPLAY_REPORT.
ENDFORM. " download_display_report
*& Form DISPLAY_REPORT
Display the report
FORM DISPLAY_REPORT .
ULINE AT /0(204).
write:/1 sy-vline no-gap, (10)'Material'(032),
sy-vline no-gap, (40)'Description'(031),
sy-vline no-gap, (15)'Reorder pt'(030),
sy-vline no-gap, (03)'BUn'(029),
sy-vline no-gap, (13)'OnHandQty'(023),
sy-vline no-gap, (13)'OnHandPlnt'(024),
sy-vline no-gap, (13)'YTD issues'(025),
sy-vline no-gap, (13)'YTD Receipts'(026),
sy-vline no-gap, (08)'MRPcntrl'(027),
sy-vline no-gap, (04)'POgrp'(028),
sy-vline no-gap, (13)'POqty'(019),
sy-vline no-gap, (10)'NextDelvDt'(020),
sy-vline no-gap, (10)'Vendor'(021),
sy-vline no-gap, (10)'PO#'(022),
sy-vline no-gap.
ULINE AT /0(204).
loop at it_final.
PERFORM COLOR_SWAP.
write:/1 sy-vline no-gap, (10)it_final-matnr,
sy-vline no-gap, (40)it_final-maktx,
sy-vline no-gap, (15)it_final-lminb, "#EC UOM_IN_MES
sy-vline no-gap, (03)it_final-meins,
sy-vline no-gap, (13)it_final-labst, "#EC UOM_IN_MES
sy-vline no-gap, (13)it_final-tot_labst, "#EC UOM_IN_MES
sy-vline no-gap, (13)it_final-issue, "#EC UOM_IN_MES
sy-vline no-gap, (13)it_final-receipt, "#EC UOM_IN_MES
sy-vline no-gap, (08)it_final-dispo,
sy-vline no-gap, (04)it_final-ekgrp,
sy-vline no-gap, (13)it_final-menge, "#EC UOM_IN_MES
sy-vline no-gap, (10)it_final-eindt,
sy-vline no-gap, (10)it_final-lifnr,
sy-vline no-gap, (10)it_final-ebeln,
sy-vline no-gap.
endloop.
ULINE AT /0(204).
skip 2.
WRITE:/ '******End of Report*******'.
ENDFORM. " DISPLAY_REPORT
*& Form CONV_TO_PDF_DOWNLOAD
Convert to PDF
FORM CONV_TO_PDF_DOWNLOAD .
DATA: V_NUMBYTES TYPE I,
V_SPOOLNO TYPE TSP01-RQIDENT.
CLEAR IT_PDF.
REFRESH IT_PDF.
WAIT UP TO 2 SECONDS.
V_SPOOLNO = SY-SPONO.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = V_SPOOLNO
NO_DIALOG = ' '
IMPORTING
PDF_BYTECOUNT = V_NUMBYTES
TABLES
PDF = IT_PDF.
IF SY-SUBRC = 0. "#EC *
PERFORM PAGE_FORMAT.
ENDIF.
ENDFORM. " CONV_TO_PDF_DOWNLOAD
*& Form page_format
Format the page
FORM PAGE_FORMAT .
DATA : L_LINES TYPE I,
L_TEMP(500) TYPE C,
L_OFFSET TYPE P,
L_LINESLEN(2) TYPE P,
L_MIMELEN(2) TYPE P,
L_TABIX LIKE SY-TABIX.
CLEAR : IT_XI_PDF,
IT_XI_TEMP.
REFRESH : IT_XI_PDF,
IT_XI_TEMP.
IT_XI_PDF[] = IT_PDF[].
Reformat the line to 255 characters wide (code from SAP)
CLEAR: L_TEMP, L_OFFSET, IT_XI_TEMP.
DESCRIBE TABLE IT_XI_PDF LINES L_LINES.
DESCRIBE FIELD IT_XI_PDF LENGTH L_LINESLEN IN CHARACTER MODE.
DESCRIBE FIELD IT_XI_TEMP LENGTH L_MIMELEN IN CHARACTER MODE.
LOOP AT IT_XI_PDF.
L_TABIX = SY-TABIX.
MOVE IT_XI_PDF TO L_TEMP+L_OFFSET.
IF L_TABIX = L_LINES.
L_LINESLEN = STRLEN( IT_XI_PDF ).
ENDIF.
L_OFFSET = L_OFFSET + L_LINESLEN.
IF L_OFFSET GE L_MIMELEN.
CLEAR IT_XI_TEMP.
IT_XI_TEMP = L_TEMP(L_MIMELEN).
APPEND IT_XI_TEMP.
SHIFT L_TEMP BY L_MIMELEN PLACES.
L_OFFSET = L_OFFSET - L_MIMELEN.
ENDIF.
IF L_TABIX = L_LINES.
IF L_OFFSET GT 0.
CLEAR IT_XI_TEMP.
IT_XI_TEMP = L_TEMP(L_OFFSET).
APPEND IT_XI_TEMP.
ENDIF.
ENDIF.
ENDLOOP.
CLEAR : IT_XI_MIME,
IT_XI_MIME[].
LOOP AT IT_XI_TEMP.
IT_XI_MIME(255) = IT_XI_TEMP-LINE.
APPEND IT_XI_MIME.
CLEAR IT_XI_MIME.
ENDLOOP.
Final Data
CLEAR : IT_HTML,
IT_HTML[].
IT_HTML[] = IT_XI_MIME[].
For sending mail
PERFORM SEND_MAIL .
ENDFORM. " page_format
Form : color_swap
Description : Subroutine for color
form color_swap.
if flag is set
if f_color eq 'X'.
clear f_color.
switch off the intensity
format color col_normal intensified off.
else.
if flag is not set.
f_color = 'X'.
switch on the intensity
format color col_normal intensified on.
endif.
endform. " color_swap -
Oracle Database : Date conversion issue between timezones
Hi All,
We are trying to convert date from Eurpoer/Amsterdam timezone to Australia/Sydnet timezone and extracting time out of it.
We are facing issue related to incorrect timing after conversion.
Please find below issue details,
Environment
Database: Oracle 10.2.0.4
Machine: Linux RHEL 4
Location: Amsterdam, Netherlands
Issue: After converting date from Eurpoer/Amsterdam timezone to Australia/Sydnet timezone
SELECT TO_CHAR (FROM_TZ (TO_TIMESTAMP ('201110201416', 'YYYYMMDDHH24MI'),
DBTIMEZONE
) AT TIME ZONE 'Australia/Sydney', 'HH24:MI')
FROM DUAL
Output of above SQL is 22:16.
Expected output is 23:16
Database Timezone (DBTIMEZONE) is set to +02:00 (i.e. GMT + 2) (Europe/Amsterdam)
If we convert date to Australia/Tasmania timezone then we get expected output i.e. 23:16.
Question: Expected time for Australia/sydney is 23:16, but why Oracle database provides 22:16 as output.
Please note that, Sydney and Tasmania comes under same timezone. Still we get different output for both the timezone.
Oracle database considers GMT + 10 for Australia/sydney and GMT + 11 for Australia/Tasmania.
If we want to use Australia/sydney then how should we get correct sydney time?
Regards
ShailendraI made a test and it showed when I omit TO_CHAR, both queries have the same result 11:15 PM. So it's TO_CHAR which is the 'culprit'. Since this is a globalization issue, you may repeat your question in this forum:
Globalization Support
(So one of the moderators moves the thread to this forum).
Werner
By the way my local timezone is Europe/Berlin, there should be no difference to Amsterdam. -
LSMW - Read Data not showing in Converted Data
Hi,
I am using LSMW to load data from a flat file (via recording). I have it working except I have one issue. When I display the data in read data all fields are showing. No errors popup when I select convert data. When I select display converted data the last few fields are missing. Any ideas why or how to fix this?
Any help is appreciated as I do not know how to proceed.
Thanks,
Annette
Edited by: Annette Ameel on Dec 4, 2008 5:37 PMHI Bush,
Currently I am also facing the same problem. In "display read data" it is showing all the field values. No error msg in "convert data". But only 2 fields are displaying in "display converted data". not showing any values in rest of the fields. Kindly suggest me how you fixed this problem -
How to convert date format into sap standard format?
Hi All,
In SAPUI5 screen i have one simple form in form i have date field which is format (MM/DD/YYYY). but i am getting POST error while inserting the data in to sap table.
I want convert date format in sap format (YYYY/MM/DD).
One more issue, when i am fetching the data from sap table,but the date display with time and time zone.
eg. Sat Aug 02 2014 05:30:00 GMT+0530 (India Standard Time)
I want to display only date.
Thanks,
Prashant.Now i am using <DatePicker id="Emp_fsdate" displayFormat="yyyy-MM-dd"/>
I checked in console, but date is display like mm/dd/yy
In my controller.js file i have written code
OData.request
requestUri: "http:sap/opu/odata/sap/ZSERVICE_FINAL_SRV/es_sodata",
method: "GET",
headers:
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/atom+xml",
"DataServiceVersion": "2.0",
"X-CSRF-Token":"Fetch"
function (data, response){
var header_xcsrf_token = response.headers['x-csrf-token'];
OData.request
requestUri:
"http://sap/opu/odata/sap/ZSERVICE_FINAL_SRV/es_sodata",
method: "POST",
headers:
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/atom+xml",
"DataServiceVersion": "2.0",
"Accept": "application/atom+xml,application/atomsvc+xml,application/xml",
"X-CSRF-Token": header_xcsrf_token
data:
Empid:Emp_id,
Empname:Emp_name,
Start_Date:Emp_sdate,
// End_Date:Emp_edate,
Status:Emp_status,
City:Emp_city,
Location:Emp_location,
and in my CREATE_ENTITY method
method ES_SODATA_CREATE_ENTITY.
DATA: ls_request_input_data TYPE zcl_zservice_final_mpc=>ts_et_sodata,
ls_userinfo TYPE zsodata.
DATA ls_temp TYPE sy-datum.
* Read Request Data
io_data_provider->read_entry_data( IMPORTING es_data = ls_request_input_data ).
* Fill workarea to be inserted
ls_userinfo-Empid = ls_request_input_data-Empid.
ls_userinfo-Empname = ls_request_input_data-Empname.
ls_userinfo-Start_Date = ls_request_input_data-Start_Date.
ls_userinfo-End_Date = ls_request_input_data-End_Date.
ls_userinfo-Status = ls_request_input_data-Status.
ls_userinfo-City = ls_request_input_data-City.
ls_userinfo-Location = ls_request_input_data-Location.
* Insert Data in table ZUSERINFO
INSERT zsodata FROM ls_userinfo.
IF sy-subrc = 0.
er_entity = ls_request_input_data. "Fill Exporting parameter ER_ENTITY
ENDIF.
endmethod.
But still i am getting an error
POST http://sap/opu/odata/sap/ZSERVICE_FINAL_SRV/es_sodata 500 (Internal Server Error)
I am able to insert all field except date field. How to insert date field in sap table. -
BPC 10.0 data load issue usiing FIM
Hi,
The error log for the load shows as below,
Any thounghts? It looks some issue in the data services layer.
(14.0) 02-02-12 00:12:01 (E) (6816:10524) RUN-050802: |Data flow DF_LOAD_Test102|Transform RejectedRows
Cannot convert data <2006.MAR> into type <DECIMAL>. Context: Column <Project Column AMOUNT>.
(14.0) 02-02-12 00:12:01 (E) (6816:10524) RUN-050304: |Data flow DF_LOAD_Test102|Transform RejectedRows
Function call <to_decimal_ext ( 2006.MAR, ., , 38, 10 ) > failed, due to error <50802>: <Cannot convert data <2006.MAR> into
type <DECIMAL>. Context: Column <Project Column AMOUNT>.>.
(14.0) 02-02-12 00:12:01 (E) (6816:10524) RUN-053008: |Data flow DF_LOAD_Test102|Transform RejectedRows
INFO: The above error occurs in the context <|Data flow DF_LOAD_Test102|Transform RejectedRows|Project Column AMOUNT|nvl(...)
Function Parameter-1|to_decimal_ext(...) Function Body|>.
(14.0) 02-02-12 00:12:11 (E) (9368:8264) RUN-050316: |Session Test102
Cannot convert data <2006.MAR> into type <DECIMAL>. Context: Column <Project Column AMOUNT>.
(14.0) 02-02-12 00:12:11 (E) (9368:8264) RUN-050304: |Session Test102
Function call <raise_exception ( Cannot convert data <2006.MAR> into type <DECIMAL>. Context: Column <Project Column AMOUNT>. )
> failed, due to error <50316>: <Cannot convert data <2006.MAR> into type <DECIMAL>. Context: Column <Project Column AMOUNT>.>.
(14.0) 02-02-12 00:12:11 (E) (9368:8264) RUN-050316: |Session Test102
Cannot convert data <2006.MAR> into type <DECIMAL>. Context: Column <Project Column AMOUNT>.
Regards,Hi there
The error is 'Cannot convert data <2006.MAR> into type <DECIMAL>' , meaning you are trying to insert text data into a decimal column, put in a transformation in your job to convert the 2006.MAR into 200603 for example.
hope this helps
Kind Regards
Daniel -
LSMW problem during display converted data
Dear Expert,
We have problem in LSMW during display converted data.
When using display converted data, the output will show many of rows based on data content.
For example, contains 6 rows. But when we want to see details of the data for one row (example row 2) by double clicking on it, the problem occurs, the output will show the details of the data from the last row (row 6).
Please your advice.
Thanks and RegardsHi,
There seems to be sorting issue. Do you have dependency on data while executing the script?
how about reading the data , is it getting uploaded correctly?
Regards -
CF9, no hotfix, VendorErrorCode 8114, cfprocresult error converting data type
Hello, everyone.
I've got an issue that really has me scratching my head. Not sure where the issue lies, but I'll explain as best I can.
Basically, I _think_ I'm being told that one of the fields in the recordset is not being converted.
On one page, I make the following CFINVOKE:
<cfinvoke component="components.header" method="content_single" returnvariable="resultset"
dbdsn="#request.db_dsn#" dbusr="#request.db_username#" dbpwd="#request.db_password#">
<cfinvokeargument name="table" value="#url.table#">
<cfif isDefined("url.thisNav") AND len(trim(url.thisNav)) gt 0><cfinvokeargument name="pt" value="#trim(url.thisNav)#"></cfif>
<cfif isDefined("url.id") AND val(url.id) gt 0><cfinvokeargument name="id" value="#val(url.id)#"></cfif>
<cfif isDefined("url.section") AND len(trim(url.section)) gt 0><cfinvokeargument name="section" value="#trim(url.section)#"></cfif>
</cfinvoke>
Within a CFCOMPONENT in header.cfc, I have the following:
<cffunction name="content_single" access="public">
<cfargument name="dbdsn" required="yes">
<cfargument name="dbusr" required="yes">
<cfargument name="dbpwd" required="yes">
<cfargument name="pt" required="no">
<cfargument name="id" required="no">
<cfargument name="section" required="no">
<cfargument name="table" required="yes">
<cfstoredproc procedure="SRT_sp_#lcase(url.table)#_contents_single" datasource="#dbdsn#"
username="#dbusr#" password="#dbpwd#"
result="query_result">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" variable="@table" value="#lcase(table)#" maxlength="30">
<cfif isDefined("pt") AND len(trim(pt)) gt 0><cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" variable="@pt" value="#ucase(pt)#" maxlength="12" null="no"></cfif>
<cfif isDefined("id") AND val(id) gt 0><cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" variable="@id" value="#val(id)#" maxlength="10" null="no"></cfif>
<cfif isDefined("section") AND len(trim(section)) gt 0><cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" variable="@section" value="#trim(replace(lcase(section),'_',' ','all'))#" maxlength="20" null="no"></cfif>
<cfprocresult name="returned_result">
</cfstoredproc>
<cfreturn returned_result>
</cffunction>
Instead of the results I expect, I get the following error:
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Error converting data type varchar to int.
The error occurred in E:\xxxxxxxx\xxxxxxx\xxxx\components\header.cfc: line 17
Called from E:\xxxxxxxx\xxxxxxx\xxxx\content_view.cfm: line 24
Called from E:\xxxxxxxx\xxxxxxx\xxxx\components\header.cfc: line 17
Called from E:\xxxxxxxx\xxxxxxx\xxxx\content_view.cfm: line 24
15 : <cfif isDefined("id") AND val(id) gt 0><cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" variable="@id" value="#val(id)#" maxlength="10" null="no"></cfif>
16 : <cfif isDefined("section") AND len(trim(section)) gt 0><cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" variable="@section" value="#trim(replace(lcase(section),'_',' ','all'))#" maxlength="20" null="no"></cfif>
17 : <cfprocresult name="returned_result">
18 : </cfstoredproc>
19 : <cfreturn returned_result>DBVARNAME is obsolete: don't use it. You must pass-in the parameters positionally, not by name. And, accordingly, you need to pass all of them in (with null values, if necessary).
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7d 52.html:
{quote}
Changed the dbvarname attribute behavior: it is now ignored for all drivers
{quote}
Adam
Maybe you are looking for
-
Write a program to create users in FileRealm
I am trying to create several hundred users in the default file realm and would be interested if anyone has a solution to this problem.
-
Hi, We are running into a problem with dhcp. Diagram is attached here. portion on the left side belongs to Network A & right side is network B. These two networks are seperated by Firewall B. Firewall B has minimal rules & permits traffic between the
-
KM Content Transport using ICE Methodology
Hi All, I would like to transport KM content from Development to Production system. I have done following steps 1. System Administration -> System Configuration -> Repository Managers - > Advanced Oprons -> Content Exchange Repository - > uncheck "Ho
-
Hello All, I need an user exit to get the order number when the order is saved via IW31. I am looking at the exit 'IWO10009', but I don't get the order no yet in this exit. The order no in structure <b>CAUFVD_IMP-AUFNR</b> has temp value like '%00000
-
Hide Personalize Button in Tile Layout
Hello, we defined the Tile Layout for the Overview Page of Component PRD01OV. There we embedded some custom table views. Everything is working fine. Now our customer has the requirement that we should hide the Personalize Buttons for the Table Views.