HOW TO PRINT THE EXCEL CELL COMMENT IN JAVA SWING FRAME ?
How to print the excel cell comment in java swing frame
user can print the data of cell with comment in bracket in java swing frame.
please make one java code to read an excel spreed sheet and print the output in Java swing frame as follows
EMP NO - 1, 2, 3
EMP NAME - aname (amitesh:very good), bname (amitesh: average), cname (amitesh: very bad)
EMP AGE - 11, 22, 33
EMP DESG - ad, bd, cd
Note: the bracket portion is the excel comments put in that cell
hello everyone i'm new to this forum..how are you all...
Jack Brosnan
[mobile phone|http://www.mobilephonesforsale.net.au/apple-iphone-f-2.html]
Similar Messages
-
How to fix the excel cell length in the sap
hi
i want to fix the excel cell length in the sap. how to fix
perform fill_cell1 using l_row l_col 1 wa_cat-seltext_l.
i want to fix the fill_cell1 how to do.
Regards,
sivakumarhi
good
go through this
The following thread has the code which will put data into multiple sheets
Download to multiple sheets in Excel
FOR COLOR LOGIC JUST REFER THIS PROGRAM
*& Report ZNEGI17 *
REPORT ZNEGI17 NO STANDARD PAGE HEADING.
this report demonstrates how to send some ABAP data to an
EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT. " font
TABLES: SPFLI.
DATA H TYPE I.
table of flights
DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
*& Event START-OF-SELECTION
START-OF-SELECTION.
read flights
SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
display header
ULINE (61).
WRITE: / SY-VLINE NO-GAP,
(3) 'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(4) 'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(8) 'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
ULINE /(61).
display flights
LOOP AT IT_SPFLI.
WRITE: / SY-VLINE NO-GAP,
IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
ENDLOOP.
ULINE /(61).
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-007
EXCEPTIONS
OTHERS = 1.
start Excel
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-008
EXCEPTIONS
OTHERS = 1.
get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - start
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP EXPORTING #1 = 2.
PERFORM ERR_HDL.
tell user what is going on
SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL1 USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL1 USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL1 USING 1 3 1 'Von'(003).
PERFORM FILL_CELL1 USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL1 USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - end
disconnect from Excel
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'C:\SKV.XLS'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
FORM FILL_CELL1 USING I J BOLD VAL.
data : color(5) type x value 'H80000008'.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'Bold' = BOLD .
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'ColorIndex' = 3 .
PERFORM ERR_HDL.
ENDFORM.
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
*& Form FILL_CELL1
text
-->P_H text
-->P_1 text
-->P_0 text
-->P_IT_SPFLI_CARRID text
form FILL_CELL using I J BOLD VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
endform. " FILL_CELL1
thanks
mrutyun^ -
How to Print the Excel Sheet From Labview??
Hii Every body,,
Actually i am logging my data to Excel Template..... Now in my front panel i will select that excel file and give print... Now automatically the datas in the excel sheet have to get printed with out opening the excel sheel... how to do?? can any 1 suggest me??I think you can get many/most of your answers here in the Excel Board thread in Breakpoint forum.
- Partha
LabVIEW - Wires that catch bugs! -
How to unfreeze the excel cells
Dear All,
Please i haven a file with freeze cells please i need to unfreeze cells urgently please help.
MS USERHi,
Check out this one "How to Lock or Unlock Excel cells".
For more:
http://office.microsoft.com/en-001/excel-help/lock-or-unlock-specific-areas-of-a-protected-worksheet-HA010096837.aspx
http://office.microsoft.com/en-001/excel-help/unlock-protected-cells-HA102809343.aspx
Note: Improve community discussions by marking the answers helpful.
Thanks
Clark Kent -
How can I view all comments in a Pages doc and print the doc with comments?
It seems that we can no longer view comments in the margin of a document. It is also not possible to print the document with comments visible. Anyone else having this problem? Pages 09 Help does not even offer an up-to-date explanation. "Show Comments" only shows color shading. The option “Show Comments and Changes Pane" does not even exist. How can I get the comments to print???
You will have to wait for Apple to fix this deficiency in a forthcoming update to Pages v5. Or, you could use Pages ’09 v4.3, if originally installed before the v5 upgrade, and located in /Applications/iWork '09.
Otherwise, use another solution (e.g. Office for Mac 2011, LibreOffice). -
How to print the row ,column,and particular cell in separate color
how to print the row ,column,and particular cell in separate color IN ALV GRID
HI,
Here you go good program links
<a href="http://www.sapfans.com/forums/viewtopic.php?t=52107">How to Set Color to a Cell in AVL</a>
<a href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm">ALV Grid Coloring</a>
Thanks
Mahesh -
How to print a specific cell in numbers
how to print a specific cell in numbers?
Copy the cell (contents), Paste onto a page of a separate document, or onto a separate sheet of your Numbers document, Print.
Or insert a single cell table onto your Numbers document, type an = sign in the cell then click on the cell you want to print. Drag the new table to a second sheet, set up your page there, and print.
See the Numbers '09 User Guide for other useful tools and techniques. Download the guide via the Help menu in Nuimbers.
Regards,
Barry -
How to print the file name in sap
Hi All,
I have requirment like,
there is a folder in my local system, inside that folder there are 10 Excel file like file1.xls,file2.xls..............file10.xls
how to print the file name of all these file in SAp like
file1.xls
file2.xls
file3.xls
file4.xls
file10.xls
Appropriate points will be rewarded.
Thanks in Advance
Arun kumarHi,
Still you are facing any problem with this code expalin the problem with details , otherwise close this thread.
Use Method <b>cl_gui_frontend_services=>directory_list_files</b> to read file names for a given directory
after reading the files then Use FM : <b>RSPO_SX_OUTPUT_TEXTDATA</b> to create spool from internal table data and print the data.
<b>sample code :</b>
data: desktop_dir type string.
data: ifiles type table of string.
data: xfiles type string.
data: count type i.
data: filepath type string.
call method cl_gui_frontend_services=>get_desktop_directory
changing
desktop_directory = desktop_dir .
call method cl_gui_cfw=>flush.
call method cl_gui_frontend_services=>directory_list_files
exporting
directory = desktop_dir
* filter = '*.xls'
files_only = 'X'
* DIRECTORIES_ONLY =
changing
file_table = ifiles
count = count.
DATA : x_name LIKE tsp03d-name,
x_dest LIKE tsp03d-padest VALUE 'LOCL',
x_rows LIKE sxpcklsti1-body_num VALUE 0,
x_startrow LIKE sxpcklsti1-body_start VALUE 1,
x_pages LIKE rspotype-pages VALUE 1,
x_pages_1 TYPE p DECIMALS 2,
x_rqtitle LIKE sxpcklsti1-obj_descr,
x_rqcopies TYPE i VALUE 1,
x_rqowner LIKE trdyse01cm-username,
x_immediate LIKE pri_params-primm VALUE ' ',
x_rqid LIKE tsp01-rqident,
i_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
x_pages = 1.
x_rqowner = sy-uname.
x_dest = 'LOCL'.
x_startrow = 1.
x_rqcopies = 1.
x_immediate = 'X' .
CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
EXPORTING
* name = x_name
dest = x_dest
rows = x_rows
startrow = x_startrow
pages = x_pages
rqtitle = x_rqtitle
rqcopies = x_rqcopies
rqowner = x_rqowner
immediately = x_immediate
IMPORTING
rqid = x_rqid
TABLES
text_data = i_contents
EXCEPTIONS
name_missing = 1
name_twice = 2
not_found = 3
illegal_layout = 4
internal_error = 5
size_mismatch = 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.
Regards
Appana
*Reward Points for helpful answers
Message was edited by: L Appana -
How to print the picture in PDF ?
I developed a plug-in(Annot) that dynamically display a picture according some condition in PDF,but the picture cannot be printed. How to print the picture ?
In the print dialog, make sure that Print: Comments (which means
annotations) is on.
Aandi Inston -
How to print a particular cell data from .xls file
InputStream inputStream =new FileInputStream("D:\\test.xls");
POIFSFileSystem fileSystem=new POIFSFileSystem (inputStream);
HSSFWorkbook workBook = new HSSFWorkbook (fileSystem);
HSSFSheet sheet = workBook.getSheetAt (0);
Iterator<HSSFRow> rows = sheet.rowIterator ();
HSSFRow row = rows.next ();
Iterator<HSSFCell> cells = row.cellIterator ();
HSSFCell cell = cells.next ();
can any get me answer to print the particular cell from the excel sheet.
Regards
PraveenThank you for your response
when i written the in following way
HSSFWorkbook workbook = new HSSFWorkbook(new
FileInputStream("D:\\sam.xls"));
HSSFSheet sheet = workbook.getSheetAt(1);
HSSFRow row = sheet.getRow(0);
HSSFCell cell = row.getCell((short)3);
int as= sheet.getFirstRowNum();
int bs=sheet.getLastRowNum();
System.out.println("Begin of row"+as);
System.out.println("End of row"+bs);
Is Displayed as
Begin of row 0
End of row 0
can any one plz let me know the procedures to print first and last row number of a .xls sheet
ans also the column number please. -
How to print the error records and success records in bdc
how to print the number of error records and success records in bdc
hai,
plz refer this program,
Z_130399130271_A
REPORT Z_130399130271_A
NO STANDARD PAGE HEADING LINE-SIZE 325.
*INCLUDE YVALIDATE.
*include bdcrecx1.
INCLUDE YINCLUDE399.
DATA ITAB LIKE TABLE OF FILE_TABLE WITH HEADER LINE.
PARAMETERS: DATASET(132) LOWER CASE.
DATA : RC TYPE I,
ERR(40) TYPE C,
SUCCESSCNT TYPE I VALUE 0,
FAILCOUNT TYPE I VALUE 0.
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 OCCURS 0,
data element: LIF16
LIFNR_001(016),
data element: KTOKK
KTOKK_002(004),
data element: ANRED
ANRED_003(015),
data element: NAME1_GP
NAME1_004(035),
data element: SORTL
SORTL_005(010),
data element: STRAS_GP
STRAS_006(035),
data element: PFACH
PFACH_007(010),
data element: ORT01_GP
ORT01_008(035),
data element: ORT02_GP
ORT02_009(035),
data element: LAND1_GP
LAND1_010(003),
data element: REGIO
REGIO_011(003),
data element: SPRAS
SPRAS_012(002),
data element: TELF1
TELF1_013(016),
data element: TELF2
TELF2_014(016),
data element: BANKS
BANKS_01_015(003),
data element: BANKK
BANKL_01_016(015),
data element: BANKN
BANKN_01_017(018),
END OF RECORD.
DATA: BEGIN OF ERRORITAB OCCURS 0,
LIFNR_001 LIKE LFA1-LIFNR,
KTOKK_002 LIKE LFA1-KTOKK,
ANRED_003 LIKE LFA1-ANRED,
NAME1_004 LIKE LFA1-NAME1,
SORTL_005 LIKE LFA1-SORTL,
STRAS_006 LIKE LFA1-STRAS,
PFACH_007 LIKE LFA1-PFACH,
ORT01_008 LIKE LFA1-ORT01,
ORT02_009 LIKE LFA1-ORT02,
LAND1_010 LIKE LFA1-LAND1,
REGIO_011 LIKE LFA1-REGIO,
SPRAS_012 LIKE LFA1-SPRAS,
TELF1_013 LIKE LFA1-TELF1,
TELF2_014 LIKE LFA1-TELF2,
BANKS_01_015 LIKE LFBK-BANKS,
BANKL_01_016 LIKE LFBK-BANKL,
BANKN_01_017 LIKE LFBK-BANKN,
ERRORMSG(60) TYPE C,
SERIAL TYPE I VALUE '1',
END OF ERRORITAB.
End generated data section ***
AT SELECTION-SCREEN ON VALUE-REQUEST FOR DATASET.
CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
EXPORTING
WINDOW_TITLE = 'select a file '
DEFAULT_EXTENSION = 'TXT'
DEFAULT_FILENAME = 'ASSIGN5.TXT'
FILE_FILTER =
INIT_DIRECTORY =
MULTISELECTION =
IMPORTING
RC =
TABLES
FILE_TABLE = ITAB
EXCEPTIONS
CNTL_ERROR = 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.
READ TABLE ITAB INDEX 1.
DATASET = ITAB-FILENAME.
WRITE DATASET.
START-OF-SELECTION.
*perform open_dataset using dataset.
*perform open_group.
DATA T TYPE STRING.
T = DATASET.
IF T EQ ' '.
MESSAGE E110(ZX).
ENDIF.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = T
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 = RECORD
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.
LOOP AT RECORD.
CLEAR RC.
CLEAR ERR.
*read dataset dataset into record.
IF SY-SUBRC <> 0. EXIT. ENDIF.
RECORD-KTOKK_002 = '0001'.
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'
RECORD-LIFNR_001.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
RECORD-KTOKK_002.
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-ANRED'
RECORD-ANRED_003.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
RECORD-NAME1_004.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
RECORD-SORTL_005.
PERFORM BDC_FIELD USING 'LFA1-STRAS'
RECORD-STRAS_006.
PERFORM BDC_FIELD USING 'LFA1-PFACH'
RECORD-PFACH_007.
PERFORM BDC_FIELD USING 'LFA1-ORT01'
RECORD-ORT01_008.
PERFORM BDC_FIELD USING 'LFA1-ORT02'
RECORD-ORT02_009.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
RECORD-LAND1_010.
PERFORM BDC_FIELD USING 'LFA1-REGIO'
RECORD-REGIO_011.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
RECORD-SPRAS_012.
PERFORM BDC_FIELD USING 'LFA1-TELF1'
RECORD-TELF1_013.
PERFORM BDC_FIELD USING 'LFA1-TELF2'
RECORD-TELF2_014.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=VW'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFBK-BANKN(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_FIELD USING 'LFBK-BANKS(01)'
RECORD-BANKS_01_015.
PERFORM BDC_FIELD USING 'LFBK-BANKL(01)'
RECORD-BANKL_01_016.
PERFORM BDC_FIELD USING 'LFBK-BANKN(01)'
RECORD-BANKN_01_017.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=UPDA'.
PERFORM BDC_TRANSACTION USING 'XK01' CHANGING ERR RC.
DATA: SERIAL TYPE I VALUE 1.
IF RC <> 0.
FAILCOUNT = FAILCOUNT + 1.
CLEAR ERRORITAB.
ERRORITAB-SERIAL = SERIAL.
ERRORITAB-LIFNR_001 = RECORD-LIFNR_001.
ERRORITAB-KTOKK_002 = RECORD-KTOKK_002.
ERRORITAB-ANRED_003 = RECORD-ANRED_003.
ERRORITAB-NAME1_004 = RECORD-NAME1_004.
ERRORITAB-SORTL_005 = RECORD-SORTL_005.
ERRORITAB-STRAS_006 = RECORD-STRAS_006.
ERRORITAB-PFACH_007 = RECORD-PFACH_007.
ERRORITAB-ORT01_008 = RECORD-ORT01_008.
ERRORITAB-ORT02_009 = RECORD-ORT02_009.
ERRORITAB-LAND1_010 = RECORD-LAND1_010.
ERRORITAB-REGIO_011 = RECORD-REGIO_011.
ERRORITAB-SPRAS_012 = RECORD-SPRAS_012.
ERRORITAB-TELF1_013 = RECORD-TELF1_013.
ERRORITAB-TELF2_014 = RECORD-TELF2_014.
ERRORITAB-BANKS_01_015 = RECORD-BANKS_01_015.
ERRORITAB-BANKL_01_016 = RECORD-BANKL_01_016.
ERRORITAB-BANKN_01_017 = RECORD-BANKN_01_017.
ERRORITAB-ERRORMSG = ERR.
SERIAL = SERIAL + 1.
APPEND ERRORITAB.
MODIFY RECORD TRANSPORTING KTOKK_002.
DELETE RECORD WHERE KTOKK_002 = '0001'.
ELSE.
SUCCESSCNT = SUCCESSCNT + 1.
ENDIF.
ENDLOOP.
display output********************************************************
SKIP.
FORMAT COLOR 5 INTENSIFIED OFF.
WRITE:/ 'No. of records successfully uploaded: '.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE: SUCCESSCNT.
Displaying the success table******************************************
IF SUCCESSCNT <> 0.
SKIP.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE:/ 'Successful Records'.
FORMAT COLOR 7 INTENSIFIED ON.
WRITE:/(261) SY-ULINE,
/ SY-VLINE,
'S.NO', 007 SY-VLINE,
'VENDOR ACC.NUM', 023 SY-VLINE,
'VENDOR ACC GROUP', 041 SY-VLINE,
'TITLE', 048 SY-VLINE,
'VENDOR NAME', 064 SY-VLINE,
'SORT FIELD', 076 SY-VLINE,
'HOUSE NO.& STREET', 101 SY-VLINE,
'PO.BOX NO', 116 SY-VLINE,
'CITY', 129 SY-VLINE,
'DISTRICT', 141 SY-VLINE,
'COUNTRY KEY', 156 SY-VLINE,
'REGION', 166 SY-VLINE,
'LANGUAGE KEY', 180 SY-VLINE,
'TELEPHONE NO 1', 196 SY-VLINE,
'TELEPHONE NO 2', 213 SY-VLINE,
'BANK COUNTRY KEY', 231 SY-VLINE,
'BANK KEY', 241 SY-VLINE,
'BANK ACC.NO', 261 SY-VLINE,
/1(261) SY-ULINE.
FORMAT COLOR 4 INTENSIFIED ON.
SERIAL = 1.
SORT RECORD BY LIFNR_001.
LOOP AT RECORD.
WRITE:/ SY-VLINE,
SERIAL LEFT-JUSTIFIED, 007 SY-VLINE,
RECORD-LIFNR_001(016), 023 SY-VLINE,
RECORD-KTOKK_002(004), 041 SY-VLINE,
RECORD-ANRED_003(015), 048 SY-VLINE,
RECORD-NAME1_004(035), 064 SY-VLINE,
RECORD-SORTL_005(010), 076 SY-VLINE,
RECORD-STRAS_006(035), 101 SY-VLINE,
RECORD-PFACH_007(010), 116 SY-VLINE,
RECORD-ORT01_008(035), 129 SY-VLINE,
RECORD-ORT02_009(035), 141 SY-VLINE,
RECORD-LAND1_010(003), 156 SY-VLINE,
RECORD-REGIO_011(003), 166 SY-VLINE,
RECORD-SPRAS_012(002), 180 SY-VLINE,
RECORD-TELF1_013(016), 196 SY-VLINE,
RECORD-TELF2_014(016), 213 SY-VLINE,
RECORD-BANKS_01_015(003), 231 SY-VLINE,
RECORD-BANKL_01_016(015), 241 SY-VLINE,
RECORD-BANKN_01_017(018), 261 SY-VLINE.
WRITE:/(261) SY-ULINE.
SERIAL = SERIAL + 1.
ENDLOOP.
WRITE:/1(261) SY-ULINE.
ENDIF.
SKIP.
FORMAT COLOR 5 INTENSIFIED OFF.
WRITE:/ 'No. of records not uploaded: '.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE: FAILCOUNT.
*Displaying the error table
IF FAILCOUNT <> 0.
SKIP.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE:/(320) SY-ULINE,
'Error Records'.
FORMAT COLOR 7 INTENSIFIED ON.
WRITE:/ SY-ULINE, SY-VLINE,
'S.NO', 007 SY-VLINE,
'VENDOR ACC.NUM', 023 SY-VLINE,
'VENDOR ACC GROUP', 041 SY-VLINE,
'TITLE', 048 SY-VLINE,
'VENDOR NAME', 064 SY-VLINE,
'SORT FIELD', 076 SY-VLINE,
'HOUSE NO.& STREET', 101 SY-VLINE,
'PO.BOX NO', 116 SY-VLINE,
'CITY', 129 SY-VLINE,
'DISTRICT', 141 SY-VLINE,
'COUNTRY KEY', 156 SY-VLINE,
'REGION', 166 SY-VLINE,
'LANGUAGE KEY', 180 SY-VLINE,
'TELEPHONE NO 1', 196 SY-VLINE,
'TELEPHONE NO 2', 213 SY-VLINE,
'BANK COUNTRY KEY', 231 SY-VLINE,
'BANK KEY', 241 SY-VLINE,
'BANK ACC.NO', 261 SY-VLINE,
'ERROR MESSAGE', 320 SY-VLINE.
WRITE:/(320) SY-ULINE.
FORMAT COLOR 4 INTENSIFIED ON.
SORT ERRORITAB BY LIFNR_001.
LOOP AT ERRORITAB.
WRITE:/ SY-VLINE,
ERRORITAB-SERIAL LEFT-JUSTIFIED, 007 SY-VLINE,
ERRORITAB-LIFNR_001 , 023 SY-VLINE,
ERRORITAB-KTOKK_002, 041 SY-VLINE,
ERRORITAB-ANRED_003, 048 SY-VLINE,
ERRORITAB-NAME1_004, 064 SY-VLINE,
ERRORITAB-SORTL_005, 076 SY-VLINE,
ERRORITAB-STRAS_006, 101 SY-VLINE,
ERRORITAB-PFACH_007, 116 SY-VLINE,
ERRORITAB-ORT01_008, 129 SY-VLINE,
ERRORITAB-ORT02_009, 141 SY-VLINE,
ERRORITAB-LAND1_010, 156 SY-VLINE,
ERRORITAB-REGIO_011, 166 SY-VLINE,
ERRORITAB-SPRAS_012, 180 SY-VLINE,
ERRORITAB-TELF1_013, 196 SY-VLINE,
ERRORITAB-TELF2_014, 213 SY-VLINE,
ERRORITAB-BANKS_01_015, 231 SY-VLINE,
ERRORITAB-BANKL_01_016, 241 SY-VLINE,
ERRORITAB-BANKN_01_017, 261 SY-VLINE,
ERRORITAB-ERRORMSG, 320 SY-VLINE.
WRITE:/(320) SY-ULINE.
ENDLOOP.
WRITE:/ SY-ULINE.
ENDIF.
hope this ll help you..
regards,
prema.A -
How to print the picture ?
I developed a plug-in(Annot) that dynamically display a picture according some condition,but the picture cannot be printed. How to print the picture ?
In the print dialog, make sure that Print: Comments (which means
annotations) is on.
Aandi Inston -
How to print the superscript in smartform
Hi gurus,
Please tell me the procedure how to print the superscript in middle of the text displaying?
when we are displaying the smartform its converted to some special character like & .
please let me know procedure at the earliest
Regards
RajHi thanks for ur patience.
see my requirment was to print TM as superscript for HLL ,already smartstyle is there, and also a character format with superscript is also defined.
then aftet HLL how it prints as superscript.
for HLL we are using another character format and for superscript we are using the another character format.
If posiible send me the code to write in smartforms
Regards
RAj
Points are awarded for useful answers. -
How to print the script in condensed mode
Hi to all,
Pls help me.
How to print the script in condensed mode and particular window only print in the condensed mode.Hi,
Hi
It will remove the blank spaces in front of the variable
and if you use the extension NO-GAPS
It will remove all the blank spaces in the variable field.
DATA: ws_val1 type char12.
ws_val1 = ' 100 123'.
Condense ws_val1.
Write / ws_val1.
Condense ws_val1 no-gaps.
write / ws_val1.
It will give output as
100 123
100123
The CONDENSE statement deletes redundant spaces from a string:
CONDENSE c NO-GAPS.
This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
Please check this link for sample code.
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
Regards,
Raj. -
How to print the text in points wise in sap script
hi friends,
how to print the text in points wise in sap script.
ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
1. hai how ru.
2. what r u doing.
3.where r u.
like this i want numbering.. waiting for ur replys.
thanks,
kirandeclare a counter
data : cnt type char 4.
print :
cnt = cnt + 1.
&cnt& &text&
cnt = cnt + 1. and so on.
or.
if the data is in an internal table
loop at internal_table.
cnt = cnt + 1.
write form.
in script -&cnt& &text&
endloop.
Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM
Maybe you are looking for
-
The table name for the system generated transactions (Retained Earnings).
Hi Gurus, I have a doubt and want to know from U experts there. Hope you won't let me down. The situation is I have created a new chart of account in our Oracle Financial. Uploaded 2007 transactions and opened year 2008 and closed all the periods of
-
Error while uploading file into KM
Hi Experts, I m getting error while uploading file into KM. Its throwing an error message like " Syngenta-POC.doc" does not exist, or file is empty; you cannot upload empty files" please assists me.
-
How to create an element in component controler
Hi Experts, I need to validate the data of a model node in component controler and add those validated records in other value node. For that I need to write a loop where in i can repeat the records for validation. How can i create the element in the
-
No sound through tv when hooked hdmi hpdv7 4069 sound only shows idt high def codec
win 7 64 HPdv7 4069wm notebook not reconizing hdmi device manager sound, video only show idt high def codec display adapter shows amd m880G with ati mobility radeon HD4250 & ati mobility radeon
-
Re: Windows 8 reinstall - productkey issue
Hello, Due to a destructive virus I had to wipe my harddisk. Now I am trying to reinstall Windows 8. I use a Windows 8 OEM DVD for this which I purchased with a new PC. It asks for a productkey, which I don't have. I understand the productkey should