Issue in table control
Hi All
I have a table control in which there are three columns. I need a dropdown list box in one of the columns but the problem is i dont want dropdown in all the cells of that column.
col 1 col2 col3
row1
row2
row3 *****
As illustrated above , I want dropdown list box only at place specified by *****. Can i achieve this somehow.
Any pointers to this will be appreciated.
Thanks.
Hi,
In tcode se51 --> table control select the field Row3(according to your example) and
double click it.Then a attributes window will be displayed.
In tht window there will be a field called Dropdown..Choose list box from it and also click on Program tab>possible entries..
Award points if useful..
Similar Messages
-
Issue in table control scroll bar
Hi experts,
In Table control I used the following code,
Refresh control 'TCDATA' from screen '200'.
If i use this code i cant able to scroll the data when the table control having multiple lines.
Can any one suggest me?. what i need to do for this..
Edited by: sai.bala on Sep 17, 2010 12:22 PMHi ,
try this...
Refresh control 'TCDATA' from screen '200'.
"write this statement below refresh table control
* Describe lines of internal table to extend the table control Vertical
* scroll bar
DESCRIBE TABLE <tablename> LINES TCDATA-lines.
prabhudas -
Strange issue with table control in dialog programming! Please help!
Hello everyone:
I have a table control on screen painter and I have atleast 10 rows on display when user calls the screen. If I have 15 columns then ofcourse user has to scroll down to see extra rows. I have line selection set to "single" for table control so that user can select only one row at a time. This works fine when user does not have to scroll to see extra rows. It is tough for me to explain i.e., if the table control displays 10 rows when the screen opens up then they can only select single row at a time (rows 1 -10). For example user selected row 7 and now they scroll down to see extra rows (for example 13) then it lets them select row 13 also even though I set line selection to "single" in the properties for table control! They should be able to select only one row at a time. Is this some limitation with table control in SAP? Please give me any information you have.
Thanks.
MithunHi,
As you suspected, this is a limitation in the table control. You need to take care of the single-selection functionality yourself except for the rows that are actually being displayed. See [Note 588284|https://service.sap.com/sap/support/notes/588284] for the official SAP explanation.
Regards,
Jamie -
Issue On Table Control Validation
Hi All,
I Got One requirement that is " Sales Employee Depo Tour Details ",
Requirement Is ---> IF One Sales Employee Updates Data Base Table Through Table Control
Details Are :
Emp no: 1234, Depo City : Hyderabad, Starting Date : 25:01:2010 End Date:31:12:9999(Default Date If Emp Gives Blank)
And Then Saves His Tour Details.
Like That If Another Employee 2345 Wants To Update His Depot tour In Same City Between Above Dates Error pop up Message Should Display With " One Employee Already In This City Want to Change End date Of That Employee ".
If He Press " Yes " Button Then That Record Display In Table Control In Change Mode After That
Emp:2345 Changes His End Date To 31:12:9999 To some 31:12:2010 And Then He Updates The Employee 1234 Details,
Then He updates his tour Details Like
Emp no: 2345, Depot City : Hyderabad, Starting Date : 25:01:2011 End Date:31:12:2011.
so i done this validation in pai module through chain and enchain and up to pop up display i done the process of validation
but how to display existing record in table control via include .
Regards
Udaya Bhasker Bandi
Edited by: UDAY123 on Jul 19, 2010 9:10 AMu have to add the
TRANSACTION 'COR2' | [USING bdc_tab [bdc_options]] .
in wihich
OPTIONS FROM opt
DEFSIZE (Selection as to whether the screens of the called transaction are displayed in the standard screen size.) Values "X" (standard size), " " (current size).
also you have to handle the 'P+'.
* Structure to hold Parameter string for runtime of CALL TRANSACTION *
DATA :
fs_opt TYPE ctu_params.
*& Form SETTINGS
* This Subroutine sets the default size check box to 'X' & Mode as 'N' *
* There are no interface parameters to be passed to this subroutine
FORM settings .
* Setting the Default size checkbox to 'X' and Mode as 'N'
fs_opt-defsize = 'X'.
FS_OPT-DISMODE = 'N'.
ENDFORM. " FORM RETRIEVE_SUBSECTION...
After filling your BDC Data.
CALL TRANSACTION 'COR2' USING t_bdcdata
OPTIONS FROM fs_opt
MESSAGES INTO t_messages.
you can see the below example
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/bdcToUploadIT0585Data
Regards. -
In my modulepool program , i am unble to add new item in table control.
in this program when add item first time , it is working fine . but when update mode , it is not adding.
please help on this.
Moderator Message: Put a little more effort into framing your questions and do a little more R&D before posting here.
Edited by: kishan P on Feb 25, 2011 5:45 PMu have to add the
TRANSACTION 'COR2' | [USING bdc_tab [bdc_options]] .
in wihich
OPTIONS FROM opt
DEFSIZE (Selection as to whether the screens of the called transaction are displayed in the standard screen size.) Values "X" (standard size), " " (current size).
also you have to handle the 'P+'.
* Structure to hold Parameter string for runtime of CALL TRANSACTION *
DATA :
fs_opt TYPE ctu_params.
*& Form SETTINGS
* This Subroutine sets the default size check box to 'X' & Mode as 'N' *
* There are no interface parameters to be passed to this subroutine
FORM settings .
* Setting the Default size checkbox to 'X' and Mode as 'N'
fs_opt-defsize = 'X'.
FS_OPT-DISMODE = 'N'.
ENDFORM. " FORM RETRIEVE_SUBSECTION...
After filling your BDC Data.
CALL TRANSACTION 'COR2' USING t_bdcdata
OPTIONS FROM fs_opt
MESSAGES INTO t_messages.
you can see the below example
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/bdcToUploadIT0585Data
Regards. -
I Have created a maintenance view of a Ztable.
In that view i have added some valiations between the Chain - Endchain.
In those validation i update a particular field of the same Ztable depending upon a certain creteria on the SAVE event.
The issue that i am facing is that when i SAVE the data for the first time the ztable field does not get updated ...... but when i SAVE it for the second time it gets updated. So basically i have to Press the SAVE Button twice for the field to be updated.
Can any one suggest why the same is happenining and what is the solution????
Thanx in Advance
Regards
DilipHi,
Go to SE11 - Utilities - Table Maintenance Generator
Then go to Environment - Modification - Events
There, you create a new entry. Use Table maintenance dialog event = 05. Put your code there. It will be called when saving new records.
Hope this helps.
Benedict -
hi,
I am having a issue with table control scrolling. When i was passing less number of records (say 19 records becuase table control is having 19 lines) to table control in BDC call transaction, everything is working fine. after filling the 19 line items its not taking the next line item the page is not scrolling down. T.code is <b>GS02</b>. please suggest me. following is my code
REPORT ZLOCK_WBS_ELEMENTS MESSAGE-ID ZFI_RESTMT.
TYPES *
*types declaration for final internal table
types: begin of ty_final,
ryear like zupi5a-ryear, "Fiscal year
rbukrs like zupi5a-rbukrs, "Company code
racct like zupi5a-racct, "Account number
rzzps_posid like zupi5a-rzzps_posid, "WBS element
rzzmtit like zupi5a-rzzmtit, "MPM title
rzzmfor like zupi5a-rzzmfor, "MPM format
rzzmatnr like zupi5a-rzzmatnr, "Material number
rzzcou like zupi5a-rzzcou, "Country
rzzfow like zupi5a-rzzfow, "Financial owner
rzzoow like zupi5a-rzzoow, "Operational owner
rzzcon like zupi5a-rzzcon, "Licensee Contract
rzzloc like zupi5a-rzzloc, "Licensor Contract
kostl like zupi5a-kostl, "Cost center
zzfam like zupi5a-zzfam, "Fame Number
zzfor like zupi5a-zzfor, "Format
zzprd like zupi5a-zzprd, "Product Line
zzwin like zupi5a-zzwin, "Window group
zzwig like zupi5a-zzwig, "Window
rtcur like zupi5a-rtcur, "Currency Key
tsl like zupi5a-tsl, "Amount Transaction currency
hsl like zupi5a-hsl, "Amount Co. code currency
ksl like zupi5a-ksl, "Amount Group currency
msl like zupi5a-msl, "Quantity
end of ty_final.
Data
data: j_final2 type standard table of ty_final,
v_final2 type standard table of ty_final.
data: wa_final2 type ty_final.
data: bdcdata like bdcdata occurs 0 with header line,
messtab like bdcmsgcoll occurs 0 with header line.
data :begin of i_values occurs 0.
include structure setvalues.
data :end of i_values.
data: v_counter(3) type n value '0',
v_from like rgsbl-from,
V_FROM(30) TYPE C,
v_setname like zfi_setid_cc-setid,
v_setid like sethier-setid,
n type i,
l type i,
k type i value '1',
p_rbukrs like zupi5a-rbukrs.
import p_rbukrs from memory id 'bukrsid'.
import i_final2 to j_final2 from memory id 'table'.
To eliminate duplicate WBS elements to be stored into the sets
v_final2 = j_final2.
sort v_final2 by rzzps_posid.
delete adjacent duplicates from v_final2 comparing rzzps_posid.
select single setid into v_setname
from zfi_setid_cc
where rbukrs EQ p_rbukrs.
IF sy-subrc <> 0.
MESSAGE E005.
ENDIF.
*write 'ZFIRESTATEMENT' to v_setname.
call function 'G_SET_GET_ID_FROM_NAME'
EXPORTING
shortname = v_setname
IMPORTING
new_setid = v_setid.
call function 'G_SET_TREE_IMPORT'
EXPORTING
client = sy-mandt
langu = sy-langu
setid = v_setid
TABLES
set_values = i_values.
describe table i_values lines n.
describe table v_final2 lines l.
write n to v_counter.
clear bdcdata.
refresh bdcdata.
perform bdc_dynpro using 'SAPMGSBM' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RGSBM-SHORTNAME'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RGSBM-SHORTNAME'
'ZFIRESTATEMENT'.
perform bdc_field using 'RGSBM-SHORTNAME'
v_setname.
loop at v_final2 into wa_final2.
v_counter = v_counter + 1.
perform bdc_dynpro using 'SAPMGSBM' '0115'.
concatenate 'RGSBL-FROM(' v_counter ')' into v_from.
perform bdc_field using 'BDC_CURSOR'
v_from.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RGSBS-TITLE'
'FI Restatement-WBS locking'.
perform bdc_field using v_from
wa_final2-rzzps_posid.
endloop.
perform bdc_dynpro using 'SAPMGSBM' '0115'.
perform bdc_field using 'BDC_CURSOR'
v_from.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'RGSBS-TITLE'
'FI Restatement-WBS locking'.
perform bdc_dynpro using 'SAPMGSBM' '0105'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'BDC_CURSOR'
'RGSBM-SHORTNAME'.
call transaction 'GS02'
using bdcdata
mode 'A'
update 'S'
messages into messtab.
Start new screen *
form bdc_dynpro using program dynpro.
clear bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
append bdcdata.
endform.
Insert field *
form bdc_field using fnam fval.
if fval <> ' '.
clear bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
append bdcdata.
endif.
endform.
this is working fine when they r less than 19 line items. please suggest me with the logic when it is more than 19 line items.Hi,
Just try to increase the table control lines before display.
v_counter = n + 10. -
HAI FRIENDS,
I HAVE DISPLAYED THE VALUES IN THE TABLE CONTROL
I HAVE DEFINED 'CHECK' FOR SELECTING THE FIELDS OF TABLE CONTROL
THE ISSUE STARTS HERE
WHEN I CHECK TOP FIELDS OF TABLE CONTROL
THEN SCROLLED VERTICALLY, THE TABLE CONTROL TO SELECT I.E CHECK THE
BOTTOM FIELDS OF TABLE CONTROL.
THE TOP FIELDS WATEVER CHECK WHERE CHECKS DISPAPEARS FOR TOP FIELDS .
BY THIS I UNABLE TO SELECT THE FIELDS OF TABLE.
PLZ HELP ME URGENTLY NEEDED.
MY MONDAY I NEEDEDYou use an internal table for values in table control..
One of the fields( very first field) in that itab is used for check - uncheck..
u have make it 'X' when u click any row...
I think this might be the problem in ur case.. when u scroll PAI starts... in that PAI check the value of check box for that particular field...
Regards
Prax -
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 -
Hi all,
I had a issue where in when I display some records in the table control, it is showing the records and the rest of the records are going into grey mode.
For example, Iam getting 3 records into the table control. From the fourth line of the table control, it is displaying the grey color.( I mean disable mode).
I have a requirement where the end user must have the facility to enter the records manually also.
So, How to make the grids of the table control in such a way we can enter some data manually along with the imported data.
Please let me get some ideas.
thanks and regards
Murali Krishna TatojuHi Murali,
I have the following logic in the PBO and it works fine,
DATA: tab_fill TYPE i,
calc_fill TYPE i,
add_fill type i,
no_lines_add type i.
CLEAR: tab_fill, calc_fill, add_fill, no_lines_add.
*check the current line number and the data filled.
DESCRIBE TABLE g_tc_rate_card_itab LINES tab_fill.{color:red} "g_tc_rate_card_itab----> internal table{color}
IF tab_fill GE 7.
calc_fill = tab_fill MOD 7. {color:red}" Initial 7 rows are available in the table for input u can change this as per you requirement or the no. of rows initially available in your screen{color}
IF calc_fill = 0.
add_fill = tab_fill / 7.
add_fill = add_fill + 1.
no_lines_add = 7 * add_fill.
tc_rate_card-lines = no_lines_add. {color; red}" tc_rate_card ----> Table control name{color}
ENDIF.
ENDIF.
By this way you can get rid of the ADD button since as soon as the 7th row is filled with data it adds up more 7 rows in the table control which are read for input.
Regards,
Abhijit G. Borakr -
Issue with input field in table control
Hi,
I have an issue with field acgl_item-rstgr in the table control.
I have created a screen program with a table control.
In the control i have added a dictionary field as acgl_item-rstgr.
When i execute, do f4 on the input field, select a value and press enter, then it is showing me
error as 'Entry 'val' does not exist in T053R (check entry). Its really weird to understand this. I have selected the value
from f4 and even then it says this. Its working for all other columns, but not working only for RSTGR.
Plz help me on this regard.
Code is like this.
TYPES : BEGIN OF ty_rstgr,
rstgr TYPE RSTGR,
END OF ty_rstgr.
TABLES : ACGL_ITEM.
DATA : it_rstgr TYPE TABLE OF ty_rstgr.
DATA : wa_rstgr TYPE ty_rstgr.
CONTROLS : table TYPE TABLEVIEW USING SCREEN 100.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT it_rstgr INTO wa_rstgr WITH CONTROL TABLE.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
LOOP AT it_rstgr.
ENDLOOP.
Thanks,Hi Navitha,
Its Check Table concepts for the error u stated. Please check wht the Search help ur using...Because for this field there is no search help at value table level...Use search help that hold all master data or create a custom search field in SE11 level or in program level.
Cheers,
Naveen -
Issue in vertical scroolbar on the table control
Hi All,
I am not able to get the vertical scrollbar on the table control iuf line items increase in number. Please help me in solving the issue.
Thanks
K SharmaHi,
In se38
CONTROLS: TCTRL_PHONELIST TYPE TABLEVIEW USING SCREEN 100.
MODULE STATUS_0100 OUTPUT.
DESCRIBE TABLE itab_PHONELIST LINES LIN.
TCTRL_PHONELIST-lines = LIN.
ENDMODULE. " STATUS_0100 OUTPUT
MODULE EXTRACT_USERDATA INPUT.
lines = sy-loopc.
ENDMODULE. " EXTRACT_USERDATA INPUT
In se51
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
LOOP AT ITAB_PHONELIST .
MODULE EXTRACT_USERDATA.
ENDLOOP. -
Table control: Line selection single issue
Hi experts,
I have created a table control and in the screen painter I have defined the line selection as "Single" for table control.
The table control can display upto 20 lines in a screen and i can select a single record only which pertains to my requirement. if I try to select two records it will not allow.
Issue: consider i select a single record from the first 20 lines displayed in screen, then i scroll the records in the table control so that it displays the records from 21 to 40. if I select a single record now from line 21 to 40, the first record that i selected is not getting deselected. That is, totally two lines are getting selected.
How to overcome this issue
Thanks in advance
Regards
AnandOk
The "problem" is here:
Types: Begin of ty_ic,
ic(20),
desc(20),
sel(1) <--------------------------------
End of ty_ic.
You've ha a field for selected line and that field is used in table control definition as you've written:
"Note: wa_ic is the structure used in table control and wa_ic-sel is the mark field defined the table control attributes"
So you're using the structure WA_IC as header line of internal table IT_IC and also as input/put field of your table control (I mean the screen fields of table control are based on WA_IC).
You don't need any code in PBO to move the data from internal table to table control, because the headerline of IT_IC and field of table control are the same, infact you've implemented only the code in PAI to save the data from table control to IT_IC:
Loop at it_ic.
Modify it_ic from wa_ic index tc_ic-current_line
Endloop
t's a good solution if it needs to transfer all data to table control automatically: it doesn't need any code in PBO
but, of course, there'll be a problem when you don't need to display something, in this case you have to think a solution, I mean you have to write a code in order to avoid to display those data.
It's the case of the selected line: in your situation all selected lines keep the selection, because the code to clear IT_IC-SEL is missing: only the user can deselect a line, but if he doesn't do it, the line will remain selected after navigation.
So you make to be sure to clear all selected lines are not displayed.
You need to create a code in PAI out of the loop of table control where you clear the flag SEL, in order to do it you need to consider:
- The index of the first record displayed in table control is stored in field TC_IC-TOP_LINE
- The index of the last record displayed in table control can be calculated: the variable SY-LOOPC indicates how many rows can be displayed in table control, so the last record will be: TC_IC-TOP_LINE + SY-LOOPC.
So you need to clear the field SEL for all records not displayed, a code like this:
PROCESS PAI.
LOOP AT IT_IC.
MODULE GET_LOOPC.
ENDLOOP.
MODULE CLEAR_SEL.
MODULE GET_LOOPC..
TOT_LINE_DISPLAYED = SY-LOOPC.
ENDMODULE
MODULE CLEAR_SEL.
* Here you need to clear the selection of the records before of TOP_LINE
IF TC_IC-TOP_LINE > 1.
LOOP AT IT_IC INTO WA_IC TO TC_IC-TOP_LINE.
CLEAR WA_IC-SEL.
MODIFY IT_IC FROM WA_IC.
ENDLOOP.
ENDIF.
* Here you need to clear the selection of the records after the last one:
LAST_INDEX = TOT_LINE_DISPLAYED + TC_IC-TOP_LINE.
DESCRIBE TABLE IT_IC LINES SY-TABIX,
IF SY-TABIX > LAST_INDEX.
LOOP AT IT_IC INTO WA_IC FROM LAST_INDEX.
CLEAR WA_IC-SEL.
MODIFY IT_IC FROM WA_IC.
ENDLOOP.
ENDIF.
ENDMODULE. -
Table Control Scrolling issue in Module Pool
Hi,
I've done table control. From Selection screen i've 3 buttons, if we'll press on one button one table control is visible. There if i do scrolling up to 10 records and i come back to selection and press another button again in table control scrolling is at previous place only. May be its nt refreshing.
Kinldy help on this issue.
With Regards,
jack.hi,
i've done like below. But no result. -
Table control small Issues , Plz help in tracing the problem
Hello John , Rich , Anand & all
My sorting is working fine but thr is small problem
1. user has habit of pressing enter after everything,
after entering the values in editable fields in Table control , it doesnt retain the entered values but if he presses save button immediately after entering values , it saves .
how 2 hold the values after pressing enter button
2. Now with this code , it saves the table control content but doesnt display the latest values immediately on the screen .
3. User doesnt want to press SAVE button , he wants save the Table control content by pressing ENTER button,
What is the OK_CODE value for Enter Button plz ?
Plllllzzzzz help me for god sake ASAP.
<u><b>Everyone whoever make an attempt is going to get 10 pnts.</b></u>
==========================
FLOW Logic
PROCESS BEFORE OUTPUT.
MODULE SET_STATUS.
LOOP AT ITAB
WITH CONTROL TCL1
CURSOR TCL1-CURRENT_LINE .
MODULE SET_LINE_COUNT .
ENDLOOP.
PROCESS AFTER INPUT.
MODULE GET_OK_CODE .
MODULE EXIT_COMAND AT EXIT-COMMAND.
MODULE SCROLL_SORT.
LOOP AT ITAB.
MODULE UPDATE_MOD.
ENDLOOP.
==========================
REPORT ZSD_REP_ORDER_BANK_CHANGE NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES: VBAK,VBAP,VBRK,ZSD_TABL_ORDBANK,MARA,KONV.
CONTROLS: TCL1 TYPE TABLEVIEW USING SCREEN 0200.
DATA: ITAB LIKE ZSD_TABL_ORDBANK OCCURS 0 WITH HEADER LINE,
WA_ITAB LIKE ZSD_TABL_ORDBANK,
OK_CODE LIKE SY-UCOMM,
SAVE_OK_CODE LIKE SY-UCOMM,
UPD_OK_CODE LIKE SY-UCOMM,
ANSWER TYPE C,
I LIKE SY-LOOPC ,
J LIKE SY-LOOPC,
V_LINES LIKE SY-LOOPC,
LINE_COUNT LIKE SY-LOOPC,
STS TYPE N,
EMGRP LIKE MARA-EXTWG,
QTY LIKE ZSD_TABL_ORDBANK-QTY,
UPRICE LIKE ZSD_TABL_ORDBANK-UPRICE,
TOT LIKE ZSD_TABL_ORDBANK-TOT,
INO LIKE VBAP-POSNR,
COL TYPE CXTAB_COLUMN,
COPIED_ONCE ,
FLDNAME(100),HELP(100).
FIELD-SYMBOLS:
<FS_ITAB> LIKE LINE OF ITAB,
<FS_TCL1> LIKE LINE OF TCL1-COLS.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECT-OPTIONS: S_CCODE FOR ZSD_TABL_ORDBANK-CCODE
NO INTERVALS NO-EXTENSION OBLIGATORY,
S_SORG FOR ZSD_TABL_ORDBANK-SORG
NO INTERVALS NO-EXTENSION OBLIGATORY,
S_DCHAN FOR ZSD_TABL_ORDBANK-DISTCHAN,
S_DIV FOR ZSD_TABL_ORDBANK-DIV,
S_MATNO FOR ZSD_TABL_ORDBANK-MATNO,
S_CUSTNO FOR ZSD_TABL_ORDBANK-CUSTNO ,
S_QTNO FOR ZSD_TABL_ORDBANK-QTNO,
S_QTDAT FOR ZSD_TABL_ORDBANK-QTDAT,
S_QTVDAT FOR ZSD_TABL_ORDBANK-QTVALDAT,
S_SONO FOR ZSD_TABL_ORDBANK-SONO.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT * FROM ZSD_TABL_ORDBANK
INTO TABLE ITAB
WHERE CCODE IN S_CCODE
AND SORG IN S_SORG
AND DISTCHAN IN S_DCHAN
AND DIV IN S_DIV
AND MATNO IN S_MATNO
AND CUSTNO IN S_CUSTNO
AND QTNO IN S_QTNO
AND QTDAT IN S_QTDAT
AND QTVALDAT IN S_QTVDAT
AND SONO IN S_SONO .
IF SY-SUBRC EQ 0.
REFRESH ITAB.
CLEAR COPIED_ONCE.
CALL SCREEN 0200.
ELSE.
MESSAGE E012(ZQOTBANK) .
ENDIF.
*& Module SET_STATUS OUTPUT
text
MODULE SET_STATUS OUTPUT.
SET PF-STATUS '0200'.
SET TITLEBAR '0200'.
IF COPIED_ONCE IS INITIAL.
SELECT * FROM ZSD_TABL_ORDBANK
INTO TABLE ITAB
WHERE CCODE IN S_CCODE
AND SORG IN S_SORG
AND DISTCHAN IN S_DCHAN
AND DIV IN S_DIV
AND MATNO IN S_MATNO
AND CUSTNO IN S_CUSTNO
AND QTNO IN S_QTNO
AND QTDAT IN S_QTDAT
AND QTVALDAT IN S_QTVDAT
AND SONO IN S_SONO .
IF SY-SUBRC EQ 0.
DESCRIBE TABLE ITAB LINES V_LINES.
TCL1-LINES = V_LINES.
ENDIF.
COPIED_ONCE = 'X'.
REFRESH CONTROL 'TCL1' FROM SCREEN '0200'.
ENDIF.
LOOP AT ITAB.
QTY = ITAB-QTY.
UPRICE = ITAB-UPRICE.
TOT = QTY * UPRICE .
ITAB-TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-CGL_QTY.
UPRICE = ITAB-CGL_UPRICE.
TOT = QTY * UPRICE .
ITAB-CGL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-BHEL_QTY.
UPRICE = ITAB-BHEL_UPRICE.
TOT = QTY * UPRICE .
ITAB-BHEL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-ALSTOM_QTY.
UPRICE = ITAB-ALSTOM_UPRICE.
TOT = QTY * UPRICE .
ITAB-ALSTOM_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-SIEMENS_QTY.
UPRICE = ITAB-SIEMENS_UPRICE.
TOT = QTY * UPRICE .
ITAB-SIEMENS_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-TELK_QTY.
UPRICE = ITAB-TELK_UPRICE.
TOT = QTY * UPRICE .
ITAB-TELK_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ITAB-OTH_QTY.
UPRICE = ITAB-OTH_UPRICE.
TOT = QTY * UPRICE .
ITAB-OTH_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
MODIFY ITAB.
ENDLOOP.
ENDMODULE. " SET_STATUS OUTPUT
*& Module SET_LINE_COUNT INPUT
text
MODULE SET_LINE_COUNT OUTPUT.
LINE_COUNT = SY-LOOPC.
ENDMODULE. " SET_LINE_COUNT INPUT
*& Module GET_OK_CODE INPUT
text
MODULE GET_OK_CODE INPUT.
IF OK_CODE = 'SAVE'.
UPD_OK_CODE = OK_CODE.
ENDIF.
ENDMODULE. " GET_OK_CODE INPUT
*& Module EXIT_COMAND INPUT
text
MODULE EXIT_COMAND INPUT.
SAVE_OK_CODE = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK_CODE.
WHEN 'BACK'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Order Bank Entry'
TEXT_QUESTION = 'Do you want to Go BacK ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE TO SCREEN 0.
ELSE.
ENDIF.
WHEN '%EX'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Order Bank Entry'
TEXT_QUESTION = 'Do you want to Exit ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE TO SCREEN 0.
ELSE.
ENDIF.
ENDCASE.
ENDMODULE. " EXIT_COMAND INPUT
*& Module SCROLL INPUT
text
MODULE SCROLL_SORT INPUT.
SAVE_OK_CODE = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK_CODE.
WHEN 'P--'.
TCL1-TOP_LINE = 1.
WHEN 'P-'.
TCL1-TOP_LINE = TCL1-TOP_LINE - LINE_COUNT.
IF TCL1-TOP_LINE LE 0.
TCL1-TOP_LINE = 1.
ENDIF.
WHEN 'P+'.
I = TCL1-TOP_LINE + LINE_COUNT.
J = TCL1-LINES - LINE_COUNT + 1.
IF J LE 0.
J = 1.
ENDIF.
IF I LE J.
TCL1-TOP_LINE = I.
ELSE.
TCL1-TOP_LINE = J.
ENDIF.
WHEN 'P++'.
TCL1-TOP_LINE = TCL1-LINES - LINE_COUNT + 1.
IF TCL1-TOP_LINE LE 0.
TCL1-TOP_LINE = 1.
ENDIF.
WHEN 'SORTUP'.
READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY SELECTED = 'X'.
IF SY-SUBRC = 0.
SPLIT <FS_TCL1>-SCREEN-NAME AT '-' INTO HELP FLDNAME.
SORT ITAB ASCENDING BY (FLDNAME).
ENDIF.
WHEN 'SORTDN'.
READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY SELECTED = 'X'.
IF SY-SUBRC = 0.
SPLIT <FS_TCL1>-SCREEN-NAME AT '-' INTO HELP FLDNAME.
SORT ITAB DESCENDING BY (FLDNAME).
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND INPUT
*& Module UPDATE_MOD INPUT
text
MODULE UPDATE_MOD INPUT.
CASE UPD_OK_CODE.
WHEN 'SAVE'.
UPDATE ZSD_TABL_ORDBANK FROM ITAB .
STS = SY-SUBRC .
IF STS NE 0.
MESSAGE E003(ZQOTBANK) .
ENDIF.
ENDCASE.
ENDMODULE. " UPDATE_MOD INPUT
Thnx
Moni
Message was edited by: md monirujjamanPROCESS BEFORE OUTPUT.
MODULE SET_STATUS.
LOOP AT ITAB
WITH CONTROL TCL1
CURSOR TCL1-CURRENT_LINE .
MODULE SET_LINE_COUNT .
ENDLOOP.
PROCESS AFTER INPUT.
MODULE GET_OK_CODE .
MODULE EXIT_COMAND AT EXIT-COMMAND.
MODULE SCROLL_SORT.
LOOP AT ITAB.
MODULE UPDATE_ITAB.
ENDLOOP.
MODULE UPDATE_TABLE.
changed modules are ......
*& Module UPDATE_MOD INPUT
text
MODULE UPDATE_ITAB INPUT.
MODIFY TABLE ITAB FROM ITAB.
ENDMODULE. " UPDATE_MOD INPUT
*& Module TABL_UPD INPUT
text
MODULE UPDATE_TABLE INPUT.
CASE UPD_OK_CODE.
WHEN 'SAVE'.
UPDATE ZSD_TABL_ORDBANK FROM TABLE ITAB .
IF SY-SUBRC NE 0.
MESSAGE E003(ZQOTBANK) .
ENDIF.
ENDCASE.
ENDMODULE. " TABL_UPD INPUT
now i m able 2 get the latest edited values from user immediately i press enter button and getting saved by pressing SAVE button but further problems are, i have one dropdown button for status 1 field , and 1 date field are not getting updated .
So further help plz.
Maybe you are looking for
-
Grey screen in v9 using Windows 7 64 bit and Serious Error
Hi, Whenever I try to create or open an existing project, I get a grey screen with the menu bar at the top. The majority of the menu selections are disabled. I also frequently get an error message 'Sorry, a serious error has occurred that requires
-
New! Attachments - Upload files as part of a form submission
You can now add multiple file attachment fields to your forms to collect files from respondents. Almost all file formats are supported for upload including audio and video (executable and other such file types are not allowed). All files are virus s
-
Outgoing Mail is SLOW....
Hi, My mail program sends my email at a really really slow rate. Like almost a minute for it to be sent. Other mail programs work fast. I like the Mail App. I thought I had read there is something you can do or check to increase the outgoing speed of
-
Performing Live with Logic Pro - any tips?
Hello to everyone on this forum, I only recently joined, but have been using Logic ever since I learned to engineer my own music. I was wonderring if anyone here performing live with Logic? I have been using this programm since version 4 and ever so
-
FLA taking forever to save (and edit)
I've got a reasonably uncomplicated FLA file, a couple of megs, no audio, all vector art. It's a quiz, so there's some coding but nothing that would be considered intimidating by an intermediate Flash programmer. The only thing in any way remarkable