Skip to Content
1
Former Member
Jun 30, 2007 at 12:50 PM

BDc recording

17 Views

WE are uploading the data for G/L A/Cs using BDC method , all of the steps are done but recording not possible plz check my coding given suggestion

===========================================================

report ZPR1 no standard page heading line-size 255.

include bdcrecx1.

data: begin of itab occurs 0,

saknr(010),

bukrs(004),

ktoks(004),

txt20_ml(020),

txt50_ml(050),

waers(005),

zuawa(003),

fstag(004),

end of itab.

start-of-selection.

CALL FUNCTION 'UPLOAD'

EXPORTING

  • CODEPAGE = ' '

FILENAME = 'c:\ritu.prn '

FILETYPE = 'asc '

  • ITEM = ' '

  • FILEMASK_MASK = ' '

  • FILEMASK_TEXT = ' '

  • FILETYPE_NO_CHANGE = ' '

  • FILEMASK_ALL = ' '

  • FILETYPE_NO_SHOW = ' '

  • LINE_EXIT = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • SILENT = 'S'

  • IMPORTING

  • FILESIZE =

  • CANCEL =

  • ACT_FILENAME =

  • ACT_FILETYPE =

TABLES

data_tab = itab.

  • 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.

perform open_group.

loop at itab.

perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.

perform bdc_field using 'BDC_CURSOR'

'GLACCOUNT_SCREEN_KEY-SAKNR'.

perform bdc_field using 'BDC_OKCODE'

'=ACC_CRE'.

perform bdc_field using 'GLACCOUNT_SCREEN_KEY-SAKNR'

'4400359'.

perform bdc_field using 'GLACCOUNT_SCREEN_KEY-BUKRS'

'7001'.

perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.

perform bdc_field using 'BDC_OKCODE'

'=2102_GROUP'.

perform bdc_field using 'BDC_CURSOR'

'GLACCOUNT_SCREEN_COA-KTOKS'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'

'440'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'

'X'.

perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.

perform bdc_field using 'BDC_OKCODE'

'=2102_BS_PL'.

perform bdc_field using 'BDC_CURSOR'

'GLACCOUNT_SCREEN_COA-XBILK'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'

'440'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-XPLACCT'

''.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'

'X'.

perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.

perform bdc_field using 'BDC_OKCODE'

'=TAB02'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-KTOKS'

'440'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-XBILK'

'X'.

perform bdc_field using 'BDC_CURSOR'

'GLACCOUNT_SCREEN_COA-TXT20_ML'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT20_ML'

'SS'.

perform bdc_field using 'GLACCOUNT_SCREEN_COA-TXT50_ML'

'AA'.

perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.

perform bdc_field using 'BDC_OKCODE'

'=TAB03'.

perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-WAERS'

'INR'.

perform bdc_field using 'BDC_CURSOR'

'GLACCOUNT_SCREEN_CCODE-ZUAWA'.

perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-ZUAWA'

'001'.

perform bdc_dynpro using 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_field using 'BDC_CURSOR'

'GLACCOUNT_SCREEN_CCODE-FSTAG'.

perform bdc_field using 'GLACCOUNT_SCREEN_CCODE-FSTAG'

'G001'.

perform bdc_transaction using 'FS00'.

endloop.