Problem in SCROLLING of TABLE CONTROL which is designed using WIZARD
Hello Friends ,
I have designed a entry screen by using table control with wizard. My table control layout has 11 rows. I have used all 3 facilities i.e. SCROLLING , INSERT/DELETE & SELECT/DESELECT by cheking ( ticking ) check boxes while designing table control with wizard.
Now i have 3 problems.
1> In my entry screen , if 11 entries are entered , they are displayed in entry screen and are saved correctly in DB.
But when i copy a file of suppose 15 entries into entry screen then it displays only 11 entries in entry screen and after that if i click/move VERTICAL SCROLL BAR to see remaining/next 4 entries then it does not display 12th 13th 14th &15th entry in entry screen. So the problem is i am unable to display remaining/next 4 entries in entry screen & also to save them DB.
2> At the same time when i click/move VERTICAL SCROLL BAR to see remaining/next 4 entries then earlier 11 entries are disappeared/ get cleared from entry screen.
3> The FIRST PAGE, PREVIOUS PAGE , NEXT PAGE , LAST PAGE and INSERT , DELETE push buttons are dispalyed in my entry screen . But they are not working or doing their opertions on table control though there is system generated code for them written in module pool program and PBO & PAI OF SCREEN 100 on which table control is present.
So eagerly waiting for POSITIVE replies & Correct solutions from all ABAP techies.
THANKS & REGARDS,
Ashish.
Hi friend,
I have visited the link u have given . But it is a report program .it is available in ABAPDOCU tcode.
ABAPDOCU----
>ABAP User Dialogs -
>Screens -
>Complex Screen Elements -
>Table Control with Scrolling .
It is a REPORT program. and not a module pool program. plz check this in ur link also.
REPORT demo_dynpro_tabcont_loop. &
*SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.* -
> this statement is used only in report program and system does not allow us to use in module pool program.
Second thing here data is retrived from spfli table where as my data will be whatever enduser enters it may be 15 lines , may be 50 lines or may be 200 lines and it shold be displayed on entry screen before clicking SAVE or any other user action.
My main problem is that I am unable to enter more than 11 entries in my entry screen. I want dynaamic table. Mean whichever enteries are entered they should be displayed on entry screen as well as can be scrolled up & down before saving and get saved after clicking SAVE button. here table control design is not imp because entry data depends on table control layout rows & which has limit. It can not be extended beyond certain level. i think max will be 20 Or 25 rows in layout. How to make it dynamic so that we can get any no. of entries in entry screen hiich canbe scrolled up & down.
Anyways thanks for ur reply And send some other soln.
Thanks & regards,
Ashish
Similar Messages
-
How to control manually the scrolling of Table Control?
Hi,
I have one selection screen which takes me to the next screen (Screen 2) having a table control.In this screen I have some buttons like display, change etc ,by clicking on which it goes to the third screen.Now my problem is even when I try to vertically scroll this table control it is taking me to the third screen which I do not want to happen. Could anyone please help me in this.
Thanks in advance.In PBO write the following code for scrolling
*& Module set_lines OUTPUT
text
MODULE SET_LINES OUTPUT.
DATA VLINES TYPE I.
DESCRIBE TABLE ITABCTL LINES VLINES.
TABCTL-LINES = VLINES + 1.
ENDMODULE. " set_lines OUTPUT
This is code for vertical scrollin..
Howevr check ur ok-codes..
Hope dis helps...
reward if it does.. -
How to manage scrolling in Table Control
Hi,
I have one scenario in which i have one table control in that one column contains check boxes. After i check, some check boxes in some rows and press scrolling button means the selection previously made goes off. I want the selection remains selected.
Please any one suggest me how to manage this.
Regards,
Mithun.Your PAI flow logic should be following this type of structure:
process after input.
module at_exit_command at exit-command. "don't exit here if you want TC data changes
module d9999_before_tc.
loop with control tc_9999.
chain.
field:
gs_9999_tc-sel,
gs_9999_tc-checkbox.
module d9999_line_tc_handler. "hold onto TC row data in here
endchain.
endloop.
module d9999_user_command.
module d9999_pai_scroll. "scroll the table control
As noted above, you need to catch the values of your checkboxes within the loop / endloop for the table control, and do any scrolling after this.
Jonathan -
Unable get the table scroll for table control
hai
i unable get horizontal scrolling for table control when the output is dislayed
help me
very urgentHi,
check out the sample program it might help you
See the following simple ex
*& Module pool ZTEST_TBLCTRL
PROGRAM ZTEST_TBLCTRL.
***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'TC1'
*&SPWIZARD: DEFINITION OF DDIC-TABLE
TABLES: ZFG_SRNO, ZFIH0004.
*&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'TC1'
*TYPES: BEGIN OF T_TC1,
ZSRNO LIKE ZFG_SRNO-ZSRNO,
SCRNAME LIKE ZFIH0004-SCRNAME,
END OF T_TC1.
*TYPES: BEGIN OF T_TC1.
STRUCTURE ZFG_SRNO.
END OF T_TC1.
*&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'TC1'
*DATA: G_TC1_ITAB TYPE T_TC1 OCCURS 0 WITH HEADER LINE,
G_TC1_WA TYPE T_TC1. "work area
DATA: G_TC1_ITAB LIKE ZFG_SRNO OCCURS 0 WITH HEADER LINE,
G_TC1_WA LIKE G_TC1_ITAB. "work area
DATA: G_TC1_COPIED. "copy flag
*&SPWIZARD: DECLARATION OF TABLECONTROL 'TC1' ITSELF
CONTROLS: TC1 TYPE TABLEVIEW USING SCREEN 0100.
*&SPWIZARD: LINES OF TABLECONTROL 'TC1'
DATA: G_TC1_LINES LIKE SY-LOOPC.
DATA: OK_CODE LIKE SY-UCOMM,
S_CODE LIKE SY-UCOMM,
MARK.
DATA: T1(10).
*&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: COPY DDIC-TABLE TO ITAB
MODULE TC1_INIT OUTPUT.
IF G_TC1_COPIED IS INITIAL.
*&SPWIZARD: COPY DDIC-TABLE 'ZFG_SRNO'
*&SPWIZARD: INTO INTERNAL TABLE 'g_TC1_itab'
SELECT * FROM ZFG_SRNO
INTO CORRESPONDING FIELDS
OF TABLE G_TC1_ITAB.
G_TC1_COPIED = 'X'.
REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
IF T1 <> SPACE.
G_TC1_ITAB-ZSRNO = T1.
CLEAR T1.
APPEND G_TC1_ITAB.
REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
ENDIF.
*TC1-TOP_LINE = 1.
ENDIF.
ENDMODULE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MOVE ITAB TO DYNPRO
MODULE TC1_MOVE OUTPUT.
MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
if sy-subrc ne 0.
*append G_TC1_WA to G_TC1_ITAB.
*endif.
READ TABLE G_TC1_ITAB INDEX TC1-CURRENT_LINE.
IF SY-SUBRC = 0.
G_TC1_WA-ZSRNO = G_TC1_ITAB-ZSRNO.
ENDIF.
MOVE-CORRESPONDING G_TC1_ITAB TO ZFG_SRNO.
REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
*******Below line is the logic for scrolling.
tc1-lines = G_TC1_LINES + 100.
ENDMODULE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GET LINES OF TABLECONTROL
MODULE TC1_GET_LINES OUTPUT.
G_TC1_LINES = SY-LOOPC.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MODIFY TABLE
MODULE TC1_MODIFY INPUT.
*break-point.
MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_ITAB.
MODIFY G_TC1_ITAB INDEX TC1-CURRENT_LINE.
G_TC1_COPIED = 'X'.
REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_WA.
MODIFY G_TC1_ITAB
FROM G_TC1_WA
INDEX TC1-CURRENT_LINE.
G_TC1_COPIED = 'X'.
if sy-subrc ne 0.
append G_TC1_WA to G_TC1_ITAB.
endif.
*modify G_TC1_ITAB INDEX TC1-CURRENT_LINE.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: PROCESS USER COMMAND
MODULE TC1_USER_COMMAND INPUT.
OK_CODE = SY-UCOMM.
PERFORM USER_OK_TC USING 'TC1'
'G_TC1_ITAB'
'FLAG'
CHANGING OK_CODE.
SY-UCOMM = OK_CODE.
ENDMODULE.
INCLUDE TABLECONTROL_FORMS *
*& Form USER_OK_TC *
FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME
CHANGING P_OK LIKE SY-UCOMM.
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA: L_OK TYPE SY-UCOMM,
L_OFFSET TYPE I.
&SPWIZARD: END OF LOCAL DATA----
*&SPWIZARD: Table control specific operations *
*&SPWIZARD: evaluate TC name and operations *
SEARCH P_OK FOR P_TC_NAME.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
L_OFFSET = STRLEN( P_TC_NAME ) + 1.
L_OK = P_OK+L_OFFSET.
*&SPWIZARD: execute general and TC specific operations *
CASE L_OK.
WHEN 'INSR'. "insert row
PERFORM FCODE_INSERT_ROW USING P_TC_NAME
P_TABLE_NAME.
CLEAR P_OK.
WHEN 'DELE'. "delete row
PERFORM FCODE_DELETE_ROW USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
CLEAR P_OK.
WHEN 'P--' OR "top of list
'P-' OR "previous page
'P+' OR "next page
'P++'. "bottom of list
PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
L_OK.
CLEAR P_OK.
WHEN 'L--'. "total left
PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
WHEN 'L-'. "column left
PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
WHEN 'R+'. "column right
PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
WHEN 'R++'. "total right
PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
WHEN 'MARK'. "mark all filled lines
PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
WHEN 'DMRK'. "demark all filled lines
PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
WHEN 'SASCEND' OR
'SDESCEND'. "sort column
PERFORM FCODE_SORT_TC USING P_TC_NAME
l_ok.
ENDCASE.
ENDFORM. " USER_OK_TC
*& Form FCODE_INSERT_ROW *
FORM fcode_insert_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_LINES_NAME LIKE FELD-NAME.
DATA L_SELLINE LIKE SY-STEPL.
DATA L_LASTLINE TYPE I.
DATA L_LINE TYPE I.
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
ASSIGN (L_LINES_NAME) TO <LINES>.
*&SPWIZARD: get current line *
GET CURSOR LINE L_SELLINE.
IF SY-SUBRC <> 0. " append line to table
L_SELLINE = <TC>-LINES + 1.
*&SPWIZARD: set top line *
IF L_SELLINE > <LINES>.
<TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
ELSE.
<TC>-TOP_LINE = 1.
ENDIF.
ELSE. " insert line into table
L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
ENDIF.
*&SPWIZARD: set new cursor line *
L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
<TC>-LINES = <TC>-LINES + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE L_LINE.
ENDFORM. " FCODE_INSERT_ROW
*& Form FCODE_DELETE_ROW *
FORM fcode_delete_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: delete marked lines *
DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
IF <MARK_FIELD> = 'X'.
DELETE <TABLE> INDEX SYST-TABIX.
IF SY-SUBRC = 0.
<TC>-LINES = <TC>-LINES - 1.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " FCODE_DELETE_ROW
*& Form COMPUTE_SCROLLING_IN_TC
text
-->P_TC_NAME name of tablecontrol
-->P_OK ok code
FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
P_OK.
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TC_NEW_TOP_LINE TYPE I.
DATA L_TC_NAME LIKE FELD-NAME.
DATA L_TC_LINES_NAME LIKE FELD-NAME.
DATA L_TC_FIELD_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
ASSIGN (L_TC_LINES_NAME) TO <LINES>.
*&SPWIZARD: is no line filled? *
IF <TC>-LINES = 0.
*&SPWIZARD: yes, ... *
L_TC_NEW_TOP_LINE = 1.
ELSE.
*&SPWIZARD: no, ... *
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
ENTRY_ACT = <TC>-TOP_LINE
ENTRY_FROM = 1
ENTRY_TO = <TC>-LINES
LAST_PAGE_FULL = 'X'
LOOPS = <LINES>
OK_CODE = P_OK
OVERLAPPING = 'X'
IMPORTING
ENTRY_NEW = L_TC_NEW_TOP_LINE
EXCEPTIONS
NO_ENTRY_OR_PAGE_ACT = 01
NO_ENTRY_TO = 02
NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 0.
ENDIF.
*&SPWIZARD: get actual tc and column *
GET CURSOR FIELD L_TC_FIELD_NAME
AREA L_TC_NAME.
IF SYST-SUBRC = 0.
IF L_TC_NAME = P_TC_NAME.
*&SPWIZARD: et actual column *
SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
ENDIF.
ENDIF.
*&SPWIZARD: set the new top line *
<TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
ENDFORM. " COMPUTE_SCROLLING_IN_TC
*& Form FCODE_TC_MARK_LINES
marks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
&SPWIZARD: EGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: mark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = 'X'.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Form FCODE_TC_DEMARK_LINES
demarks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: demark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = SPACE.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Module D20XX_INIT OUTPUT
text
MODULE D20XX_INIT OUTPUT.
*if screen-name = 'ZSRNO'.
SCREEN-INPUT = 0.
SCREEN-COLOR = 0.
MODIFY SCREEN.
endif.
ENDMODULE. " D20XX_INIT OUTPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
*CLEAR R1_REF.
DO 30 TIMES.
APPEND G_TC1_ITAB.
ENDDO.
DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module TAB1_INIT OUTPUT
text
MODULE TAB1_INIT OUTPUT.
ENDMODULE. " TAB1_INIT OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module MESSAGE INPUT
text
MODULE MESSAGE INPUT.
OK_CODE = SY-UCOMM.
S_CODE = OK_CODE.
CLEAR OK_CODE.
if S_CODE = 'DELE'.
loop at G_TC1_ITAB.
if G_TC1_ITAB-scrname = 'X'.
delete g_tc1_itab.
endif.
endloop.
ELSEIF S_CODE = 'SAVE'.
G_TC1_WA-ZSRNO = T1.
MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
ENDIF.
ENDMODULE. " MESSAGE INPUT
*& Module DELETE_RECORD INPUT
text
MODULE DELETE_RECORD INPUT.
IF MARK = 'X' AND S_CODE = 'DELE'.
DELETE TABLE G_TC1_ITAB FROM ZFG_SRNO.
DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
ENDIF.
ENDMODULE. " DELETE_RECORD INPUT
*********************Screen modules*********************
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC1'
MODULE TC1_INIT.
*&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
LOOP AT G_TC1_ITAB
INTO G_TC1_WA
WITH CONTROL TC1
CURSOR TC1-CURRENT_LINE.
*&SPWIZARD: MODULE TC1_CHANGE_FIELD_ATTR
MODULE TC1_MOVE.
MODULE TAB1_INIT.
MODULE TC1_GET_LINES.
ENDLOOP.
MODULE D20XX_INIT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC1'
*BREAK POINT.
LOOP AT G_TC1_ITAB.
CHAIN.
FIELD ZFG_SRNO-ZSRNO.
MODULE TC1_MODIFY ON CHAIN-REQUEST.
MODULE TC1_MODIFY.
ENDCHAIN.
MODULE MESSAGE .
MODULE DELETE_RECORD.
ENDLOOP.
MODULE TC1_USER_COMMAND.
*&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
MODULE USER_COMMAND_0100.
please check out the link below for more information it might help you
http://help.sap.com/saphelp_sm32/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c7b454211d189710000e8322d00/content.htm
http://www.sapbrainsonline.com/REFERENCES/ABAP_SYNTAX/SAP_ABAP_SYNTAX.html
*********please reward points if the information is helpful to you************* -
Screen with table control which works like SM30
Hello,
I have a screen with some parameters in order to obtain some records from
a custom table. In the same screen I must insert a table control which
shows the extracted records.
This table control has to work exactly like transaction SM30, that is the
user can modify, insert, delete or copy a record.
Does anybody know if exists a way (or method) to include this transaction
in the table control ? Or I have to use custom control to obtain this ?
N.B. the user wants a screen with parameter and table control (or custom control)
and not a call function to transaction sm30.
I thank you in advance. Paolo.Hi Rob,
thanks for your interest; no it's not a reason of authorization, but simply
the user wants to modify a report that actually works with some parameters
at the top of the screen and a customer control which shows an Alv_grid
with the extracted record;
Now the user needs to modify this records (insert and delete) directly from
this list. So I don't know if there's a way to obtain this goal without replace
the custom control with a table control.
The screen look like this:
Param.1 XXXXXXX
Param.2 XXXXXXXXXXXX
Custom Contr. with ALV_grid (for extracted record)
Regards.
Paolo. -
How to make table control rows dynamic/unlimited using TC with Wizard
Hi Friends ,
I have designed a table control layout using table control with wizard.
Now the problem is when we design a TC layout ,then we have to design it on the page . The page has upper & lower limits. so the maximum size & maximum rows in layout is limited. I have tried to create a TC layout with maximum size & maximum rows . Maximum rows created in Layout is 25.
Now suppose if enduser wants 100 entries to enter by coping a file of 100 records in my TC present on entry screen , then ONLY 25 entries are displayed on entry scren before doing any user action or saving and after saving only these 25 entries are sved in DB. Means enrtries from 26 to 100 are not displayed on entry screen or saved in DB.
So my requirement is to display all 100 entries at a time in entry screen before saving with scrolling up & down facility and these 100 entries should also get saved in DB after clicking save button. In short I want dynamic entry screen table control which can show/dieplay Any Number . of entries whatever the number may be entered by enduser .
Plz note that I have used all 3 facilliteis i.e.
1. Scrolling
2. INSERT/DELETE
3. SELECT/DESELECT
while designing TC with wizard .
Scrolling buttons like FIRST PAGE, PREV. PAGE, NEXT PAGE, LAST PAGE are displayed.
BUT they are not functioning though there is system generated code present in both MPP and in PBO & PAI. After clicking any of them , data which is dislaying on entry screen ( Here it is 25 entries ) is getting cleared/disappeared from enry entry screen.
Waiting for ur response & solutions.
Thanks & Regards,
SudhirHi Ashish ,
Do one thing .
At PAI of screen holding TC , there is module name tc_mark on request .
in this module , there is work area declared g_tc_wa .
Now go to tc_init module of pbo , where u have given your select command .
select * from ........................................
use this code .
if g_tc_wa is initial .
SELECT * FROm
g_tc_wa = 'X'.
REFRESH CONTROL 'TC' FROM SCREEN dynnr.
ENDIF.
Just do this , m sure all buttons, insert, delete , scroll bar.. everything will work . -
I see that you can control which form is used based on security roles, but can you control it based on other field values? I'd like a new record to use a different form until a given status is updated. I have a status of draft and active. So
it would be nice if I could use form1 for those in draft, form2 for those that are active. But I only see where you can control that via the security roles.
I can code all of this via JavaScript, but having the ability to use two separate forms would be nice. Is that even possible.
Best regards,
Jon Gregory RothlanderHello,
Recheck following article - http://gonzaloruizcrm.blogspot.com/2014/11/avoiding-form-reload-when-switching-crm.html
Dynamics CRM MVP/ Technical Evangelist at SlickData LLC
My blog -
Problem with Vertical scroll in table control
Dear All,
I am facing a problem with table control in module pool program. currently it displays 6 lines, but it does not display the vertical scroll button, even though when I fill data in the six rows and hit enter.
I have set the vertical scroll option on the table control properties also.
Can someone help me by sending some sample code?
Thanks,
Amit GoyalHI Amit ,
If you have already selected the properties of vertical and horizontal scroll bar then no other operations needed .. if the number of rows increases then that of the table control , you will automatically see the Vertical scroll in your table control ..
if still you dont see it then write back ..
Reward if helpful !
Thanks
Ranjita -
Error in Vertical Scrolling of Table Control
Hi All,
I make Table control using wizard for internal table which I declare in TOP include.
But my Vertical Scrolling is not working.
Would appreciate your reply .
Regards,
PoojaHi pooja ,
When you will fill the entries till the bottom , scroll will appear .
don't worry about it
Regards
Yogendra Bhaskar -
Problem while saveing in Table Control.
Hi
I am geting error while saving data in table control.
This table contol is pop up window at end of screen .
user enter qty & uom in TC..
Error i am getting is...
Field symbol has not been assigned.
Error analysis
The system tried to access an anasigned field symbol (data segment
number 32772).
The field symbol is no longer assigned, because a Unicode program
previously tried to set the field symbol using an ASSIGN statement with
an offset/length declaration. The memory addressed in this offset/length
declaration, however, no longer lay within the valid range.
Information on where terminated
The termination occurred in the ABAP program "SAPLOMCV" in
"CONVERSION_EXIT_MATN1_INPUT".
i Have coded like this..
MODULE USER_COMMAND_0112 INPUT.
CASE OKCODE.
WHEN 'BACK' or 'CANCEL'.
SET SCREEN 0.
This iti is contain data which diplay in TC
when 'DISPLAY'.
LOOP AT ITI.
read table iti with key ingr_code = iti-ingr_code
ingr_desc = iti-ingr_desc.
wka1-ingr_code = iti-ingr_code.
wka1-ingr_desc = iti-ingr_desc.
wka1-conc = iti-conc.
wka1-quantity = iti-quantity.
wka1-uom = iti-uom.
append wka1 to itf.
ENDLOOP.
WHEN 'SAV'.
loop at itf where check = 'x' .
update zacg_ns
set ingr_code = itf-ingr_code
col_name = itf-ingr_desc
conc = itf-conc
quantity = itf-quantity
UOM = itf-UOM
ru = itf-ru
where ingr_code = itf-ingr_code
and col_name = itf-ingr_desc.
zacg_ns-ingr_code = itf-ingr_code.
zacg_ns-col_name = itf-ingr_desc.
zacg_ns-conc = itf-conc.
zacg_ns-quantity = itf-quantity.
zacg_ns-UOM = itf-UOM.
update zacg_ns.
endloop.
leave program.
ENDCASE.
ENDMODULE. " USER_COMMAND_0112 INPUT
MODULE read_table_control INPUT
MODULE read_table_control INPUT.
MODIFY itf INDEX tc-current_line.
ENDMODULE. "read_table_control INPUT
*& Include ZACG_NS_2 *
*& Module STATUS_0111 OUTPUT
text
MODULE STATUS_0111 OUTPUT.
SET PF-STATUS 'ZNEWSHADE'.
SET TITLEBAR 'ZNS'.
ENDMODULE. " STATUS_0111 OUTPUT
*& Module STATUS_0112 OUTPUT
text
MODULE STATUS_0112 OUTPUT.
SET PF-STATUS 'ZTC'.
SET TITLEBAR 'xxx'.
DESCRIBE TABLE itf LINES lines.
tc-lines = lines.
ENDMODULE. " STATUS_0112 OUTPUt
PROCESS BEFORE OUTPUT.
MODULE STATUS_0112.
LOOP at itf WITH CONTROL TC CURSOR tc-current_line.
MODULE TC_PBO .
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP at itf .
module read_table_control.
ENDLOOP.
MODULE USER_COMMAND_0112.
Can any one help me..Hi,
Did you enter that filed later after creating the table control?
You check in the element list whether for that element u have an entry or not..
Regards,
Nishant -
Problem in the BDC Table Control for the T.Code VA01
Hi,
I faced probelm in the BDC of the VA01. In the Table Control
the records are entered upto 12 line items. after 13th line item overwrites the first record. How to solve the Problem.
Please help me.or use this
Internal table definition *
data : begin of bdcdata occurs 0.
include structure bdcdata.
data : end of bdcdata.
data: begin of messtab occurs 0.
include structure bdcmsgcoll.
data: end of messtab.
data: v_chr_opengrp type c,
r_matnr like mara-matnr, "variable for material conversion
r_werks like marc-werks, "variable for plant
v_str_fname type string.
data: begin of count2,
inrec(9) type n, " input I_MATERIAL count
create(9) type n, " create count
error(9) type n, " error count
bdc(9) type n, " count of BDC creates
end of count2.
types: begin of ty_source,
partn_numb(10) type n ,"Customer Number 1
ref(035),
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
material like vbap-matnr,
reqqty(018),
reqdate(010),
end of ty_source,
begin of ty_header ,
partn_numb(10) ,"Customer Number 1
ref(035),
sales_org(4) , "Sales Organization
distr_chan(2) , "Distribution Channel
division(002), "DIVISION
doc_type(4) , "Sales Document Type
purch_no(020), "Purchase order
end of ty_header,
begin of ty_item,
partn_numb(10) ,"Customer Number 1
ref(035),
material like vbap-matnr,
reqqty(018),
reqdate(010),
end of ty_item.
data : msg(240) type c, " Return Message
e_rec(8) type c, " Error Records Counter
rec_no(8) type c, " Records Number Indicator
s_rec(8) type c, " Successful Records Counter
t_rec(8) type c, " Total Records Counter
v_matnr like mara-matnr.
data: val(2) type n value 01.
data : begin of bdc_itab occurs 0.
include structure bdcdata.
data : end of bdc_itab.
data : t_source type standard table of ty_source with header line,
t_header type standard table of ty_header initial size 1,
t_item type standard table of ty_item initial size 1,
t_target type standard table of bdcdata initial size 1.
data : w_source type ty_source,
w_source1 type ty_source,
w_header type ty_header,
w_item type ty_item,
w_target type bdcdata,
count type i,
count1 type n.
Variable Declaration
data: w_fname type string,
fnam(20),
date1(10),
i(2) type n,
v_count type i,
v_group type apqi-groupid.
*& selection screen
selection-screen :begin of block bl1 with frame title text-001.
parameters : p_fname type rlgrap-filename, "Input file
p_update(1) default 'N', "Input for update mode
p_bdcgrp(12) default 'SD_ORDERS'. "Input for session name
selection-screen end of block bl1.
**&SELECTION SCREEN VALIDATIONS
at selection-screen on value-request for p_fname.
call function 'KD_GET_FILENAME_ON_F4'
exporting
program_name = 'ZMATERIAL'
dynpro_number = '1000'
field_name = 'P_FNAME'
changing
file_name = p_fname.
*& Start of selection
start-of-selection.
if p_fname is initial.
message i016(rp) with 'Please enter a file name'.
leave list-processing.
else.
move p_fname to v_str_fname.
endif.
call function 'GUI_UPLOAD'
exporting
filetype = 'ASC'
filename = v_str_fname
has_field_separator = 'X'
tables
data_tab = t_source
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
sort t_source by ref partn_numb.
loop at t_source into w_source.
add 1 to count2-inrec.
w_source1 = w_source.
AT NEW PARTN_NUMB. "10/31 KVB
at new ref.
w_header-doc_type = w_source1-doc_type..
w_header-sales_org = w_source1-sales_org . "'0001'
w_header-distr_chan = w_source1-distr_chan. "'01'
w_header-division = w_source1-division. " '01'
w_header-purch_no = w_source1-purch_no.
w_header-partn_numb = w_source1-partn_numb.
w_header-ref = w_source1-ref.
append w_header to t_header.
endat.
w_item-partn_numb = w_source1-partn_numb.
w_item-material = w_source1-material.
w_item-reqqty = w_source1-reqqty.
w_item-ref = w_source1-ref.
w_item-reqdate = w_source1-reqdate.
append w_item to t_item.
clear :w_item,w_header.
endloop.
loop at t_header into w_header.
perform bdc_dynpro using 'SAPMV45A' '0101' .
perform bdc_field using 'BDC_CURSOR' 'VBAK-SPART'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'VBAK-AUART' w_header-doc_type.
perform bdc_field using 'VBAK-VKORG' w_header-sales_org.
perform bdc_field using 'VBAK-VTWEG' w_header-distr_chan.
perform bdc_field using 'VBAK-SPART' w_header-division.
perform bdc_dynpro using 'SAPMV45A' '4001' .
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BDC_CURSOR' 'VBKD-BSTKD'.
perform bdc_field using 'VBKD-BSTKD' w_header-purch_no.
perform bdc_field using 'KUWEV-KUNNR' w_header-partn_numb.
i = 1.
loop at t_item into w_item where partn_numb = w_header-partn_numb
and ref = w_header-ref.
at new partn_numb.
clear count1.
count = 0.
endat.
count = count + 1.
if count gt 5.
clear i.
i = 2.
perform bdc_dynpro using 'SAPMV45A' '4001' .
perform bdc_field using 'BDC_OKCODE' '=POAN'.
endif.
count1 = count1 + 1.
concatenate 'VBAP-POSNR(' i ')' into fnam.
perform bdc_field using fnam
count1.
concatenate 'RV45A-MABNR(' i ')' into fnam.
perform bdc_field using fnam w_item-material.
concatenate 'RV45A-KWMENG(' i ')' into fnam.
perform bdc_field using fnam w_item-reqqty..
concatenate 'RV45A-ETDAT(' i ')' into fnam.
perform bdc_field using fnam w_item-reqdate.
concatenate 'VBKD-BSTKD_E(' i ')' into fnam.
perform bdc_field using fnam w_item-ref.
i = i + 1.
clear: w_item.
endloop.
clear w_header.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform post_transaction.
refresh bdc_itab.
clear bdc_itab.
endloop.
*endloop.
end-of-selection.
perform finalization.
Start new screen *
form bdc_dynpro using program dynpro.
clear bdc_itab.
bdc_itab-program = program.
bdc_itab-dynpro = dynpro.
bdc_itab-dynbegin = 'X'.
append bdc_itab.
endform. "bdc_dynpro
Insert field *
form bdc_field using fnam fval.
if fval <> ''.
clear bdc_itab.
bdc_itab-fnam = fnam.
bdc_itab-fval = fval.
append bdc_itab.
endif.
endform. "bdc_field
**& Form get_filename
text
--> p1 text
<-- p2 text
*form get_filename .
*call function 'WS_FILENAME_GET'
exporting
def_filename = space
def_path = file
mask = ',.,..'
mode = 'N'
title = text-015
importing
filename = file
exceptions
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
others = 5.
*endform. " get_filename
*& Form post_transaction
text
--> p1 text
<-- p2 text
form post_transaction .
refresh messtab.
clear messtab.
call transaction 'VA01' using bdc_itab
mode p_update
update 'S'
messages into messtab.
read table messtab with key msgtyp = 'E'.
if sy-subrc eq 0.
perform process_error_messages.
add 1 to count2-bdc.
if v_chr_opengrp is initial.
perform bdc_open_group.
endif.
call function 'BDC_INSERT'
exporting
tcode = 'VA01'
tables
dynprotab = bdc_itab
exceptions
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
others = 5.
if sy-subrc <> 0.
case sy-subrc.
when 1.
write: / 'Internal error'.
when 2.
write: / 'Not open error'.
when 3.
write: / 'queue error'.
when 4.
write: / 'tcode invalid error'.
when others.
write: / 'other error'.
endcase.
endif.
else.
add +1 to count2-create.
format intensified off.
format color col_normal.
format color col_normal off.
endif.
clear bdc_itab.
refresh bdc_itab.
endform. " post_transaction
*& Form finalization
text
--> p1 text
<-- p2 text
form finalization .
if v_chr_opengrp = 'X'.
call function 'BDC_CLOSE_GROUP'
exceptions
not_open = 1
queue_error = 2
others = 3.
endif.
get time.
skip 2.
write: / 'Time', sy-uzeit.
skip.
format color col_total on.
write: / 'Total Records: ', 40 count2-inrec.
write: / 'PERNR not of Emp Group 6 ', 40 count2-error.
write: / 'Records Created: ', 40 count2-create.
write: / 'BDC Create in group: ', 40 count2-bdc.
if v_chr_opengrp = 'X'.
skip 1.
format intensified on.
format color col_negative on.
write: / 'PLEASE USE TRANSACTION "SM35" ',
'TO PROCESS THE GENERATED BDC SESSION ... ',
p_bdcgrp.
endif.
endform. " finalization
*& Form bdc_open_group
text
--> p1 text
<-- p2 text
form bdc_open_group .
call function 'BDC_OPEN_GROUP'
exporting
client = sy-mandt
group = p_bdcgrp
holddate = sy-datum
keep = 'X'
user = sy-uname
exceptions
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
others = 11.
if sy-subrc eq 0.
v_chr_opengrp = 'X'.
endif.
endform. " bdc_open_group
*& Form process_error_messages
text
--> p1 text
<-- p2 text
form process_error_messages .
data: begin of loc_aux_message.
include structure message.
data: end of loc_aux_message.
data : msgno type sy-msgno.
loop at messtab.
move messtab-msgnr to msgno.
call function 'WRITE_MESSAGE'
exporting
msgid = messtab-msgid
msgno = msgno
msgty = messtab-msgtyp
msgv1 = messtab-msgv1
msgv2 = messtab-msgv2
msgv3 = messtab-msgv3
msgv4 = messtab-msgv4
importing
messg = loc_aux_message
exceptions
others = 1.
if sy-subrc eq 0.
format color col_negative on.
write: /10 loc_aux_message.
format color col_negative off.
else.
format color col_negative on.
write: /10 t_source-partn_numb.
write: / 'Error creating message'.
format color col_negative off.
exit.
endif.
endloop.
endform. " process_error_messages -
Problem in bdc for table control for line items
Hi experts,
I am runnig a bdc for ME52.
i am just entering PR number, in the second screen i have got all the line items. I need to select these line item 10 and double click or hit enter, it takes me to screen 3, there im just checking a checkbox and saving.
Again i need to select the line item 20 and double click or hit enter. again the same process.
Again repeat for all the line items.
But my problem is it is updating everytime for only line item 10. for line item 20 and others it say "no chnge in the data".
I am pasting my code here. please check and revert me back .plz.
DATA: w_output LIKE LINE OF i_output.
REFRESH I_ITAB[].
SELECT * FROM EBAN
INTO TABLE i_itab
WHERE banfn in s_banfn AND
bsart in s_bsart AND
bstyp in s_bstyp AND
matnr in s_matnr AND
werks in s_werks AND
lfdat in s_lfdat AND
pstyp in s_pstyp AND
knttp in s_knttp AND
estkz in s_estkz AND
loekz eq ' '.
IF sy-subrc = 0.
CLEAR: w_itab,
i_poitab[].
SORT i_itab by banfn.
LOOP AT i_itab INTO w_itab where menge GT eban-bsmng.
IF p_close = 'X' AND p_rep = 'X'.
IF w_itab-ebakz = 'X'.
w_itab-ebakz = ' '.
APPEND w_itab to i_poitab.
ENDIF.
ELSEIF p_open = 'X' AND p_rep = 'X'.
IF w_itab-ebakz = ' '.
w_itab-ebakz = 'X'.
APPEND w_itab to i_poitab.
ENDIF.
ELSEIF p_close = 'X' AND p_repw = 'X'.
IF w_itab-ebakz = ' '.
APPEND w_itab to i_poitab.
ENDIF.
ELSEIF p_open = 'X' AND p_repw = 'X'.
IF w_itab-ebakz = 'X'.
APPEND w_itab to i_poitab.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT i_poitab into w_output.
APPEND w_output to i_output.
PERFORM CALL_BDC.
endloop.
IF p_rep = 'X'.
PERFORM CALL_BDC.
ENDIF.
ENDFORM. " GET_DATA
*& Form CALL_BDC
text
--> p1 text
<-- p2 text
FORM CALL_BDC.
DATA: seltab(5) TYPE N,
seltab1(2) TYPE N,
tempvar(30) TYPE N,
cnt TYPE N.
LOOP AT i_output.
clear: seltab,
seltab1.
seltab = i_output-bnfpo.
seltab1 = seltab+2(2).
perform bdc_dynpro using 'SAPMM06B' '0105'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-BANFN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-BANFN'
i_output-banfn.
perform bdc_dynpro using 'SAPMM06B' '0106'.
clear tempvar.
*cnt = 1.
concatenate 'EBAN-BNFPO(' seltab1 ')' into tempvar.
perform bdc_field using 'BDC_CURSOR'
'EBAN-BNFPO(seltab1)'.
tempvar.
perform bdc_field using 'BDC_OKCODE'
'=DETA'.
perform bdc_field using 'RM06B-BNFPO'
i_output-bnfpo.
perform bdc_field using 'RM06B-TCSELFLAG(seltab1)'
'X'.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-EBAKZ'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'EBAN-EBAKZ'
i_output-ebakz.
CALL TRANSACTION 'ME52' USING bdc_data MODE 'A'
MESSAGES INTO i_bdcmsg.
COMMIT WORK AND WAIT.
ENDLOOP.
ENDFORM. " CALL_BDC
*& Form bdc_dynpro
text
-->P_0686 text
-->P_0687 text
FORM bdc_dynpro USING program dynpro.
CLEAR bdc_data.
bdc_data-program = program.
bdc_data-dynpro = dynpro.
bdc_data-dynbegin = 'X'.
APPEND bdc_data.
CLEAR bdc_data.
ENDFORM.
thanks,
NLooks like table control logic is wrong -- do compare with below program...
only table contril area
REPORT ZPadmam
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0,
i1 TYPE i,
lifnr LIKE rf02k-lifnr,
bukrs LIKE rf02k-bukrs,
ekorg LIKE rf02k-ekorg,
ktokk LIKE rf02k-ktokk,
anred LIKE lfa1-anred,
name1 LIKE lfa1-name1,
sortl LIKE lfa1-sortl,
land1 LIKE lfa1-land1,
akont LIKE lfb1-akont,
fdgrv LIKE lfb1-fdgrv,
waers LIKE lfm1-waers,
END OF itab.
DATA : BEGIN OF jtab OCCURS 0,
j1 TYPE i,
banks LIKE lfbk-banks,
bankl LIKE lfbk-bankl,
bankn LIKE lfbk-bankn,
END OF jtab.
DATA : cnt(4) TYPE n.
DATA : fdt(20) TYPE c.
DATA : c TYPE i.
INCLUDE bdcrecx1.
START-OF-SELECTION.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\first1.txt'
filetype = 'DAT'
TABLES
data_tab = itab.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\second.txt'
filetype = 'DAT'
TABLES
data_tab = jtab.
LOOP AT itab.
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
itab-lifnr.
PERFORM bdc_field USING 'RF02K-BUKRS'
itab-bukrs.
PERFORM bdc_field USING 'RF02K-EKORG'
itab-ekorg.
PERFORM bdc_field USING 'RF02K-KTOKK'
itab-ktokk.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-LAND1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFA1-ANRED'
itab-anred.
PERFORM bdc_field USING 'LFA1-NAME1'
itab-name1.
PERFORM bdc_field USING 'LFA1-SORTL'
itab-sortl.
PERFORM bdc_field USING 'LFA1-LAND1'
itab-land1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
cnt = 0.
LOOP AT jtab WHERE j1 = itab-i1.
cnt = cnt + 1.
CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-banks.
CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankl.
CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankn.
IF cnt = 5.
cnt = 0.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
ENDIF.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-FDGRV'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFB1-AKONT'
itab-akont.
PERFORM bdc_field USING 'LFB1-FDGRV'
itab-fdgrv.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNA'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-WAERS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFM1-WAERS'
itab-waers.
PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-LIFNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'XK01'.
ENDLOOP.
PERFORM close_group.
Thanks
Seshu -
Problems with scrolling and Mission Control
I have this problem:
When scrolling down any page, the letters will blur at the top of the screen and not the bottom.
When swiping acrross pages in the launchpad, it occasionaly freezes half way between the two.
When I swipe up with four fingers to access mission control, the screen becomes very sluggish. Swiping back down (or clicking a tab) is even worse, causing slow "laggy" animations.
And this the report from EtreCheck:
Hardware Information:
MacBook Pro (13-inch, Mid 2012)
MacBook Pro - model: MacBookPro9,2
1 2.5 GHz Intel Core i5 CPU: 2 cores
4 GB RAM
Video Information:
Intel HD Graphics 4000 - VRAM: 1024 MB
System Software:
OS X 10.9.2 (13C1021) - Uptime: 0 days 0:3:16
Disk Information:
APPLE HDD HTS545050A7E362 disk0 : (500.11 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) / [Startup]: 499.25 GB (309.44 GB free)
HL-DT-ST DVDRW GS41N
USB Information:
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Apple Inc. BRCM20702 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. FaceTime HD Camera (Built-in)
FireWire Information:
Thunderbolt Information:
Apple Inc. thunderbolt_bus
Configuration files:
/etc/hosts - Count: 1
Launch Daemons:
[loaded] com.adobe.fpsaud.plist Support
[loaded] com.microsoft.office.licensing.helper.plist Support
Launch Agents:
[not loaded] com.bose.soundtouch.plist Support
User Launch Agents:
[loaded] com.adobe.ARM.[...].plist Support
[loaded] com.google.keystone.agent.plist Support
[running] com.spotify.webhelper.plist Support
User Login Items:
iTunesHelper
Spotify
BitTorrent
Autodesk 360
Internet Plug-ins:
SharePointBrowserPlugin: Version: 14.0.0 Support
FlashPlayer-10.6: Version: 13.0.0.201 - SDK 10.6 Support
AdobePDFViewer: Version: 10.0.0 Support
Flash Player: Version: 13.0.0.201 - SDK 10.6 Support
QuickTime Plugin: Version: 7.7.3
Default Browser: Version: 537 - SDK 10.9
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
3rd Party Preference Panes:
Flash Player Support
Time Machine:
Time Machine not configured!
Top Processes by CPU:
2% WindowServer
2% SoundTouch music server
0% fontd
0% BitTorrent
0% mds
Top Processes by Memory:
90 MB mds_stores
86 MB Safari
78 MB Spotify
57 MB Spotify Helper
49 MB ocspd
Virtual Memory Information:
1.83 GB Free RAM
1.44 GB Active RAM
190 MB Inactive RAM
558 MB Wired RAM
303 MB Page-ins
0 B Page-outsI have this problem:
When scrolling down any page, the letters will blur at the top of the screen and not the bottom.
When swiping acrross pages in the launchpad, it occasionaly freezes half way between the two.
When I swipe up with four fingers to access mission control, the screen becomes very sluggish. Swiping back down (or clicking a tab) is even worse, causing slow "laggy" animations.
And this the report from EtreCheck:
Hardware Information:
MacBook Pro (13-inch, Mid 2012)
MacBook Pro - model: MacBookPro9,2
1 2.5 GHz Intel Core i5 CPU: 2 cores
4 GB RAM
Video Information:
Intel HD Graphics 4000 - VRAM: 1024 MB
System Software:
OS X 10.9.2 (13C1021) - Uptime: 0 days 0:3:16
Disk Information:
APPLE HDD HTS545050A7E362 disk0 : (500.11 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) / [Startup]: 499.25 GB (309.44 GB free)
HL-DT-ST DVDRW GS41N
USB Information:
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Apple Inc. BRCM20702 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. FaceTime HD Camera (Built-in)
FireWire Information:
Thunderbolt Information:
Apple Inc. thunderbolt_bus
Configuration files:
/etc/hosts - Count: 1
Launch Daemons:
[loaded] com.adobe.fpsaud.plist Support
[loaded] com.microsoft.office.licensing.helper.plist Support
Launch Agents:
[not loaded] com.bose.soundtouch.plist Support
User Launch Agents:
[loaded] com.adobe.ARM.[...].plist Support
[loaded] com.google.keystone.agent.plist Support
[running] com.spotify.webhelper.plist Support
User Login Items:
iTunesHelper
Spotify
BitTorrent
Autodesk 360
Internet Plug-ins:
SharePointBrowserPlugin: Version: 14.0.0 Support
FlashPlayer-10.6: Version: 13.0.0.201 - SDK 10.6 Support
AdobePDFViewer: Version: 10.0.0 Support
Flash Player: Version: 13.0.0.201 - SDK 10.6 Support
QuickTime Plugin: Version: 7.7.3
Default Browser: Version: 537 - SDK 10.9
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
3rd Party Preference Panes:
Flash Player Support
Time Machine:
Time Machine not configured!
Top Processes by CPU:
2% WindowServer
2% SoundTouch music server
0% fontd
0% BitTorrent
0% mds
Top Processes by Memory:
90 MB mds_stores
86 MB Safari
78 MB Spotify
57 MB Spotify Helper
49 MB ocspd
Virtual Memory Information:
1.83 GB Free RAM
1.44 GB Active RAM
190 MB Inactive RAM
558 MB Wired RAM
303 MB Page-ins
0 B Page-outs -
Vertical scrolling in table control
Hi Friends,
How to enable the vertical scroll bar in the table control. I my form, this is not working, but horizontal scroll bar is working.
Kindly guide me to get the vertical scroll bar working.
TIA.
Regards,
Mark KHi,
Let us say table control name is TC1. You have to assign a value to TC1-lines in PBO event in a module.
try this. Determine the number of records in your internal table.
describe table itab lines gv_lines.
TC1-lines = gv_lines.
thanks,
sksingh -
No Ok_Code for scrolling in table control
Hi,
I m using Tcode FPP1 (PSCD module) for creating business
partners while creating the industry type I have a table
control where I need to entre values but when values are
getting exceeded the table control does not scroll in batch
input mode nor while recording it gave any kind of Ok_code
for this.
How do I now scroll I have tries '=P+' and '=PAUA_T' but it does not work can some one help on this.
Thanks,
Vaibhav B Gawali.You can try and put a Loop within your perform statements,at poin where you need to do this scrolling.
you can take help of a counter variable to keep track of you record and perfor m the scrolling operation.
Say the screen can take 6 record at a time. you can initialise the couter CNT with value 1 and loop in this statement till the counter reaches 7. Once the counter reaches 7,you can perform BDC_CODE = 'P+' and reset the counter to 1 again.
This is just a logic,you can implement it as per you code.
Thanks n Regs,
Bhavin
Maybe you are looking for
-
SQLJ-JPublisher - J2T-153, Invalid value for -context:while generating the
Hi All, I am trying to generate the java code for the oracle types defined for one of the module in our project.for that i have defined a new context by extending the 'DefaultContext' provided by SQLJ and as mentioned in the below URL. http://docs.or
-
How can I resolve conflict between itunes and Windows 8.1
When downloading itunes to my laptop computer, using Windows 8.1 my email/network account will not work on that computer. It is fine on other devices such as ipad and Windows phone. I can also pick up emails on online on the same laptop. There app
-
Help - need Adobe Creative Suite 4 Web Premium Mac OS Installation Disk 2
Hey there, Hoping someone can help me out on here. I recently moved and purchased a new computer and went to reinstall CS4 only to find that I am missing installation disk 2. As Adobe no longer supports the media for this, they reccomended that I con
-
Hi... We can't get Digital Photo Professional (v3.13.0.1) to open on our Windows 8, 64-bit machine. We get the following message: We've uninstalled and reinstalled a couple of times, made sure the screen resolution is above 1024 x 768, and have tri
-
Keyboard settings problem Java Studio Enterprise 8.1 on OpenSUSE 10.2
I have of Sun Java Studio Enterprise 8.1 installed on OpenSUSE 10.2 x86-64 using KDE. I use Finnish keyboard, the same keyboard is used in Swedish, too. For some reason I haven't been able to use the FI/SE keyboard layout with the IDE. The keyboard b