How to read fieldcatalog of Data Entry View in CAT2
Hi,
I have a requirement wherein I need to validate the time data of 'Data Entry View' in TCode: CAT2. Here, there is a table control which uses dynamic field catalog (for days Eg: MO 11/07, TU 11/08.....SU 11/13).
Whenever a user enters the 'Key Date' from CAT2, the system automatically gets the Data Entry Period of that Key date.
For eg, let's say user enters Key date as '11/28/2011' then the Data entry period would be 11/28/2011 to 12/04/2011.
Requirement: Now the system should allow the user to enter time for November month only i.e. 28, 29 and 30. It should not allow the user to enter time data for December. In short the system should allow the user to enter times of only one month.
For this validation I'm using the User Exit: CATS0006 . Please suggest me how to read the above fieldcatalog,
And also let me know if this can be achieved by any other method.
Thanks,
Singh
Thanks Raymond. The problem is solved.
Below is some part of the logic...
Work area declaration
DATA: wa_check_table TYPE cats_comm.
Variables
DATA: w_cnt TYPE i.
Get the no. of records
DESCRIBE TABLE check_table LINES w_cnt.
Read the last record
READ TABLE check_table INTO wa_check_table INDEX w_cnt. "We can loop also
IF dateto4(2) GT datefrom4(2).
IF wa_check_table-workdate4(2) GT datefrom4(2).
MESSAGE e208(00) WITH text-001. "Appropriate Error Message
ENDIF.
ENDIF.
Similar Messages
-
How to change the column name of Data Entry View of CAT2?
Hi experts,
The requirement is to change the name of one of the columns in the Time Sheet: Data Entry View appearing on execution of t-code CAT2. What should be the procedure to do the same?I came across the thread
CAT2 Worklist enhancement.
which aims to do the same. Does this method work? How is the problem mentioned in Step 5 of the final post to be resolved? -
How can I select a date to view in Calendar while I am in month view?
I am looking at month view in Calendar on my iPad. I touch a date. Intuitively, I expect that date to open up in Day or Week view, but it doesn't! On my iphone, it works just fine. Am I missing something?
How can I select a date to view while in Month view and have it go to Day or Week view?
Thanks for any help.I would try this:
In Lr import one photo into a different folder that you can see in the list.
Then in your OS (mac Finder / Win Explorer) move the photo to the folder that you cannot see.
In Lr the photo will now appear with a question mark on its frame. Click directly on the question mark and select <Locate photo>. Navigate to the folder, open it, and click on the photo.
Maybe this will help Lr to recognize the folder.
If this doesn't help try renaming the folder in your OS. -
How to read and write data in to a specified range of cells(it include multiple row & columns) in excel
CVI Comes with a sample project that explains how to read/write to a Excel file: choose "Explore examples..." in CVI welcome page and navigate to <cviSampleDir>\activex\excel folder where you can load excel2000dem.prj.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
How to add a field in data entry section of cat2 transaction
hi friends,
i just want to know how i can add one more field in the data entry section of the cat2 transaction.would appreciate if u help me asap.
thanks,
sakshiDid you solve this?
-
How to set order of data entry in a table?
a simple question, i know, but i cannot seem to find out how to do it...
if i want to enter data in a two column table, how do i force Numbers to move the data entry box in a specified way on "enter", so i want to enter data in a1, b1, a2, b2, a3, b3 etc and want the correct cell is active after hitting enter. in excel, you just highlight the area you want to fill. this doesnt seem to work in numbers. any ideas?
TIA
niccoi rechecked that, yes, i must have been using enter.
but still 2 keys on opposite sides of the keyboard -
How can read BOM component date before save the production order??
Hi Experts,
In our company, we need to develop a program to read the BOM component data of the production order
before we save the production order.
That for example ,when we create and release a production order , before we save the production
order,we want a porgram to read the BOM component data. If some component data can meet our
requriement (may be if there is material requirement quantity>100 EA),then the system will pop up a
small dialog box to remind us.
There is user exit PPCO0007 and PPCO0007.But it seems they only can read the head data of the
production order before we save the production order. And the BOM component data of the production
order are saved in the RESB(Reservation Table).So if we do not save the production order,all the BOM
component data are not saved in the RESB table.
So how can slove the problem??
How can read component date before save the production order??
Are there any other user exit we can use???Hi Just wanted to check am I right that you are trying to check if you have enough Materials Available before you release or Save the order right ? if this is your business objective then when you create order you have material availability tab which checks and gives error if shortage is there. Please let me know if is this wht you asking for ?
-
How to read a byte data from maxdb data base
Dear All,
I have a issue in reading the data from database table.
I have a column named as templateData which contains the byte data (biometric template data, which comes from fingerprint device) which is DataType of LONG and CODE of BYTE.
I am not using the below to get the template data
Connection con = null;
Statement stmt = null;
ResultSet resultSet = null;
byte[] DbBioData = new byte[1024];
InitialContext ctx = new InitialContext();
if(ctx == null)
throw new Exception("Boom - No Context");
DataSource ds = (DataSource)ctx.lookup(db_drvstr);
con = ds.getConnection();
stmt = con.createStatement();
resultSet = stmt.executeQuery(db_query + " where SUBJECT_ID='"+ username +"'");
if(resultSet.next())
DbBioData = resultSet.getBytes(1);
_loc.infoT("verify", "verify::Got BioData From MAXDB" +DbBioData );
loc.infoT("verify", "verify::Query is: " +dbquery + " where SUBJECT_ID='"+ username +"'" );
But I am not getting the proper data, could anyone please tell me the way to read the biometric data from data base table.Hi Kishore,
is it me or is there no query definition in that code?
I see that you concatenate a "db_query" with a string to make up a WHERE clause, but the db_query is nowhere defined before.
So at least you should provide something like
stmt = con.createStatement("SELECT templateDate FROM <tablename> ");
before you do anything with the query.
Besides this: have you ever heard of SQL injections? Try to use BIND-variables instead of concatenating strings. Otherwise your application will spend much time just with parsing your queries...
Hmm... possibly the best thing you could do about this is to read the JAVA manual for MaxDB:
<a href="http://maxdb.sap.com/currentdoc/ef/2de883d47a3840ac4ebb0b65a599e5/content.htm">Java Manual (SAP Library - Interfaces)</a>
Best regards,
Lars
Edited by: Lars Breddemann on Dec 17, 2007 1:12 PM - corrected link -
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really difficult to manage the message inflow and status with accuracy. Hence i am planning to develop an application which can retrive(only reading) the data from CSS and interpret the same to quickly arrive at decisons for the message. As a first set i need to read the message data from CSS. Are there any APIs available for the same. I guess SAP developer dashboard has some what similar functionality but with very limited scope. May be if somebody can comment on the technology/machanism behind pulling the data into dashboard?
Any comments here?
Regards,
Paulhttp://gizmodo.com/5070368/caps-lock-trainer-key-painfully-punishes-poor-netiquette
Also, there is no native way to display a PDF in flash. You will need to use a utility that converts it. SWFTools has one that works pretty well. -
How to read internal table data and use to retrive from other table.
Hi all,
I am trying to generate a report using ooabap.
In this scenario, I retrieved data from one standard table (zcust) and successfully displayed using structure 'i_zcust_final' ( i_zcust_final is similar structure of zcust).
Now I want to get some other data from other standard table (zpurch) using the data in i_zcust_final. How....???? I am unable to read data from i_zcust_final even i kept in loop.
I am attaching the code here.. even it too long, please look at the code and suggest me what to do.
code **************************
REPORT ZBAT_OOPS_REPORT1.
TABLES: ZCUST.
D E F I N I T I O N *****
CLASS BATLANKI_CLS DEFINITION.
PUBLIC SECTION.
DATA : ITAB_ZCUST TYPE STANDARD TABLE OF ZCUST,
I_ZCUST_FINAL LIKE LINE OF ITAB_ZCUST,
ITAB_ZCUST1 TYPE STANDARD TABLE OF ZCUST.
TYPES: BEGIN OF IT_ZPURCH,
CUSTNUM TYPE ZPURCH-CUSTNUM,
PURC_DOC TYPE ZPURCH-PURC_DOC,
VENDOR TYPE ZPURCH-VENDOR,
STATUS TYPE ZPURCH-STATUS,
PURC_ORG TYPE ZPURCH-PURC_ORG,
END OF IT_ZPURCH.
DATA : ITAB_ZPURCH TYPE TABLE OF IT_ZPURCH,
I_ZPURCH_FINAL LIKE LINE OF ITAB_ZPURCH.
METHODS: GET_ZCUST,
PRINT_ZCUST,
GET_ZPURCH.
ENDCLASS.
I N I T I A L I Z T I O N *****
SELECT-OPTIONS:S_CUSNUM FOR ZCUST-CUSTNUM.
INITIALIZATION.
S_CUSNUM-LOW = '0100'.
S_CUSNUM-HIGH = '9999'.
S_CUSNUM-OPTION = 'BT'.
S_CUSNUM-SIGN = 'I'.
APPEND S_CUSNUM.
CLEAR S_CUSNUM.
I M P L E M E N T A T I O N *****
CLASS BATLANKI_CLS IMPLEMENTATION.
METHOD GET_ZCUST.
SELECT * FROM ZCUST
INTO TABLE ITAB_ZCUST
WHERE CUSTNUM IN S_CUSNUM.
ENDMETHOD.
METHOD PRINT_ZCUST.
LOOP AT ITAB_ZCUST INTO I_ZCUST_FINAL.
WRITE:/ I_ZCUST_FINAL-CUSTNUM,
I_ZCUST_FINAL-CUSTNAME,
I_ZCUST_FINAL-CITY,
I_ZCUST_FINAL-EMAIL.
ENDLOOP.
ENDMETHOD.
METHOD GET_ZPURCH.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO CORRESPONDING FIELDS OF TABLE ITAB_ZPURCH
WHERE CUSTNUM EQ I_ZCUST_FINAL-CUSTNUM.
ENDLOOP.
LOOP AT ITAB_ZPURCH INTO I_ZPURCH_FINAL.
WRITE:/ I_ZPURCH_FINAL-CUSTNUM,
I_ZPURCH_FINAL-PURC_DOC,
I_ZPURCH_FINAL-VENDOR,
I_ZPURCH_FINAL-STATUS,
I_ZPURCH_FINAL-PURC_ORG.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
O B J E C T *****
DATA: BATLANKI_OBJ TYPE REF TO BATLANKI_CLS.
START-OF-SELECTION.
CREATE OBJECT BATLANKI_OBJ.
CALL METHOD:
BATLANKI_OBJ->GET_ZCUST,
BATLANKI_OBJ->PRINT_ZCUST,
BATLANKI_OBJ->GET_ZPURCH.
Can anyone suggest me..
Thanks in advance,
Surender.Hi Surendar..
There is mistake in the Work area specification in this method.
METHOD GET_ZPURCH.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO CORRESPONDING FIELDS OF TABLE ITAB_ZPURCH
<b>WHERE CUSTNUM EQ ITAB_ZCUST1-CUSTNUM.</b>
"Instead of I_ZCUST_FINAL-CUSTNUM.
ENDLOOP.
LOOP AT ITAB_ZPURCH INTO I_ZPURCH_FINAL.
WRITE:/ I_ZPURCH_FINAL-CUSTNUM,
I_ZPURCH_FINAL-PURC_DOC,
I_ZPURCH_FINAL-VENDOR,
I_ZPURCH_FINAL-STATUS,
I_ZPURCH_FINAL-PURC_ORG.
ENDLOOP.
ENDMETHOD.
Now it should work..
One more thing : From performance point of view you have to Replace that loop using FOR ALL ENTRIES . And avoid CORRESPONDING FIELDS. it will be slow.
This is the code.
LOOP AT ITAB_ZCUST INTO ITAB_ZCUST1.
if ITAB_ZCUST[] IS NOT INITIAL.
SELECT CUSTNUM
PURC_DOC
VENDOR
STATUS
PURC_ORG
FROM ZPURCH
INTO TABLE ITAB_ZPURCH
<b>for all entries in ITAB_ZCUST1</b>
<b>WHERE CUSTNUM EQ ITAB_ZCUST1-CUSTNUM.</b>
"Instead of I_ZCUST_FINAL-CUSTNUM.
ENDIF.
ENDLOOP.
<b>Reward if Helpful.</b> -
How to read BP header data in standardaddress context node
Hi,
we have the next requirement in CRM 7.0 WebUI:
In view BP_ADDR/StandardAddress the field STRUCT.TELEPHONETEL should only be an input field if the authorization group of the business partner has a certain value. So I tried to solve this in the I-getter method for this STRUCT.TELEPHONETEL field by reading the authorization group and change the rv_disabled value.
How should I read the authorization group? This is field STRUCT.AUTHORIZATIONGROUP and belongs to the HEADER node.
Can you please supply me an example code for this?
Thanks in advance!!
Kind regards,
Roy WillemsHi,
In the get_i method use the below code to get BuilHeader entity.
Data: lv_entity type ref to cl_crm_bol_entity.
lv_entity ?= collection_wrapper->current( ).
lv_entity ?= lv_entity->get_parent( ).
if lv_entity is not bound.
lv_authgrp = lv_entity->get_property_as_string( iv_attr_name = 'AUTHORIZATIONGROUP' ).
endif.
Regards,
Arun
Edited by: Arun Kumar on Aug 9, 2010 12:58 PM -
How to fetch user specific data from View?
Hi
I have a requirement in which I need to display table data specific to Session_user only. Scenario is if user belongs to a specific region he should be able to see data related to that specific region only.
I am thinking of passing session_user name in view query but do not know whether it's possible or not.If possible how to do this.
What is the best way to achieve it?
Thanks
VibzzHello
Vibzz,
First thing is that you need to implement security in your application, if you configured security then, Take a session scope bean in your un bounded task flow
inside that session bean , you can get the information from security context, then write a static block inside your session bean and modify the fallowing code according to your requirement
ADFContext adfc=ADFContext.getCurrent();// get the context instance
SecurityContext securityContext=adfc.getSecurityContext();// instantiate the SecurityContext
String username=securityContext.getUserName(); // returns the username from the security Context who are currently logged in
Once you written this code just assign this username to session scope variable
Map sessionScope =
(Map)ADFContext.getCurrent().getSessionScope().put("UserName", username);
So that the username with the key UserName will be available throughout your session
and Apply in where clause according to the user logged in, or else you may directly use
adf.context.securityContext.userName at the bind variable what ever you used inside your view criteria. -
How to read and write data from json file from windows phone7 app
Hi
I am developing wp7 app for the use of students my questions are
How can i write a code to read and write the json/text file for the wp7.
I am using windows 7 OS, VS 2010 Edition.
This is my code below:
xaml:
<Grid>
<TextBlock Height="45" HorizontalAlignment="Left" Margin="7,18,0,550" Name="textBlock1" Text="Full
Name: " />
<TextBox Width="350" Height="70" HorizontalAlignment="Left" Margin="108,1,0,0" Name="txtName"
Text="Enter your full name" VerticalAlignment="Top" />
<TextBlock Height="45" HorizontalAlignment="Left" Margin="6,75,0,0" Name="textBlock2" Text="Contact
No: " VerticalAlignment="Top" />
<TextBox Width="350" Height="70" HorizontalAlignment="Left" Margin="108,61,0,480" Name="txtContact"
Text="Enter your contact number" MaxLength="10" />
<Button Content="Register" Height="72" HorizontalAlignment="Left" Margin="10,330,0,0" Name="btnRegister"
VerticalAlignment="Top" Width="190" Click="btnRegister_Click" />
</Grid>
xaml.cs:
private void btnRegister_Click(object sender, RoutedEventArgs e)
string name, contact;
name = txtName.Text;
contact = txtContact.Text;
try
if (name != "" && contact != "")
string msg = name + " " + contact;
MessageBox.Show(msg);
Student stud = new Student
Name= name,
Contact = contact,
string jsonString = JsonConvert.SerializeObject(stud);
MessageBox.Show(jsonString);
else
MessageBox.Show("Input Proper Information", MessageBoxButton.OK);
catch (Exception ex)
MessageBox.Show(ex.Message);
I have download NewtonSoft.json version 5.0.8.
So, I am able to convert input data into json format, but how can I able to write and read this data from a json/text file.
How can I do?
Thank you in adv and please, reply soon.We don't have many samples left for Windows Phone 7 + Azure, the closest one to what you want to do is probably:
Using Local Storage with OData on Windows Phone To Reduce Network Bandwidth
this sample uses the local database feature: 'LINQ to SQL', available to Windows Phone 7.1 and 8.0 Silverlight applications, instead of simple file storage but even if you choose to stick with simple file storage I believe you should be able to adapt the
networking related portions of the sample to your particular application.
Eric Fleck, Windows Store and Windows Phone Developer Support. If you would like to provide feedback or suggestions for future improvements to the Windows Phone SDK please go to http://wpdev.uservoice.com/ where you can post your suggestions and/or cast
your votes for existing suggestions. -
How to read and write data from Excel to TestStand without using LabVIEW VIs
Hi,
How can I read in columns of data from Excel into a TestStand array and write columns of data to Excel from TestStand without using LabVIEW VIs?
I don't think the Property Loader custom step type in TestStand will work because the data I would like to read in from Excel is in a column that is thousands of rows long and the data has to be in the proper format to use the Property Loader to load in an array from Excel.
Thanks for your help.That example does not use LabVIEW and it does about 40% of what you need to do by calling Excel through ActiveX. If you don't know how to use Excel through ActiveX then you'll need to brush up on that.
http://www.microsoft.com/en-us/download/details.aspx?id=16250
http://support.microsoft.com/kb/141759
http://support.microsoft.com/kb/302084
CTA, CLA, MTFBWY -
How to read azure storage data using JAVA with REST API
Hi,
We have a cloud service in our lab. We have enabled diagnostics
in cloud services. So WADPerformanceCounterTable was created in storage account. Now , We want to read the WADPerformanceTable using
JAVA with REST API. Is there any way to collect these details. please give me any
sample code to connect azure storage using table service REST API.
Thanks & Regards
RathideviHi,
Please have a look at this article:
https://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/, it demonstrate how to use table service Rest API, it also give us the code, hope this helps. Of course, the
MSDN article could also help us coding.
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
Macbook Air won't startup, flashing question mark
Hello everyone, here's the problem: Recently (Sep) I've bought a new macbook air (2012, 128gb SSD). After a few months of using it the following problem happened: while surfing on the web, my macbook hang up (I couldn't press anything or do anything,
-
New MacBook Pro 15" unable to recognize Hard Drive connected by thunderbolt cable
We have three macs in the house and recently purchased a new MacBook Pro 15" with two thunderbolt connections. I have a 4TB Seagate HD that has been partitioned into 4 1 TB drives all formatted for MAC OS. Each Partition is being used for a separate
-
Balance carryforward is not correct due to incorrect GL created with wrong
Hi team, We have created two gl accounts with wrong account group which is balance sheet and also made an postings to that gl account after year end process done so correcting this issue, now we have transferred that amount to new gl account which is
-
Help moving files from G3 imac (OS 8.7)
Howdy. I recently pulled the old imac ( 1999) out of the closet and gave it to my nine year old daughter . It does not have any way to transfer data other than a first generation USB port. I've been unable to find a flash drive ( powered or not) or a
-
How to use PL/SQL type table in SQL FROM clause
Hi All, I have to use a PL/SQL type table in our SQL statement as a table? I am using the syntax (below) but it gives PL/SQL: ORA-00902: invalid datatype SELECT ... FROM TABLE(CAST( var_pl/sql_table AS pl/sql_table)) tab WHERE tab.a=1; Plz reply with