2010 Oct 25 5:33 PM
We are implementing upgrade to mysap 700 from 46C
PROGRAMS USING function call to 'SX_OBJECT_CONVERT_ALI_RAW' fields have changed
we used to send tables directly and now we are sendin fields to be changed
i have tried to send the data but continue to have errors
700 version has this function with these paramaters
CALL FUNCTION 'SX_OBJECT_CONVERT_ALI_RAW'
EXPORTING
FORMAT_SRC = SOURCE_NAME
FORMAT_DST = OUT_NAME
ADDR_TYPE = 'FAX' " int or fax
DEVTYPE = DEVTYPE
FUNCPARA = 255
CHANGING
TRANSFER_BIN = LISTOBJECT
CONTENT_TXT = content_txt
CONTENT_BIN = content_bin
OBJHEAD =
LEN = OUTLEN
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2
changing
TRANSFER_BIN TYPE SX_BOOLEAN
CONTENT_TXT TYPE SOLI_TAB
CONTENT_BIN TYPE SOLIX_TAB
OBJHEAD TYPE SOLI_TAB O
LEN TYPE SO_OBJ_LEN
when ran we get an abap dump content_bin
Error analysis
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 "GET_MEMORY_LIST" "(FORM)", 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:
The call to the function module "SX_OBJECT_CONVERT_ALI_RAW" is incorrect:
The function module interface allows you to specify only
fields of a particular type under "CONTENT_BIN".
The field "CONTENT_BIN" specified here is a different
field type
.
it looks like i need to set <fs> pointer to the field but i am akwardly at this any help please will do well.
this is how we used to use the function
CALL FUNCTION 'SX_OBJECT_CONVERT_ALI_RAW '
EXPORTING
FORMAT_SRC = SOURCE_NAME
FORMAT_DST = OUT_NAME
DEVTYPE = DEVTYPE
FUNCPARA = FUNCP
LEN_IN = INLEN
IMPORTING
LEN_OUT = OUTLEN
TABLES
CONTENT_IN = LISTOBJECT
CONTENT_OUT = OBJTXT
EXCEPTIONS
ERR_CONV_FAILED = 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.
We are implementing upgrade to mysap 700 from 46C
PROGRAMS USING function call to 'SX_OBJECT_CONVERT_ALI_RAW' fields have changed
we used to send tables directly and now we are sendin fields to be changed
i have tried to send the data but continue to have errors
700 version has this function with these paramaters
CALL FUNCTION 'SX_OBJECT_CONVERT_ALI_RAW'
EXPORTING
FORMAT_SRC = SOURCE_NAME
FORMAT_DST = OUT_NAME
ADDR_TYPE = 'FAX' " int or fax
DEVTYPE = DEVTYPE
FUNCPARA = 255
CHANGING
TRANSFER_BIN = LISTOBJECT
CONTENT_TXT = content_txt
CONTENT_BIN = content_bin
OBJHEAD =
LEN = OUTLEN
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2
changing
TRANSFER_BIN TYPE SX_BOOLEAN
CONTENT_TXT TYPE SOLI_TAB
CONTENT_BIN TYPE SOLIX_TAB
OBJHEAD TYPE SOLI_TAB O
LEN TYPE SO_OBJ_LEN
when ran we get an abap dump content_bin
Error analysis
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 "GET_MEMORY_LIST" "(FORM)", 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:
The call to the function module "SX_OBJECT_CONVERT_ALI_RAW" is incorrect:
The function module interface allows you to specify only
fields of a particular type under "CONTENT_BIN".
The field "CONTENT_BIN" specified here is a different
field type
.
it looks like i need to set <fs> pointer to the field but i am akwardly at this any help please will do well.
this is how we used to use the function
CALL FUNCTION 'SX_OBJECT_CONVERT_ALI_RAW '
EXPORTING
FORMAT_SRC = SOURCE_NAME
FORMAT_DST = OUT_NAME
DEVTYPE = DEVTYPE
FUNCPARA = FUNCP
LEN_IN = INLEN
IMPORTING
LEN_OUT = OUTLEN
TABLES
CONTENT_IN = LISTOBJECT
CONTENT_OUT = OBJTXT
EXCEPTIONS
ERR_CONV_FAILED = 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.
2010 Oct 27 5:51 PM
ok i solved my own problem.... i new i could. here is the results
first i had to dig into the bapi to find the proper definition to declare in my program i will present the code
and let you exame the example.
----
FORM GET_MEMORY_LIST TABLES P_MYSECOND STRUCTURE ZLIPOV.
DATA: LSIND LIKE SY-LSIND,
LISTTAB LIKE ABAPLIST OCCURS 1 WITH HEADER LINE,
OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE,
SOURCE_NAME LIKE SXCONVERT-FORMAT_SRC,
OUT_NAME LIKE SXCONVERT-FORMAT_DST,
DEVTYPE LIKE SXSERV-DEVTYPE,
FUNCP LIKE SXFUNCPARA,
INLEN LIKE SOOD-OBJLEN,
OUTLEN LIKE SOOD-OBJLEN,
UPDFLG TYPE I VALUE 0,
LNCNT TYPE I VALUE 0,
LABLNCNT TYPE I VALUE 0,
PRVLN TYPE I VALUE 0.
this is the added structures for the new fields
used for SX_OBJECT_CONVERT_ALI_RAW and the rest of the SX_OBJECT_CONVERT family
data:
TRANSFER_BIN TYPE SX_BOOLEAN, " SHOULD BE SET TO X
OBJHEAD like SOLI occurs 0,
content_txt LIKE soli OCCURS 0,
content_bin LIKE solix OCCURS 0.
CLEAR LISTOBJECT[].
CLEAR OBJHEAD.
CLEAR CONTENT_TXT[].
CLEAR CONTENT_BIN[].
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LISTTAB
EXCEPTIONS
NOT_FOUND = 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.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
IN = LISTTAB
OUT = CONTENT_BIN " this will receive the data
EXCEPTIONS
COMPRESS_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.
SOURCE_NAME = 'ALI' .
OUT_NAME = 'RAW'.
DEVTYPE = 'POSTSCPT'.
TRANSFER_BIN ='X'. " set to x our program will fail to convert stupid but needed
describe table listtab lines inlen.
DESCRIBE TABLE LISTOBJECT LINES INLEN.
SX_OBJECT_CONVERT_ALI_RAW
SX_OBJECT_CONVERT_ALI_PRT
SX_OBJECT_CONVERT_OTF_RAW
SX_OBJECT_CONVERT_OTF_PRT
SX_OBJECT_CONVERT_INT_RAW
DESCRIBE TABLE content_bin LINES INLEN.
CALL FUNCTION 'SX_OBJECT_CONVERT_ALI_RAW'
EXPORTING
FORMAT_SRC = SOURCE_NAME
FORMAT_DST = OUT_NAME
ADDR_TYPE = 'FAX' " int or fax
DEVTYPE = DEVTYPE
FUNCPARA = 255 " this is used to prevent wrapping if beyond 132 characters
CHANGING
TRANSFER_BIN = TRANSFER_BIN
CONTENT_TXT = content_txt " returns the data we want to address and work with
CONTENT_BIN = content_bin" data is conpressed and in binnary format
OBJHEAD = OBJHEAD
LEN = OUTLEN
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2
.
move content_txt[] to OBJTXT[]. " in my case the program origianly used OBJTXT
" so i chose to compy the data back here
.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |