BDC Recording For J1IG with Table Control Scroll bar
Dear Friends,
I am doing BDC program for J1IG Transaction after done recording.
As you knows that, In J1IG transaction max. 11 materials are shows in table control at a time and if more records are there, then we have to scroll down manually so after that, we can see the records.
Now my BDC program runs upto 11 materials but when more than 11 materials, selection is coming on first material only and cursor not showing 12th material.
So i think page down is not working for that issue.
I have seen lots of search forum for that but not getting the proper answer.
Please reply.
Regards,
Shivam.
Dear Dinu,
For better understanding please see the code.
So you suggest what should i have to do?.
LOOP AT jtab INTO wb.
LOOP AT itab INTO wa WHERE mblnr EQ wb-mblnr.
CLEAR : flag.
AT NEW mblnr.
flag = 'X'.
CLEAR : cnt, var1, var2.
ENDAT.
cnt = cnt + 1.
IF flag EQ 'X'.
PERFORM bdc_dynpro USING 'SAPMJ1IG' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ECAP'.
PERFORM bdc_dynpro USING 'SAPMJ1IG' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'T_HEADER-EXDAT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'J_1IEXCHDR-EXGRP'
wa-exgrp.
PERFORM bdc_field USING 'T_HEADER-MBLNR'
wa-mblnr.
PERFORM bdc_field USING 'T_HEADER-MJAHR'
wa-mjahr.
PERFORM bdc_field USING 'T_HEADER-EXNUM'
wa-exnum.
PERFORM bdc_field USING 'T_HEADER-EXDAT'
wa-exdat.
PERFORM bdc_dynpro USING 'SAPMJ1IG' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'J_1IEXCHDR-EXGRP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=DETL'.
ENDIF.
CONCATENATE 'T_ITEM-ZEILE(' cnt ')' INTO var1.
CONCATENATE 'T_ITEM-SELECTION(' cnt ')' INTO var2.
PERFORM bdc_dynpro USING 'SAPMJ1IG' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
var1. "'T_ITEM-ZEILE(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=MORE'.
PERFORM bdc_field USING var2 "'T_ITEM-SELECTION(01)'
'X'. "record-selection_01_019.
PERFORM bdc_dynpro USING 'SAPMJ1IG' '0400'.
PERFORM bdc_field USING 'BDC_CURSOR'
'T_LOCAL_EXC-EXADDRATE1(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'T_LOCAL_EXC-MENGE(01)'
wa-menge.
PERFORM bdc_field USING 'T_LOCAL_EXC-EXBAS(01)'
wa-exbas.
PERFORM bdc_field USING 'T_LOCAL_EXC-EXBED(01)'
wa-exbed.
PERFORM bdc_field USING 'T_LOCAL_EXC-BEDRATE(01)'
wa-bedrate.
PERFORM bdc_field USING 'T_LOCAL_EXC-EXAED(01)'
wa-exaed.
PERFORM bdc_field USING 'T_LOCAL_EXC-AEDRATE(01)'
wa-aedrate.
PERFORM bdc_field USING 'T_LOCAL_EXC-ECS(01)'
wa-ecs.
PERFORM bdc_field USING 'T_LOCAL_EXC-ECSRATE(01)'
wa-ecsrate.
PERFORM bdc_field USING 'T_LOCAL_EXC-EXADDTAX1(01)'
wa-exaddtax1.
PERFORM bdc_field USING 'T_LOCAL_EXC-EXADDRATE1(01)'
wa-exaddrate1.
PERFORM bdc_dynpro USING 'SAPMJ1IG' '0400'.
PERFORM bdc_field USING 'BDC_CURSOR'
'T_LOCAL_EXC-RG23ASER(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMJ1IG' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'T_ITEM-DOCNO(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
CLEAR opt.
opt-dismode = 'A'.
opt-updmode = 'S'.
* opt-defsize = '12'.
* CLEAR: it_messages[], it_messages.
CALL TRANSACTION 'J1IG' USING it_bdcdata OPTIONS FROM opt
MESSAGES INTO it_messages.
REFRESH it_bdcdata.
ENDLOOP.
CHECK it_messages[] IS NOT INITIAL.
LOOP AT it_messages.
PERFORM fill_messages USING it_messages-msgtyp
it_messages-msgid
it_messages-msgnr
it_messages-msgv1
it_messages-msgv2
it_messages-msgv3
it_messages-msgv4.
ENDLOOP.
PERFORM display_messages TABLES tmsg.
Similar Messages
-
BDC program for rebate with table controls
Hi Friends,
Iam Doing bdc program for Rebate(TCODE VBO1) with table controls..
can u give the solutions for table controls...
if anybody having the code..please send me..
Thanks & Advance,
sampathhi,
check this example it may help you.
REPORT ZSR_BDC_TBCTRL
NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES : RF02K,LFA1,LFBK.
DATA : BEGIN OF IT_VEN OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
SPRAS LIKE LFA1-SPRAS,
BANKS(6) TYPE C,
BANKL(17) TYPE C,
BANKN(19) TYPE C,
END OF IT_VEN.
DATA : BEGIN OF BANKS OCCURS 0,
BANKS LIKE LFBK-BANKS,
END OF BANKS,
BEGIN OF BANKL OCCURS 0,
BANKL LIKE LFBK-BANKL,
END OF BANKL,
BEGIN OF BANKN OCCURS 0,
BANKN LIKE LFBK-BANKN,
END OF BANKN.
DATA : FLD(20) TYPE C,
CNT(2) TYPE N.
DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
INCLUDE BDCRECX1.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'Z:\sr.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = IT_VEN
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.
PERFORM OPEN_GROUP.
LOOP AT IT_VEN.
REFRESH BDCDATA.
REFRESH : BANKS,BANKL,BANKN..
SPLIT IT_VEN-BANKS AT ',' INTO TABLE BANKS.
SPLIT IT_VEN-BANKL AT ',' INTO TABLE BANKL.
SPLIT IT_VEN-BANKN AT ',' INTO TABLE BANKN.
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'
IT_VEN-LIFNR.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
IT_VEN-KTOKK.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
IT_VEN-NAME1.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
IT_VEN-SORTL.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
IT_VEN-LAND1.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
IT_VEN-SPRAS.
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(02)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
*perform bdc_field using 'LFBK-BANKS(01)'
'DE'.
*perform bdc_field using 'LFBK-BANKS(02)'
'DE'.
*perform bdc_field using 'LFBK-BANKL(01)'
'10020030'.
*perform bdc_field using 'LFBK-BANKL(02)'
'67270003'.
*perform bdc_field using 'LFBK-BANKN(01)'
'12345'.
*perform bdc_field using 'LFBK-BANKN(02)'
'66666'.
MOVE 1 TO CNT.
LOOP AT BANKS.
CONCATENATE 'LFBK-BANKS(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKS-BANKS.
CNT = CNT + 1.
ENDLOOP.
MOVE 1 TO CNT.
LOOP AT BANKL.
CONCATENATE 'LFBK-BANKL(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKL-BANKL.
CNT = CNT + 1.
ENDLOOP.
MOVE 1 TO CNT.
LOOP AT BANKN.
CONCATENATE 'LFBK-BANKN(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKN-BANKN.
CNT = CNT + 1.
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 'SAPLSPO1' '0300'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=YES'.
PERFORM BDC_TRANSACTION USING 'XK01'.
ENDLOOP.
PERFORM CLOSE_GROUP.&----
*& Report ZSR_BDC_TBCTRL
REPORT ZSR_BDC_TBCTRL
NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES : RF02K,LFA1,LFBK.
DATA : BEGIN OF IT_VEN OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
SPRAS LIKE LFA1-SPRAS,
BANKS(6) TYPE C,
BANKL(17) TYPE C,
BANKN(19) TYPE C,
END OF IT_VEN.
DATA : BEGIN OF BANKS OCCURS 0,
BANKS LIKE LFBK-BANKS,
END OF BANKS,
BEGIN OF BANKL OCCURS 0,
BANKL LIKE LFBK-BANKL,
END OF BANKL,
BEGIN OF BANKN OCCURS 0,
BANKN LIKE LFBK-BANKN,
END OF BANKN.
DATA : FLD(20) TYPE C,
CNT(2) TYPE N.
DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
INCLUDE BDCRECX1.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'Z:\sr.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = IT_VEN
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.
PERFORM OPEN_GROUP.
LOOP AT IT_VEN.
REFRESH BDCDATA.
REFRESH : BANKS,BANKL,BANKN..
SPLIT IT_VEN-BANKS AT ',' INTO TABLE BANKS.
SPLIT IT_VEN-BANKL AT ',' INTO TABLE BANKL.
SPLIT IT_VEN-BANKN AT ',' INTO TABLE BANKN.
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'
IT_VEN-LIFNR.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
IT_VEN-KTOKK.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
IT_VEN-NAME1.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
IT_VEN-SORTL.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
IT_VEN-LAND1.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
IT_VEN-SPRAS.
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(02)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
*perform bdc_field using 'LFBK-BANKS(01)'
'DE'.
*perform bdc_field using 'LFBK-BANKS(02)'
'DE'.
*perform bdc_field using 'LFBK-BANKL(01)'
'10020030'.
*perform bdc_field using 'LFBK-BANKL(02)'
'67270003'.
*perform bdc_field using 'LFBK-BANKN(01)'
'12345'.
*perform bdc_field using 'LFBK-BANKN(02)'
'66666'.
MOVE 1 TO CNT.
LOOP AT BANKS.
CONCATENATE 'LFBK-BANKS(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKS-BANKS.
CNT = CNT + 1.
ENDLOOP.
MOVE 1 TO CNT.
LOOP AT BANKL.
CONCATENATE 'LFBK-BANKL(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKL-BANKL.
CNT = CNT + 1.
ENDLOOP.
MOVE 1 TO CNT.
LOOP AT BANKN.
CONCATENATE 'LFBK-BANKN(' CNT ') ' INTO FLD.
PERFORM BDC_FIELD USING FLD BANKN-BANKN.
CNT = CNT + 1.
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 'SAPLSPO1' '0300'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=YES'.
PERFORM BDC_TRANSACTION USING 'XK01'.
ENDLOOP.
PERFORM CLOSE_GROUP. -
Table controls (scroll bars) with LSMW
Hi,
I have to fill a table control from a lsmw project, my problem appears when we need to scroll down table control because there are no more free lines.
My question is if it's possible to manage table control scroll bars to scroll down when all rows will be taken, using lsmw.
Any idea about it would be very appreciated
Thanks in advanceHi Javier,
I suggest you is that you should loop at the internal table from which you are filling the data into the table control or use a counter for number of rows comming up at a time in the table control. And then put code for ADD+ button. Do this till the end of file or table.
I hope this helps.
Also you can use TCode for the LSMW to upload one record at a time. U can try this also.
Regards,
Usha. -
Bdc recording of screen having table control
hi all,
how to trap scroll in bdc recording of table control.
regards deepakHi..,
<b>I found this program in one of the BDC links !! Hope this helps u !!</b>
Following is a sample code of handling table control in BDC.
REPORT Y730_BDC5 .
*HANDLING TABLE CONTROL IN BDC
DATA : BEGIN OF IT_DUMMY OCCURS 0,
DUMMY(100) TYPE C,
END OF IT_DUMMY.
DATA : BEGIN OF IT_XK01 OCCURS 0,
LIFNR(10) TYPE C,
BUKRS(4) TYPE C,
EKORG(4) TYPE C,
KTOKK(4) TYPE C,
NAME1(30) TYPE C,
SORTL(10) TYPE C,
LAND1(3) TYPE C,
SPRAS(2) TYPE C,
AKONT(6) TYPE C,
FDGRV(2) TYPE C,
WAERS(3) TYPE C,
END OF IT_XK01,
BEGIN OF IT_BANK OCCURS 0,
BANKS(3) TYPE C,
BANKL(10) TYPE C,
BANKN(10) TYPE C,
KOINH(30) TYPE C,
LIFNR(10) TYPE C,
END OF IT_BANK.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = 'C:\VENDOR.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = IT_DUMMY.
LOOP AT IT_DUMMY.
IF IT_DUMMY-DUMMY+0(2) = '11'.
IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
APPEND IT_XK01.
ELSE.
IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
APPEND IT_BANK.
ENDIF.
ENDLOOP.
LOOP AT IT_XK01.
REFRESH IT_BDCDATA.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-REF_LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
IT_XK01-LIFNR.
perform bdc_field using 'RF02K-BUKRS'
IT_XK01-BUKRS.
perform bdc_field using 'RF02K-EKORG'
IT_XK01-EKORG.
perform bdc_field using 'RF02K-KTOKK'
IT_XK01-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-TELX1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
IT_XK01-NAME1.
perform bdc_field using 'LFA1-SORTL'
IT_XK01-SORTL.
perform bdc_field using 'LFA1-LAND1'
IT_XK01-LAND1.
perform bdc_field using 'LFA1-SPRAS'
IT_XK01-SPRAS.
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-KOINH(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
DATA : FNAM(20) TYPE C,
IDX TYPE C.
MOVE 1 TO IDX.
LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKS.
CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKL.
CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-BANKN.
CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
IT_BANK-KOINH.
IDX = IDX + 1.
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'
IT_XK01-AKONT.
perform bdc_field using 'LFB1-FDGRV'
IT_XK01-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'
IT_XK01-WAERS.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'WYT3-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'XK01' USING IT_BDCDATA
MODE 'A'
UPDATE 'S'
MESSAGES INTO IT_BDCMSGCOLL.
ENDLOOP.
FORM BDC_DYNPRO USING PROG SCR.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROG.
IT_BDCDATA-DYNPRO = SCR.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
ENDFORM.
regards,
sai ramesh -
Problem in module pool with table control scrolling
hi,
i am using the table control in module pool,in the table control i have radion button for all the rows.
After i got the data into the table control ,if i select radio button and if i press vertical scroll bar button, that radio button is deselecting,how to solve this issue.
Please help me.Hi
Generally we don't keep radiobuttons in table control for selecting the records
We keep check boxes for selecting the records
Radio button is used to select a single from a group of records and at a time only one is selected, where as checkboxes at a time you can select a single or multiple.
So use checkboxes and code correctly see the doc for Table control
syntax:
CONTROLS .
if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.
u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.
Go through this urls.
www.****************
www.sap-img.com
Check the below links.
http://www.planetsap.com/howdo_a.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
http://sap.niraj.tripod.com/id25.html
Reward points if useful
Regards
Anji -
Table Control Scroll Bar inactive
Hi All,
I am facing a strange problem. I have placed a table control on my screen and have added the columns. Rest of the functionality is also fine. However, even when the number of rows in the table exceeds its height, the Vertical Scroll bar is inactive and I cannot scroll down to the hidden line items. The horizontal scroll bar is working perfectly.The color of the Vertical Scroll bar is also Dark grey (as in inactive.)
I fail to understand what could be the reason for this? Helpful answers will be suitably rewarded
Regards,
MadhurHi Madur,
Try this code :
(assume that the name of your table control is T1)
In the screen logic you will have:
Loop with control T1.
module get_Looplines.
Endloop.
Module get_looplines.
Looplines = sy-loopc.
Endmodule.
In the PBO of the screen you will have a module that loads the itab and determines the total number of lines read.
Module load_itab.
. (select database table and
append to itab)
describe table itab lines linecount.
Endmodule.
We now have all the values to construct a scroll module.
MODULE SCROLL INPUT.
CASE SAVE_OK_CODE.
WHEN 'P--'.
T1-TOP_LINE = 1.
WHEN 'P-'.
T1-TOP_LINE = T1-TOP_LINE - LOOPLINES.
IF T1-TOP_LINE < 1.
T1-TOP_LINE = 1.
ENDIF.
WHEN 'P+'.
T1-TOP_LINE = T1-TOP_LINE + LOOPLINES.
IF T1-TOP_LINE > LINECOUNT.
T1-TOP_LINE = LINECOUNT - LOOPLINES + 1.
ENDIF.
WHEN 'P++'.
T1-TOP_LINE = LINECOUNT - LOOPLINES + 1.
ENDCASE.
ENDMODULE. " SCROLL INPUT
WHEN 'P--'.
CLEAR SY-UCOMM.
CTR1-TOP_LINE = 1.
WHEN 'P-'.
CLEAR SY-UCOMM.
CTR1-TOP_LINE = CTR1-TOP_LINE - LINECOUNT1.
IF CTR1-TOP_LINE < 1.
CTR1-TOP_LINE = 1.
ENDIF.
WHEN 'P+'.
DESCRIBE TABLE ITAB1 LINES N1.
CTR1-TOP_LINE = CTR1-TOP_LINE + LINECOUNT1.
IF CTR1-TOP_LINE > N1.
CTR1-TOP_LINE = N1.
ENDIF.
CLEAR SY-UCOMM.
WHEN 'P++'.
DESCRIBE TABLE ITAB1 LINES N1.
CLEAR SY-UCOMM.
CTR1-TOP_LINE = N1.
Cheers
Sunny
Rewrd points, if helpful -
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 -
Table control scroll bar issue
how to set the scroll bar for table control for the transaction code va42 for billing plan tab.
i have added few custom fileds for the table control, when i m re-arranging the columns for the table control, the scroll bar is fixed for one field( as standard) and the scroll bar starts from that place. how to fix the scroll bar or control the scroll bar and sets it position for the desired column.HI,
Table control ahs a property called FIXED_COLS. You ave to pass the column number to this property. -
Hello,
There is table control in my program and screen.
This object with created table control wizard.
This object on scroll bar(ver.-hor.)
I want to not see scroll bar.(visible = false)
Pleace help me.
Thanks.Hello Melih
I do not think that we can effect the scroll bars. If the size of the screen/dynpro is sufficient to display the entire table control then there should be no scroll bar. If the screen is smaller than the table control then the GUI automatically displays the scroll bars (which makes perfect sense).
Regards
Uwe -
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. -
Problem in doing BDC recording for Tcode FAGLSKF
Hi All,
I need to make postings for Statistical key figures. For this I need to make postings using transaction FAGLSKF.
Now my problem is that when I try to make recording for transaction FAGLSKF I could not see the values recorded for ITEM Data Table control.
Any one having any idea as what I am missing. Your suggestions would be really helpful.
Regards,
LalitHi Poorna,
Thanks a lot for the valueable feedback.
I checked the FMs mentioned by you. These FMs make the SKF posting but these FMs do not perform any kind of validations.
Like for example if I use tcode FAGLSKF and try to make some posting. In case I am giving some invalid input to this transaction ( e.g. wrong Statistical Key Figure Value ) , this t code does not allow us to post and immediateley thorows some error.
Where as I use FM FAGL_FAGLSKF_PN_POST, this FM makes an entry in the table FAGLSKF_PN without any validations.
This FM simply insert an entry to the table FAGLSKF_PN.
Any Idea how to overcome this. I want to make the validations in the same way as done using Tcode FAGLSKF.
Thanks a lot for your valueable inputs.
Regards,
Lalit -
How to create bdc with table control
hi all.
please some body tell me how to create bdc with table control
or suggest any www with screen shots
thanks in advance ,
aparnaHi AParna,
Its very Simple.
ALl you have to do is set up a counter based on the number of lines in the tabke. when the counter reaches the number of lines in the table hit the next page button which is at the top of every screen in SAP.
Please refer to the following BDC program I had developed using Table control,
this is for ME01 transaction.
LOOP AT T_EORD_HED.
SELECT SINGLE * FROM MARA WHERE MATNR = T_EORD_HED-MATNR.
IF SY-SUBRC = 0.
PERFORM BDC_DYNPRO USING 'SAPLMEOR' '0200'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'EORD-MATNR'
T_EORD_HED-MATNR. "'58335'.
PERFORM BDC_FIELD USING 'EORD-WERKS'
T_EORD_HED-WERKS. "'0253'.
L_COUNT = 1.
LOOP AT T_EORD WHERE MATNR = T_EORD_HED-MATNR
AND WERKS = T_EORD_HED-WERKS.
SELECT SINGLE * FROM LFA1 WHERE LIFNR = T_EORD-LIFNR.
IF SY-SUBRC = 0.
* Look into the if condition below
IF L_COUNT = 010.
L_COUNT = 1.
PERFORM BDC_DYNPRO USING 'SAPLMEOR' '0205'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=NS'.
L_COUNT = L_COUNT + 1.
ENDIF.
PERFORM BDC_DYNPRO USING 'SAPLMEOR' '0205'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-AUTET(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
CONCATENATE 'EORD-VDATU' '(' L_COUNT ')' INTO OPR_FIELD.
WRITE SY-DATUM TO T_EORD-VDATU.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-VDATU.
CONCATENATE 'EORD-BDATU' '(' L_COUNT ')' INTO OPR_FIELD.
WRITE T_EORD-BDATU TO V_BDATU.
PERFORM BDC_FIELD USING OPR_FIELD
V_BDATU.
CONCATENATE 'EORD-LIFNR' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-LIFNR.
CONCATENATE 'EORD-EKORG' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
'0001'.
CONCATENATE 'EORD-RESWK' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-RESWK.
WRITE T_EORD-MEINS TO V_MEINS.
CONCATENATE 'EORD-MEINS' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
V_MEINS.
* CONCATENATE 'EORD-EBELN' '(' L_COUNT ')' INTO OPR_FIELD.
* PERFORM BDC_FIELD USING 'OPR_FIELD'
* T_EORD-EBELN.
CONCATENATE 'EORD-EBELP' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-EBELP.
IF T_EORD-FLIFN NE SPACE OR T_EORD-FRESW NE SPACE OR
T_EORD-FEBEL NE SPACE.
CONCATENATE 'RM06W-FESKZ' '(' L_COUNT ')' INTO OPR1_FIELD.
PERFORM BDC_FIELD USING OPR1_FIELD
'X'.
ENDIF.
IF T_EORD-NOTKZ <> ''.
CONCATENATE 'EORD-NOTKZ' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
'X'.
ENDIF.
CONCATENATE 'EORD-AUTET' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-AUTET.
L_COUNT = L_COUNT + 1.
ENDIF.
ENDLOOP.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BU'.
CALL TRANSACTION 'ME01' USING I_BDCDATA
MODE UP_MODE
* optIONS FROM l_opt
MESSAGES INTO I_BDCMSGCOLL.
PERFORM FORMAT_OUTPUT.
ENDIF.
ENDLOOP. -
Bdc recording for trancastion ME01
Hi,
Can u help me in BDC recording for transaction 'ME01' .
I have no idea for transaction 'ME01' & here i like to know how to handle table ctr during bdc recording?
give sample code if possible.
ThanksSee the sample attached code for ME51 using table control.
similarly record the same for ME01 and copy the TC logic from this.
REPORT zmm_pr_upload_mat
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Standard Include for Selection Screen
INCLUDE bdcrecx1.
Internal Table for Upload Data
DATA: BEGIN OF i_pr OCCURS 0,
Header Screen
sno(3), " SNo
bsart(004), " PR Type
epstp(001), " Item Category
knttp(001), " Account Assignment
eeind(010), " Delivery Date
lpein(001), " Category of Del Date
werks(004), " Plant
lgort(004), " Storage Location
ekgrp(003), " Purchasing Group
matkl(009), " Material Group
bednr(010), " Tracking No
afnam(012), " Requisitioner
Item Details
matnr(018), " Material No
menge(017), " Quantity
badat(010),
frgdt(010),
preis(014), " Valuation Price
waers(005), " Currency
peinh(005),
wepos(001),
repos(001),
sakto(010), " GL Account
kostl(010), " Cost Center
bnfpo(005),
END OF i_pr.
Internal Table for header Data
DATA: BEGIN OF it_header OCCURS 0,
sno(3), " SNo
bsart(004), " PR Type
epstp(001), " Item Category
knttp(001), " Account Assignment
eeind(010), " Delivery Date
werks(004), " Plant
lgort(004), " Storage Location
ekgrp(003), " Purchasing Group
matkl(009), " Material Group
bednr(010), " Tracking No
afnam(012), " Requisitioner
END OF it_header.
Internal Table for Item Data
DATA: BEGIN OF it_item OCCURS 0,
sno(3), " SNo
matnr(018), " Material No
menge(017), " Quantity
preis(014), " Valuation Price
sakto(010), " GL Account
kostl(010), " Cost Center
END OF it_item.
Data Variables & Constants
CONSTANTS : c_x VALUE 'X'. " Flag
DATA : v_l(2), " Counter
v_rowno(5), " Row No
v_2(2), " Counter
v_rows LIKE sy-srows, " Rows in TC
v_field(45). " String
Parameters
PARAMETERS: p_file LIKE ibipparms-path. " Filename
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start of Selection
START-OF-SELECTION.
Open the BDC Session
PERFORM open_group.
Upload the File into internal Table
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_pr
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
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 i_pr BY sno.
LOOP AT i_pr.
MOVE-CORRESPONDING i_pr TO it_item.
APPEND it_item.
CLEAR it_item.
AT END OF sno.
READ TABLE i_pr INDEX sy-tabix.
MOVE-CORRESPONDING i_pr TO it_header.
APPEND it_header.
CLEAR it_header.
ENDAT.
ENDLOOP.
SORT it_header BY sno.
SORT it_item BY sno.
v_rows = sy-srows - 6.
Upload the Data from Internal Table
LOOP AT it_header.
Header Data
PERFORM bdc_dynpro USING 'SAPMM06B' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBAN-BEDNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EBAN-BSART'
it_header-bsart.
PERFORM bdc_field USING 'RM06B-EPSTP'
it_header-epstp.
PERFORM bdc_field USING 'EBAN-KNTTP'
it_header-knttp.
PERFORM bdc_field USING 'RM06B-EEIND'
it_header-eeind.
PERFORM bdc_field USING 'RM06B-LPEIN'
it_header-lpein.
PERFORM bdc_field USING 'EBAN-WERKS'
it_header-werks.
PERFORM bdc_field USING 'EBAN-LGORT'
it_header-lgort.
PERFORM bdc_field USING 'EBAN-EKGRP'
it_header-ekgrp.
PERFORM bdc_field USING 'EBAN-MATKL'
it_header-matkl.
PERFORM bdc_field USING 'EBAN-BEDNR'
it_header-bednr.
PERFORM bdc_field USING 'EBAN-AFNAM'
it_header-afnam.
Item Details
v_l = 0.
To add no. of rows
v_2 = 0 .
As the screen is showing 13 rows defaulted to 130
v_rowno = 130 .
LOOP AT it_item WHERE sno = it_header-sno.
v_l = v_l + 1.
IF v_l = 14 .
IF v_2 = 12 .
v_2 = 12 .
v_l = 2 .
From second time onwards it is displaying 12 rows only
v_rowno = v_rowno + 120 .
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'RM06B-BNFPO'
v_rowno.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ELSE.
V_2 initialized to 12 for second screen purpose
v_2 = 12 .
v_l = 2 .
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'RM06B-BNFPO'
v_rowno .
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ENDIF.
ENDIF.
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
CLEAR v_field.
CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
PERFORM bdc_field USING v_field it_item-matnr.
CLEAR v_field.
CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
PERFORM bdc_field USING v_field it_item-menge.
PERFORM bdc_dynpro USING 'SAPMM06B' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBAN-PREIS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EBAN-PREIS'
it_item-preis.
PERFORM bdc_dynpro USING 'SAPMM06B' '0505'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EBKN-SAKTO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'EBKN-SAKTO'
it_item-sakto.
Cost Center
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'COBL-KOSTL'
it_item-kostl.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMM06B' '0106'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06B-BNFPO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
Call The Transaction
PERFORM bdc_transaction USING 'ME51'.
ENDLOOP.
Close the BDC Session
PERFORM close_group.
reward if useful
Regards
Vasu -
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 -
ABAP HR How to create infotype with table control in it like Infotype 0008
Hi Experts.
I need help from u guys. My client requirement is to create custom infotype just like 0008 infotype which contain table control to save amount and wage types. I try to create infotype with table control using PM01, but that table control is in display mode only, i almost search every where to create custom infotype with table control but what ever threads in forum all are they unanswered and most of the threads for creating infotype. But i already done with infotype , but my main problem is table control.
If any one have some suggestion for this please share with me.
<removed by moderator> i am looking for positive reply.
Edited by: Thomas Zloch on Aug 30, 2011 12:54 PMHi
I've created several infotypes with a Table Control and it is always the same story. You have to create a custom Z table to store the Table Control data (if you can have unlimited records), so in the PSXXXX structure you need to add a TABNR field to link the PAXXXX table and the Z one, just like the type table OM infotypes.
Then in your code you have to control every possible operation, INS, MOD, DEL... and update the Z table accordingly (the standard code won't do that)
If your TC fields appear in display mode, take a look at the Groups 1 and 3 in your fields, the must be set with the usual values for a PA infotype.
If you have more questions, just ask,
Regards
Maybe you are looking for
-
Reporting Service issues without service and land line access?
Since Verizon makes it extremely difficult to report poor coverage, I figured I would just place this information online in hopes of an agent reading and reporting the problem. There is little to no Verizon coverage of all types (4g3g/1x) over pretty
-
Installation Problem of Oracle9i AS on Windows 2000
Hi All, I installed Oracle9i database, Oracle9i Developer Suite on my machine having W2k. After that I tried to install Oracle 9iAS. But auto installer is not starting after inserting CD. Then after I execute setup.txt but it is giving error after as
-
Calendar app: Week days in the day view
Hi, some days ago I had (in the day view of the calendar) the weekdays in the upper bar. But these are vanished and I don'd know why and do not know how to bring them back. I compared the day view to a collegue's Z30 day view but he has still the wee
-
Iphone not recognized by Windows 7
iPhone 4 no longer recognized by Windows 7, 64-bit desktop. The iTunes diagnostic shows everything working satisfactorily, and Windows Control Panel, under Devices and Printers, shows the "Apple Mobile Device USB Driver". The Properties for that devi
-
Is there any way to see unread mails/chains with unread mails on iPad?
I use iPad with MS Exchange and have many emails and have not found a way to work with chains with unread emails. Is there a way to do it? Maybe together with MSE?