I have problem in Table Control?
Hi,
With the help of Table Control I put data on screens but my question is " How can I read one or more rows from that list " ??
Plz help me out.
Thanks and Regards,
Gagan
Hi Gagan
Depen on when you want to read data from list.
You should read data in a module of PAI, but if you want to read only line which are displayed, you should put this module between LOOP/ENDLOOP of tablecontrol, if you want to read whole list you should put this module out of LOOP/ENDLOOP....
and also depen on how you've built the fields of table control.
IF you have called them as the fields of your internal table:
PROCESS PBO.
LOOP AT ITAB WITH CONTROL T_CTRL CURSOR T_CTRL-CURRENT_LINE.
ENDLOOP.
PROCESS PAI.
LOOP AT ITAB.
MODIFY_ITAB.
ENDLOOP.
MODULE MODIFY_ITAB.
As the output fields of table control are called the
internal table, its headerline is automatically filled:
MODIFY ITAB INDEX T_CTRL-CURRENT_LINE.
Remenber: here you can see only records which are
displayed
ENDMODULE.
IF the names are different:
PROCESS PBO.
LOOP AT ITAB WITH CONTROL T_CTRL
CURSOR T_CTRL-CURRENT_LINE.
MODULE DISPLAY_RECORD.
ENDLOOP.
PROCESS PAI.
LOOP AT ITAB.
MODULE MODIFY_ITAB.
ENDLOOP.
MODULE DISPLAY_RECORD.
FIELD_TAB_CTRL1 = ITAB-FIELD1.
FIELD_TAB_CTRL2 = ITAB-FIELD2.
FIELD_TAB_CTRL3 = ITAB-FIELD3.
ENDMODULE.
MODULE MODIFY_ITAB.
ITAB-FIELD1 = FIELD_TAB_CTRL1.
ITAB-FIELD2 = FIELD_TAB_CTRL2.
ITAB-FIELD3 = FIELD_TAB_CTRL3.
MODIFY ITAB INDEX T_CTRL-CURRENT_LINE.
Remenber: here you can see only records which are
displayed
ENDMODULE.
Now if you want to read whole list:
PROCESS PAI.
LOOP AT ITAB.
MODULE MODIFY_ITAB.
ENDLOOP.
MODULE LOOP_TABLE.
MODULE LOOP_TABLE.
LOOP AT ITAB.
ENDLOOP.
ENDMODULE.
But you can use USER_COMMAND module instead of LOOP_TABLE module... depend on how you prefer to do that
Max
Message was edited by: max bianchi
Message was edited by: max bianchi
Similar Messages
-
Problem with Table control lines
Hi Friends,
This is the problem with table control lines:
I have screen with table control and I would like change the table control lines dynamicaly.
Exp:
In my PBO the Internal table which I am using to loop the TC is havig 7 records and its displayed with 7 records, now I have added one more record into my ITAB and now ITAB is having 8 records, when I am looping this ITAB with TC its taking the TC lines 7 only.
here is the code:
Initial values in gt_scr400 = 8
Initial values in tc_scr400 = 8
Now added one more recor into gt_scr400 , now gt_scr400 = 9.
LOOP AT gt_scr400
INTO wa_scr400
WITH CONTROL tc_scr400
CURSOR tc_scr400-current_line.
ENDLOOP.
I have used this logic :
DESCRIBE TABLE gt_scr400 LINES g_rec_300 .
tc_scr300-lines = g_rec_300.
but its not modifying the lines in my table control.
How to change the TC lines based on ITAB total records.
Thanks,
Sridharthere is a field in TableViewName-xxx
don't remember the exact field name for (total no of records)
you can check it in debug. when you add records in Internal table, u need to modify this field which is set at the first time when table control is populated. -
Problem with Table control in BDC
Hi Experts,
I have dought regarding Table control i.e How to handle Table control in BDC? i need explanation for handling TC and senario for using T C in BDC?
regards,
Sudha.Hello,
This is the bdc to update the XK01 transaction code (Vendor Creation).
Here we will use table controls for bankings. Here Iam sending the coding and text files.
Coding
REPORT zprataptable2
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.
Intial screen data file.
1 63190 0001 0001 0001 mr bal188 b in 31000 a1 inr
2 63191 0001 0001 0001 mr bal189 b in 31000 a1 inr
Table control Data:
1 in sb 11000
1 in sb 12000
1 in sb 13000
1 in sb 14000
1 in sb 15000
1 in sb 16000
1 in sb 17000
1 in sb 18000
1 in sb 19000
1 in sb 20000
1 in sb 21000
1 in sb 22000
2 in sb 21000
2 in sb 22000
Thanks,
Vasanth -
Problem with Table control & i/o field
hi experts,
i have a problem with both table control and i/o field.
2 i/o fields and 1 table control.
i/o field are common for table control data.
when i am inserting ata from here to database table, table control data are inserted successfully, but from i/o field data are not inserted.
kind regards,
debendraHi
You must create data objects in your ABAP code having same name as your screen i/o fields. Now these objects will contain the data entered in your screen. Use these objects to insert data in your db table.
Hope this helps
Regards,
Jayanthi.K -
List box problem in table control
Hi,
I have 3 list box coloum in my table control.Based on the 1st list box selection i wanna fill the 2nd list box.
I used function code 'CUS' and made the Fct type <BLANK> but my problem is fuction code triggers PAI but i am not getting the values what i slected in the 1st list box.
Please help me.
Regards,
Karthik.Actually i resolved the problem the problem was with the function module...instead of VRM_SET_VALUES i tried F4_help...
-
STRANGE PROBLEM WITH TABLE CONTROL
Hi all,
I am having a strange problem.
I have a table control in which i have a sort button .WHEN I PLACE THE CURSOR AND CLICK SORT BUTTON,IT WOULD SORT THE RECORDS IN ASCENDING BASED ON THAT COLUMN.
THE PROBLEM IS THAT WHEN I SCROLL DOWN THE WINDOW USING MY MOUSE ,IAM LOSING THE SORT AND THE RECORDS COME TO ORGINAL WAY THAT ARE BEING READ FROM DATABASE.i WANTED TO MAINTAIN THE RECORDS IN THE SORTED WAY EVEN THOUGH I SCROLL DOWN THROUGH MY MOUSE .
PLEASE TELL ME IF I MISS ANY TRICKHello,
You may get your data again in the PBO section. So, get all your data before the PBO .
regards,
Naimesh -
Hi all,
I am able to loop two items for the sales order using table control.But I am not able to populate more than 2 items. Can anybody explain what exactly is the problem.
I am including my code below.
DATA: BEGIN OF ITAB OCCURS 0,
KUNNR(255) TYPE C,
END OF ITAB.
DATA :BEGIN OF ITAB1 OCCURS 0,
KUNNR1(10) TYPE C,
KUNNR2(10) TYPE C,
KETDAT(8) TYPE C,
DWERK(4) TYPE C,
ZTERM(4) TYPE C,
INCO1(3) TYPE C,
INCO2(16) TYPE C,
AUDAT(8) TYPE C,
VKBUR(4) TYPE C,
BZIRK(3) TYPE C,
END OF ITAB1.
DATA : BEGIN OF ITAB2 OCCURS 0,
KUNNR1(10) TYPE C,
MABNR(8) TYPE C,
KWMENG(1) TYPE C,
END OF ITAB2.
include bdcrecx1.
PARAMETERS PATH(128) DEFAULT 'C:\SALES1.TXT'.
DATA : FNAM(20) TYPE C,
IDX TYPE C.
start-of-selection.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = PATH
FILETYPE = 'ASC'
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT ITAB.
itab1-kunnr1 = itab2-kunnr1.
ITAB1-KUNNR1 = ITAB-KUNNR+0(10).
ITAB1-KUNNR2 = ITAB-KUNNR+10(10).
ITAB1-KETDAT = ITAB-KUNNR+20(8).
ITAB1-DWERK = ITAB-KUNNR+28(4).
ITAB1-ZTERM = ITAB-KUNNR+32(4).
ITAB1-INCO1 = ITAB-KUNNR+36(3).
ITAB1-INCO2 = ITAB-KUNNR+39(16).
ITAB1-AUDAT = ITAB-KUNNR+55(8).
ITAB1-VKBUR = ITAB-KUNNR+63(4).
ITAB1-BZIRK = ITAB-KUNNR+67(3).
ITAB2-KUNNR1 = ITAB-KUNNR+0(10).
ITAB2-MABNR = ITAB-KUNNR+70(8).
ITAB2-KWMENG = ITAB-KUNNR+78(1).
APPEND ITAB1.
CLEAR ITAB1.
APPEND ITAB2.
CLEAR ITAB2.
ENDLOOP.
perform open_group.
loop at itab1.
perform bdc_dynpro using 'SAPMV45A' '0101'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-AUART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBAK-AUART'
'ZOR'.
perform bdc_field using 'VBAK-VKORG'
'1000'.
perform bdc_field using 'VBAK-VTWEG'
'10'.
perform bdc_field using 'VBAK-SPART'
'10'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'KKAU'.
perform bdc_field using 'KUAGV-KUNNR'
itab1-kunnr1.
perform bdc_field using 'KUWEV-KUNNR'
itab1-kunnr2.
perform bdc_field using 'RV45A-KETDAT'
itab1-ketdat.
perform bdc_field using 'RV45A-KPRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
'11/21/2005'.
perform bdc_field using 'VBKD-ZTERM'
itab1-zterm.
perform bdc_field using 'VBKD-INCO1'
ITAB1-INCO1.
perform bdc_field using 'VBKD-INCO2'
ITAB1-INCO2.
perform bdc_dynpro using 'SAPMV45A' '4002'.
perform bdc_field using 'BDC_OKCODE'
'=T\05'.
perform bdc_field using 'BDC_CURSOR'
'VBKD-BZIRK'.
perform bdc_field using 'VBAK-AUDAT'
ITAB1-AUDAT.
perform bdc_field using 'VBAK-VKBUR'
ITAB1-VKBUR.
perform bdc_field using 'VBAK-WAERK'
'USD'.
perform bdc_field using 'VBKD-PRSDT'
'11/21/2005'.
perform bdc_field using 'VBKD-BZIRK'
ITAB1-BZIRK.
perform bdc_dynpro using 'SAPLV60F' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=T\06'.
perform bdc_field using 'BDC_CURSOR'
'FPLT-AFDAT(05)'.
perform bdc_field using 'FPLA-BEDAT'
'11/21/2005'.
perform bdc_field using 'FPLA-BEDAR'
'01'.
perform bdc_field using 'FPLA-RFPLN'
'0000000042'.
perform bdc_field using 'FPLT-AFDAT(01)'
'11/21/2005'.
perform bdc_field using 'FPLT-AFDAT(02)'
'11/21/2005'.
perform bdc_field using 'FPLT-AFDAT(03)'
'11/21/2005'.
perform bdc_field using 'FPLT-AFDAT(04)'
'11/21/2005'.
perform bdc_field using 'FPLT-AFDAT(05)'
'11/21/2005'.
perform bdc_dynpro using 'SAPMV45A' '4002'.
perform bdc_field using 'BDC_OKCODE'
'=T\09'.
perform bdc_field using 'BDC_CURSOR'
'VBKD-ZLSCH'.
perform bdc_field using 'VBKD-KTGRD'
'01'.
perform bdc_field using 'VBKD-ZLSCH'
'C'.
perform bdc_field using 'VBAK-ZUONR'
'Open Sales order'.
perform bdc_dynpro using 'SAPMV45A' '4002'.
perform bdc_field using 'BDC_OKCODE'
'=T\11'.
perform bdc_field using 'BDC_CURSOR'
'GVS_TC_DATA-REC-PARTNER(05)'.
perform bdc_field using 'GV_FILTER'
'PARALL'.
perform bdc_field using 'GVS_TC_DATA-REC-PARTNER(05)'
'3838'.
perform bdc_dynpro using 'SAPMV45A' '4002'.
perform bdc_field using 'BDC_OKCODE'
'=T\14'.
perform bdc_field using 'BDC_CURSOR'
'VBKD-BSARK'.
perform bdc_field using 'VBKD-BSARK'
'CU01'.
perform bdc_field using 'VBKD-IHREZ'
'12134'.
perform bdc_dynpro using 'SAPMV45A' '4002'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-ZZLEAT'.
perform bdc_field using 'VBAK-ZZWARR'
'12346C'.
perform bdc_field using 'VBAK-ZZFABW'
'F14689'.
perform bdc_field using 'VBAK-ZZWARX'
'12012005'.
perform bdc_field using 'VBAK-ZZLEAT'
'CGUYFIU'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=PKO1'.
perform bdc_field using 'KUAGV-KUNNR'
itab1-kunnr1.
perform bdc_field using 'KUWEV-KUNNR'
itab1-kunnr2.
perform bdc_field using 'RV45A-KETDAT'
itab1-ketdat.
perform bdc_field using 'RV45A-KPRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
'11/21/2005'.
perform bdc_field using 'VBKD-ZTERM'
itab1-zterm.
perform bdc_field using 'VBKD-INCO1'
ITAB1-INCO1.
perform bdc_field using 'VBKD-INCO2'
ITAB1-INCO2.
perform bdc_field using 'BDC_CURSOR'
'RV45A-ccode(idx)'.
MOVE 1 TO IDX.
LOOP AT ITAB2 WHERE KUNNR1 = ITAB2-KUNNR1.
CONCATENATE 'RV45A-MABNR(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
ITAB2-MABNR.
CONCATENATE 'RV45A-KWMENG(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
ITAB2-KWMENG.
IDX = IDX + 1.
ENDLOOP.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=PKO1'.
perform bdc_field using 'KUAGV-KUNNR'
itab1-kunnr1.
perform bdc_field using 'KUWEV-KUNNR'
itab1-kunnr2.
perform bdc_field using 'RV45A-KETDAT'
itab1-ketdat.
perform bdc_field using 'RV45A-KPRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
'11/21/2005'.
perform bdc_field using 'VBKD-ZTERM'
itab1-zterm.
perform bdc_field using 'VBKD-INCO1'
ITAB1-INCO1.
perform bdc_field using 'VBKD-INCO2'
ITAB1-INCO2.
perform bdc_field using 'RV45A-VBAP_SELKZ(01)'
'X'.
perform bdc_dynpro using 'SAPMV45A' '5003'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_field using 'KUAGV-KUNNR'
itab1-kunnr1.
perform bdc_field using 'KUWEV-KUNNR'
itab1-kunnr2.
perform bdc_field using 'RV45A-KETDAT'
ITAB1-KETDAT.
perform bdc_field using 'RV45A-KPRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
'11/21/2005'.
perform bdc_field using 'VBKD-ZTERM'
ITAB1-ZTERM.
perform bdc_field using 'VBKD-INCO1'
ITAB1-INCO1.
perform bdc_field using 'VBKD-INCO2'
ITAB1-INCO2.
perform bdc_field using 'BDC_CURSOR'
'RV45A-MABNR(idx)'.
perform bdc_transaction using 'VA01'.
endloop.
Perform close_group.Answered the other post.
<i>
I think i see the problem,
LOOP AT ITAB2 WHERE KUNNR1 = <b>ITAB2</b>-KUNNR1.
CONCATENATE 'RV45A-MABNR(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
ITAB2-MABNR.
CONCATENATE 'RV45A-KWMENG(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
ITAB2-KWMENG.
IDX = IDX + 1.
ENDLOOP.
I think that it should be .....
LOOP AT ITAB2 WHERE KUNNR1 = <b>ITAB1</b>-KUNNR1.
</i>
Regards,
Rich Heilman -
Screen resolution problem in table control
when i was transfering data in BDC using table control,i got screen resolution problem.
how to rectify the problem?Hi,
Check this coding.
WA_CTU_PARAMS type ctu_params.
WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
WA_CTU_PARAMS-UPDMODE = 'S'. "synchronous update
WA_CTU_PARAMS-NOBINPT = 'X'.
WA_CTU_PARAMS-NOBIEND = 'X'.
WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
CALL TRANSACTION 'VA01' USING it_bdcdata
OPTIONS FROM WA_CTU_PARAMS
MESSAGES INTO it_mesg.
Default size will play good role in terms of resolution. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resolution. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
Hope this resolves your query.
Reward all the helpful answers.
Regards -
How to overcome looping problem in Table control?
If the table control displays,say for eg 5 rows in the screen,it is looping the same in flow logic.
What if the table control has 10 rows but only 5 rows are displayed? and i want to loop through all the records in the flow logic.
how to overcome this problem?
Points will be awarded for answers.
Regards
RajaHi
U need to insert a new LOOP for you internal table and store the data in a different headerline:
PROCESS PAI (or PBO).
LOOP AT ITAB.
MODULE LOOP_ITAB.
ENDLOOP.
MODULE LOOP_ITAB.
LOOP AT ITAB INTO WA.
IF SY-TABIX = <TABLE CONTROL>-CURRENT_LINE
*--->It's the same record of LOOP of PAI (or PBO).
ENDIF.
ENLOOP.
ENDMODULE.
Max -
Hi Gurus,
I have a table control in which iam displaying the attachment names which I attached. I have create, delete buttons in the application tool bar..when I select one attachment and press enter/scroll then the one which i have selected is refreshed, ie it no more shows on the screen as selected. I dont understand how I can show it selected after I press enter key/scroll down.
whenever i press enter key/scroll then iam setting a flag and Iam checking if that flag is checked in PBO and if it is checked then Iam not displaying anything in the pBO but still whatever i have selected is being refreshed..
Plese provide some pointers...
Thanks a lot
Regards,
SanthoshHere is my code...
PROCESS BEFORE OUTPUT.
MODULE get_attachment.
LOOP AT gl_attachment
INTO gl_wa
WITH CONTROL gl_tc
CURSOR gl_tc-top_line.
ENDLOOP.
MODULE status_3000.
PROCESS AFTER INPUT.
LOOP AT gl_attachment.
MODULE get_selected_line.
ENDLOOP.
MODULE user_command_3000.
*& Module get_selected_line INPUT
text
MODULE get_selected_line INPUT.
IF sel = 'X'.
gl_attachment-sel_field = 'X'.
MODIFY gl_attachment INDEX gl_tc-current_line TRANSPORTING sel_field
ENDIF.
ENDMODULE. " get_selected_line INPUT
Please guide me...
Thanks a lot for the super fast replies... -
Problem in Table controls in BDC
Hi All,
I have porblem in BDC using table controls.
I am working on VBO2 transaction i developed BDC for that i used CTUParameters for screen resulution
whenever press P+ it will go 11 recors in up and 11 is the first line in second page so how to map that
please help me.HI...
when that screen perform will come follow these steps...
before the table control screen... write following code.....
v_count = v_count + 1. ( you need to declare this variable )
(as your screen contains 11 row....)
IF v_count le 11.
pass the values to the perform statements.......
else.
add the perform related to P+ .
v_count = 1.
pass the values to the perform statements.......
ENDLOOP.
i hoep this info will be helpfull for you,,,,,,
if you need any clarification please revert back....
regards,
nag. -
BDC for XK02 getting problem in table control.....
hello i want to migrate data for vendor from flat file to SAP.i want to update VAT date and VAT number. but i m not getting how to handle index of table control? coz when we scroll down index get changed......
pls guide me......Hi,
refer the theards for table control index.
https://forums.sdn.sap.com/click.jspa?searchID=12815720&messageID=5466905
https://forums.sdn.sap.com/click.jspa?searchID=12815720&messageID=4290992
Regards
Kiran Sure -
hai experts
how should i implement a table control in LSMW please send me u r seggassions and code also
Message was edited by:
venkat rathnamhai experts my question has not been answered yet please send me answer
-
Problem During table control - Item Details not filling
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
Additionally - you simply posted your code with no explanation. Please ask a proper question
Edited by: Rob Burbank on Sep 17, 2009 10:47 AMIn read table I have wriiten following code as already mentioned
MODULE read_table INPUT.
CLEAR ok_code.
zlc_items-mark = wa_item-mark.
zlc_items-posting_key = wa_item-posting_key.
zlc_items-account_number = wa_item-account_number.
zlc_items-special_gl = wa_item-special_gl.
zlc_items-amount = wa_item-amount.
zlc_items-cost_center = wa_item-cost_center.
zlc_items-wbs_element = wa_item-wbs_element.
zlc_items-text = wa_item-text.
zlc_items-vendor = wa_item-vendor.
zlc_items-tax_code = wa_item-tax_code.
zlc_items-profit_center = wa_item-profit_center.
APPEND wa_item TO it_item.
CLEAR wa_item.
ENDMODULE. -
Problem with table control adding new line
Dear friends,
i am working with the VA01 upload program.
when i am uploading the multiple line items i am getting the error.
i resoved the error and successfully upload the data for 3 line items.
when i am upload the data for 10line items it was showing the error as the screen field doesn't exists.
here i am attaching the logic
DATA: V_MABNR(20) TYPE C,
V_KWMENG(20) TYPE C,
V_KBETR(20) TYPE C,
VAL(03) TYPE N VALUE 01.
include bdcrecx1.
start-of-selection.
perform open_group.
LOOP AT IT_FINAL INTO WA_FINAL.
perform bdc_dynpro using 'SAPMV45A' '0101'.
perform bdc_field using 'BDC_CURSOR' 'VBAK-AUART'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'VBAK-AUART' WA_FINAL-AUART."'OR'.
perform bdc_field using 'VBAK-VKORG' WA_FINAL-VKORG."'1000'.
perform bdc_field using 'VBAK-VTWEG' WA_FINAL-VTWEG."'12'.
perform bdc_field using 'VBAK-SPART' WA_FINAL-SPART."'00'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BDC_CURSOR' 'VBKD-BSTDK'.
perform bdc_field using 'VBKD-BSTKD' WA_FINAL-BSTKD."'PO TEST'.
perform bdc_field using 'VBKD-BSTDK' WA_FINAL-BSTDK."'03.02.2012'.
perform bdc_field using 'KUAGV-KUNNR' WA_FINAL-KUNAG." '1033'.
perform bdc_field using 'KUWEV-KUNNR' WA_FINAL-KUNWE." '1033'.
LOOP AT IT_FINAL1 INTO WA_FINAL1.
CONCATENATE 'RV45A-MABNR(' '0' VAL ')' INTO V_MABNR.
CONCATENATE 'RV45A-KWMENG(' '0' VAL ')' INTO V_KWMENG.
CONCATENATE 'KOMV-KBETR(' '0' VAL ')' INTO V_KBETR.
perform bdc_field using 'BDC_CURSOR' V_KBETR."v_kwmeng.
perform bdc_field using v_mabnr WA_FINAL1-MATNR."wa_item-matnr.
perform bdc_field using v_kwmeng WA_FINAL1-KWMENG."wa_item-kwmeng.
perform bdc_field using v_kbetr WA_FINAL1-KBETR."wa_item-kwmeng.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE' '/00'.
VAL = VAL + 1.
endloop.
*VAL = 01.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE' '=SICH'.
ENDLOOP.
perform bdc_transaction using 'VA01'.
perform close_group.
i searched in SDN i found a lot of links but i can't find the proper document.
can any one explain me clearly about adding the N line items and screen resolution logic.
Thanks,
karunakarHi,
For screen resolution logic, you can pass the value 'X' into the variable CTU_PARAMS-DEFSIZE in the OPTIONS parameter of CALL TRANSACTION using BDC DATA.
CALL TRANSACTION TCODE USING BDCDATA
MODE CTUMODE
UPDATE CUPDATE
OPTIONS FROM OPT
MESSAGES INTO MESSTAB.
DEFSIZE - Selects whether the screens of the called transaction are displayed in the standard screen size. Values: "X" (standard size), " " (current size).
Maybe you are looking for
-
FI Balances when Mid month Golive
Hi Gurus, We are going live in Mid may and following Jan to Dec cycle. Need your guidance on uploading of FI balances. Should we upload trial as on April End and then upload each FI transaction in system manually for May and do may month end in SAP O
-
Adding definitions to Specific Words within a PDF file
I have a client who wants me to add definitions to Glossary words throughout a PDF file. They want it to look like a "roll over" or when you click on the glossary word a definition pops up. Is there a way to do this in Acrobat 9 or it can't be done?
-
Copying the same interval to Sub-asset master
Hi Friends, My client is using 4.6c Version. The main asset master is having two time intervals in the time dependent data tab. With reference to that main asset, when we are creating the sub asset master all the time intervals are automatically copy
-
Business Objects XI 3.1 SP2 with BW Netweaver 7.01 EHP1 SP05
Is anyone else out there running this combination of sap products? Are you successful? We are seeing a lot of inconsistencies with webi reports. We have reports returned with no data. We have some reports that run in one instance with data and the fo
-
Content on home page "jumps" upwards with Firefox
Just updated a site, everything seems ok - apart from when first viewing the homepage with Firefox. The three images in the main content window, and the pre-filled hints in the tip subscription box all "jump" up the page. When I refresh the page (or