How to set a date string in a textbox which bind to a Date type datasource
Hi,
I found i can't set a default date value in a textbox which bind to a Date type datasource. Even i tried copying a date string which is picked by the calendar date picker and copy the exactly same string into my source code. It just doesn't work and gives me error said "Invalid date value".
My source code is like this:
oEditText = (SAPbouiCOM.EditText)oItem.Specific;
oEditText.DataBind.SetBound(true, "", "dtFrom");
oEditText.Value = "09/08/2010"; //DateTime.Now.ToString("dd/MM/yyyy");
Any suggestion?
Thanks!
Lan
Hi,
oItem = oForm.Items.Item("10")
oEdit = oItem.Specific
oEdit.String = Format(Today.Date, "dd/MM/yyyy")
or
datestring = oForm.Items.Item("10").Specific.value
datepass = Left(datestring, 4) & "/" & Mid(datestring, 5, 2) & "/" & Mid(datestring, 7, 2)
dtDocDate = Date.Parse(datepass)
Thanks,
Mahesh
Similar Messages
-
How to set the Data types of the Excel sheet while exporting details to it.
Hi All,
We are trying to export some order details to the excel sheet from a jsp. It is working fine when the local system language is set to English.
But when i change it to Russian. the details like Line Numbers(e.g: 1.1, 1.2, 1.3 and so on... ) are getting changed into some other data type(e.g: 01.янв, 02.янв, 03.янв and so on....).
i guess this is mainly due to some data type mismatch, so i tried setting all the possible charset for response in the jsp, but could not succeeded.
This is only for the details which or of decimal format, working fine for the details which are in String type. like Description, Item name etc...
As it is high preference issue for our client, Please help me in this regard ASAP.
Thanks & Regards,
Praveen Reddy Bhi Shiv..
Its not an OAF page but it is from Apps only (i.e.Oracle iStore).
we tried writing this:
<%response.setContentType("application/vnd.ms-excel; charset=UTF-8");%>
<%response.setHeader("Content-Disposition", "attachment; filename=downloadOrders.xls" );%>
<head>
<title>Logitech_iStore</title>
<style>
table {
border-style: solid;
table th.mainHeader {
border-style: solid;
background-color:#000099;
border-color:#000000;
color:#FFFFFF;
font-family:Arial, Helvetica, sans-serif;
font-weight:bold;
font-size:13pt;
table th {
border-style: solid;
background-color:#6687C4;
border-color:#000000;
color:#FFFFFF;
font-family:Arial, Helvetica, sans-serif;
font-weight:bold;
font-size:12pt;
table td.color1 {
border-style: solid;
background-color:#FFFFFF;
border-color:#000000;
color:#000000;
font-family:"Times New Roman", Times, serif;
font-weight:normal;
font-size:12pt;
table td.color2 {
border-style: solid;
background-color:#C0C0C0;
border-color:#000000;
color:#000000;
font-family:"Times New Roman", Times, serif;
font-weight:normal;
font-size:12pt;
table td {
border-style: solid;
background-color:#FFFFFF;
border-color:#000000;
color:#000000;
font-family:"Times New Roman", Times, serif;
font-weight:normal;
font-size:12pt;
</style>
</head>
<body>
<%
/*BigDecimal resp_id=RequestCtx.getResponsibilityId();
String respIdParam="";
String respkey="";
if(resp_id!=null)
respIdParam=resp_id.toString();
out.println("respIdParam"+respIdParam);
logi.oracle.apps.ibe.util.LogiDAOImpl dao=new logi.oracle.apps.ibe.util.LogiDAOImpl();
respkey=dao.getRespKey(respIdParam);
out.println("respkey"+respkey);
logi.oracle.apps.ibe.util.LogiOrderDetailsBean orderDetailsBean = new logi.oracle.apps.ibe.util.LogiOrderDetailsBean();
java.util.ArrayList ls = new java.util.ArrayList();
String resp_key=request.getParameter("respkey");
System.out.println(resp_key);
String noofDays=request.getParameter("noOfDays");
String qCustAcctId=request.getParameter("qCustAcctId");
logi.oracle.apps.ibe.util.LogiDAOImpl daoimpl=new logi.oracle.apps.ibe.util.LogiDAOImpl();
String decideTab=request.getParameter("decideTab");
String startDate=request.getParameter("startDate");
String endDate=request.getParameter("endDate");
String queryCondition=request.getParameter("queryCondition");
String queryOperator=request.getParameter("queryOperator");
String queryValue=request.getParameter("queryValue");
String queryDateValue=request.getParameter("queryDate");
System.out.println("queryDateValue"+queryDateValue);
%>
<table cellspacing="1" cellpadding="1" width="100%" border="0" class="OraBGAccentDark">
<tr>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_ORD_NUM")%></th>
<th>Customer Name</th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_ORD_DATE")%></th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_BOOKED_DATE")%></th>
<th>Request Date</th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_ORD_STATUS")%></th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_ORD_PO")%></th>
<th>Currency</th>
<th>Payment Terms</th> <th>Freight Terms</th>
<th>FOB</th>
<th>Sales Channel</th>
<th>Ship to Location</th>
<th>Bill to Location</th>
<th>SalesTerritory Country</th>
<th>Order Type</th>
<th>Order Total</th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_LINE_NUM")%></th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_ITEM")%></th>
<th>Customer SKU</th>
<th>Description</th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_QTY")%></th>
<th>Shipped Quantity</th>
<th>ScheduleShip Date</th>
<th>Unit Price</th>
<th>Extented Amount</th>
<th>Taxes Total</th>
<th>Freight Charges</th>
<th>Case pack charge</th>
<th>Charges Total</th>
<th><%=AOLMessageManager.getMessageSt("IBE","IBE_LGT_LINE_STATUS")%></th>
<th>Ship Date</th>
<th>Warehouse</th>
<th>Tracking Number</th>
<th>Waybill Number</th>
<th>Delivery Number</th>
<th>Pro Number</th>
<th>Hold Applied</th>
<th>Pallet Qty</th>
<th>Pallet#</th>
<th>Invoice Number</th>
<th>Promo Number</th>
<th>Ship Method</th>
</tr>
<%
int pSiteid=0;
java.math.BigDecimal mSiteId=oracle.apps.ibe.util.RequestCtx.getMinisiteId();
if(mSiteId!=null)
pSiteid=mSiteId.intValue();
out.println("pSiteid"+pSiteid);
if(decideTab!=null && decideTab.trim().equalsIgnoreCase("days"))
if(qCustAcctId!=null)
ls=daoimpl.downOrderDetails(qCustAcctId,noofDays,pSiteid);
else if(decideTab!=null && decideTab.trim().equalsIgnoreCase("dates"))
if(qCustAcctId!=null)
ls=daoimpl.downOrderDateDetails(qCustAcctId,queryDateValue,startDate,endDate);
else if(decideTab!=null && decideTab.trim().equalsIgnoreCase("condition"))
if(qCustAcctId!=null)
ls=daoimpl.downOrderConditionDetails(qCustAcctId,queryCondition,queryOperator,queryValue);
for(int i=0;i<ls.size();i++)
orderDetailsBean=(logi.oracle.apps.ibe.util.LogiOrderDetailsBean)ls.get(i);
String orderNumber= orderDetailsBean.getOrderNumber(); //Order Number
if(orderNumber==null)orderNumber="";
String customerName=orderDetailsBean.getCustomerName(); //Customer Name
if(customerName==null)customerName="";
String orderedDate=orderDetailsBean.getOrderDate(); //Order Date
if(orderedDate==null)orderedDate="";
String bookeddate= orderDetailsBean.getBookedDate(); //Booked Date
if(bookeddate==null)bookeddate="";
String requestdate= orderDetailsBean.getRequestDate(); //Requested Date
if(requestdate==null)requestdate="";
String orderstatus= orderDetailsBean.getOrderStatus(); //Order Status
if(orderstatus==null)orderstatus="";
String ponumber= orderDetailsBean.getPoNumber(); //PO Number
if(ponumber==null)ponumber="";
String currency=orderDetailsBean.getCurrencyCode(); //Currency
if(currency==null)currency="";
String paymentterms= orderDetailsBean.getPaymentTerms(); //Payment Terms
if(paymentterms==null)paymentterms="";
String frieghtterms=orderDetailsBean.getFreightTerms(); //Freight Terms
if(frieghtterms==null)frieghtterms="";
String fobterms=orderDetailsBean.getFobTerms(); //Fob Terms
if(fobterms==null)fobterms="";
String saleschannel=orderDetailsBean.getSalesTerms(); //Sales Channel
if(saleschannel==null)saleschannel="";
String billtoloc=orderDetailsBean.getBillToLocation(); // Bill to Location
if(billtoloc==null)billtoloc="";
String shiptoloc=orderDetailsBean.getShipToLocation(); //Ship To Location
if(shiptoloc==null)shiptoloc="";
String salesterr=orderDetailsBean.getSalesCountry(); // Sales Territory
if(salesterr==null)salesterr="";
String ordertype=orderDetailsBean.getOrderType(); // Order Type
if(ordertype==null)ordertype="";
String ordertotal=orderDetailsBean.getOrderTotal(); //Order Total
if(ordertotal==null)ordertotal="";
String linenumber=orderDetailsBean.getLinenumber(); //Line Number
if(linenumber==null)linenumber="";
String item= orderDetailsBean.getItem(); //Item Name
if(item==null)item="";
String sku= orderDetailsBean.getCustomerSKU(); // Customer SKU
if(sku==null)sku="";
String desc= orderDetailsBean.getDescription(); //Item Description
if(desc==null)desc="";
desc = URLEncoder.encode(desc); // Added by Sunil
desc = URLDecoder.decode(desc);
String qty=orderDetailsBean.getQty(); //Ordered Quantity
if(qty==null)qty="";
String shippedqty=orderDetailsBean.getShippedQty(); //Shipped Quantity
if(shippedqty==null)shippedqty="";
String scheduleqty=orderDetailsBean.getScheduleDate(); //Schedule Date
if(scheduleqty==null)scheduleqty="";
String unitprice=orderDetailsBean.getUnitPrice(); //Unit Price
if(unitprice==null)unitprice="";
String xamount=orderDetailsBean.getXAmount(); //Extended Amount
if(xamount==null)xamount="";
String taxestotal=orderDetailsBean.getTaxesTotal(); //Taxes Total
if(taxestotal==null)taxestotal="";
String freightcharges=orderDetailsBean.getFreightCharges();//Freight Charges
if(freightcharges==null)freightcharges="";
String palletcharges=orderDetailsBean.getPalletSurcharge(); //Pallet Charges
if(palletcharges==null)palletcharges="";
String chargestotal=orderDetailsBean.getChargesTotal(); //Charges Total
if(chargestotal==null)chargestotal="";
String linestatus=orderDetailsBean.getLinestatus(); //Line Status
if(linestatus==null)linestatus="";
String shipdate=orderDetailsBean.getShipDate(); //Ship Date
if(shipdate==null)shipdate="";
String warehouse=orderDetailsBean.getWareHouse(); //Ware House
if(warehouse==null)warehouse="";
String trackingnumber=orderDetailsBean.getTrackingNumber();//Tracking Number
if(trackingnumber==null)trackingnumber="";
String waybill=orderDetailsBean.getWayBillnumber(); //Waybill Number
if(waybill==null)waybill="";
String deliverynumber=orderDetailsBean.getDeliveryNumber(); //Delivery Number
if(deliverynumber==null)deliverynumber="";
String pronumber=orderDetailsBean.getProNumber(); //Pro Number
if(pronumber==null)pronumber="";
String holdapplied=orderDetailsBean.getHoldApplied(); //Hold Applied
if(holdapplied==null)holdapplied="";
String palletqty=orderDetailsBean.getPalletQty(); //Pallet Qty
if(palletqty==null)palletqty="";
String pallethash=orderDetailsBean.getPalletHash(); //Pallet Hash
if(pallethash==null)pallethash="";
String invoicenumber=orderDetailsBean.getInvoiceNumber(); //invoice Number
if(invoicenumber==null)invoicenumber="";
String promonumber=orderDetailsBean.getPromoNumber(); //Promonumber
if(promonumber==null)promonumber="";
String shipmethod=orderDetailsBean.getShipMethod(); //Promonumber
if(shipmethod==null)shipmethod="";
%>
<tr>
<td><%=orderNumber%></td>
<td><%=customerName%></td>
<td><%=orderedDate%></td>
<td><%=bookeddate%></td>
<td><%=requestdate%></td>
<td><%=orderstatus%></td>
<td><%=ponumber%></td>
<td><%=currency%></td>
<td><%=paymentterms%></td>
<td><%=frieghtterms%></td>
<td><%=fobterms%></td>
<td><%=saleschannel%></td>
<td><%=billtoloc%></td>
<td><%=shiptoloc%></td>
<td><%=salesterr%></td>
<td><%=ordertype%></td>
<td><%=ordertotal%></td>
<td><%=linenumber%></td>
<td><%=item%></td>
<td><%=sku%></td>
<td><%= desc %></td>
<td><%=qty%></td>
<td><%=shippedqty%></td>
<td><%=scheduleqty%></td>
<td><%=unitprice%></td>
<td><%=xamount%></td>
<td><%=taxestotal%></td>
<td><%=freightcharges%></td>
<td><%=palletcharges%></td>
<td><%=chargestotal%></td>
<td><%=linestatus%></td>
<td><%=shipdate%></td>
<td><%=warehouse%></td>
<td><%=trackingnumber%></td>
<td><%=waybill%></td>
<td><%=deliverynumber%></td>
<td><%=pronumber%></td>
<td><%=holdapplied%></td>
<td><%=palletqty%></td>
<td><%=pallethash%></td>
<td><%=invoicenumber%></td>
<td><%=promonumber%></td>
<td><%=shipmethod%></td>
</tr>
<% }
%>
</table>
</body>
</html>
Please suggest the needful...
Praveen Reddy -
How to set a date type variable to null, nothing or such
I created an User Defined Type that holds a Deadline property which is date type. Whenever there is no Deadline set yet, I would like such property to be set to Null, Nothing or such. I noticed that if I just Dim a Date Type variable its value will be
already set to 12:00 AM, and the same value takes place if I set the variable to a blank cell value. Any ideas to get around of this problem?
Jorge Barbi Martins ([email protected])A variable of type Date cannot be empty. Its default value is 0, which corresponds to Midnight on 30 December 1899.
If you want to be able to make it empty, declare it as Variant instead of as Date. You can then set its value to Null.
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
How to set JDBC Data Sources in Oracle MapViewer for Oracle database 12c Release 1 (12.1.0.1)?
The following is my configuration in the conf\mapViewerConfig.xml:
<map_data_source name="mvdemo12"
jdbc_host="127.0.0.1"
jdbc_sid="orcl12c1"
jdbc_port="1522"
jdbc_user="mvdemo"
jdbc_password="7OVl2rJ+hOYxG5T3vKJQb+hW4NPgy9EN"
jdbc_mode="thin"
number_of_mappers="3"
allow_jdbc_theme_based_foi="true"
editable="true"/>
<!-- **** -->
But it does not work.
After use "sqlplus mvdemo/[email protected]:1522/pdborcl", it connected to the Oracle database 12c.
Does anyone know it?
Thanks,For 11.1.1.7.1 use the syntax for jdbc_sid, i.e.
//mypdb1.foo.com as described in the README,
- MapViewer native (non-container) data sources can now use database service name in place of SID. To supply a db service name, you will use the same jdbc_sid attribute, but specify the service name with double slashes in front, such as follows:
<map_data_source name="myds"
jdbc_host="foo.com"
jdbc_sid="//mypdb1.foo.com"
jdbc_port="1522"
/>
For 11.1.1.7.0 use a container_ds instead.
i.e. instead of using
<map_data_source name="my_12c_test"
jdbc_host="mydbinstance"
jdbc_sid="pdborcl12c"
jdbc_port="1522"
jdbc_user="mytestuser"
jdbc_password="m2E7T48U3LfRjKwR0YFETQcjNb4gCMLG8/X0KWjO00Q="
jdbc_mode="thin"
number_of_mappers="6"
allow_jdbc_theme_based_foi="false"
editable="false"
/>
use
<map_data_source name="my_12c_test"
container_ds="jdbc/db12c"
number_of_mappers="6"
allow_jdbc_theme_based_foi="false"
editable="false"
/>
In my case the Glassfish 3.1.2.2 JDBC connection pool definition was
Property
url jdbc:oracle:thin:@mydbinstance:1522/pdborcl12c.rest_of.service.name
Uncheck the Wrap JDBC Objects option in Advanced panel, i.e. the Edit JDBC Connection Pool Advanced properties page.
Add a JDBC resource for that newly created pool
Use that in mapviewerconfig.xml as above -
How to set a date range for date field ?
Dear Experts,
Scenario:
I have a query in validating the date field in my BSP application. My application is for maintain infotype 0023 Other/Previous Employers online by employees in the company.
As per our design we are maintaining the all employment details of the employee both ( with in the current company / previous employment outside the company) in the same infotype.
Every employee will have a hiring date within the SAP HR system. We consider this date as the cutoff date between current and previous employment in our application. When the employee updating the details wia BSP page I need to check the following.
Record inside current company: Validation that, the user should only able to enter BEGIN DATE (BEGDA) greater than or equal HIRING DATE and END DATE(ENDDA) should be greater than FROM DATE (BEGDA).
Record outside current Company: Validation that, the user should only able to enter BEGIN DATE (BEGDA) less than or equal HIRING DATE and END DATE (ENDDA) should be greater than FROM DATE (BEGDA) and less than HIRING DATE.
Technical Requirement:
How to set a date range for date field, i.e. how we can limit the date range in a HTMLB date field? Can this it be achieved via standard functionality of HTMLB?
Following is the code to describe date field in my application.
<htmlb:inputField id= "ENDDA_NEW_IN"
type= "date"
doValidate= "TRUE"
showHelp= "TRUE"
disabled= "FALSE"
width= "183"
style= "cssTextAreadate"
value= "<%='99991231'%>"/>
Thanks a lot in advance for your assistance and help.
Cibinu2026
Edited by: cibin kuruvilla on Nov 12, 2008 11:13 AMHi,
This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
Regards,
<p>Blair Wheadon</p>
<p>Product Manager, Crystal Reports</p> -
How to generate a set of date type records
How to generate a set of date-type records, with a fixed interval, starting from a date like 2008-01-01.
Some thing like this
SQL> select to_char(to_date('2008-01-01','yyyy-mm-dd') + (level - 1),'DD-MON-YYYY') my_date
2 from dual
3 connect by level <= 10
4 /
MY_DATE
01-JAN-2008
02-JAN-2008
03-JAN-2008
04-JAN-2008
05-JAN-2008
06-JAN-2008
07-JAN-2008
08-JAN-2008
09-JAN-2008
10-JAN-2008
10 rows selected. -
How to set Oracle Data Integrator Timeout paramter value as unlimited
Hi
Can any one help me how to set Oracle Data Integrator Timeout (ODI menu>User Paramter>Oracle Data Integrator Timeout > paramter value as unlimited.
By default it is 30 and i want to change it as unlimited.
I am connecting linux box through windows using citrix and opened ODI and start the scenario execution (my scenario execution in loop and it will execute continuesly) after execution starts I an logout from citrix (I am not closing ODI) and after some time like 50 min my odi execution is stoped due to timeout.
my ODI execution should continue in my absence that to unlimited.
Please help me it is urgent
Regards,
PhanikanthThanks Bhabani
Is it work for unlimited in linux box because I have given operator dispplay limit(0=no limit) as 1000000 and I am unable to see the execution session details on Operator>session list
later i have changed to 10000 and click on ok and just refreshed and it is working fine
If I give mensioned below it will not impact on ODI ?
windows it is working but I have doubt on linux version
Please help me
Regards,
Phanikanth -
How to set default date value to a field on screen
How to set default date value to a field on screen and allow users to modify it ....
Hello,
In the PAI module, you need to save the changes to the database using the command MODIFY.
Follow an example:
Create or change a message in database table T100. If there is no message with the number 100 in the MYMSGCLASS message class in English, it will be created. Otherwise only the text is changed.
DATA message_wa TYPE t100.
message_wa-sprsl = 'EN'.
message_wa-arbgb = 'MYMSGCLASS'.
message_wa-msgnr = '100'.
message_wa-text = 'Some new message ...'.
MODIFY t100 FROM message_wa.
Regards. -
How to set the data fields column wide at sqlplus
Dear Sir/Madam
I would like to know how to set the data fields column wide at sqlplus
Thanks
Francissee
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch6.htm#sthref1131
and the FORMAT clause of the COLUMN command in
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#BACHCABF -
How to set the Data Synchronisation mode for ADF BC component?
Hi All,
How to set the Data Synchronisation mode for ADF BC component
Thanks
RaghavendraCan you clarify what you mean by the data synchronization mode?
If you mean the Sync Mode, then in 10.1.3 you set this property by:
1. Selecting your DataBindings.cpx file
2. Expanding the "Data Control Usages" section in the structure window
3. Selecting the ADFBC-based data control
4. Setting the "syncMode" property in the property inspector. -
How to set this DATS parameter
Hi Pros,
I am calling function 'HR_FORMS_TIM_GET_B2_RESULTS' in the program , its input parameter is BEGDA, I transfer a date variable to BEGDA, but does not work. can not get any data. but if I run this function in SE37, I input date '20140807', successfully get result. please tell me how to set this DATS parameter?Hi,
You might be passing the date in '12.12.2014' or '12/12/2014' format. Please
use the function module 'CONVERSION_EXIT_BEGDA_INPUT' to convert the date
to internal format and then pass it to the function module.
Thanks -
How to find the Data Type of a column
Dear All,
How to find the Data Type of a Column dynamically in oracle Form.
Thanks and Regards,
Fazil
Edited by: user11334489 on Aug 25, 2012 9:06 PMhi,
you can use get_item_property built-in
eg:
declare
l_item VARCHAR2(10);
begin
l_item := Get_Item_Property('item_name',DATATYPE);
end; -
Dear SharePoint Developers,
Please help.
I need to know How to set the column order of a sealed column in a custom Content Type for the new item form NewDocSet.aspx?
I think this is a "sealed column", whatever that is, which is shown in SPD 2013 as a column of content type "document, folder, MyCustomContentType".
I know when I set the column order in my custom Content Type settings page, it is correct.
But, when I load the NewDocSet.aspx page, the column order that I set in the settings page is NOT used for this "sealed column" which is bad.
Can you help?
Please advise.
Thanks.
Mark Kamoski
-- Mark KamoskiHi,
According to your post, my understanding is that you want to set the column order of a sealed column in a custom Content Type for the new item form NewDocSet.aspx.
Per my knowledge, if you have Content Type management enabled for the list or library (if you see a list of content type with the option to add more), the display order of columns is set for each content type.
Drill down into one of them and you'll see the option under the list of columns for that content type.
To apply the column order in the NewDocSet.aspx page, you need to:
Select Site Settings, under Site Collection Administration, click Content type publishing. In the Refresh All Published
Content Types section, choose Refresh all published content types on next
update.
Run two timer jobs(Content Type Hub, Content Type Subscriber) in central admin(Central Administration--> Monitoring--> Review timer jobs).
More information:
http://sharepoint.stackexchange.com/questions/95028/content-types-not-refreshing-on-sp-online
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
How to add TIMESTAMP data type in Enterprise Architect...?
Hi all
There is no data type of timestamp in Enterprise Architech. There is only
DATE type. I have ERD prepared from Enterprise Architech. How to modify
DATE type to TIMESTAMP type.
How to add TIMESTAMP data type in Enterprise Architect or in ERD ?
Thanks in advance,
PalHave you asked this question of the vendor of Enterprise Architect? They may have a later version that supports the various TIMESTAMP data types. If your ERD tool doesn't support a data type, other than talking to the vendor or working around the problem (i.e. generate DDL to a text file and edit it before applying it to the database), you're probably out of luck.
Justin -
How to use same Data Type and Length for two fields
How to use same data type and length for two fields when using 'FOR ALL ENTRIES IN' in a select statement? For instance the select queries are :
SELECT bukrs gjahr belnr lifnr budat bldat zlspr dmbtr waers shkzg
FROM bsik
INTO TABLE it_bsik
WHERE bukrs = p_bukrs
AND lifnr IN s_lifnr.
IF it_bsik IS NOT INITIAL.
SELECT belnr gjahr awkey awtyp
FROM bkpf
INTO TABLE it_bkpf
FOR ALL ENTRIES IN it_bsik
WHERE belnr = it_bsik-belnr
AND gjahr = it_bsik-gjahr.
IF it_bkpf IS NOT INITIAL.
SELECT belnr gjahr lifnr xblnr
FROM rbkp
INTO TABLE it_rbkp
FOR ALL ENTRIES IN it_bkpf
WHERE belnr = it_bkpf-awkey+0(10)
AND gjahr = it_bkpf-awkey+10(4).
ENDIF.
ENDIF.
Here it gives an error in the 3rd select query that 'When you use the addition "FOR ALL ENTRIES IN itab", the fields "GJAHR" and "IT_BKPF2-AWKEY+10(4)" must have the same type and the same length.'
Kindly clarify.Hi Saurabh,
Please see the example code that I have developed for you. It will help you solve the problem.
REPORT ZTEST_3 .
tables : BKPF.
data : begin of it_bkpf occurs 1,
belnr type RE_BELNR,
awkey type awkey,
awtyp type awtyp,
gjahr type GJAHR,
end of it_bkpf.
data : begin of it_bkpf1 occurs 1,
belnr type RE_BELNR,
awkey type gjahr, " change the data type
awtyp type awtyp,
gjahr type GJAHR,
end of it_bkpf1.
data : begin of it_rbkp occurs 1,
belnr type BELNR_D,
gjahr type gjahr,
lifnr type LIFRE,
xblnr type XBLNR,
end of it_rbkp.
select belnr
awkey
awtyp
gjahr
from bkpf
into table it_bkpf
where BUKRS = 'TELH'.
loop at it_bkpf.
it_bkpf1-belnr = it_bkpf-belnr.
it_bkpf1-awkey = it_bkpf-awkey+10(4). "Here only append the required length.
it_bkpf1-awtyp = it_bkpf-awtyp.
it_bkpf1-gjahr = it_bkpf-gjahr.
append it_bkpf1.
clear it_bkpf1.
endloop.
select belnr
gjahr
lifnr
xblnr
from RBKP
into table it_rbkp
for all entries in it_bkpf1
where belnr = it_bkpf1-belnr
This is just an example. Change the fields according to your requirement.
Regards
Abhii
Edited by: Abhii on Mar 9, 2011 9:08 AM
Maybe you are looking for
-
Image Blob field can't display in designer viewer & web app
It's very strange that my Image blob field is showing correctly in designer, but it's displaying nothing in Preview tab. After I deployed in to the web application in jboss, there is one error msg output to server console: ERROR [BlobFieldPictureCach
-
Photosmart D110 All-In-One Printer - Shadow image problem
I have been having a problem with this printer, ever since we purchased it about 2 months ago, where it will print a shadow image of text or pictures on some documets but not others. It is specific and consistent in that it will print this shadow ima
-
7300GT with DVI and DVI to svideo
I just wanted to be sure there were no issues when using a DVI connection to an lcd screen and the dvi-to-svideo converter to a television. I don't have a second dvi lcd to test, but the Mac isn't recognizing the dvi-to-svideo connection.
-
Migrating data from Lose It, iPhone 3G to 3GS
Has anyone been successful in migrating their "Lost It" data from the iPhone 3G to the new 3GS? Can you see the data on your PC to make sure it was backed up sucessfully? I cannot see it in iTunes and it has not transferred over.
-
Buggy JTabbed Pane, Scroll? Constraints?
I don't know if this is a bug, limitation, or if I'm not implementing it properly, but I am having a problem with scroll panes in a tabbed frame. Here's the scoop. I have a JFrame which has a has a JTabbedPane north and a JPanel (which contains a cou