Hi gurus what is table control can explin with example
hi gurus what is table control can explin with example
TABLE CONTROL
These are the screen elements used to display tabular data they can be called
as screen tables( like STEP LOOP).To use table control we have to create it on the screen using SCREEN PAINTER(SE51) and declare a control variable of TYPE TABLEVIEW using CONTROLS statement in the ABAP program. We have to use LOOP .. ENDLOOP statement in both PBO and PAI with or without AT int_table parameter. IF AT int_table parameter is not used than we have to place a MODULE call between the LOOP...ENDLOOP statement to fill the screen table rows from the ABAP program in PBO and program our own scrolling functions
using OK_CODE field.
Having a parallel loop(at screen table rows & int table rows) by using parameter
AT int_table makes the ABAP code simple.
A special structure of type CXTAB_CONTROL is used to set/get various
attributes of table control at runtime like CURRENT_LINE ,TOP_LINE.
ABAP declaration
CONTROLS: tab_con TYPE TABLEVIEW USING SCREEN nnnn
Here tab_con is the same name we used in screen for the table control.
This ABAP statement will declare a control variable that will be used to access
the table control , and set it's various attributes like number of fixed columns(tab_con-FIXED_COLS) ,total number of records it will display(tab_con-LINES).It is of type CXTAB_CONTROL and is a deep structure(structure containing structures).
REFRESH CONTROL tab_con FROM SCREEN nnnn
This ABAP statement will initialize the table control on the screen nnnn to its initial values.
PBO processingI
n PBO we have to use the screen LOOP ...ENDLOOP statement , with or without
intenal table.
LOOP WITH CONTROL tab_con.
MODULE fill_tab_con.
ENDLOOP.
Here a module should be called between the loop endloop statement to transfer
data from th ABAP program to the screen table through a structure.This module
should use the CURRENT_LINE attribute of the table control variable to get the
current screen table record index to read the data from the internal table into a work area.
e.g.
READ TABLE int_table INDEX tab_con-CURRENT_LINE
The record read will be placed in the header line of the internal table and will be available to the similarly named screen fields or if these are different it can be written explicitly. e.g.
screen_field_name = int_table-field_name
LOOP AT int_table INTO workarea WITH CONTROL tab_con CURSOR i FROM
n1 TO n2.
ENDLOOP.
Here the module call is not required to fill the screen table.The CURSOR parameter is a integer of type I indicating which absolute internal table line
should be the first to display on the table control .FROM n1 TO n2 can be used
to restrict the starting line and ending line number of the internal table , they are of type SY-TABIX.
In both cases before the LOOP statement a module should be called which
is generally for setting of status ,in which we should fill the LINES attribute
(tab_con-LINES ) of the control with the total number of internal table records,doing this ensures correct and automatic scrolling.
The ABAP statement DESCRIBE TABLE int_table LINES lines can be used
to get the total lines in an int table.
PAI Processing
We have to use LOOP ... ENDLOOP in PAI so that data can transfer fro table control to ABAP program. If we want to write changes to the data we should
call a module between the LOOP ... ENDLOOP. The MODULE call to process user commands (SY-UCOM) should be called after the ENDLOOP statement.
e.g.
PROCESS AFTER INPUT
MODULE mod AT EXIT-COMMAND.
LOOP AT itab_table or LOOP "depending on whether we are using AT int_table
MODULE modify_int_table.
ENDLOOP.
MODULE user_command.
In the MODULE call modify_int_table we can use
MODIFY int_table FROM workarea INDEX tab_con-CURRENT_LINE
or we can use
int_table-field_name = screen_field_name.
Similar Messages
-
HI EXPERTS
WHAT IS TABLE CONTROL?For Transactions like VA01 , VK11 etc Header data , Item data is available .
For each Header entry there is 1 or more item entries exisisted . These item
data is saved in table format.
eg : va01 etc.,.
Check eg prg for Table control transaction : FV11
Program Name : ZFV11_NEW
Program Description : To Upload Condition Records-FV11
Author : Jagadish
Start Date : 11/06/2007
REPORT zfv11
NO STANDARD PAGE HEADING LINE-SIZE 255.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
TABLES : t100.
DATA: BEGIN OF record OCCURS 0,
data element: KSCHA
kschl(004), "Condition Type
data element: SELKZ_LIST
selkz(001),
data element: WERKS_D
werks(004), "Plant
data element: ELIFN
lifnr(010), "Vendor
data element: MATNR
matnr(018), "Material No.
data element: KBETR_KOND
kbetr(016), "Amount
data element: KODATAB
datab(010), "Condition Validity Date from
data element: KODATBI
datbi(010), "Condition Validity To
data element: MWSKZ
mwsk1(002),
END OF record.
DATA : BEGIN OF it_new OCCURS 0, " Internal Table for Header Data
kschl(004),
werks(004),
lifnr(010),
END OF it_new.
DATA : BEGIN OF it_item OCCURS 0, " Internal table for Item Data
werks(004),
lifnr(010),
matnr(018),
kbetr(016),
datab(010),
datbi(010),
mwsk1(002),
END OF it_item.
DATA : cnt(2) TYPE n,
fld(25) TYPE c.
TYPE-POOLS: truxs.
DATA: it_raw TYPE truxs_t_text_data.
DATA : n TYPE n.
DATA:
BEGIN OF t_data OCCURS 0,
data TYPE string,
END OF t_data.
DATA:BEGIN OF it_mess OCCURS 0,
msgtyp(5),
lms(200),
msgv1(50),
END OF it_mess.
DATA : p_mode TYPE c.
DATA:it_msgtab TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE,
it_msgtab1 TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
DATA : l_mstring(150).
DATA : BEGIN OF bdcdata OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdcdata.
PARAMETERS : p_file1 LIKE rlgrap-filename.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
PERFORM file_selection.
PERFORM data_upload.
PERFORM table_control.
LOOP AT it_new.
REFRESH bdcdata.
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RV13A-KSCHL'
it_new-kschl.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KONP-KBETR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMG-WERKS'
it_new-werks.
PERFORM bdc_field USING 'KOMG-LIFNR'
it_new-lifnr.
DATA: "X(5) TYPE N,
N(5) TYPE N.
N = 0.
LOOP AT it_item.
N = N + 1.
ENDLOOP.
"X = 1.
CNT = 1.
DO N TIMES.
IF CNT > 19.
perform bdc_field using 'BDC_OKCODE' 'KOMG-MATNR(01)'.
perform bdc_field using 'BDC_OKCODE' '=P+'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
CNT = 1.
ENDIF.
cnt = 1.
LOOP AT it_item WHERE werks EQ it_new-werks AND lifnr EQ it_new-lifnr . "FROM x TO x.
CONCATENATE 'KOMG-MATNR(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-matnr.
CONCATENATE 'KONP-KBETR(' cnt')' INTO fld.
PERFORM bdc_field USING fld it_item-kbetr.
CONCATENATE 'RV13A-DATAB(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-datab.
CONCATENATE 'RV13A-DATBI(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-datbi.
CONCATENATE 'KONP-MWSK1(' cnt ')' INTO fld.
PERFORM bdc_field USING fld it_item-mwsk1.
cnt = cnt + 1.
if cnt = 20.
perform bdc_field using 'BDC_OKCODE' 'KOMG-MATNR(19)'.
perform bdc_field using 'BDC_OKCODE' '=P+'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
CNT = 1.
endif.
CLEAR it_item.
ENDLOOP.
ENDDO.
PERFORM bdc_dynpro USING 'SAPMV13A' '1363'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KONP-MWSK1(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
CALL TRANSACTION 'FV11' USING bdcdata MODE 'A'
UPDATE 'S'
MESSAGES INTO it_msgtab.
CLEAR bdcdata[].
PERFORM error.
ENDLOOP.
Start new screen -Subroutine for screen s *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field -Subroutine for field s *
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_FIELD
*& Form file_selection
FORM file_selection .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'P_FILE1'
IMPORTING
file_name = p_file1.
ENDFORM. " file_selection
*& Form data_upload
FORM data_upload .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw
i_filename = p_file1
TABLES
i_tab_converted_data = record
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " data_upload
*& Form error
FORM error .
LOOP AT it_msgtab.
IF it_msgtab-msgtyp = 'E'.
SELECT SINGLE * FROM t100 WHERE sprsl = it_msgtab-msgspra
AND arbgb = it_msgtab-msgid
AND msgnr = it_msgtab-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH it_msgtab-msgv1 INTO l_mstring.
REPLACE '&2' WITH it_msgtab-msgv2 INTO l_mstring.
REPLACE '&3' WITH it_msgtab-msgv3 INTO l_mstring.
REPLACE '&4' WITH it_msgtab-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH it_msgtab-msgv1 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv2 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv3 INTO l_mstring.
REPLACE '&' WITH it_msgtab-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
it_mess-msgtyp = it_msgtab-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = it_msgtab-msgv1.
APPEND it_mess.
WRITE: / it_msgtab-msgtyp, l_mstring(150).
ELSE.
WRITE: / it_msgtab.
it_mess-msgtyp = it_msgtab-msgtyp.
it_mess-lms = l_mstring.
it_mess-msgv1 = it_msgtab-msgv1.
APPEND it_mess.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " error
*& Form table_Control
FORM table_control .
SORT record BY lifnr matnr.
LOOP AT record.
ON CHANGE OF record-lifnr.
MOVE-CORRESPONDING record TO it_new.
APPEND it_new.
ENDON.
MOVE-CORRESPONDING record TO it_item.
APPEND it_item.
ENDLOOP.
ENDFORM. " table_Control
Reward if useful
Regards
Jagadeesh.G -
How to handle the table control While working with LSMW?
How to handle the table control While working with LSMW?
its possible in lsmw,
Hi,
LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
check that single charecter field, it that is X that means the header record is processed, and do the items.
and, this is another way, try this out also
YOu can do this in "Define Source Structures" step,
the HEADER is defined first,
then the DETAIL below the HEADER.
add the fields to the structures.
Both should have some common key field
Please take care that the name of the common field is the same.
Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
Thanks -
What is star schema - pls explain with example
Hai.
what is star schema - pls explain with example
thanks in advance
GiriHi Giri,
SAP's BIW employs extended star schama
The extended star schema consists of a fact table (in two parts, E and F - f is the inbound table, E long-term storage). Dimension tables are connected to the fact tables via the DIMID(dimension id) which is a generated value and is stored in both dimension and fact tables. In addition, the dimension tables are connected to tables which hold master data values (or bind the dimension table to tables that hold the values), such as S tables, P, Q, X, Y. These dimension tables hold SIDs, again generated keys which relate values in the dimension table (the DIMIDs) with master data values. Thus, at the time of the query, join operations ensure that the master data values can be merged with the key figure values stored in the fact tables.
Truthfully, one does not need to understand this schema extensively in order to model in BI in SAP NetWeaver. It helps to understand master data, navigational attributes, etc. Otherwise, simply model the key figures in the fact table and the characteristics into dimensions and you're good - the application generates the star schema for you - you don't have to specify it.
See the transaction "LISTSCHEMA" which will show you the relationship between the F fact table and the other tables of the cube's star schema.
Also follow the link for more info:
http://help.sap.com/saphelp_nw04/helpdata/en/4c/89dc37c7f2d67ae10000009b38f889/content.htm
Thanks for any points you assign.
Regards -
What is activity in SAP CRM with examples plz?
Dear All
What is activity in SAP CRM with examples plz?
Thanks
CRM NewbeeActivities are explained in CR010 & CR300. It is a transaction type used to record sales activities e.g. telephone call, email or customer visit or a follow up call, request to fill up a questionnaire or request to set the status to complete etc. in customer/partner engagement lifecycle. This has mainly information like: Activity type partner, texts & dates. However it is an order document like opportunity, sales order etc. & extra information can be added by including customer set types like we do in opportunity, quotation, sales order, conttract etc.
Activities are a central part of SAP CRM & used across application e.g. Interaction Center, Sales, Marketing etc.
I hope this should be sufficient & helpful.
If you need to understand more about basic concept of Activities please see the dropdown list for Activity types..this will give you a good idea as to what are the kinds of business transactions which can be activities.
Regarding Quotation thing...Quotation is not an activity but 'Create Quotation' or 'Create Quotation as follow up to a lead or opportunity' can be an activity.
Thanks,
Vivek -
Hi gurus what is lock objects in datadictionary ,can explain with example
hi gurus what is lock objects in datadictionary ,can explain with exple
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
Hope this will give a basic idea.
Here is a Link with good example
Lock Objects
Look the following Links for additionl info.
http://help.sap.com/saphelp_nw04/helpdata/en/c2/2d7037ecc92a7ee10000009b38f8cf/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
http://articles.techrepublic.com.com/5100-6329_11-5066352.html
Hope this Helps -
Table Control In Modulepool with Multiple Selection.
Hi Gurus,
I have 2 Screens. In First Screen Im entering Plant and Date.
In Second Screen I have 10 Radio Buttons along with Table Control.In table control i have 6 columns.I have to add multiple rows according to radio button selection and for every row it has to carry First Screens Plant and Date also.So, In table Controls table it has to store along with radio button,Plant and Date and the Table control Values.
Pls send me the solution asap.
I'l give good points.
Thanks in Advance,
regards,
kumar.chOk,good
-
Table controls (scroll bars) with LSMW
Hi,
I have to fill a table control from a lsmw project, my problem appears when we need to scroll down table control because there are no more free lines.
My question is if it's possible to manage table control scroll bars to scroll down when all rows will be taken, using lsmw.
Any idea about it would be very appreciated
Thanks in advanceHi Javier,
I suggest you is that you should loop at the internal table from which you are filling the data into the table control or use a counter for number of rows comming up at a time in the table control. And then put code for ADD+ button. Do this till the end of file or table.
I hope this helps.
Also you can use TCode for the LSMW to upload one record at a time. U can try this also.
Regards,
Usha. -
What a basis person can do with BI Accelerator (BIA)?
I wonder except install and upgrade, what else a basis person can help with BIA?
Thanks for you help.Hi,
from my knowledge a basis person can do the following
1. Indexing of tables in BIA
2. Monitoring the load after implementation of BIA -
Table control + filed visible with 1 char
Hello Friends,
I have a table control, and there I have a column with 1 char, and it set to the default size of 1 column, however due to visibility reason I want to make it a bit broder, how I can make it, that the column size get increased ?
Regards,hi All,
using se51 I can increase the length, otherwise using GUI Editor, it did not let me increase the visible lenght....its not edit able..
thanks all,
Regards, -
Table control data update with LED status progress
Hi Friends,
I've a requirement for my project....
But i am not clear of how to implement that.
The main.vi will extract the data from an Excel sheet using all excel.llb and show the data in table control.
At the back end i'll be keep on reading data from the worksheet 1 of the excel sheet.
so my intention is something like this
whenever it reads the 1st row of data the LED should blink at the first row and it proceed down as per the for loop
And should continue up to the end.
If anybody have worked out with the Table control and Excel sheet VI's please help.
Your help would be appreciated.
Will attach the VI on request.
Cheers,
Suneel.VHi Mike,
Thanks for your prompt response.
Attached are the VI's.
The main VI is Excel_Tablecontrol.vi and the sub vi is excel_read.vi
In the main VI select any excel sheet from your PC and it will extract the first sheet data in it.
But in my real project i will be reading line by line.
Could you please make me clear how should i put an indicator whcih would go line by line.
Cheers,
Suneel.V
Attachments:
Excel_TableControl.vi 11 KB
Excel_Read_Write_V1.0.vi 48 KB -
What a basis admin can help with DP, SNP,PPDS and GATP in SCM?
I just finished my configuration on LCA and LDA. What else a basis admin can do on supporting DP, SNP,PPDS and GATP in SCM?
I want to learn more SCM and APO/LiveCache. Thanks!Hi
Since your question is particular to any specific issue
I would suggest you to attend ADM555 training offered by SAP eduction division.(ofcourse if possible to you).
Otherwise, if any issue please post that in the form back.
Regards
Sekhar -
What a basis admin can help with GRC except install/upgrade?
Our basis team installs and upgrades GRC.
However when coming to the support for GRC, we are not sure where to draw the border line between
basis team and security team.
What is the responsibility of basis team in GRC area?
Thanks for your help.Hi Jennifer,
There is no real clear cut answer for this! Where do you draw the line for the other ERP systems?
It really depends on your own support structure and the skills of the individuals. I would ask your Application Support Mgr to confirm / define the remit with those involved.
Having said that, I would suggest that the technical landscape management and connectors would lend itself to the basis / netweaver analysts role. You may also want them to deal with the assignment of the webservices and the connectivity of the components to each other.
The functional configuration would tend to lend itself to the security team though as I expect that they would be more business focussed and be able to design the way in which the tools should be used by the business.
I hope this helps?
Simon -
What a basis admin can help with BPC version for NW?
Hi!
My company has installed BPC verion for NW platform.
I wonder there is any BPC specific work that a basis admin can help?
Thanks for your info.Hi
Since your question is particular to any specific issue
I would suggest you to attend ADM555 training offered by SAP eduction division.(ofcourse if possible to you).
Otherwise, if any issue please post that in the form back.
Regards
Sekhar -
Issue with number of lines in Table control for an web transaction in ITS
Hi,
We have acustom web transaction ZC03 where we have used table controls. Recently a kernal patch has been installed and after that the number of lines appearing in table control has got changed. Earlier table control was coming with 5 lines and presently its coming with 3 lines. Can you please help me to fix the issue.
The code used in HTML template for table controi is given below:
`SAP_DynproLayerBegin(005,013,067,006)`
`SAP_TableControl("TC_TIME1")`
`SAP_DynproLayerEnd()`
I have tried other alternatives like `SAP_DynproTableControl("TC_TIME1")`, `D_TableControl("TC_TIME1') but did n't get any fruitful result also.
Thanks and Regards,
RanadevWhat where the precise Kernel updates? What where you on and what did you upgrade too?
Did you apply any BASIS Support Pack corrections during the Kernel upgrade?
If you applied a new BASIS support pack - check the following WIKI:
[How to check the publishing Date of an Internet Service|http://wiki.sdn.sap.com/wiki/x/OYG8BQ ]
if you need to republish - use the following WIKI:
[How to activate, publish and test ITS services in the integrated ITS?|http://wiki.sdn.sap.com/wiki/x/kmE ]
Regards,
Oisin
Maybe you are looking for
-
my flash player stoped working 2 days ago and i tryed all the tips and adviceto fix it /update it still stops instilation at 47 to 50%
-
New iTunes library does not appear
I've just got my new MacBook Pro and want to move my iTunes library to the new Mac. Followed the article about this (http://docs.info.apple.com/article.html?artnum=300173) except i used Firewire to move the iTunes folder. After replacing the iTunes f
-
Dear All when we make the customer goods return receipt with movement type 651 this movemet type is not creating any Accounting Document on the document status when we click on the accounting button its giving the message material dose not inculding
-
Problem with Excel 2013 on W8 and WD NAS
With my W8 laptop, I get a lot of problem saving excel file on my NAS. I get "we can't save filename.xlsx because the file is in read-only. To keep your changes you'll need to save the workbook with a new name or in a different location..." I'm alone
-
Cover Flow viewing of Events in iPhoto
When I first used iPhoto in my new iMac, I was able to browse the photos in the Events source of iPhoto with a view which was like the CoverFlow view in the Finder. Now that ability is gone. How can I get it back? (This is in iPhoto '08, version 7.1.