Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

convert solix_tab to RAW 1022

hi,

I am converting smartfrom otf to binary using SX_OBJECT_CONVERT_OTF_PDF. the data type of content_bin is SOLIX_TAB, which is RAW (255). I want to convert this into SDOK_SDATX which is RAW (1022). I have used below code to do that, But I am getting dump in FM  SX_TABLE_LINE_WIDTH_CHANGE  'Invalid partial field access: Length is too large'. Am i Missing something? is there a better way to do this?



Dump text:


In the executed program "SAPLSX03", the system attempted to access the field

"CONTENT_IN" of the type "u" and with the length 127 using the length 255.

However, a partial field access with a length specification that is

larger than the field length is not allowed.

   CALL FUNCTION lv_fm_name

     EXPORTING

       control_parameters = lt_control_parameters

       output_options     = lt_output_options

       it_approval_data   = lt_approval_data

     IMPORTING

       job_output_info    = lt_job_output_info

     EXCEPTIONS

       formatting_error   = 1

       internal_error     = 2

       send_error         = 3

       user_canceled      = 4

       OTHERS             = 5.

   .

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.

*

   CLEAR: lt_otf[], lt_content_hex, lt_content_txt.

   lt_otf[] = lt_job_output_info-otfdata[].

   LOOP AT lt_otf  INTO  ls_otf.

     CLEAR ls_content.

     CONCATENATE ls_otf-tdprintcom ls_otf-tdprintpar   INTO ls_content.

     APPEND ls_content TO lt_content_txt.

   ENDLOOP.

   CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'

     EXPORTING

       format_src      = 'OTF'

       format_dst      = 'PDF'

     CHANGING

       transfer_bin    = lv_transfer_bin

       content_txt     = lt_content_txt

       content_bin     = lt_content_hex

       objhead         = lt_objhead

       len             = lv_len

     EXCEPTIONS

       err_conv_failed = 1

       OTHERS          = 2.

   DATA: lt_content_new TYPE bbpt_att_cont.

   CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'

     EXPORTING

       transfer_bin                = 'X'

     TABLES

       content_in                  = lt_content_hex

       content_out                 = lt_content_new

     EXCEPTIONS

       err_line_width_src_too_long = 1

       err_line_width_dst_too_long = 2

       err_conv_failed             = 3

       OTHERS                      = 4.

replied

Hi,

I am on release 740 .

Based on @SRIHARSHA kasukurthi response Re: convert solix_tab to RAW 1022 I looked at CL_BCS_CONVERT .

I can see that there is a method SOLIX_TO_XTAB .

Try it if you can....

I did not test this.

Regards.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question