2007 Jun 04 10:40 AM
hi all,
can anyone please send me a bdc program for handling the table controls.
please attach the flat file also.
thanks in advance and i will surely give ten points for the requrement.
sultan.s
2007 Jun 04 10:56 AM
Hi,
Check this sample code.
report Z_XK01_REC_PRG_MUL_CTRL_FIELDS
no standard page heading line-size 255.
TABLES: RF02K,LFA1,LFBK,LFB1,LFM1.
DATA: BEGIN OF IT_ITAB OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
BUKRS LIKE RF02K-BUKRS,
EKORG LIKE RF02K-EKORG,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
BANKS(6) TYPE C,
BANKL(17) TYPE C,
BANKN(19) TYPE C,
AKONT LIKE LFB1-AKONT,
FDGRV LIKE LFB1-FDGRV,
WAERS LIKE LFM1-WAERS,
END OF IT_ITAB.
DATA: BEGIN OF BANKS OCCURS 0,
BANKS LIKE LFBK-BANKS,
END OF BANKS.
DATA: BEGIN OF BANKL OCCURS 0,
BANKL LIKE LFBK-BANKL,
END OF BANKL.
DATA: BEGIN OF BANKN OCCURS 0,
BANKN LIKE LFBK-BANKN,
END OF BANKN.
DATA : FLD(20) TYPE C,
CNT(2) TYPE N.
include bdcrecx1.
start-of-selection.
*CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'Z:/SS/MUL_REC_TAB.TXT'
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH = FILELENGTH
TABLES
DATA_TAB = it_itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
.
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'Z:/SS/MUL_REC_TAB.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = FILELENGTH
HEADER = HEADER
TABLES
DATA_TAB = it_itab
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_ITAB.
REFRESH BDCDATA.
REFRESH: BANKS,BANKL,BANKN.
SPLIT IT_ITAB-BANKS AT ',' INTO TABLE BANKS.
SPLIT IT_ITAB-BANKL AT ',' INTO TABLE BANKL.
SPLIT IT_ITAB-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_itab-lifnr.
perform bdc_field using 'RF02K-BUKRS'
it_itab-bukrs.
perform bdc_field using 'RF02K-EKORG'
it_itab-ekorg.
perform bdc_field using 'RF02K-KTOKK'
it_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-NAME1'
it_itab-name1.
perform bdc_field using 'LFA1-SORTL'
it_itab-sortl.
perform bdc_field using 'LFA1-LAND1'
it_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(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)'
'11111111'.
*perform bdc_field using 'LFBK-BANKL(02)'
'10010010'.
*perform bdc_field using 'LFBK-BANKN(01)'
'534634634'.
*perform bdc_field using 'LFBK-BANKN(02)'
'986678443'.
*perform bdc_dynpro using 'SAPMF02K' '0130'.
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_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_itab-akont.
perform bdc_field using 'LFB1-FDGRV'
it_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'
it_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_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_field using 'RSRD1-TBMA'
'X'.
perform bdc_transaction using 'XK01'.
endloop.
perform close_group.
This is the test data
bScdefgh 0001 0001 0001 xyz1234567890sssOMALI sss DE DE,DE 11111111,10010010 534634634,986678443 62130 A3 AUD
here the spaces are tab delimeters.
hi all,
can anyone please send me a bdc program for handling the table controls.
please attach the flat file also.
thanks in advance and i will surely give ten points for the requrement.
sultan.s
2007 Jun 04 10:49 AM
Hi Sultan,
Please check the below program....
report BDC_FIELD_DELETION
no standard page heading line-size 255.
include bdcrecx1.
parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
*
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
*
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: CLASSTAB
TBMA_001(001),
data element: TABNAME16
TBMA_VAL_002(016),
data element: TYPENAME
DDTYPE_VAL_003(030),
data element: AS4TEXT
DDTEXT_004(060),
data element: EX_CDTF
CDTF_005(001),
data element: AS4TEXT
DDTEXT_006(060),
data element: DATATYPE_D
DATATYPE_007(010),
data element: DDLENG
LENG_008(006),
data element: OUTPUTLEN
OUTPUTLEN_009(006),
data element: EX_CDE
CDE_010(001),
data element: AS4TEXT
DDTEXT_011(060),
data element: DATATYPE_D
DATATYPE_012(010),
data element: DDLENG
LENG_013(006),
data element: OUTPUTLEN
OUTPUTLEN_014(006),
data element: AS4TEXT
DDTEXT_015(060),
data element:
ELEM_016(001),
data element:
DOMAIN_017(001),
data element: DOM_REF
DOMNAME_018(030),
data element: AS4TEXT
DDTEXT_019(060),
data element: CLASSTAB
TBMA_020(001),
data element: TABNAME16
TBMA_VAL_021(016),
data element: TYPENAME
DDTYPE_VAL_022(030),
end of record.
End generated data section ***
start-of-selection.
perform open_dataset using dataset.
perform open_group.
do.
read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=SHOW'.
perform bdc_field using 'RSRD1-TBMA'
record-TBMA_001.
perform bdc_field using 'RSRD1-TBMA_VAL'
record-TBMA_VAL_002.
perform bdc_field using 'RSRD1-DDTYPE_VAL'
record-DDTYPE_VAL_003.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'=WB_DISP_EDIT_TOGGLE'.
perform bdc_field using 'BDC_CURSOR'
'DD03P-FIELDNAME(01)'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'=WB_SELECT_OBJECT'.
perform bdc_field using 'DD02D-DDTEXT'
record-DDTEXT_004.
perform bdc_field using 'BDC_CURSOR'
'DD03D-ROLLNAME(05)'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=NO'.
perform bdc_dynpro using 'SAPLSD51' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=WB_WHERE_USED_LIST'.
perform bdc_dynpro using 'SAPICDE_' '0101'.
perform bdc_field using 'BDC_CURSOR'
'RSEUV-TDFIND'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RSEUX-CDTF'
record-CDTF_005.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'06/04'.
perform bdc_field using 'BDC_OKCODE'
'=WB_BACK'.
perform bdc_dynpro using 'SAPLSD51' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=WB_SELECT_OBJECT'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=NO'.
perform bdc_dynpro using 'SAPLSD01' '1200'.
perform bdc_field using 'BDC_CURSOR'
'DD01D-DDTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=WB_WHERE_USED_LIST'.
perform bdc_field using 'DD01D-DDTEXT'
record-DDTEXT_006.
perform bdc_field using 'DD01D-DATATYPE'
record-DATATYPE_007.
perform bdc_field using 'DD01D-LENG'
record-LENG_008.
perform bdc_field using 'DD01D-OUTPUTLEN'
record-OUTPUTLEN_009.
perform bdc_dynpro using 'SAPICDD_' '0101'.
perform bdc_field using 'BDC_CURSOR'
'RSEUV-TDFIND'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RSEUX-CDE'
record-CDE_010.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'04/04'.
perform bdc_field using 'BDC_OKCODE'
'=DELE'.
perform bdc_dynpro using 'SAPLSDYY' '0800'.
perform bdc_field using 'BDC_CURSOR'
'DDOBJ_TEXT'.
perform bdc_field using 'BDC_OKCODE'
'=GOON'.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_CURSOR'
'04/04'.
perform bdc_field using 'BDC_OKCODE'
'=WB_BACK'.
perform bdc_dynpro using 'SAPLSD01' '1200'.
perform bdc_field using 'BDC_CURSOR'
'DD01D-DDTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=WB_BACK'.
perform bdc_field using 'DD01D-DDTEXT'
record-DDTEXT_011.
perform bdc_field using 'DD01D-DATATYPE'
record-DATATYPE_012.
perform bdc_field using 'DD01D-LENG'
record-LENG_013.
perform bdc_field using 'DD01D-OUTPUTLEN'
record-OUTPUTLEN_014.
perform bdc_dynpro using 'SAPLSD51' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=WB_BACK'.
perform bdc_field using 'DD04D-DDTEXT'
record-DDTEXT_015.
perform bdc_field using 'BDC_CURSOR'
'DD04D-DOMNAME'.
perform bdc_field using 'RADIO-ELEM'
record-ELEM_016.
perform bdc_field using 'RADIO-DOMAIN'
record-DOMAIN_017.
perform bdc_field using 'DD04D-DOMNAME'
record-DOMNAME_018.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_OKCODE'
'=WB_BACK'.
perform bdc_field using 'DD02D-DDTEXT'
record-DDTEXT_019.
perform bdc_field using 'BDC_CURSOR'
'DD03D-ROLLNAME(05)'.
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_field using 'RSRD1-TBMA'
record-TBMA_020.
perform bdc_field using 'RSRD1-TBMA_VAL'
record-TBMA_VAL_021.
perform bdc_field using 'RSRD1-DDTYPE_VAL'
record-DDTYPE_VAL_022.
perform bdc_transaction using 'SE11'.
enddo.
perform close_group.
perform close_dataset using dataset.
-
Reward points if helpful....
Regards,
Omkar.
2007 Jun 04 11:02 AM
hi yanamala,
thanks for your reply.i wanted to know the code for catching the records(line items) into one header item into the internal table.
pls if you can send me that code i will surely be very happy to reward you with ten points.
thanks,
sultan.s
2007 Jun 04 10:50 AM
Hi,
Check the following links:
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
Regards,
Bhaskar
2007 Jun 04 10:56 AM
Hi,
Check this sample code.
report Z_XK01_REC_PRG_MUL_CTRL_FIELDS
no standard page heading line-size 255.
TABLES: RF02K,LFA1,LFBK,LFB1,LFM1.
DATA: BEGIN OF IT_ITAB OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
BUKRS LIKE RF02K-BUKRS,
EKORG LIKE RF02K-EKORG,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
BANKS(6) TYPE C,
BANKL(17) TYPE C,
BANKN(19) TYPE C,
AKONT LIKE LFB1-AKONT,
FDGRV LIKE LFB1-FDGRV,
WAERS LIKE LFM1-WAERS,
END OF IT_ITAB.
DATA: BEGIN OF BANKS OCCURS 0,
BANKS LIKE LFBK-BANKS,
END OF BANKS.
DATA: BEGIN OF BANKL OCCURS 0,
BANKL LIKE LFBK-BANKL,
END OF BANKL.
DATA: BEGIN OF BANKN OCCURS 0,
BANKN LIKE LFBK-BANKN,
END OF BANKN.
DATA : FLD(20) TYPE C,
CNT(2) TYPE N.
include bdcrecx1.
start-of-selection.
*CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'Z:/SS/MUL_REC_TAB.TXT'
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH = FILELENGTH
TABLES
DATA_TAB = it_itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
.
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'Z:/SS/MUL_REC_TAB.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = FILELENGTH
HEADER = HEADER
TABLES
DATA_TAB = it_itab
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_ITAB.
REFRESH BDCDATA.
REFRESH: BANKS,BANKL,BANKN.
SPLIT IT_ITAB-BANKS AT ',' INTO TABLE BANKS.
SPLIT IT_ITAB-BANKL AT ',' INTO TABLE BANKL.
SPLIT IT_ITAB-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_itab-lifnr.
perform bdc_field using 'RF02K-BUKRS'
it_itab-bukrs.
perform bdc_field using 'RF02K-EKORG'
it_itab-ekorg.
perform bdc_field using 'RF02K-KTOKK'
it_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-NAME1'
it_itab-name1.
perform bdc_field using 'LFA1-SORTL'
it_itab-sortl.
perform bdc_field using 'LFA1-LAND1'
it_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(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)'
'11111111'.
*perform bdc_field using 'LFBK-BANKL(02)'
'10010010'.
*perform bdc_field using 'LFBK-BANKN(01)'
'534634634'.
*perform bdc_field using 'LFBK-BANKN(02)'
'986678443'.
*perform bdc_dynpro using 'SAPMF02K' '0130'.
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_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_itab-akont.
perform bdc_field using 'LFB1-FDGRV'
it_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'
it_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_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_field using 'RSRD1-TBMA'
'X'.
perform bdc_transaction using 'XK01'.
endloop.
perform close_group.
This is the test data
bScdefgh 0001 0001 0001 xyz1234567890sssOMALI sss DE DE,DE 11111111,10010010 534634634,986678443 62130 A3 AUD
here the spaces are tab delimeters.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |