Problem When Formatting Functions
When I right click on a function that I am editing and click on format. My line comments are all stripped away.
Regardless of comment style --- or /* */
Here are some samples:
-- This function is called from within ApEx
/* tada
line two
Both comment sets above are completely removed when I format.
SQL Developer
Version 1.5.1 Build MAIN-5440 Windows XP SP3
DB: 10.2.0.3 EE
Thanks,
Justin
Hi Justin,
My comments are not removed, there is an option to remove comments, is that set?
Tools->Database->SQL Formatter->Other, Special Formatting 'Delete Comment'
-Turloch
Similar Messages
-
Problem when calling function module CV120_DOC_CHECKOUT_VIEW in background
Hi ,
I'm currently developping an abap program which extract document from KPRO for printing into a windows Folder.
For this I use standard function module CV120_DOC_CHECKOUT_VIEW.
When i run my program in foreground task there's no problem, but when i run it in background task the extract doesn't work. It seems that the system cannot connect to the Windows Network.
Whe the program is running in foreground task, the function module user SAPHHTP RFC destination, when it runs in background task it use SAPFTP destination .
Does somebody can help me ?
thanks in advanceHi Ajay,
The program extract document into a folder on Windows Network that means on a server not on a PC .
I know that in background task ther's no connection with sapgui.
For example when i want to create a file on network n background task i use OPEN_DATASET instruction and that works fine.
My problem is the use of the standard function module CV120_DOC_CHECKOUT_VIEW in background task because when this function module is running in background task it use the SAPFTP rfc destination instead of SAPHHTP rfc destination in foreground task . I check the RFC destination , thoses works both . SO i think the problem comes from parameters given to the function module.
Regards. -
Problem when using function module : SO_NEW_DOCUMENT_SEND_API1
hi,all
when i use this function module to send external email ,a strange problem has been encountered. After executing this FM,i find that the return parameters SY-SUBRC = 0 . but when i use tcode SCOT to check the email in SAP email box,nothing has been found.
could anyone please give me a clue about where the error occur ?you can try using commit work fter sy-subrc check.
and also Try calling this Function module SO_DEQUEUE_UPDATE_LOCKS
if sy-subrc eq 0.
commit work.
call function 'SO_DEQUEUE_UPDATE_LOCKS'.
endif. -
Problem when using function module PYXX_READ_PAYROLL_RESULT giving dump.
When i am using PYXX_READ_PAYROLL_RESULT function module to get HR cluster data. I am getting following dump.
So,can any one help me to solve this issue.I want this function data.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "PYXX_READ_PAYROLL_RESULT" "(FUNCTION)", nor was it propagated by a
RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
Call to FORM "IMPORT_RESULT" is incorrect:
The actual parameter no. 2 has a different data type in the
PERFORM than requested for the FORM "IMPORT_RESULT" in program "%_T0LJ20".
Program SAPLHRPAY99_IMPEXP
Include LHRPAY99_IMPEXPU02
Row 1
Module type (FUNCTION)
Module Name PYXX_READ_PAYROLL_RESULT
Program SAPLHRPAY99_IMPEXP
Include LHRPAY99_IMPEXPU02
Row 137
Module type (FUNCTION)
Module Name PYXX_READ_PAYROLL_RESULTFind below is my code can u tell me wch type is not true .i tried but not able to find prob solution.
Plz help me waiting for reply.
TYPE-POOLS: SLIS.
DATA : FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid,
gt_events TYPE slis_t_event,
gd_prntparams TYPE slis_print_alv,
it_eve TYPE slis_t_event,
V_LAYOUT TYPE SLIS_LAYOUT_ALV.
wa_eve TYPE slis_alv_event.
*DATA header TYPE slis_t_listheader WITH HEADER LINE.
*DATA: ls_fcat TYPE slis_t_fieldcat_alv,
l_lin TYPE i.
*DATA: ls_event TYPE slis_alv_event.
DATA : WA_COLNO(2) TYPE N VALUE '1'.
DATA : REPID LIKE SY-REPID.
TABLES: PA0001,PA0002,T001P,T528T,T527X,T503T.
DATA:BEGIN OF IT_PA0002 OCCURS 0,
PERNR LIKE PA0002-PERNR,
END OF IT_PA0002.
DATA:BEGIN OF IT_PA0001 OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
PLANS LIKE PA0001-PLANS,
WERKS LIKE PA0001-WERKS,
BTRTL LIKE PA0001-BTRTL,
ORGEH LIKE PA0001-ORGEH,
PERSK LIKE PA0001-PERSK,
END OF IT_PA0001.
DATA: BEGIN OF IT_T528T OCCURS 0,
PLANS LIKE T528T-PLANS,
PLSTX LIKE T528T-PLSTX,
END OF IT_T528T.
DATA: BEGIN OF IT_T001P OCCURS 0,
WERKS LIKE T001P-WERKS,
BTRTL LIKE T001P-BTRTL,
BTEXT LIKE T001P-BTEXT,
END OF IT_T001P.
DATA: BEGIN OF IT_T527X OCCURS 0,
ORGEH LIKE T527X-ORGEH,
ORGTX LIKE T527X-ORGTX,
END OF IT_T527X.
DATA: BEGIN OF IT_T503T OCCURS 0,
PERSK LIKE T503T-PERSK,
PTEXT LIKE T503T-PTEXT,
END OF IT_T503T.
DATA:BEGIN OF IT_FINAL OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
PLSTX LIKE T528T-PLSTX,
BTEXT LIKE T001P-BTEXT,
ORGTX LIKE T527X-ORGTX,
PTEXT LIKE T503T-PTEXT,
END OF IT_FINAL.
*DATA: WI_RT LIKE LINE OF PAYROLL-INTER-RT,
*DATA: WI_RGDIR LIKE STANDARD TABLE OF PC261 WITH HEADER LINE,
DATA: IT_EVP TYPE HRPY_TT_RGDIR,
ls_evp LIKE LINE OF IT_EVP,
WI_RGDIR LIKE STANDARD TABLE OF PC261 WITH HEADER LINE,
WI_PAYRESULT TYPE PAY99_RESULT.
WI_PAYRESULT TYPE STANDARD TABLE OF PAYUS_RESULT WITH HEADER LINE.
DATA WG_MOLGA LIKE T500L-MOLGA.
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECT-OPTIONS: S_PERNR FOR PA0001-PERNR,
S_BTRTL FOR PA0001-BTRTL,
S_ORGEH FOR PA0001-ORGEH.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM BUILD_FIELD_CATLOG.
PERFORM DISPLAY_DATA.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT PERNR
INTO CORRESPONDING FIELDS OF TABLE IT_PA0002
FROM PA0002
WHERE PERNR IN S_PERNR.
IF IT_PA0002[] IS NOT INITIAL.
SELECT PERNR ENAME PLANS WERKS BTRTL ORGEH PERSK
INTO CORRESPONDING FIELDS OF TABLE IT_PA0001
FROM PA0001
FOR ALL ENTRIES IN IT_PA0002
WHERE PERNR = IT_PA0002-PERNR
AND BTRTL IN S_BTRTL
AND ORGEH IN S_ORGEH.
ENDIF.
IF IT_PA0001[] IS NOT INITIAL.
SELECT PLANS PLSTX
INTO CORRESPONDING FIELDS OF TABLE IT_T528T
FROM T528T
FOR ALL ENTRIES IN IT_PA0001
WHERE PLANS = IT_PA0001-PLANS
AND SPRSL = 'EN'.
SELECT WERKS BTRTL BTEXT
INTO CORRESPONDING FIELDS OF TABLE IT_T001P
FROM T001P
FOR ALL ENTRIES IN IT_PA0001
WHERE WERKS = IT_PA0001-WERKS
AND BTRTL = IT_PA0001-BTRTL.
SELECT ORGEH ORGTX
INTO CORRESPONDING FIELDS OF TABLE IT_T527X
FROM T527X
FOR ALL ENTRIES IN IT_PA0001
WHERE ORGEH = IT_PA0001-ORGEH
AND SPRSL = 'EN'.
SELECT PERSK PTEXT
INTO CORRESPONDING FIELDS OF TABLE IT_T503T
FROM T503T
FOR ALL ENTRIES IN IT_PA0001
WHERE PERSK = IT_PA0001-PERSK
AND SPRSL = 'EN'.
ENDIF.
*DELETE ADJACENT DUPLICATES FROM IT_PA0001 COMPARING PERNR.
LOOP AT IT_PA0001.
MOVE IT_PA0001-ENAME TO IT_FINAL-ENAME.
READ TABLE IT_PA0002 WITH KEY PERNR = IT_PA0001-PERNR.
IF SY-SUBRC = 0.
MOVE IT_PA0002-PERNR TO IT_FINAL-PERNR.
ENDIF.
READ TABLE IT_T528T WITH KEY PLANS = IT_PA0001-PLANS.
IF SY-SUBRC = 0.
MOVE IT_T528T-PLSTX TO IT_FINAL-PLSTX.
ENDIF.
LOOP AT IT_T001P WHERE WERKS = IT_PA0001-WERKS AND BTRTL = IT_PA0001-BTRTL.
MOVE IT_T001P-BTEXT TO IT_FINAL-BTEXT.
ENDLOOP.
READ TABLE IT_T527X WITH KEY ORGEH = IT_PA0001-ORGEH.
IF SY-SUBRC = '0'.
MOVE IT_T527X-ORGTX TO IT_FINAL-ORGTX.
ENDIF.
READ TABLE IT_T503T WITH KEY PERSK = IT_PA0001-PERSK.
IF SY-SUBRC = '0'.
MOVE IT_T503T-PTEXT TO IT_FINAL-PTEXT.
ENDIF.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = IT_FINAL-PERNR
BUFFER
NO_AUTHORITY_CHECK = ' '
IMPORTING
MOLGA = WG_MOLGA
TABLES
IN_RGDIR = WI_RGDIR
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2 .
CLEAR WG_SUM.
LOOP AT WI_RGDIR INTO ls_evp.
IF ( WI_RGDIR-FPEND BETWEEN P_STDATE AND P_ENDATE AND
WI_RGDIR-SRTZA = 'A' ) .
IF Wg_MOLGA = '10'.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
CLUSTERID = 'IN'
EMPLOYEENUMBER = IT_FINAL-PERNR
SEQUENCENUMBER = ls_evp-SEQNR
READ_ONLY_INTERNATIONAL = ''
CHANGING
PAYROLL_RESULT = WI_PAYRESULT
EXCEPTIONS
ILLEGAL_ISOCODE_OR_CLUSTERID = 1
ERROR_GENERATING_IMPORT = 2
IMPORT_MISMATCH_ERROR = 3
SUBPOOL_DIR_FULL = 4
NO_READ_AUTHORITY = 5
NO_RECORD_FOUND = 6
VERSIONS_DO_NOT_MATCH = 7
ERROR_READING_ARCHIVE = 8
ERROR_READING_RELID = 9
OTHERS = 10.
endif.
ENDLOOP.
APPEND IT_FINAL.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM IT_FINAL COMPARING ALL FIELDS.
ENDFORM. " GET_DATA
*& Form BUILD_FIELD_CATLOG
text
--> p1 text
<-- p2 text
FORM BUILD_FIELD_CATLOG .
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PERNR'.
FIELDCATALOG-SELTEXT_M = 'Emp Code'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 9.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'ENAME'.
FIELDCATALOG-SELTEXT_M = 'Emp Name'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 40.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PLSTX'.
FIELDCATALOG-SELTEXT_M = 'Position'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 26.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'BTEXT'.
FIELDCATALOG-SELTEXT_M = 'Work Location'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 15.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'ORGTX'.
FIELDCATALOG-SELTEXT_M = 'Dept. Description'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 25.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
CLEAR FIELDCATALOG.
FIELDCATALOG-FIELDNAME = 'PTEXT'.
FIELDCATALOG-SELTEXT_M = 'Grade Set Code'.
FIELDCATALOG-COL_POS = WA_COLNO.
FIELDCATALOG-OUTPUTLEN = 21.
FIELDCATALOG-EMPHASIZE = 'X'.
FIELDCATALOG-KEY = 'X'.
WA_COLNO = WA_COLNO + 1.
APPEND FIELDCATALOG TO FIELDCATALOG.
ENDFORM. " BUILD_FIELD_CATLOG
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM DISPLAY_DATA .
REPID = SY-CPROG.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = 'X'
IT_FIELDCAT = FIELDCATALOG[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL
EXCEPTIONS
PROGRAM_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.
ENDFORM. " DISPLAY_DATA -
Problem when calling a return type BOOLEAN SQL Function in a package
Hi All,
I am having problem when trying to call a SQL function in a package with return type BOOLEAN
The SQL function signature is as follows
CREATE OR REPLACE PACKAGE RMSOWNER.ORDER_ATTRIB_SQL ****
FUNCTION GET_PO_TYPE_DESC(O_error_message IN OUT VARCHAR2,
I_PO_TYPE IN VARCHAR2,
O_PO_TYPE_DESC IN OUT VARCHAR2)
RETURN BOOLEAN;
Following is my java code
+CallableStatement cs3 = conn.prepareCall("{?=call ORDER_ATTRIB_SQL.GET_PO_TYPE_DESC(?,?,?)}");+
+cs3.registerOutParameter(1, java.sql.Types.BOOLEAN);+
+cs3.registerOutParameter(2, java.sql.Types.VARCHAR);+
+cs3.registerOutParameter(4, java.sql.Types.VARCHAR);+
+cs3.setString(2, "");+
+cs3.setString(3, "ST");+
+cs3.setString(4, "");+
+ResultSet rs3 = cs3.executeQuery();+
I get the following exception, i tried changing the sql type(registerOutParameter) from boolean to bit but i still getting this exception.
But when i call any other functions with return type other than boolean they work perfectly fine.
Please can anyone help me fix this issue, i am not sure if its anything to do with vendor JDBC classes?
+java.sql.SQLException: ORA-06550: line 1, column 13:+
+PLS-00382: expression is of wrong type+
+ORA-06550: line 1, column 7:+
+PL/SQL: Statement ignored+
+ at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)+
+ at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)+
+ at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)+
+ at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)+
+ at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)+
+ at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:954)+
+ at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)+
+ at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)+
+ at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3422)+
+ at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394)+
#####Hello People!
There is another workaround!!
See the example below:
private String callBooleanAPi(String tableName,String apikey,String dtInicio,String dtFim,String comando) throws SQLException {
CallableStatement cs = null;
String call = "";
String retorno = null;
try {
if(comando.equalsIgnoreCase("INSERT")){
call = "declare x BOOLEAN; y varchar2(2);begin x :=PKG.INSERT(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
} else if(comando.equalsIgnoreCase("UPDATE")){
call = "declare x BOOLEAN; y varchar2(2);begin x := PKG.UPDATE(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
} else if(comando.equalsIgnoreCase("DELETE")){
call = "declare x BOOLEAN; y varchar2(2);begin x := PKG.DELETE(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
cs = conn.prepareCall(call);
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat sdfToSqlDate = new SimpleDateFormat("yyyy-MM-dd");
java.util.Date dataInicialVigencia =null;
java.util.Date dataFinalVigencia = null;
Date dtInicialFormatada =null;
Date dtFinalFormatada = null;
if(dtInicio != null && !dtInicio.equals("")){
dataInicialVigencia = sdf.parse(dtInicio);
dtInicio =sdfToSqlDate.format(dataInicialVigencia);
dtInicialFormatada = Date.valueOf(dtInicio);
if(dtFim != null && !dtFim.equals("")){
dataFinalVigencia = sdf.parse(dtFim);
dtFim =sdfToSqlDate.format(dataFinalVigencia);
dtFinalFormatada = Date.valueOf(dtFim);
cs.setString(1, tableName);
cs.setString(2, apikey);
cs.setDate(3, dtInicialFormatada );
cs.setDate(4, dtFinalFormatada );
cs.registerOutParameter(5, java.sql.Types.VARCHAR);
cs.registerOutParameter(6, java.sql.Types.VARCHAR );
cs.execute();
retorno = cs.getString(6);
System.out.println( cs.getString(5));
} catch(SQLException e){
throw new SQLException("An SQL error ocurred while calling the API COR_VIGENCIA: " + e);
} catch(Exception e){
Debug.logger.error( "Error calculating order: " + id, e );
} finally {
if (cs != null) {
cs.close();
cs = null;
return retorno;
As you can see the CallableStatement class acepts PL/SQl blocks.
Best Regards. -
How do I fix the problems with text formating functions in hotmail and other text based sites?
In a Mailing list provider site it disables the text formating functions, instead only showing a 'loading' message. The functions never appear. In Hotmail the scroll arrows on the right hand side does not work. Sometimes the email toolbar becomes 'grey' and the buttons do not work. When forwarding an email sometimes the email does not show in the new email message.
== This happened ==
Every time Firefox opened
== Firefox was reinstalled March 2010.The only possible fix was turning the phone off immediately and burying it in a bag of dry rice for a week at least. That might...just might...have worked. But you're way beyond that and I see no fixes. In fact the phone is probably going to get more problems before finally gving up the ghost. Continued use is just shorting out more and more of the circuitry. For that reason I don't think repair is much of an option. Go to an Apple Store and buy an out-of-warranty replacement.
-
READ_TEXT: format problem when printing to PDF
Hello everybody,
I am using READ_TEXT function module to get long text then display to PDF format.
I met a problem with format as following:
The long text has bold format, for e.g.: This is bold text.
The READ_TEXT FM will then read the data as: <H>This is bold text.</>
When output to PDF instead of display as This is bold text., it is displaying <H>This is bold text.</>
Please suggest me how to fix this.
Thanks,
KhanhHi Khanh ,
Below is the sample code for your reference .
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'ZG01'
LANGUAGE = 'EN'
NAME = TH_INDATA_F01-VBELN_A
OBJECT = 'VBBK'
IMPORTING
HEADER =
TABLES
LINES = TD_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
Here lines = td_line refers to Lines of text read
The table contains all text lines belonging to a text module. The line structure is defined in table TLINE. The line contents are stored in ITF format.
Hope this helps you .
Regards ,
Navya . -
What is the problem when your camera function doesn't work and lags?
What's the problem when the camera function doesnt work and lags? Can my iPod touch be returned because of this? I have done nothing to damage the product.
My file association for jpg files is correct, if i click on a
jpg, ACDSee starts immediately.Although I am a long time Windoze non-user, I vaguely remember that there's a difference between correct file-type association being set and some application starting at a mouse click on a file icon. I also vaguely remember Windoze file-type association mechanism uses a few action-types. Java Desktop should expect a specific action-type for the association. -
SQL LOADER Problem when data is loaded but not come in standard formate
Hi guys,
I got problem when sql loader run data loaded successfully in table but UOM data not come in standard formate.
UOM table column contains the Unit of measure data but in my excel sheet it's look like :
EXCEl SHEET DATA:
1541GAFB07080 0 Metres
1541GAFE10040 109.6 Metres
1541GAFE10050 594.2 Metres
1541GAFE10070 126.26 Metres
1541GAFE14040 6.12 Metres
1541GAFE14050 0 Metres
1541SAFA05210 0 Metres
1541SAFA07100 0 Metres
1551EKDA05210 0 Nos
1551EKDA07100 0 Nos
1551EKDA07120 0 Nos
1551EKDA07140 0 Nos
1551EKDA07200 0 Nos.
1551EKDA08160 0 Nos.
1551EKDA08180 0 Nos.
1551EKDA08200 0 Nos.
1551EKDA10080 41 Nos.
1551EKDA10140 85 Nos.
.ctl file :
OPTIONS (silent=(header,feedback,discards))
LOAD DATA
INFILE *
APPEND
INTO TABLE XXPL_PO_REQUISITION_STG
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY'"'
TRAILING NULLCOLS
( ITEM_CODE CHAR,
ITEM_DESCRIPTION CHAR "TRIM(:ITEM_DESCRIPTION)",
QUANTITY,
UOM,
NEED_BY_DATE,
PROJECT,
TASK_NAME,
BUYER,
REQ_TYPE,
STATUS,
ORGANIZATION_CODE,
LOCATION,
SUBINVENTORY,
LINE_NO,
REQ_NUMBER,
LOADED_FLAG CONSTANT 'N',
SERIAL_NO "XXPL_PRREQ_SEQ.NEXTVAL",
CREATED_BY,
CREATION_DATE SYSDATE,
LAST_UPDATED_BY,
LAST_UPDATED_DATE,
LAST_UPDATED_LOGIN
Some output came in table like:
W541WDCA05260 0 Metres|
W541WDCA05290 3 Metres|
W541WDCA05264 4 Metres|
W541WDCA05280 8 Metres|
1551EADA04240 0 Nos|
1551EADA07100 0 Nos|
1551EKDA10080 0 Nos.|
1551EKDA10080 41 Nos.|
proble in | delimiter...how to remove it ' | ' from my table when sqlloader program runnig ...... where i can change in .ctl file or excel file....it's urgent guys olz help me ..
thanksHi,
How are you extracting the data to Excel sheet ?
Please check the format type of the column in Excel sheet for UOM.
There is no issue in the SQL loader control file, but issue is there in your source excel file. (Try using a different method to extract the data to Excel sheet.)
Regards,
Yuvaraj.C -
Problem when Opening a file in the Function Moudle
Hi,
I was encountered a Problem , when i am opening a file from the function Module,
But when i tried the same code in the ABAP Editor it was working fine.
Is there any Difference from ABAP Editor & Function Module Editor
(ex : Un-Code Etc ) ...
Let me know if your have any conserns. Thanks In Advance.
Regards
NagHi,
In the FM'S u might have declared the import,export,tables parameters.So u have to use these parameters in the source code editor of FM.If u don't use any of these parameters and try to use any other parameters which also not declared in the FM source code,then u will get the error.pz check the parameters u r using in the FM....
Regards,
Nagaraj -
i deal with a itunes update problem when i try to update i get coneection has timed out error! i had the same problem when i had vista.. yesterday i formated my pc but i still have the same prommblem. i dont deal with such problems on direct downloads.i have this problem only with tunes. maybe my conection freezes for a sec idk
Sorry I gave this a 'this helped me' but after a long struggle I found some ticked box somewhere from some unauthorised chrome extension blaaa....... the link you gave was great, not only did it confirm all the bad things google is supposed to be up to it provided a better browser. Cheers man.
Anyone who find this; I disabled all extension in chrome. I then searched the word proxy in the settings section. A button came up, "change proxy settings" I clicked on it. Earlier it was greyed out as an extension was interefering.. It brought up a box with my own settings from my computer. Then I clicked LAN settings, then unchecked the 'Use a proxy server' button.
P.S. If you're using chrome, bail, and dowload Komodo Dragon. It's virtually identical, but you're not tracked, and you can use chrome extensions, and you can quickily transfer your chrome preferences into it. -
Reports layout/format problem when called from forms
hi,
using forms and reports builder 10g OS winxp
i have created web and paper layout report with pre-defined template gray (rdf). when i run the web layout there is no problem.
when i call this report from form using
web.show_document('http://machine:8889/reports/rwservlet?report=mail_report.rdf&destype=cache&desformat=HTML&userid=abc/xyz@dbname¶1='||:parameter1, '_blank');
the layout (cell bgcolors of the table) does not appear.
pl guide what am i missing out.
thanksHi,
that has nothing to do with forms. Your call inside web.show_document is a servlet-call. With this you get the paper layout of a report. If you want to get the web-layout, you have to call the report with a jsp-call. In your case that might look like http://machine:8889/reports/mail_report.jsp?userid=.....
If you store your report as jsp-file, you can use it for paper & web-layout, as rdf only paper-layout is possible.
http://download.oracle.com/docs/cd/B25016_08//doc/dl/bi/B14048_02/pbr_arch.htm#i1005927
http://download.oracle.com/docs/cd/B25016_08//doc/dl/bi/B14048_02/pbr_run.htm#g1022421
Regards
Rainer -
Problems when trying to send a smartform through fax
Hi,
Im currently confronting a problem when sending smartforms through fax to multiple recipients.
This is the scenario Im working on:
The client needs to be able to send a document, could be a PO or invoices, to diferent recipients at the same time. So far in case of purchase orders, we have been able to find the respective faxes and emails for each of the partner functions.
Functionality for email is working as desired but when sending faxes I have problems.
Reviewing the output through SOST I get all my receipients which are email and faxes. Emails are fine since it creates a PDF attachment with the order and all of its details.
For fax I get the same even though the paramenters are set for fax.
Here is my code if you could please help me here on this one.
SELECT lifn2 FROM EkPA into l_ekpa-lifn2
WHERE EBELN = a_EBELN.
APPEND l_EKPA.
ENDSELECT.
SELECT adrnr
FROM lfa1
INTO itab-q_adrnr
FOR ALL ENTRIES IN l_ekpa WHERE lifnr = l_ekpa-lifn2.
APPEND itab.
ENDSELECT.
*& End of partner address
*& Selection of Address or Fax number from ADR3 & ADR6 according to ADRNR
*& Nato
IF sy-subrc EQ 0.
loop at itab.
SELECT SINGLE smtp_addr INTO (itab-q_mail)
from adr6 where addrnumber = itab-q_adrnr and flg_nouse eq space.
IF itab-q_mail ne Space.
Move 'U' to itab-q_typ2(1).
Move 'X' to itab-q_express(1).
Move 'EXT' to itab-XOBJT.
ENdIF.
SELECT SINGLE FAXNR_LONG INTO (itab-q_fax)
SELECT SINGLE country FAX_NUMBER INTO (itab-q_cty, itab-q_fax )
from adr3 where addrnumber = itab-q_adrnr and flg_nouse eq space.
If itab-q_fax ne space.
Move 'F' to itab-q_typ(1).
Move 'TELEFAX' to itab-q_com.
Endif.
Modify itab.
endloop.
*& END of ITAB
CLEAR : DOC_CHNG.
REFRESH LINES.
IF NAST-NACHA eq '7'.
* Fill both the fax & email Receiver lists
clear: reclist, reclist2.
refresh: reclist, reclist2.
*& loop table itab to update receipient list in table Reclist
*& Nato
loop at itab.
IF not itab-q_typ is initial.
concatenate itab-q_cty itab-q_fax into reclist2-RECNAM separated by space. "FAX NUMBER
move itab-q_fax to reclist2-receiver. "FAX NUMBER
*&>>>>>>>>>>>>>>>>>>>new entry for testing nato 080206<<<<<<<<<<<&
move itab-q_cty to RECLIST2-COUNTRY. "Country Code
move itab-q_fax to Reclist2-FAX. "Fax number
*&>>>>>>>>>>>>>>ENd of entry<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<&
move itab-q_typ to REClist2-REC_TYPE. "Communication type for fax
move itab-q_EXPRESS to Express. "comment for testing
move itab-q_com to REClist2-COM_TYPE.
Move 'X' to reclist2-NOTIF_DEL.
Move 'TELEFAX' to reclist2-SNDART. "TYPE OF DEVICE
Move a_ebeln to sood-OBJDES. "new addition for testing nato
append Reclist2.
endif.
IF not itab-q_typ2 is initial.
move itab-q_mail to REclist-receiver. "SMT ADDRESS
move itab-q_typ2 to REClist-REC_TYPE.
move itab-q_EXPRESS to REClist-express.
move 'X' to reclist-TO_ANSWER.
Move a_ebeln to sood-OBJDES. "new addition for testing nato
move itab-q_com to REClist-COM_TYPE. "comment for testing only
append Reclist.
Endif.
move reclist-receiver to address.
endLoop.
*& END OF RECipient
ENDIF.
DOC_CHNG-OBJ_DESCR = nast-objky.
ELSE.
IF RECLIST IS INITIAL.
LOOP AT reclist INTO RECIPIENT . " This logic might get commented or deleted. Nato 08/01/06
ENDLOOP.
ENDIF.
DOC_CHNG-OBJ_DESCR = L_TITLE.
ENDIF.
IF RECLIST[] IS INITIAL.
MESSAGE E573(VE) RAISING RECEIVER_NOT_FOUND.
ENDIF.
*& New entry to determine path according to communication
*& type
*& If comm type eq U follow convert_otf
*& then Read text, finaly send API
*& If comm type eq F follow path to "Convert OTF & FAX
*& Nato 080106
REFRESH : HOTFDATA, LT_SOLIX, OBJBIN.
LOOP AT JOB_OUTPUT_INFO-OTFDATA INTO HOTFDATA.
APPEND HOTFDATA.
ENDLOOP.
*& Prepare content to be converted to PDF format
*& nato
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = DOC_SIZE
BIN_FILE = LD_BINFILE
TABLES
OTF = HOTFDATA
LINES = HTLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
*& new entry just for test today 080306
*&nato
*endif.
*&--end of entry--
I = 0.
N = XSTRLEN( LD_BINFILE ).
WHILE I < N.
LT_SOLIX-LINE = LD_BINFILE+I.
APPEND LT_SOLIX.
I = I + 255.
ENDWHILE.
*& end of convertion pdf
LOOP AT LT_SOLIX INTO WA_SOLIX.
CLEAR WA_SOLI.
ASSIGN WA_SOLI TO <PTR_HEX> CASTING.
MOVE WA_SOLIX TO <PTR_HEX>.
APPEND WA_SOLI TO OBJBIN.
ENDLOOP.
*& Prepare send mail
CLEAR : NAME, DOCNAME.
REFRESH : OBJTXT, OBJPACK.
CONCATENATE NAST-KAPPL NAST-KSCHL INTO NAME.
CONDENSE NAME.
IF NAST-NACHA NE '7'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'STAM'
LANGUAGE = SY-LANGU
NAME = NAME
OBJECT = 'OCS'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CONCATENATE NAST-OBJKY '.PDF' INTO DOCNAME .
CONDENSE DOCNAME.
*endif. "temp nato -080406
if reclist-rec_type eq 'U'.
DOC_CHNG-OBJ_NAME = 'Delivery'.
LOOP AT LINES.
OBJTXT = LINES-TDLINE.
APPEND OBJTXT.
ENDLOOP.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
IF TAB_LINES > 0.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
ENDIF.
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = DOCNAME.
APPEND OBJHEAD.
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'PDF'.
OBJPACK-OBJ_NAME = 'Delivery'.
OBJPACK-OBJ_DESCR = NAST-OBJKY.
OBJPACK-OBJ_DESCR = A_EBELN.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
break nhernandez.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE E081(ZGLO) WITH SY-SUBRC RAISING MAIL_SENDING_ERROR.
ENDIF.
endif.
AM I missing something?Hi Nat,
You can check this link which shows how to use the PRINT_TEXT for sending fax.
http://www.sap-img.com/abap/sending-fax-from-abap.htm
Also you can check these
Smartforms
Sending Smartforms through Fax
Sending SMARTFORM output to FAX gateway
How to fax a smartform?
/people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
ftp
Cheers
VJ -
Problem when export ALV.
Hello,
I have a problem with the function REUSE_ALV_GRID_DISPLAY.
When click to the button Local File... (CrtlShiftF9) my report give me a run timer error.
Runtime Errors GETWA_NOT_ASSIGNED
Date and Time 16.03.2009 11:43:34
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
You attempted to access an unassigned field symbol
(data segment 75).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
Trigger Location of Runtime Error
Program SAPLKKBL
Include LKKBLF99
Row 3.840
Module type (FORM)
Module Name GEN_FIELD_OUT2
Source Code Extract
Line SourceCde
3810 format hotspot on.
3811 elseif gs_fc-hotspot = 'V'
3812 and gs_out_flags-hotline is initial and not <field> is initial
3813 and gt_stack-is_layout-no_hotspot is initial.
3814 format hotspot on.
3815 endif.
3816 *>>> new API
3817 perform salv_set_cell_hotspot using l_celltype.
3818 *<<< new API
3819 if gs_fc-input = 'X' and
3820 gt_stack-is_layout-no_input is initial and
3821 gs_fc-checkbox is initial.
3822 format input on.
3823 format intensified off.
3824 endif.
3825 if not gs_fc-emphasize is initial and gs_out-info is initial.
3826 perform field_color_normal using gs_fc
3827 * gt_stack-is_layout
3828 gs_out-info.
3829 endif.
3830
3831 * complex logic with internal table for color description
3832 data: lr_tabledescr type ref to cl_abap_tabledescr,
3833 ls_lvc_color type lvc_s_scol,
3834 lt_kkbl_color type kkblo_t_specialcol,
3835 ls_kkbl_color type kkblo_specialcol.
3836
3837 if gs_out_flags-mcoltab = 'X' and gs_out_flags-slave ne 'X' and
3838 gs_out_flags-sum ne 'X'.
3839 lr_tabledescr ?= cl_abap_typedescr=>describe_by_name( 'LVC_T_SCOL' ).
>>>>> if lr_tabledescr->applies_to_data( <coltab_any> ) eq 'X'.
3841 loop at <coltab_lvc> into ls_lvc_color.
3842 move-corresponding ls_lvc_color to ls_kkbl_color.
3843 ls_kkbl_color-fieldname = ls_lvc_color-fname.
3844 append ls_kkbl_color to lt_kkbl_color.
3845 endloop.
3846 assign lt_kkbl_color to <coltab>.
3847 endif.
3848 perform field_color_complex using <coltab>
3849 gs_fc
3850 gs_out_flags-color
3851 gs_out_flags-intensified
3852 gs_out_flags-inverse.
3853 elseif gs_out_flags-scoltab = 'X' and gs_out_flags-slave = 'X' and
3854 gs_out_flags-sum ne 'X'.
3855 lr_tabledescr ?= cl_abap_typedescr=>describe_by_name( 'LVC_T_SCOL' ).
3856 if lr_tabledescr->applies_to_data( <coltab_any_slave> ) eq 'X'.
3857 loop at <coltab_lvc_slave> into ls_lvc_color.
3858 move-corresponding ls_lvc_color to ls_kkbl_color.
3859 ls_kkbl_color-fieldname = ls_lvc_color-fname.
I verify the internal table it has 315 values export to excel.
How can i solve this problem?I try to download the output from SYSTEM>LIST>SAVE LOCAL FILE, but it was disable.
here is the report code:
REPORT zfir0021.
TABLES: bsid, yypcl_fiboleto.
TYPE-POOLS: slis.
TYPES: BEGIN OF tp_bsid,
bukrs TYPE bukrs,
kunnr TYPE kunnr,
umsks TYPE umsks,
umskz TYPE umskz,
augdt TYPE augdt,
augbl TYPE augbl,
zuonr TYPE dzuonr,
gjahr TYPE gjahr,
belnr TYPE belnr_d,
buzei TYPE buzei,
END OF tp_bsid.
TYPES: BEGIN OF tp_dd03l,
fieldname TYPE dd03l-fieldname,
position TYPE dd03l-position,
keyflag TYPE dd03l-keyflag,
rollname TYPE dd03l-rollname,
datatype TYPE dd03l-datatype,
END OF tp_dd03l.
+*----
*+
*** Variáveis
+*----
*+
DATA w_catalogo TYPE slis_fieldcat_alv.
DATA w_layout TYPE slis_layout_alv.
DATA t_catalogo TYPE slis_t_fieldcat_alv.
DATA: v_layout TYPE slis_layout_alv,
t_dd03l TYPE STANDARD TABLE OF tp_dd03l WITH HEADER LINE.
DATA t_bsid TYPE STANDARD TABLE OF bsid WITH HEADER LINE.
DATA: t_bsid_aux TYPE STANDARD TABLE OF bsid WITH HEADER LINE,
t_yypcl_fiboleto TYPE STANDARD TABLE OF yypcl_fiboleto WITH HEADER LINE,
t_reg_ok TYPE STANDARD TABLE OF yypcl_fiboleto3 WITH HEADER LINE,
t_reg_err TYPE STANDARD TABLE OF yypcl_fiboleto3 WITH HEADER LINE.
+*----
*+
*** Parâmetros de seleção
+*----
*+
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-s02.
SELECT-OPTIONS: s_blart FOR bsid-blart,
s_situa FOR yypcl_fiboleto-situacao,
s_data FOR bsid-budat.
SELECTION-SCREEN END OF BLOCK bl1.
* Execução do Programa
START-OF-SELECTION.
PERFORM seleciona_dados.
PERFORM imprime_resultado.
PERFORM catalogo.
PERFORM gerar_alv.
END-OF-SELECTION.
+*&----
*+
*& Form seleciona_dados
+*&----
*+
+* text+
+*----
*+
+* --> p1 text+
+* <-- p2 text+
+*----
*+
+FORM seleciona_dados .+
+* DATA lr_situacao TYPE RANGE OF yypcl_fiboleto-situacao WITH HEADER LINE.+
* lr_situacao-sign = 'I'.
* lr_situacao-option = 'EQ'.
* lr_situacao-low = '1'.
* APPEND lr_situacao.
* lr_situacao-low = '4'.
* APPEND lr_situacao.
SELECT * INTO TABLE t_bsid
FROM bsid
WHERE bukrs EQ '0050'
AND blart IN s_blart
AND budat IN s_data
AND anfbn <> ''.
SELECT *
INTO TABLE t_yypcl_fiboleto
FROM yypcl_fiboleto
WHERE empresa EQ '0050'
AND dtemissao IN s_data
AND situacao IN s_situa
AND tpdoc IN s_blart.
ENDFORM. " seleciona_dados
+*&----
*+
*& Form imprime_resultado
+*&----
*+
+* text+
+*----
*+
+* --> p1 text+
+* <-- p2 text+
+*----
*+
FORM imprime_resultado.
SORT t_bsid BY bukrs kunnr gjahr belnr buzei.
SORT t_yypcl_fiboleto BY empresa cdcliente gjahr nudoc_cont itdoc_cont.
LOOP AT t_bsid.
READ TABLE t_yypcl_fiboleto WITH KEY empresa = t_bsid-bukrs
cdcliente = t_bsid-kunnr
gjahr = t_bsid-gjahr
nudoc_cont = t_bsid-belnr
itdoc_cont = t_bsid-buzei
BINARY SEARCH.
IF NOT sy-subrc IS INITIAL.
t_bsid_aux = t_bsid.
APPEND t_bsid_aux.
ENDIF.
ENDLOOP.
ENDFORM. " imprime_resultado
+*&----
*+
*& Form catalogo
+*&----
*+
+* text+
+*----
*+
+* --> p1 text+
+* <-- p2 text+
+*----
*+
FORM catalogo.
DATA l_cont TYPE i.
SELECT fieldname position keyflag rollname datatype
INTO TABLE t_dd03l
FROM dd03l
WHERE tabname = 'BSID'
AND rollname <> '.INCLUDE' AND
rollname <> 'MANDT' .
SORT t_dd03l BY position.
LOOP AT t_dd03l.
ADD 1 TO l_cont.
PERFORM insert_catalogo USING:
t_dd03l-fieldname
t_dd03l-keyflag
'L'
t_dd03l-datatype
l_cont
'C410'.
ENDLOOP.
ENDFORM. " catalogo
+*&----
*+
*& Form INSERT_CATALOGO
+*&----
*+
FORM insert_catalogo USING f_campo
f_tamanho
f_texto
f_alinhamento
f_somatorio
f_tipo
f_decimais
f_checkbox
f_input
f_hotspot
f_no_out
f_pos
f_cor.
CLEAR w_catalogo.
w_catalogo-col_pos = f_pos.
w_catalogo-fieldname = f_campo.
w_catalogo-key = ' '.
w_catalogo-outputlen = f_tamanho.
w_catalogo-seltext_s = f_texto. " descrição curta
w_catalogo-seltext_m = f_texto. " descrição média
w_catalogo-seltext_l = f_texto. " descrição longa
w_catalogo-just = f_alinhamento.
w_catalogo-do_sum = f_somatorio. " totalizar coluna
w_catalogo-datatype = f_tipo.
w_catalogo-decimals_out = f_decimais.
w_catalogo-checkbox = f_checkbox. " exibir como checkbox
w_catalogo-input = f_input. " modificação permitida
w_catalogo-hotspot = f_hotspot. " chama form USER_COMMAND
w_catalogo-no_out = f_no_out. " Ocultar campo inicialmente
IF w_catalogo-datatype <> 'CHAR'.
w_catalogo-no_zero = 'X'.
ENDIF.
w_catalogo-emphasize = f_cor.
APPEND w_catalogo TO t_catalogo.
ENDFORM. " INSERT_CATALOGO
+*&----
*+
*& Form gerar_alv
+*&----
*+
+* Gera o ALV com as informações da T_YYPCL_FIBOLETO_AUX+
+*----
*+
FORM gerar_alv.
v_layout-colwidth_optimize = 'X'. " Largura melhor possível da coluna
v_layout-no_input = 'X'.
v_layout-info_fieldname = 'COLOR_LINE'.
v_layout-coltab_fieldname = 'CELL_COLOUR'.
v_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = 'BSID'
* i_callback_user_command = 'Z_USER_COMMAND'
is_layout = v_layout
it_fieldcat = t_catalogo
i_save = 'A'
TABLES
t_outtab = t_bsid_aux
EXCEPTIONS
program_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.
ENDFORM. " gerar_alv -
Code generation problem when inlining
I've run into an instance of incorrectly generated code. The problem appears to occur when a function is marked in the source with the "inline" or "__inline__" qualifiers but the compiler decides not to inline it. The problem only appears when there is very specific control flow. A reduced program exhibiting this behavior is given below:
int actual_intr, format, cpl;
static __inline__ void report(int fno) {
if (actual_intr) actual_intr = fno;
void evaluate_M_int_ld(void) {
int spec = cpl==1 || cpl==3;
int adv = cpl==2 || cpl == 4;
int cclear = cpl==8 || cpl==10;
if (format != 101 && format!=202) report(0);
if (!spec) actual_intr = 2;
if (cclear) actual_intr = 3;
}I compile this program with gcc -O2 -fno-inline -S. Note that the -fno-inline flag is there to prevent inlining from occurring; I can reproduce the behavior without the flag on code examples large enough that the internal compiler rules limit inlining. (But they're way too large to post here.)
The generated assembly is:
.global evaluate_M_int_ld
evaluate_M_int_ld:
sethi %hi(format),%o5
sethi %hi(cpl),%o4
ld [%o5+%lo(format)],%g4
ld [%o4+%lo(cpl)],%o5
cmp %o5,1
be,pn %icc,.L77000052
cmp %o5,3
.L77000051:
be,pn %icc,.L77000052
or %g0,0,%g3
.L77000053:
xor %o5,8,%o0
<snipped a bunch of irrelevant stuff here>
.L77000052:
retl ! Result =
nopSomehow the "spec" calculation is branching to the end of the function. To make the problem even weirder, removing the unused adv variable results in correct compilation. If the __inline__ keyword is left out, the generated code is fine.
The obvious workaround for now is to use -D__inline__= -Dinline= on all of my compiles.
The compiler version and tool information is:
telyn-haul1% gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: /net/clpt-v490-1/export/data/bldmstr/20070711_mars_gcc/src/configure prefix=/usr/sfw enable-shared with-system-zlib enable-checking=release disable-libmudflap enable-languages=c,c++ enable-version-specific-runtime-libs with-cpu=v9 with-ld=/usr/ccs/bin/ld without-gnu-ld
Thread model: posix
gcc version 4.0.4 (gccfss)
--DavidAdding -W2,-Rcond_elim to the existing flags does make both the small example and the original code compile correctly.
--David
Maybe you are looking for
-
External Hard Drive not Readable & Input/Output Error?
I was using my OWC 300gb external hard drive for a while and it's worked great. I had a bunch of files on it, but I recently transferred everything to another external HD I have, which worked fine, so I could erase this 300gb one. I can't remember wh
-
How do I update a contact card on multiple iCloud accounts?
I currently have two iCloud accounts set up on my iMac. One is mine, and the other is my wife's. I have both set up to sync contacts over the air. If I update a contact card that is linked to both accounts it only updates the card under my account
-
How to implement a internet radio client by j2me
Can anyone please help me to implement a internet radio client application for mobile device which will do audio streaming while playing mp3 files?
-
Accessing drill through results with Analyzer API
<p>So here is the scenario that my client is faced with:</p><p> </p><p>We've got a financial Analyzer report in which the users candrill down to a list of specific level 0 invoice numbers. Fromthere, we setup a relational drill through such that when
-
I can not delete an email I get a message218130.emlx" couldn't be copied because you don't have permission to access "Messages"