2009 Sep 03 10:34 AM
Dear all
This program only upload the 800 line item
we want the data upload through Excle sheet 9000 line item , i am new in abap
please advise how can increase the no of the line item ,if possible please add the program on same
REPORT ZBDC_PROGRAME.
TYPE-POOLS: VRM.
SELECTION-SCREEN BEGIN OF BLOCK BACH WITH FRAME TITLE FRAME1.
SELECTION-SCREEN SKIP 2.
PARAMETERS: P_RTYPE(10) TYPE C AS LISTBOX VISIBLE LENGTH 30.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN END OF BLOCK BACH.
INITIALIZATION.
PERFORM FFILL_REPORT_TYPES.
START-OF-SELECTION.
IF P_RTYPE EQ 'NO1'.
CALL TRANSACTION 'ZVEND_MASTER_FI'.
... " other alternatives
ELSEIF P_RTYPE EQ 'NO31'.
CALL TRANSACTION 'ZME21N_K'.
ENDIF.
*&---------------------------------------------------------------------*
*& Form FFILL_REPORT_TYPES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FFILL_REPORT_TYPES .
DATA: LS_LIST TYPE VRM_VALUES,
LS_NAME TYPE VRM_ID,
LS_VALUE LIKE LINE OF LS_LIST.
LS_NAME = 'P_RTYPE'.
LS_VALUE-KEY = 'NO1'.
LS_VALUE-TEXT = 'Vendor master FI/CO'.
APPEND LS_VALUE TO LS_LIST.
CLEAR LS_VALUE.
... lots of other values
LS_VALUE-KEY = 'NO31'.
LS_VALUE-TEXT = 'PO Upload Acc assig category - k'.
APPEND LS_VALUE TO LS_LIST.
CLEAR LS_VALUE.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = LS_NAME
VALUES = LS_LIST
* EXCEPTIONS
* ID_ILLEGAL_NAME = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " FFILL_REPORT_TYPESthnaks
venkat
Edited by: Matt on Sep 3, 2009 12:09 PM
2009 Sep 03 11:13 AM
I've edited your program so that it fits within the 2500 character limit. I don't think I deleted anything of importance. I cannot see what relevance your program has to your question.
Please note: in future only post the relevant parts of your program.
And from a programming point of view - learn how to paramaterise instead of repeating the same code over and over and over...
matt
Dear all
This program only upload the 800 line item
we want the data upload through Excle sheet 9000 line item , i am new in abap
please advise how can increase the no of the line item ,if possible please add the program on same
REPORT ZBDC_PROGRAME.
TYPE-POOLS: VRM.
SELECTION-SCREEN BEGIN OF BLOCK BACH WITH FRAME TITLE FRAME1.
SELECTION-SCREEN SKIP 2.
PARAMETERS: P_RTYPE(10) TYPE C AS LISTBOX VISIBLE LENGTH 30.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN END OF BLOCK BACH.
INITIALIZATION.
PERFORM FFILL_REPORT_TYPES.
START-OF-SELECTION.
IF P_RTYPE EQ 'NO1'.
CALL TRANSACTION 'ZVEND_MASTER_FI'.
... " other alternatives
ELSEIF P_RTYPE EQ 'NO31'.
CALL TRANSACTION 'ZME21N_K'.
ENDIF.
*&---------------------------------------------------------------------*
*& Form FFILL_REPORT_TYPES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FFILL_REPORT_TYPES .
DATA: LS_LIST TYPE VRM_VALUES,
LS_NAME TYPE VRM_ID,
LS_VALUE LIKE LINE OF LS_LIST.
LS_NAME = 'P_RTYPE'.
LS_VALUE-KEY = 'NO1'.
LS_VALUE-TEXT = 'Vendor master FI/CO'.
APPEND LS_VALUE TO LS_LIST.
CLEAR LS_VALUE.
... lots of other values
LS_VALUE-KEY = 'NO31'.
LS_VALUE-TEXT = 'PO Upload Acc assig category - k'.
APPEND LS_VALUE TO LS_LIST.
CLEAR LS_VALUE.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = LS_NAME
VALUES = LS_LIST
* EXCEPTIONS
* ID_ILLEGAL_NAME = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " FFILL_REPORT_TYPESthnaks
venkat
Edited by: Matt on Sep 3, 2009 12:09 PM
2009 Sep 03 11:13 AM
I've edited your program so that it fits within the 2500 character limit. I don't think I deleted anything of importance. I cannot see what relevance your program has to your question.
Please note: in future only post the relevant parts of your program.
And from a programming point of view - learn how to paramaterise instead of repeating the same code over and over and over...
matt
2009 Sep 03 12:58 PM
Venkat,
Are you trying to Upload 9000 or n number of records from Excel to Internal table ?.
Kanagaraja L
2009 Sep 03 1:01 PM
Hi,
Check out the code BDC for VK11.
REPORT zbdc_vk11
NO STANDARD PAGE HEADING LINE-SIZE 255.
INCLUDE bdcrecx1.
PARAMETER:pr_file LIKE rlgrap-filename OBLIGATORY.
DATA: w_filenm LIKE rlgrap-filename.
DATA: rawdata(4096) TYPE c OCCURS 0.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = pr_file
mask = ',*.xls.'
mode = 'O'
title = 'Upload File'(i03)
IMPORTING
filename = pr_file
START-OF-SELECTION.
WRITE pr_file TO w_filenm.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
i_tab_raw_data = rawdata
i_filename = w_filenm
TABLES
i_tab_converted_data = itab.
<add your BDC recording here>
Regards,
Amit
Edited by: Amit Iyer on Sep 3, 2009 5:32 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |